From fa8b272639f3ccc01fccb272fab68c16eaa11c95 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 16 Dec 2019 17:54:37 +0100 Subject: Update examples --- examples/web/core/core_drop_files.html | 330 +- examples/web/core/core_drop_files.js | 10455 +- examples/web/core/core_drop_files.wasm | Bin 115512 -> 232800 bytes examples/web/core/core_drop_files.wasm.map | 1 + examples/web/core/core_drop_files.wast | 148111 +++++++++++++++++++++ examples/web/core/core_loading_thread.html | 469 +- examples/web/core/core_loading_thread.html.mem | Bin 18958 -> 19505 bytes examples/web/core/core_loading_thread.js | 11714 +- examples/web/core/core_loading_thread.wasm | Bin 139107 -> 143217 bytes examples/web/core/core_loading_thread.wasm.map | 1 + examples/web/core/core_loading_thread.wast | 79336 +++++++++++ examples/web/core/core_loading_thread.worker.js | 50 +- examples/web/textures/textures_image_text.html | 330 +- examples/web/textures/textures_image_text.js | 10643 +- examples/web/textures/textures_image_text.wasm | Bin 170003 -> 345982 bytes examples/web/textures/textures_to_image.html | 330 +- examples/web/textures/textures_to_image.js | 10699 +- examples/web/textures/textures_to_image.wasm | Bin 142464 -> 283402 bytes 18 files changed, 272446 insertions(+), 23 deletions(-) create mode 100644 examples/web/core/core_drop_files.wasm.map create mode 100644 examples/web/core/core_drop_files.wast create mode 100644 examples/web/core/core_loading_thread.wasm.map create mode 100644 examples/web/core/core_loading_thread.wast (limited to 'examples') diff --git a/examples/web/core/core_drop_files.html b/examples/web/core/core_drop_files.html index 90c1da2..866203d 100644 --- a/examples/web/core/core_drop_files.html +++ b/examples/web/core/core_drop_files.html @@ -1 +1,329 @@ -raylib HTML5 GAME
Downloading...
\ No newline at end of file + + + + + + + raylib HTML5 GAME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/examples/web/core/core_drop_files.js b/examples/web/core/core_drop_files.js index d4793bf..a6e67bf 100644 --- a/examples/web/core/core_drop_files.js +++ b/examples/web/core/core_drop_files.js @@ -1 +1,10454 @@ -var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}else{return scriptDirectory+path}}if(ENVIRONMENT_IS_NODE){scriptDirectory=__dirname+"/";var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{return 0}return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);if(typeof WebAssembly!=="object"){err("no native wasm support detected")}var wasmMemory;var wasmTable;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_NORMAL=0;var ALLOC_NONE=3;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,stackAlloc,dynamicAlloc][allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var WASM_PAGE_SIZE=65536;var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var DYNAMIC_BASE=5269504,DYNAMICTOP_PTR=26592;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="core_drop_files.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":320,"maximum":320,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);return exports};function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ___lock(){}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)},resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(1)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=function(e){done(this.error);e.preventDefault()};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var NODEFS={isWindows:false,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process["binding"]("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"]}},bufferFrom:function(arrayBuffer){return Buffer.alloc?Buffer.from(arrayBuffer):new Buffer(arrayBuffer)},mount:function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(22)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return stat.mode},realPath:function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:function(flags){flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(!flags){return newFlags}else{throw new FS.ErrnoError(22)}},node_ops:{getattr:function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},lookup:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return node},rename:function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},unlink:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},rmdir:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readdir:function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},symlink:function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readlink:function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}}},stream_ops:{open:function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},close:function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},read:function(stream,buffer,offset,length,position){if(length===0)return 0;try{return fs.readSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},write:function(stream,buffer,offset,length,position){try{return fs.writeSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(-e.errno)}}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(5)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(40)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(40)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 13}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 13}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 13}return 0},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return 13;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 17}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return 20}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 16}}else{if(FS.isDir(node.mode)){return 21}}return 0},mayOpen:function(node,flags){if(!node){return 2}if(FS.isLink(node.mode)){return 40}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 21}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(24)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(29)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(16)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(16)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(20)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(22)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(22)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(1)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},getStreamFromFD:function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream},getSocketFromFD:function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket},getSocketAddress:function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();if(!(offset_high==-1&&offset_low<0)&&!(offset_high==0&&offset_low>=0)){return-ERRNO_CODES.EOVERFLOW}var offset=offset_low;FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[result>>2]=tempI64[0],HEAP32[result+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-ERRNO_CODES.EINVAL}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:{return-ERRNO_CODES.EINVAL}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21509:case 21505:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21519:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return-ERRNO_CODES.EINVAL}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21524:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___unlock(){}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";Module["readAsync"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){return _emscripten_GetProcAddress(name_)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i0||window.pageYOffset>0){return[window.pageXOffset,window.pageYOffset]}if(typeof document.documentElement.scrollLeft!=="undefined"||typeof document.documentElement.scrollTop!=="undefined"){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}return[document.body.scrollLeft|0,document.body.scrollTop|0]},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},tick:function(){if(window["performance"]&&window["performance"]["now"])return window["performance"]["now"]();else return Date.now()},fullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}};function __requestPointerLock(target){if(target.requestPointerLock){target.requestPointerLock()}else if(target.mozRequestPointerLock){target.mozRequestPointerLock()}else if(target.webkitRequestPointerLock){target.webkitRequestPointerLock()}else if(target.msRequestPointerLock){target.msRequestPointerLock()}else{if(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock){return-3}else{return-1}}return 0}function _emscripten_exit_pointerlock(){JSEvents.removeDeferredCalls(__requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else if(document.msExitPointerLock){document.msExitPointerLock()}else if(document.mozExitPointerLock){document.mozExitPointerLock()}else if(document.webkitExitPointerLock){document.webkitExitPointerLock()}else{return-1}return 0}function __fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;__fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_num_gamepads(){return JSEvents.lastGamepadState.length}function __fillPointerlockChangeEventData(eventStruct,e){var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP32[eventStruct>>2]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement&&pointerLockElement.id?pointerLockElement.id:"";stringToUTF8(nodeName,eventStruct+4,128);stringToUTF8(id,eventStruct+132,128)}function _emscripten_get_pointerlock_status(pointerlockStatus){if(pointerlockStatus)__fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");if(instancedArraysExt){GLctx["vertexAttribDivisor"]=function(index,divisor){instancedArraysExt["vertexAttribDivisorANGLE"](index,divisor)};GLctx["drawArraysInstanced"]=function(mode,first,count,primcount){instancedArraysExt["drawArraysInstancedANGLE"](mode,first,count,primcount)};GLctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){instancedArraysExt["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension("OES_vertex_array_object");if(vaoExt){GLctx["createVertexArray"]=function(){return vaoExt["createVertexArrayOES"]()};GLctx["deleteVertexArray"]=function(vao){vaoExt["deleteVertexArrayOES"](vao)};GLctx["bindVertexArray"]=function(vao){vaoExt["bindVertexArrayOES"](vao)};GLctx["isVertexArray"]=function(vao){return vaoExt["isVertexArrayOES"](vao)}}var drawBuffersExt=GLctx.getExtension("WEBGL_draw_buffers");if(drawBuffersExt){GLctx["drawBuffers"]=function(n,bufs){drawBuffersExt["drawBuffersWEBGL"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=="Integer"&&type!=="Integer64"){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case"Float":HEAPF32[p+i*4>>2]=result[i];break;case"Boolean":HEAP8[p+i>>0]=result[i]?1:0;break;default:throw"internal glGet error, bad type: "+type}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);return}}switch(type){case"Integer64":tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[p>>2]=tempI64[0],HEAP32[p+4>>2]=tempI64[1];break;case"Integer":HEAP32[p>>2]=ret;break;case"Float":HEAPF32[p>>2]=ret;break;case"Boolean":HEAP8[p>>0]=ret?1:0;break;default:throw"internal glGet error, bad type: "+type}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,"Boolean")}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){if(GL.lastError){var error=GL.lastError;GL.lastError=0;return error}else{return GLctx.getError()}}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,"Integer")}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;if(bufSize>0&&source){var numBytesWrittenExclNull=stringToUTF8(result,source,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Float")}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Integer")}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case"Integer":HEAP32[params>>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;case"FloatToInteger":HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;case"FloatToInteger":HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"Float")}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"FloatToInteger")}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4};var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var sizePerPixel=__colorChannelsInGlTextureFormat[format]*__sizeOfGlTextureElementType[type];if(!sizePerPixel){GL.recordError(1280);return}var bytes=__computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);var end=pixels+bytes;switch(type){case 5121:return HEAPU8.subarray(pixels,end);case 5126:return HEAPF32.subarray(pixels>>2,end>>2);case 5125:case 34042:return HEAPU32.subarray(pixels>>2,end>>2);case 5123:case 33635:case 32819:case 32820:case 36193:return HEAPU16.subarray(pixels>>1,end>>1);default:GL.recordError(1280)}}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){GLctx.uniform3iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*12>>2))}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){GLctx.uniform4iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*16>>2))}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var __specialEventTargets=[0,typeof document!=="undefined"?document:0,typeof window!=="undefined"?window:0];function __findEventTarget(target){try{if(!target)return window;if(typeof target==="number")target=__specialEventTargets[target]||UTF8ToString(target);if(target==="#window")return window;else if(target==="#document")return document;else if(target==="#screen")return screen;else if(target==="#canvas")return Module["canvas"];return typeof target==="string"?document.getElementById(target):target}catch(e){return null}}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.mozRequestPointerLock&&!target.webkitRequestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(__requestPointerLock,2,[target]);return 1}else{return-2}}return __requestPointerLock(target)}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){abortOnCannotGrowMemory(requestedSize)}function _emscripten_run_script(ptr){eval(UTF8ToString(ptr))}function _emscripten_sample_gamepad_data(){return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function __fillMouseEventData(eventStruct,e,target){HEAPF64[eventStruct>>3]=JSEvents.tick();HEAP32[eventStruct+8>>2]=e.screenX;HEAP32[eventStruct+12>>2]=e.screenY;HEAP32[eventStruct+16>>2]=e.clientX;HEAP32[eventStruct+20>>2]=e.clientY;HEAP32[eventStruct+24>>2]=e.ctrlKey;HEAP32[eventStruct+28>>2]=e.shiftKey;HEAP32[eventStruct+32>>2]=e.altKey;HEAP32[eventStruct+36>>2]=e.metaKey;HEAP16[eventStruct+40>>1]=e.button;HEAP16[eventStruct+42>>1]=e.buttons;HEAP32[eventStruct+44>>2]=e["movementX"]||e["mozMovementX"]||e["webkitMovementX"]||e.screenX-JSEvents.previousScreenX;HEAP32[eventStruct+48>>2]=e["movementY"]||e["mozMovementY"]||e["webkitMovementY"]||e.screenY-JSEvents.previousScreenY;if(Module["canvas"]){var rect=Module["canvas"].getBoundingClientRect();HEAP32[eventStruct+60>>2]=e.clientX-rect.left;HEAP32[eventStruct+64>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+60>>2]=0;HEAP32[eventStruct+64>>2]=0}if(target){var rect=JSEvents.getBoundingClientRectOrZeros(target);HEAP32[eventStruct+52>>2]=e.clientX-rect.left;HEAP32[eventStruct+56>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+52>>2]=0;HEAP32[eventStruct+56>>2]=0}if(e.type!=="wheel"&&e.type!=="mousewheel"){JSEvents.previousScreenX=e.screenX;JSEvents.previousScreenY=e.screenY}}function __registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(72);target=__findEventTarget(target);var mouseEventHandlerFunc=function(event){var e=event||window.event;__fillMouseEventData(JSEvents.mouseEvent,e,target);if(dynCall_iiii(callbackfunc,eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};if(JSEvents.isInternetExplorer()&&eventTypeString=="mousedown")eventHandler.allowsDeferredCalls=false;JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread);return 0}function __fillFullscreenChangeEventData(eventStruct,e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function __registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.fullscreenChangeEvent)JSEvents.fullscreenChangeEvent=_malloc(280);var fullscreenChangeEventhandlerFunc=function(event){var e=event||window.event;var fullscreenChangeEvent=JSEvents.fullscreenChangeEvent;__fillFullscreenChangeEventData(fullscreenChangeEvent,e);if(dynCall_iiii(callbackfunc,eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:false,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(typeof JSEvents.fullscreenEnabled()==="undefined")return-1;target=target?__findEventTarget(target):__specialEventTargets[1];if(!target)return-4;__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"mozfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"msfullscreenchange",targetThread);return 0}function __registerGamepadEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.gamepadEvent)JSEvents.gamepadEvent=_malloc(1432);var gamepadEventHandlerFunc=function(event){var e=event||window.event;var gamepadEvent=JSEvents.gamepadEvent;__fillGamepadEventData(gamepadEvent,e.gamepad);if(dynCall_iiii(callbackfunc,eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread);return 0}function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread);return 0}function __registerKeyEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.keyEvent)JSEvents.keyEvent=_malloc(164);var keyEventHandlerFunc=function(event){var e=event||window.event;var keyEventData=JSEvents.keyEvent;stringToUTF8(e.key?e.key:"",keyEventData+0,32);stringToUTF8(e.code?e.code:"",keyEventData+32,32);HEAP32[keyEventData+64>>2]=e.location;HEAP32[keyEventData+68>>2]=e.ctrlKey;HEAP32[keyEventData+72>>2]=e.shiftKey;HEAP32[keyEventData+76>>2]=e.altKey;HEAP32[keyEventData+80>>2]=e.metaKey;HEAP32[keyEventData+84>>2]=e.repeat;stringToUTF8(e.locale?e.locale:"",keyEventData+88,32);stringToUTF8(e.char?e.char:"",keyEventData+120,32);HEAP32[keyEventData+152>>2]=e.charCode;HEAP32[keyEventData+156>>2]=e.keyCode;HEAP32[keyEventData+160>>2]=e.which;if(dynCall_iiii(callbackfunc,eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:JSEvents.isInternetExplorer()?false:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function __registerTouchEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.touchEvent)JSEvents.touchEvent=_malloc(1684);target=__findEventTarget(target);var touchEventHandlerFunc=function(event){var e=event||window.event;var touches={};for(var i=0;i>2]=e.ctrlKey;HEAP32[ptr+8>>2]=e.shiftKey;HEAP32[ptr+12>>2]=e.altKey;HEAP32[ptr+16>>2]=e.metaKey;ptr+=20;var canvasRect=Module["canvas"]?Module["canvas"].getBoundingClientRect():undefined;var targetRect=JSEvents.getBoundingClientRectOrZeros(target);var numTouches=0;for(var i in touches){var t=touches[i];HEAP32[ptr>>2]=t.identifier;HEAP32[ptr+4>>2]=t.screenX;HEAP32[ptr+8>>2]=t.screenY;HEAP32[ptr+12>>2]=t.clientX;HEAP32[ptr+16>>2]=t.clientY;HEAP32[ptr+20>>2]=t.pageX;HEAP32[ptr+24>>2]=t.pageY;HEAP32[ptr+28>>2]=t.changed;HEAP32[ptr+32>>2]=t.onTarget;if(canvasRect){HEAP32[ptr+44>>2]=t.clientX-canvasRect.left;HEAP32[ptr+48>>2]=t.clientY-canvasRect.top}else{HEAP32[ptr+44>>2]=0;HEAP32[ptr+48>>2]=0}HEAP32[ptr+36>>2]=t.clientX-targetRect.left;HEAP32[ptr+40>>2]=t.clientY-targetRect.top;ptr+=52;if(++numTouches>=32){break}}HEAP32[touchEvent>>2]=numTouches;if(dynCall_iiii(callbackfunc,eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread);return 0}function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread);return 0}function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread);return 0}function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread);return 0}function _exit(status){exit(status)}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i=0&&arrayIndex>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GLFW={Window:function(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.framebufferSizeFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.dropFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null},WindowFromId:function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 94;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:function(win){var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:function(event){if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;dynCall_vii(GLFW.active.charFunc,GLFW.active.id,charCode)},onKeyChanged:function(keyCode,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(!GLFW.active.keyFunc)return;if(repeat)status=2;dynCall_viiiii(GLFW.active.keyFunc,GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))},onGamepadConnected:function(event){GLFW.refreshJoysticks()},onGamepadDisconnected:function(event){GLFW.refreshJoysticks()},onKeydown:function(event){GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:function(event){GLFW.onKeyChanged(event.keyCode,0)},onBlur:function(event){if(!GLFW.active)return;for(var i=0;i0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,1)},onMouseleave:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,0)},onMouseButtonChanged:function(event,status){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=0;if(event.type=="mousewheel"){sx=event.wheelDeltaX;sy=event.wheelDeltaY}else{sx=event.deltaX;sy=event.deltaY}dynCall_vidd(GLFW.active.scrollFunc,GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:function(width,height){if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.windowSizeFunc)return;dynCall_viii(GLFW.active.windowSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},onFramebufferSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.framebufferSizeFunc)return;dynCall_viii(GLFW.active.framebufferSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},requestFullscreen:function(){var RFS=Module["canvas"]["requestFullscreen"]||Module["canvas"]["mozRequestFullScreen"]||Module["canvas"]["webkitRequestFullScreen"]||function(){};RFS.apply(Module["canvas"],[])},requestFullScreen:function(){err("GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.");GLFW.requestFullScreen=function(){return GLFW.requestFullscreen()};return GLFW.requestFullscreen()},exitFullscreen:function(){Browser.exitFullscreen()},cancelFullScreen:function(){err("GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.");GLFW.cancelFullScreen=function(){return GLFW.exitFullscreen()};return GLFW.exitFullscreen()},getTime:function(){return _emscripten_get_now()/1e3},setWindowTitle:function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=UTF8ToString(title);if(GLFW.active.id==win.id){document.title=win.title}},setJoystickCallback:function(cbfun){GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks()},joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function(){if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:null;GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joy0},getCursorPos:function(winid,x,y){setValue(x,Browser.mouseX,"double");setValue(y,Browser.mouseY,"double")},getMousePos:function(winid,x,y){setValue(x,Browser.mouseX,"i32");setValue(y,Browser.mouseY,"i32")},setCursorPos:function(winid,x,y){},getWindowPos:function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}setValue(x,wx,"i32");setValue(y,wy,"i32")},setWindowPos:function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}setValue(width,ww,"i32");setValue(height,wh,"i32")},setWindowSize:function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){GLFW.requestFullscreen()}else{GLFW.exitFullscreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(!win.windowSizeFunc)return;dynCall_viii(win.windowSizeFunc,win.id,width,height)},createWindow:function(width,height,title,monitor,share){var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){GLFW.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}if(!Module.ctx)return 0;var win=new GLFW.Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc)dynCall_vi(win.windowCloseFunc,win.id);GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i>2];var nanoseconds=HEAP32[rqtp+4>>2];if(rmtp!==0){HEAP32[rmtp>>2]=0;HEAP32[rmtp+4>>2]=0}return _usleep(seconds*1e6+nanoseconds/1e3)}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}FS.staticInit();Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function _emscripten_get_now_actual(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmGlobalArg={};var asmLibraryArg={"c":abort,"b":___assert_fail,"kc":___lock,"z":___setErrNo,"Za":___syscall140,"Oa":___syscall145,"y":___syscall146,"l":___syscall221,"ja":___syscall5,"x":___syscall54,"Q":___syscall6,"w":___unlock,"v":_eglGetProcAddress,"P":_emscripten_exit_pointerlock,"qd":_emscripten_get_gamepad_status,"fd":_emscripten_get_heap_size,"Wc":_emscripten_get_num_gamepads,"O":_emscripten_get_pointerlock_status,"Bc":_emscripten_glActiveTexture,"rc":_emscripten_glAttachShader,"jc":_emscripten_glBeginQueryEXT,"cc":_emscripten_glBindAttribLocation,"Zb":_emscripten_glBindBuffer,"Tb":_emscripten_glBindFramebuffer,"Mb":_emscripten_glBindRenderbuffer,"Db":_emscripten_glBindTexture,"tb":_emscripten_glBindVertexArrayOES,"mb":_emscripten_glBlendColor,"jb":_emscripten_glBlendEquation,"ib":_emscripten_glBlendEquationSeparate,"hb":_emscripten_glBlendFunc,"gb":_emscripten_glBlendFuncSeparate,"fb":_emscripten_glBufferData,"eb":_emscripten_glBufferSubData,"db":_emscripten_glCheckFramebufferStatus,"cb":_emscripten_glClear,"bb":_emscripten_glClearColor,"ab":_emscripten_glClearDepthf,"$a":_emscripten_glClearStencil,"_a":_emscripten_glColorMask,"Ya":_emscripten_glCompileShader,"Xa":_emscripten_glCompressedTexImage2D,"Wa":_emscripten_glCompressedTexSubImage2D,"Va":_emscripten_glCopyTexImage2D,"Ua":_emscripten_glCopyTexSubImage2D,"Ta":_emscripten_glCreateProgram,"Sa":_emscripten_glCreateShader,"Ra":_emscripten_glCullFace,"Qa":_emscripten_glDeleteBuffers,"Pa":_emscripten_glDeleteFramebuffers,"Na":_emscripten_glDeleteProgram,"Ma":_emscripten_glDeleteQueriesEXT,"La":_emscripten_glDeleteRenderbuffers,"Ka":_emscripten_glDeleteShader,"Ja":_emscripten_glDeleteTextures,"Ia":_emscripten_glDeleteVertexArraysOES,"Ha":_emscripten_glDepthFunc,"Ga":_emscripten_glDepthMask,"Fa":_emscripten_glDepthRangef,"Ea":_emscripten_glDetachShader,"Da":_emscripten_glDisable,"Ca":_emscripten_glDisableVertexAttribArray,"Ba":_emscripten_glDrawArrays,"Aa":_emscripten_glDrawArraysInstancedANGLE,"za":_emscripten_glDrawBuffersWEBGL,"ya":_emscripten_glDrawElements,"xa":_emscripten_glDrawElementsInstancedANGLE,"wa":_emscripten_glEnable,"va":_emscripten_glEnableVertexAttribArray,"ua":_emscripten_glEndQueryEXT,"ta":_emscripten_glFinish,"sa":_emscripten_glFlush,"ra":_emscripten_glFramebufferRenderbuffer,"qa":_emscripten_glFramebufferTexture2D,"pa":_emscripten_glFrontFace,"oa":_emscripten_glGenBuffers,"na":_emscripten_glGenFramebuffers,"ma":_emscripten_glGenQueriesEXT,"la":_emscripten_glGenRenderbuffers,"ka":_emscripten_glGenTextures,"ia":_emscripten_glGenVertexArraysOES,"ha":_emscripten_glGenerateMipmap,"ga":_emscripten_glGetActiveAttrib,"fa":_emscripten_glGetActiveUniform,"ea":_emscripten_glGetAttachedShaders,"da":_emscripten_glGetAttribLocation,"ca":_emscripten_glGetBooleanv,"ba":_emscripten_glGetBufferParameteriv,"aa":_emscripten_glGetError,"$":_emscripten_glGetFloatv,"_":_emscripten_glGetFramebufferAttachmentParameteriv,"Z":_emscripten_glGetIntegerv,"Y":_emscripten_glGetProgramInfoLog,"X":_emscripten_glGetProgramiv,"W":_emscripten_glGetQueryObjecti64vEXT,"V":_emscripten_glGetQueryObjectivEXT,"U":_emscripten_glGetQueryObjectui64vEXT,"T":_emscripten_glGetQueryObjectuivEXT,"S":_emscripten_glGetQueryivEXT,"R":_emscripten_glGetRenderbufferParameteriv,"ce":_emscripten_glGetShaderInfoLog,"be":_emscripten_glGetShaderPrecisionFormat,"ae":_emscripten_glGetShaderSource,"$d":_emscripten_glGetShaderiv,"_d":_emscripten_glGetString,"Zd":_emscripten_glGetTexParameterfv,"Yd":_emscripten_glGetTexParameteriv,"Xd":_emscripten_glGetUniformLocation,"Wd":_emscripten_glGetUniformfv,"Vd":_emscripten_glGetUniformiv,"Ud":_emscripten_glGetVertexAttribPointerv,"Td":_emscripten_glGetVertexAttribfv,"Sd":_emscripten_glGetVertexAttribiv,"Rd":_emscripten_glHint,"Qd":_emscripten_glIsBuffer,"Pd":_emscripten_glIsEnabled,"Od":_emscripten_glIsFramebuffer,"Nd":_emscripten_glIsProgram,"Md":_emscripten_glIsQueryEXT,"Ld":_emscripten_glIsRenderbuffer,"Kd":_emscripten_glIsShader,"Jd":_emscripten_glIsTexture,"Id":_emscripten_glIsVertexArrayOES,"Hd":_emscripten_glLineWidth,"Gd":_emscripten_glLinkProgram,"Fd":_emscripten_glPixelStorei,"Ed":_emscripten_glPolygonOffset,"Dd":_emscripten_glQueryCounterEXT,"Cd":_emscripten_glReadPixels,"Bd":_emscripten_glReleaseShaderCompiler,"Ad":_emscripten_glRenderbufferStorage,"zd":_emscripten_glSampleCoverage,"yd":_emscripten_glScissor,"xd":_emscripten_glShaderBinary,"wd":_emscripten_glShaderSource,"vd":_emscripten_glStencilFunc,"ud":_emscripten_glStencilFuncSeparate,"td":_emscripten_glStencilMask,"sd":_emscripten_glStencilMaskSeparate,"rd":_emscripten_glStencilOp,"pd":_emscripten_glStencilOpSeparate,"od":_emscripten_glTexImage2D,"nd":_emscripten_glTexParameterf,"md":_emscripten_glTexParameterfv,"ld":_emscripten_glTexParameteri,"kd":_emscripten_glTexParameteriv,"jd":_emscripten_glTexSubImage2D,"id":_emscripten_glUniform1f,"hd":_emscripten_glUniform1fv,"gd":_emscripten_glUniform1i,"ed":_emscripten_glUniform1iv,"dd":_emscripten_glUniform2f,"cd":_emscripten_glUniform2fv,"bd":_emscripten_glUniform2i,"ad":_emscripten_glUniform2iv,"$c":_emscripten_glUniform3f,"_c":_emscripten_glUniform3fv,"Zc":_emscripten_glUniform3i,"Yc":_emscripten_glUniform3iv,"Xc":_emscripten_glUniform4f,"Vc":_emscripten_glUniform4fv,"Uc":_emscripten_glUniform4i,"Tc":_emscripten_glUniform4iv,"Sc":_emscripten_glUniformMatrix2fv,"Rc":_emscripten_glUniformMatrix3fv,"Qc":_emscripten_glUniformMatrix4fv,"Pc":_emscripten_glUseProgram,"Oc":_emscripten_glValidateProgram,"Nc":_emscripten_glVertexAttrib1f,"Mc":_emscripten_glVertexAttrib1fv,"Lc":_emscripten_glVertexAttrib2f,"Kc":_emscripten_glVertexAttrib2fv,"Jc":_emscripten_glVertexAttrib3f,"Ic":_emscripten_glVertexAttrib3fv,"Hc":_emscripten_glVertexAttrib4f,"Gc":_emscripten_glVertexAttrib4fv,"Fc":_emscripten_glVertexAttribDivisorANGLE,"Ec":_emscripten_glVertexAttribPointer,"Dc":_emscripten_glViewport,"Cc":_emscripten_memcpy_big,"Ac":_emscripten_request_pointerlock,"zc":_emscripten_resize_heap,"N":_emscripten_run_script,"yc":_emscripten_sample_gamepad_data,"xc":_emscripten_set_click_callback_on_thread,"wc":_emscripten_set_fullscreenchange_callback_on_thread,"vc":_emscripten_set_gamepadconnected_callback_on_thread,"uc":_emscripten_set_gamepaddisconnected_callback_on_thread,"tc":_emscripten_set_keypress_callback_on_thread,"sc":_emscripten_set_main_loop,"qc":_emscripten_set_touchcancel_callback_on_thread,"pc":_emscripten_set_touchend_callback_on_thread,"oc":_emscripten_set_touchmove_callback_on_thread,"nc":_emscripten_set_touchstart_callback_on_thread,"mc":_exit,"lc":_glActiveTexture,"M":_glAttachShader,"i":_glBindAttribLocation,"d":_glBindBuffer,"k":_glBindTexture,"ic":_glBlendFunc,"q":_glBufferData,"u":_glBufferSubData,"L":_glClear,"K":_glClearColor,"hc":_glClearDepthf,"gc":_glCompileShader,"fc":_glCompressedTexImage2D,"ec":_glCreateProgram,"dc":_glCreateShader,"bc":_glCullFace,"p":_glDeleteBuffers,"J":_glDeleteProgram,"I":_glDeleteShader,"H":_glDeleteTextures,"ac":_glDepthFunc,"G":_glDetachShader,"$b":_glDisable,"o":_glDisableVertexAttribArray,"_b":_glDrawArrays,"Yb":_glDrawElements,"F":_glEnable,"h":_glEnableVertexAttribArray,"Xb":_glFrontFace,"n":_glGenBuffers,"Wb":_glGenTextures,"t":_glGetAttribLocation,"Vb":_glGetFloatv,"Ub":_glGetProgramInfoLog,"E":_glGetProgramiv,"Sb":_glGetShaderInfoLog,"D":_glGetShaderiv,"j":_glGetString,"s":_glGetUniformLocation,"Rb":_glLinkProgram,"Qb":_glPixelStorei,"Pb":_glReadPixels,"Ob":_glShaderSource,"Nb":_glTexImage2D,"g":_glTexParameteri,"Lb":_glUniform1i,"Kb":_glUniform4f,"Jb":_glUniformMatrix4fv,"r":_glUseProgram,"f":_glVertexAttribPointer,"Ib":_glViewport,"Hb":_glfwCreateWindow,"Gb":_glfwDefaultWindowHints,"Fb":_glfwDestroyWindow,"Eb":_glfwGetCursorPos,"m":_glfwGetTime,"Cb":_glfwInit,"Bb":_glfwMakeContextCurrent,"Ab":_glfwSetCharCallback,"zb":_glfwSetCursorEnterCallback,"yb":_glfwSetCursorPosCallback,"xb":_glfwSetDropCallback,"wb":_glfwSetErrorCallback,"vb":_glfwSetKeyCallback,"ub":_glfwSetMouseButtonCallback,"sb":_glfwSetScrollCallback,"rb":_glfwSetWindowIconifyCallback,"qb":_glfwSetWindowShouldClose,"pb":_glfwSetWindowSizeCallback,"ob":_glfwSwapBuffers,"C":_glfwTerminate,"e":_glfwWindowHint,"B":_llvm_stackrestore,"A":_llvm_stacksave,"nb":_nanosleep,"lb":_time,"kb":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);Module["asm"]=asm;var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["de"].apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){return Module["asm"]["ee"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["fe"].apply(null,arguments)};var _ma_device_process_pcm_frames_capture__webaudio=Module["_ma_device_process_pcm_frames_capture__webaudio"]=function(){return Module["asm"]["ge"].apply(null,arguments)};var _ma_device_process_pcm_frames_playback__webaudio=Module["_ma_device_process_pcm_frames_playback__webaudio"]=function(){return Module["asm"]["he"].apply(null,arguments)};var _main=Module["_main"]=function(){return Module["asm"]["ie"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["je"].apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return Module["asm"]["se"].apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return Module["asm"]["te"].apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return Module["asm"]["ue"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["ke"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["le"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["me"].apply(null,arguments)};var dynCall_vidd=Module["dynCall_vidd"]=function(){return Module["asm"]["ne"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["oe"].apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){return Module["asm"]["pe"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["qe"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return Module["asm"]["re"].apply(null,arguments)};Module["asm"]=asm;Module["getMemory"]=getMemory;Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(Module["thisProgram"]);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);Module["quit"](1,e)}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status)}Module["quit"](status,new ExitStatus(status))}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}Module["noExitRuntime"]=true;run(); +// Copyright 2010 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_HAS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// A web environment like Electron.js can have Node enabled, so we must +// distinguish between Node-enabled environments and Node environments per se. +// This will allow the former to do things like mount NODEFS. +// Extended check using process.versions fixes issue #8816. +// (Also makes redundant the original check that 'require' is a function.) +ENVIRONMENT_HAS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); +} + + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + + + + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +if (ENVIRONMENT_IS_NODE) { + scriptDirectory = __dirname + '/'; + + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + read_ = function shell_read(filename, binary) { + var ret; + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + return binary ? ret : ret.toString(); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + process['on']('unhandledRejection', abort); + + quit_ = function(status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} else +if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function(status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = {}; + console.log = print; + console.warn = console.error = typeof printErr !== 'undefined' ? printErr : print; + } +} else +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + + read_ = function shell_read(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + setWindowTitle = function(title) { document.title = title }; +} else +{ + throw new Error('environment detection error'); +} + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { get: function() { abort('Module.arguments has been replaced with plain arguments_') } }); +if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { get: function() { abort('Module.thisProgram has been replaced with plain thisProgram') } }); +if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { get: function() { abort('Module.quit has been replaced with plain quit_') } }); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { get: function() { abort('Module.read has been replaced with plain read_') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { get: function() { abort('Module.readAsync has been replaced with plain readAsync') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { get: function() { abort('Module.readBinary has been replaced with plain readBinary') } }); +// TODO: add when SDL2 is fixed if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } }); + + +// TODO remove when SDL2 is fixed (also see above) + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)'); +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + if (end > _emscripten_get_heap_size()) { + abort('failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly'); + } + HEAP32[DYNAMICTOP_PTR>>2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + "debugger": function() { + debugger; + } +}; + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// Wraps a JS function as a wasm function with a given signature. +// In the future, we may get a WebAssembly.Function constructor. Until then, +// we create a wasm module that takes the JS function as an import with a given +// signature, and re-exports that as a wasm function. +function convertJsFunctionToWasm(func, sig) { + + // The module is static, with the exception of the type section, which is + // generated based on the signature passed in. + var typeSection = [ + 0x01, // id: section, + 0x00, // length: 0 (placeholder) + 0x01, // count: 1 + 0x60, // form: func + ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + 'i': 0x7f, // i32 + 'j': 0x7e, // i64 + 'f': 0x7d, // f32 + 'd': 0x7c, // f64 + }; + + // Parameters, length + signatures + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + + // Return values, length + signatures + // With no multi-return in MVP, either 0 (void) or 1 (anything else) + if (sigRet == 'v') { + typeSection.push(0x00); + } else { + typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); + } + + // Write the overall length of the type section back into the section header + // (excepting the 2 bytes for the section id and length) + typeSection[1] = typeSection.length - 2; + + // Rest of the module is static + var bytes = new Uint8Array([ + 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") + 0x01, 0x00, 0x00, 0x00, // version: 1 + ].concat(typeSection, [ + 0x02, 0x07, // import section + // (import "e" "f" (func 0 (type 0))) + 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, + 0x07, 0x05, // export section + // (export "f" (func 0 (type 0))) + 0x01, 0x01, 0x66, 0x00, 0x00, + ])); + + // We can compile this wasm module synchronously because it is very small. + // This accepts an import (at "e.f"), that it reroutes to an export (at "f") + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + e: { + f: func + } + }); + var wrappedFunc = instance.exports.f; + return wrappedFunc; +} + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + var ret = table.length; + + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!err instanceof RangeError) { + throw err; + } + throw 'Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.'; + } + + // Insert new element + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!err instanceof TypeError) { + throw err; + } + assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + return ret; +} + +function removeFunctionWasm(index) { + // TODO(sbc): Look into implementing this to allow re-using of table slots +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + assert(typeof func !== 'undefined'); + + + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; + +} + +function removeFunction(index) { + + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary') } }); +var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } }); + + +if (typeof WebAssembly !== 'object') { + abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.'); +} + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + +// Wasm globals + +var wasmMemory; + +// Potentially used for direct table calls. +var wasmTable; + + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) + while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var str = ''; + // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = u8Array[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + + +var STATIC_BASE = 1024, + STACK_BASE = 31184, + STACKTOP = STACK_BASE, + STACK_MAX = 5274064, + DYNAMIC_BASE = 5274064, + DYNAMICTOP_PTR = 31152; + +assert(STACK_BASE % 16 === 0, 'stack must start aligned'); +assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned'); + + + +var TOTAL_STACK = 5242880; +if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') + +var INITIAL_TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 67108864;if (!Object.getOwnPropertyDescriptor(Module, 'TOTAL_MEMORY')) Object.defineProperty(Module, 'TOTAL_MEMORY', { get: function() { abort('Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY') } }); + +assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, 'TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + + + + + + if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; + } else + { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + }); + } + + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['TOTAL_MEMORY']. +INITIAL_TOTAL_MEMORY = buffer.byteLength; +assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0); +updateGlobalBufferAndViews(buffer); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + var cookie1 = HEAPU32[(STACK_MAX >> 2)-1]; + var cookie2 = HEAPU32[(STACK_MAX >> 2)-2]; + if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); + } + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + + + HEAP32[0] = 0x63736d65; /* 'emsc' */ + + + +// Endianness check (note: assumes compiler arch was little-endian) +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function abortFnPtrError(ptr, sig) { + abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); +} + + + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + checkStackCookie(); + assert(!runtimeInitialized); + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); +TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + +var memoryInitializer = null; + + + + + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + +var wasmBinaryFile = 'core_drop_files.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // if we don't have the binary yet, and have the Fetch api, use that + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function(resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm(env) { + // prepare imports + var info = { + 'env': env, + 'wasi_unstable': env + , + 'global': { + 'NaN': NaN, + 'Infinity': Infinity + }, + 'global.Math': Math, + 'asm2wasm': asm2wasmImports + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(output['instance']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate +// the wasm module at that time, and it receives imports and provides exports and so forth, the app +// doesn't need to care that it is wasm or asm.js. + +Module['asm'] = function(global, env, providedBuffer) { + // memory was already allocated (so js could use the buffer) + env['memory'] = wasmMemory + ; + // import table + env['table'] = wasmTable = new WebAssembly.Table({ + 'initial': 4954, + 'maximum': 4954, + 'element': 'anyfunc' + }); + // With the wasm backend __memory_base and __table_base and only needed for + // relocatable output. + env['__memory_base'] = 1024; // tell the memory segments where to place themselves + // table starts at 0 by default (even in dynamic linking, for the main module) + env['__table_base'] = 0; + + var exports = createWasm(env); + assert(exports, 'binaryen setup failed (no wasm support?)'); + return exports; +}; + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = []; + + + + + +// STATICTOP = STATIC_BASE + 30160; +/* global initializers */ /*__ATINIT__.push();*/ + + + + + + + + +/* no memory initializer */ +var tempDoublePtr = 31168 +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; +} + +function copyTempDouble(ptr) { + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; +} + +// {{PRE_LIBRARY}} + + + function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; + } + + function demangleAll(text) { + var regex = + /\b__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); + } + + function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); + } + + function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); + } + + function ___assert_fail(condition, filename, line, func) { + abort('Assertion failed: ' + UTF8ToString(condition) + ', at: ' + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']); + } + + function ___lock() {} + + + + var PATH={splitPath:function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + },normalize:function(path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function(path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function(path) { + return PATH.splitPath(path)[3]; + },join:function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function(l, r) { + return PATH.normalize(l + '/' + r); + }}; + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else err('failed to set errno from JS'); + return value; + } + + var PATH_FS={resolve:function() { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; + + var TTY={ttys:[],init:function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + },shutdown:function() { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + },register:function(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + },stream_ops:{open:function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(19); + } + stream.tty = tty; + stream.seekable = false; + },close:function(stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + },flush:function(stream) { + stream.tty.ops.flush(stream.tty); + },read:function(stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(6); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + },write:function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(6); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset+i]); + } + } catch (e) { + throw new FS.ErrnoError(5); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }},default_tty_ops:{get_char:function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + var isPosixPlatform = (process.platform != 'win32'); // Node doesn't offer a direct check, so test by exclusion + + var fd = process.stdin.fd; + if (isPosixPlatform) { + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + } + + try { + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + } catch(e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + },put_char:function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }},default_tty1_ops:{put_char:function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }}}; + + var MEMFS={ops_table:null,mount:function(mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + },createNode:function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(1); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + },getFileDataAsRegularArray:function(node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + },getFileDataAsTypedArray:function(node) { + if (!node.contents) return new Uint8Array; + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + },expandFileStorage:function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + },resizeFileStorage:function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + },node_ops:{getattr:function(node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + },lookup:function(parent, name) { + throw FS.genericErrors[2]; + },mknod:function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + },rename:function(old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(39); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + },unlink:function(parent, name) { + delete parent.contents[name]; + },rmdir:function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(39); + } + delete parent.contents[name]; + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + },readlink:function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(22); + } + return node.link; + }},stream_ops:{read:function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + assert(size >= 0); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + },write:function(stream, buffer, offset, length, position, canOwn) { + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + assert(position === 0, 'canOwn must imply no weird position inside the file'); + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position+length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position+length); + return length; + },llseek:function(stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + },allocate:function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if ( !(flags & 2) && + (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < stream.node.usedBytes) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + // malloc() can lead to growing the heap. If targeting the heap, we need to + // re-acquire the heap buffer object in case growth had occurred. + var fromHeap = (buffer.buffer == HEAP8.buffer); + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(12); + } + (fromHeap ? HEAP8 : buffer).set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + }}}; + + var IDBFS={dbs:{},indexedDB:function() { + if (typeof indexedDB !== 'undefined') return indexedDB; + var ret = null; + if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + assert(ret, 'IDBFS used, but indexedDB not supported'); + return ret; + },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount) { + // reuse all of the core MEMFS functionality + return MEMFS.mount.apply(null, arguments); + },syncfs:function(mount, populate, callback) { + IDBFS.getLocalSet(mount, function(err, local) { + if (err) return callback(err); + + IDBFS.getRemoteSet(mount, function(err, remote) { + if (err) return callback(err); + + var src = populate ? remote : local; + var dst = populate ? local : remote; + + IDBFS.reconcile(src, dst, callback); + }); + }); + },getDB:function(name, callback) { + // check the cache first + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); + } + + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); + } + if (!req) { + return callback("Unable to connect to IndexedDB"); + } + req.onupgradeneeded = function(e) { + var db = e.target.result; + var transaction = e.target.transaction; + + var fileStore; + + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); + } + + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } + }; + req.onsuccess = function() { + db = req.result; + + // add to the cache + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },getLocalSet:function(mount, callback) { + var entries = {}; + + function isRealDir(p) { + return p !== '.' && p !== '..'; + }; + function toAbsolute(root) { + return function(p) { + return PATH.join2(root, p); + } + }; + + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + + while (check.length) { + var path = check.pop(); + var stat; + + try { + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); + } + + entries[path] = { timestamp: stat.mtime }; + } + + return callback(null, { type: 'local', entries: entries }); + },getRemoteSet:function(mount, callback) { + var entries = {}; + + IDBFS.getDB(mount.mountpoint, function(err, db) { + if (err) return callback(err); + + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index('timestamp'); + + index.openKeyCursor().onsuccess = function(event) { + var cursor = event.target.result; + + if (!cursor) { + return callback(null, { type: 'remote', db: db, entries: entries }); + } + + entries[cursor.primaryKey] = { timestamp: cursor.key }; + + cursor.continue(); + }; + } catch (e) { + return callback(e); + } + }); + },loadLocalEntry:function(path, callback) { + var stat, node; + + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode }); + } else if (FS.isFile(stat.mode)) { + // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. + // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); + } else { + return callback(new Error('node type not supported')); + } + },storeLocalEntry:function(path, entry, callback) { + try { + if (FS.isDir(entry.mode)) { + FS.mkdir(path, entry.mode); + } else if (FS.isFile(entry.mode)) { + FS.writeFile(path, entry.contents, { canOwn: true }); + } else { + return callback(new Error('node type not supported')); + } + + FS.chmod(path, entry.mode); + FS.utime(path, entry.timestamp, entry.timestamp); + } catch (e) { + return callback(e); + } + + callback(null); + },removeLocalEntry:function(path, callback) { + try { + var lookup = FS.lookupPath(path); + var stat = FS.stat(path); + + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + + callback(null); + },loadRemoteEntry:function(store, path, callback) { + var req = store.get(path); + req.onsuccess = function(event) { callback(null, event.target.result); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },storeRemoteEntry:function(store, path, entry, callback) { + var req = store.put(entry, path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },removeRemoteEntry:function(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },reconcile:function(src, dst, callback) { + var total = 0; + + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e.timestamp > e2.timestamp) { + create.push(key); + total++; + } + }); + + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + var e = dst.entries[key]; + var e2 = src.entries[key]; + if (!e2) { + remove.push(key); + total++; + } + }); + + if (!total) { + return callback(null); + } + + var errored = false; + var db = src.type === 'remote' ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + + function done(err) { + if (err && !errored) { + errored = true; + return callback(err); + } + }; + + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; + + transaction.oncomplete = function(e) { + if (!errored) { + callback(null); + } + }; + + // sort paths in ascending order so directory entries are created + // before the files inside them + create.sort().forEach(function (path) { + if (dst.type === 'local') { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + + // sort paths in descending order so files are deleted before their + // parent directories + remove.sort().reverse().forEach(function(path) { + if (dst.type === 'local') { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); + }}; + + var NODEFS={isWindows:false,staticInit:function() { + NODEFS.isWindows = !!process.platform.match(/^win/); + var flags = process["binding"]("constants"); + // Node.js 4 compatibility: it has no namespaces for constants + if (flags["fs"]) { + flags = flags["fs"]; + } + NODEFS.flagsForNodeMap = { + "1024": flags["O_APPEND"], + "64": flags["O_CREAT"], + "128": flags["O_EXCL"], + "0": flags["O_RDONLY"], + "2": flags["O_RDWR"], + "4096": flags["O_SYNC"], + "512": flags["O_TRUNC"], + "1": flags["O_WRONLY"] + }; + },bufferFrom:function (arrayBuffer) { + // Node.js < 4.5 compatibility: Buffer.from does not support ArrayBuffer + // Buffer.from before 4.5 was just a method inherited from Uint8Array + // Buffer.alloc has been added with Buffer.from together, so check it instead + return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); + },mount:function (mount) { + assert(ENVIRONMENT_HAS_NODE); + return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); + },createNode:function (parent, name, mode, dev) { + if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { + throw new FS.ErrnoError(22); + } + var node = FS.createNode(parent, name, mode); + node.node_ops = NODEFS.node_ops; + node.stream_ops = NODEFS.stream_ops; + return node; + },getMode:function (path) { + var stat; + try { + stat = fs.lstatSync(path); + if (NODEFS.isWindows) { + // Node.js on Windows never represents permission bit 'x', so + // propagate read bits to execute bits + stat.mode = stat.mode | ((stat.mode & 292) >> 2); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); // syscall errnos are negated, node's are not + } + return stat.mode; + },realPath:function (node) { + var parts = []; + while (node.parent !== node) { + parts.push(node.name); + node = node.parent; + } + parts.push(node.mount.opts.root); + parts.reverse(); + return PATH.join.apply(null, parts); + },flagsForNode:function(flags) { + flags &= ~0x200000 /*O_PATH*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x800 /*O_NONBLOCK*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x8000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x80000 /*O_CLOEXEC*/; // Some applications may pass it; it makes no sense for a single process. + var newFlags = 0; + for (var k in NODEFS.flagsForNodeMap) { + if (flags & k) { + newFlags |= NODEFS.flagsForNodeMap[k]; + flags ^= k; + } + } + + if (!flags) { + return newFlags; + } else { + throw new FS.ErrnoError(22); + } + },node_ops:{getattr:function(node) { + var path = NODEFS.realPath(node); + var stat; + try { + stat = fs.lstatSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. + // See http://support.microsoft.com/kb/140365 + if (NODEFS.isWindows && !stat.blksize) { + stat.blksize = 4096; + } + if (NODEFS.isWindows && !stat.blocks) { + stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; + } + return { + dev: stat.dev, + ino: stat.ino, + mode: stat.mode, + nlink: stat.nlink, + uid: stat.uid, + gid: stat.gid, + rdev: stat.rdev, + size: stat.size, + atime: stat.atime, + mtime: stat.mtime, + ctime: stat.ctime, + blksize: stat.blksize, + blocks: stat.blocks + }; + },setattr:function(node, attr) { + var path = NODEFS.realPath(node); + try { + if (attr.mode !== undefined) { + fs.chmodSync(path, attr.mode); + // update the common node structure mode as well + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + var date = new Date(attr.timestamp); + fs.utimesSync(path, date, date); + } + if (attr.size !== undefined) { + fs.truncateSync(path, attr.size); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },lookup:function (parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + var mode = NODEFS.getMode(path); + return NODEFS.createNode(parent, name, mode); + },mknod:function (parent, name, mode, dev) { + var node = NODEFS.createNode(parent, name, mode, dev); + // create the backing node for this in the fs root as well + var path = NODEFS.realPath(node); + try { + if (FS.isDir(node.mode)) { + fs.mkdirSync(path, node.mode); + } else { + fs.writeFileSync(path, '', { mode: node.mode }); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + return node; + },rename:function (oldNode, newDir, newName) { + var oldPath = NODEFS.realPath(oldNode); + var newPath = PATH.join2(NODEFS.realPath(newDir), newName); + try { + fs.renameSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },unlink:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.unlinkSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },rmdir:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.rmdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readdir:function(node) { + var path = NODEFS.realPath(node); + try { + return fs.readdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },symlink:function(parent, newName, oldPath) { + var newPath = PATH.join2(NODEFS.realPath(parent), newName); + try { + fs.symlinkSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readlink:function(node) { + var path = NODEFS.realPath(node); + try { + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + }},stream_ops:{open:function (stream) { + var path = NODEFS.realPath(stream.node); + try { + if (FS.isFile(stream.node.mode)) { + stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags)); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },close:function (stream) { + try { + if (FS.isFile(stream.node.mode) && stream.nfd) { + fs.closeSync(stream.nfd); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },read:function (stream, buffer, offset, length, position) { + // Node.js < 6 compatibility: node errors on 0 length reads + if (length === 0) return 0; + try { + return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },write:function (stream, buffer, offset, length, position) { + try { + return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + try { + var stat = fs.fstatSync(stream.nfd); + position += stat.size; + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + } + } + + if (position < 0) { + throw new FS.ErrnoError(22); + } + + return position; + }}}; + + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + // Issue 4254: Using curr as a node name will prevent the node + // from being found in FS.nameTable when FS.open is called on + // a path which holds a child of this node, + // given that all FS functions assume node names + // are just their corresponding parts within their given path, + // rather than incremental aggregates which include their parent's + // directories. + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; + } + return parent; + } + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; + } + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function(node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function(parent, name) { + throw new FS.ErrnoError(2); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(1); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(1); + },unlink:function(parent, name) { + throw new FS.ErrnoError(1); + },rmdir:function(parent, name) { + throw new FS.ErrnoError(1); + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newName, oldPath) { + throw new FS.ErrnoError(1); + },readlink:function(node) { + throw new FS.ErrnoError(1); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(5); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + }}}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(40); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(40); + } + } + } + } + + return { path: current_path, node: current }; + },getPath:function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + },hashName:function(parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + },hashAddNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + },hashRemoveNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + },lookupNode:function(parent, name) { + var err = FS.mayLookup(parent); + if (err) { + throw new FS.ErrnoError(err, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + },createNode:function(parent, name, mode, rdev) { + if (!FS.FSNode) { + FS.FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + + FS.FSNode.prototype = {}; + + // compatibility + var readMode = 292 | 73; + var writeMode = 146; + + // NOTE we must use Object.defineProperties instead of individual calls to + // Object.defineProperty in order to make closure compiler happy + Object.defineProperties(FS.FSNode.prototype, { + read: { + get: function() { return (this.mode & readMode) === readMode; }, + set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } + }, + write: { + get: function() { return (this.mode & writeMode) === writeMode; }, + set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } + }, + isFolder: { + get: function() { return FS.isDir(this.mode); } + }, + isDevice: { + get: function() { return FS.isChrdev(this.mode); } + } + }); + } + + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + },destroyNode:function(node) { + FS.hashRemoveNode(node); + },isRoot:function(node) { + return node === node.parent; + },isMountpoint:function(node) { + return !!node.mounted; + },isFile:function(mode) { + return (mode & 61440) === 32768; + },isDir:function(mode) { + return (mode & 61440) === 16384; + },isLink:function(mode) { + return (mode & 61440) === 40960; + },isChrdev:function(mode) { + return (mode & 61440) === 8192; + },isBlkdev:function(mode) { + return (mode & 61440) === 24576; + },isFIFO:function(mode) { + return (mode & 61440) === 4096; + },isSocket:function(mode) { + return (mode & 49152) === 49152; + },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + },flagsToPermissionString:function(flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + },nodePermissions:function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 13; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 13; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 13; + } + return 0; + },mayLookup:function(dir) { + var err = FS.nodePermissions(dir, 'x'); + if (err) return err; + if (!dir.node_ops.lookup) return 13; + return 0; + },mayCreate:function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 17; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + },mayDelete:function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var err = FS.nodePermissions(dir, 'wx'); + if (err) { + return err; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 20; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 16; + } + } else { + if (FS.isDir(node.mode)) { + return 21; + } + } + return 0; + },mayOpen:function(node, flags) { + if (!node) { + return 2; + } + if (FS.isLink(node.mode)) { + return 40; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 21; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(24); + },getStream:function(fd) { + return FS.streams[fd]; + },createStream:function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function(){}; + FS.FSStream.prototype = {}; + // compatibility + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function() { return this.node; }, + set: function(val) { this.node = val; } + }, + isRead: { + get: function() { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function() { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function() { return (this.flags & 1024); } + } + }); + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + },closeStream:function(fd) { + FS.streams[fd] = null; + },chrdev_stream_ops:{open:function(stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + },llseek:function() { + throw new FS.ErrnoError(29); + }},major:function(dev) { + return ((dev) >> 8); + },minor:function(dev) { + return ((dev) & 0xff); + },makedev:function(ma, mi) { + return ((ma) << 8 | (mi)); + },registerDevice:function(dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + },getDevice:function(dev) { + return FS.devices[dev]; + },getMounts:function(mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + },syncfs:function(populate, callback) { + if (typeof(populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(err) { + assert(FS.syncFSRequests > 0); + FS.syncFSRequests--; + return callback(err); + } + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return doCallback(err); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + },mount:function(type, opts, mountpoint) { + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(16); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + },unmount:function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(22); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + assert(idx !== -1); + node.mount.mounts.splice(idx, 1); + },lookup:function(parent, name) { + return parent.node_ops.lookup(parent, name); + },mknod:function(path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(22); + } + var err = FS.mayCreate(parent, name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.mknod(parent, name, mode, dev); + },create:function(path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + },mkdir:function(path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + },mkdirTree:function(path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch(e) { + if (e.errno != 17) throw e; + } + } + },mkdev:function(path, mode, dev) { + if (typeof(dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + },symlink:function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(2); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(2); + } + var newname = PATH.basename(newpath); + var err = FS.mayCreate(parent, newname); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.symlink(parent, newname, oldpath); + },rename:function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(16); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(2); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(18); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(22); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(39); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var err = FS.mayDelete(old_dir, old_name, isdir); + if (err) { + throw new FS.ErrnoError(err); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + err = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(16); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + err = FS.nodePermissions(old_dir, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch(e) { + console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch(e) { + console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + },rmdir:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, true); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(20); + } + return node.node_ops.readdir(node); + },unlink:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, false); + if (err) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readlink:function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(2); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(22); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + },stat:function(path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(2); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(1); + } + return node.node_ops.getattr(node); + },lstat:function(path) { + return FS.stat(path, true); + },chmod:function(path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + },lchmod:function(path, mode) { + FS.chmod(path, mode, true); + },fchmod:function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chmod(stream.node, mode); + },chown:function(path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + },lchown:function(path, uid, gid) { + FS.chown(path, uid, gid, true); + },fchown:function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chown(stream.node, uid, gid); + },truncate:function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(22); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(21); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(22); + } + var err = FS.nodePermissions(node, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + },ftruncate:function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(22); + } + FS.truncate(stream.node, len); + },utime:function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + },open:function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(2); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(17); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(2); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var err = FS.mayOpen(node, flags); + if (err) { + throw new FS.ErrnoError(err); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + console.log("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch(e) { + console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); + } + return stream; + },close:function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + },isClosed:function(stream) { + return stream.fd === null; + },llseek:function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(29); + } + if (whence != 0 /* SEEK_SET */ && whence != 1 /* SEEK_CUR */ && whence != 2 /* SEEK_END */) { + throw new FS.ErrnoError(22); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + },read:function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(22); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + },write:function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(22); + } + if (stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch(e) { + console.log("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); + } + return bytesWritten; + },allocate:function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(22); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(95); + } + stream.stream_ops.allocate(stream, offset, length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(13); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(13); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(19); + } + return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function(stream) { + return 0; + },ioctl:function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(25); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + },readFile:function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + },writeFile:function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + },cwd:function() { + return FS.currentPath; + },chdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(2); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(20); + } + var err = FS.nodePermissions(lookup.node, 'x'); + if (err) { + throw new FS.ErrnoError(err); + } + FS.currentPath = lookup.path; + },createDefaultDirectories:function() { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + },createDefaultDevices:function() { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function() { return 0; }, + write: function(stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function() { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else + {} + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function() { abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function() { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(9); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + },createStandardStreams:function() { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); + assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); + assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); + },ensureErrnoError:function() { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function(errno) { + this.errno = errno; + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } + }; + this.setErrno(errno); + this.message = ERRNO_MESSAGES[errno]; + + // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack + // now ensures it shows what we want. + if (this.stack) { + // Define the stack property for Node.js 4, which otherwise errors on the next line. + Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); + this.stack = demangleAll(this.stack); + } + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [2].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + },staticInit:function() { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; + },init:function(input, output, error) { + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + },quit:function() { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + },getMode:function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + },joinPath:function(parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + },absolutePath:function(relative, base) { + return PATH_FS.resolve(base, relative); + },standardizePath:function(path) { + return PATH.normalize(path); + },findObject:function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + },analyzePath:function(path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + },createFolder:function(parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + },createPath:function(parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + },createFile:function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + },createDevice:function(parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset+i]); + } catch (e) { + throw new FS.ErrnoError(5); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + },createLink:function(parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + },forceLoadFile:function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(5); + return success; + },createLazyFile:function(parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length-1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize)|0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024*1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum+1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: function() { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + assert(size >= 0); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function(plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + },indexedDB:function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + },DB_NAME:function() { + return 'EM_FS_' + window.location.pathname; + },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + console.log('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + },loadFilesFromDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch(e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(9); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + },doStat:function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -20; + } + throw e; + } + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); + HEAP32[(((buf)+(48))>>2)]=4096; + HEAP32[(((buf)+(52))>>2)]=stat.blocks; + HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(76))>>2)]=0; + (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); + return 0; + },doMsync:function(addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function(path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function(path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -22; + } + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function(path, buf, bufsize) { + if (bufsize <= 0) return -22; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf+len]; + stringToUTF8(ret, buf, bufsize+1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf+len] = endChar; + + return len; + },doAccess:function(path, amode) { + if (amode & ~7) { + // need a valid mode + return -22; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -2; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -13; + } + return 0; + },doDup:function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + },doWritev:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + },varargs:0,get:function(varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function() { + var ret = UTF8ToString(SYSCALLS.get()); + return ret; + },getStreamFromFD:function() { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(9); + return stream; + },get64:function() { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function() { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -75; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((result)>>2)]=tempI64[0],HEAP32[(((result)+(4))>>2)]=tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall145(which, varargs) {SYSCALLS.varargs = varargs; + try { + // readv + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doReadv(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall221(which, varargs) {SYSCALLS.varargs = varargs; + try { + // fcntl64 + var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get(); + switch (cmd) { + case 0: { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -22; + } + var newStream; + newStream = FS.open(stream.path, stream.flags, 0, arg); + return newStream.fd; + } + case 1: + case 2: + return 0; // FD_CLOEXEC makes no sense for a single process. + case 3: + return stream.flags; + case 4: { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0; + } + case 12: + /* case 12: Currently in musl F_GETLK64 has same value as F_GETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ { + + var arg = SYSCALLS.get(); + var offset = 0; + // We're always unlocked. + HEAP16[(((arg)+(offset))>>1)]=2; + return 0; + } + case 13: + case 14: + /* case 13: Currently in musl F_SETLK64 has same value as F_SETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + /* case 14: Currently in musl F_SETLKW64 has same value as F_SETLKW, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + + + return 0; // Pretend that the locking is successful. + case 16: + case 8: + return -22; // These are for sockets. We don't have them fully implemented yet. + case 9: + // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves. + ___setErrNo(22); + return -1; + default: { + return -22; + } + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall5(which, varargs) {SYSCALLS.varargs = varargs; + try { + // open + var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get(); // optional TODO + var stream = FS.open(pathname, flags, mode); + return stream.fd; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21509: + case 21505: { + if (!stream.tty) return -25; + return 0; + } + case 21510: + case 21511: + case 21512: + case 21506: + case 21507: + case 21508: { + if (!stream.tty) return -25; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -25; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -25; + return -22; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + case 21523: { + // TODO: in theory we should write to the winsize struct that gets + // passed in, but for now musl doesn't read anything on it + if (!stream.tty) return -25; + return 0; + } + case 21524: { + // TODO: technically, this ioctl call should change the window size. + // but, since emscripten doesn't have any concept of a terminal window + // yet, we'll just silently throw it away as we do TIOCGWINSZ + if (!stream.tty) return -25; + return 0; + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___unlock() {} + + + function _fd_write(stream, iov, iovcnt, pnum) {try { + + stream = FS.getStream(stream); + if (!stream) throw new FS.ErrnoError(9); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + }function ___wasi_fd_write( + ) { + return _fd_write.apply(null, arguments) + } + + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.'); + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (typeof setImmediate === 'undefined') { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = 'setimmediate'; + var Browser_setImmediate_messageHandler = function(event) { + // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, + // so check for both cases. + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + addEventListener("message", Browser_setImmediate_messageHandler, true); + setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module['setImmediates'] === undefined) Module['setImmediates'] = []; + Module['setImmediates'].push(func); + postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js + } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + setImmediate(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + } + + function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + noExitRuntime = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + + Browser.mainLoop.func = func; + Browser.mainLoop.arg = arg; + + var browserIterationFunc; + if (typeof arg !== 'undefined') { + browserIterationFunc = function() { + Module['dynCall_vi'](func, arg); + }; + } else { + browserIterationFunc = function() { + Module['dynCall_v'](func); + }; + } + + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + // not counted, but move the progress along a tiny bit + next = next + 0.5; // do not steal all the next one's progress + Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; + } + } + console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); + Browser.mainLoop.updateStatus(); + + // catches pause/resume main loop from blocker execution + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + setTimeout(Browser.mainLoop.runner, 0); + return; + } + + // catch pauses from non-main loop sources + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Implement very basic swap interval control + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + // Not the scheduled time to render this frame - skip. + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + + // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize + // VBO double-buffering and reduce GPU stalls. + + + + if (Browser.mainLoop.method === 'timeout' && Module.ctx) { + err('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); + Browser.mainLoop.method = ''; // just warn once per call to set main loop + } + + Browser.mainLoop.runIter(browserIterationFunc); + + checkStackCookie(); + + // catch pauses from the main loop itself + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able + // to queue the newest produced audio samples. + // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() + // do not need to be hardcoded into this function, but can be more generic. + if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); + + Browser.mainLoop.scheduler(); + } + + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + + Browser.mainLoop.scheduler(); + } + + if (simulateInfiniteLoop) { + throw 'SimulateInfiniteLoop'; + } + }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. + },resume:function() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + },updateStatus:function() { + if (Module['setStatus']) { + var message = Module['statusMessage'] || 'Please wait...'; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); + } else { + Module['setStatus'](message); + } + } else { + Module['setStatus'](''); + } + } + },runIter:function(func) { + if (ABORT) return; + if (Module['preMainLoop']) { + var preRet = Module['preMainLoop'](); + if (preRet === false) { + return; // |return false| skips a frame + } + } + try { + func(); + } catch (e) { + if (e instanceof ExitStatus) { + return; + } else { + if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); + throw e; + } + } + if (Module['postMainLoop']) Module['postMainLoop'](); + }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function() { + if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers + + if (Browser.initted) return; + Browser.initted = true; + + try { + new Blob(); + Browser.hasBlobConstructor = true; + } catch(e) { + Browser.hasBlobConstructor = false; + console.log("warning: no blob constructor, cannot create blobs with mimetypes"); + } + Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); + Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; + if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { + console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); + Module.noImageDecoding = true; + } + + // Support for plugins that can process preloaded files. You can add more of these to + // your app by creating and appending to Module.preloadPlugins. + // + // Each plugin is asked if it can handle a file based on the file's name. If it can, + // it is given the file's raw data. When it is done, it calls a callback with the file's + // (possibly modified) data. For example, a plugin might decompress a file, or it + // might create some side data structure for use later (like an Image element, etc.). + + var imagePlugin = {}; + imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = null; + if (Browser.hasBlobConstructor) { + try { + b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + if (b.size !== byteArray.length) { // Safari bug #118630 + // Safari's Blob can only take an ArrayBuffer + b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); + } + } catch(e) { + warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); + } + } + if (!b) { + var bb = new Browser.BlobBuilder(); + bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range + b = bb.getBlob(); + } + var url = Browser.URLObject.createObjectURL(b); + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var img = new Image(); + img.onload = function img_onload() { + assert(img.complete, 'Image ' + name + ' could not be decoded'); + var canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + Module["preloadedImages"][name] = canvas; + Browser.URLObject.revokeObjectURL(url); + if (onload) onload(byteArray); + }; + img.onerror = function img_onerror(event) { + console.log('Image ' + url + ' could not be decoded'); + if (onerror) onerror(); + }; + img.src = url; + }; + Module['preloadPlugins'].push(imagePlugin); + + var audioPlugin = {}; + audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; + }; + audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + Module["preloadedAudios"][name] = audio; + if (onload) onload(byteArray); + } + function fail() { + if (done) return; + done = true; + Module["preloadedAudios"][name] = new Audio(); // empty shim + if (onerror) onerror(); + } + if (Browser.hasBlobConstructor) { + try { + var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + } catch(e) { + return fail(); + } + var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var audio = new Audio(); + audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 + audio.onerror = function audio_onerror(event) { + if (done) return; + console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); + function encode64(data) { + var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var PAD = '='; + var ret = ''; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = (leftchar << 8) | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = (leftchar >> (leftbits-6)) & 0x3f; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar&3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar&0xf) << 2]; + ret += PAD; + } + return ret; + } + audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); + finish(audio); // we don't wait for confirmation this worked - but it's worth trying + }; + audio.src = url; + // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror + Browser.safeSetTimeout(function() { + finish(audio); // try to use it even though it is not necessarily ready to play + }, 10000); + } else { + return fail(); + } + }; + Module['preloadPlugins'].push(audioPlugin); + + + // Canvas event setup + + function pointerLockChange() { + Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || + document['mozPointerLockElement'] === Module['canvas'] || + document['webkitPointerLockElement'] === Module['canvas'] || + document['msPointerLockElement'] === Module['canvas']; + } + var canvas = Module['canvas']; + if (canvas) { + // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module + // Module['forcedAspectRatio'] = 4 / 3; + + canvas.requestPointerLock = canvas['requestPointerLock'] || + canvas['mozRequestPointerLock'] || + canvas['webkitRequestPointerLock'] || + canvas['msRequestPointerLock'] || + function(){}; + canvas.exitPointerLock = document['exitPointerLock'] || + document['mozExitPointerLock'] || + document['webkitExitPointerLock'] || + document['msExitPointerLock'] || + function(){}; // no-op if function does not exist + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + + document.addEventListener('pointerlockchange', pointerLockChange, false); + document.addEventListener('mozpointerlockchange', pointerLockChange, false); + document.addEventListener('webkitpointerlockchange', pointerLockChange, false); + document.addEventListener('mspointerlockchange', pointerLockChange, false); + + if (Module['elementPointerLock']) { + canvas.addEventListener("click", function(ev) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + },createContext:function(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. + + var ctx; + var contextHandle; + if (useWebGL) { + // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: 1, + }; + + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + + // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not + // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function + // Browser.createContext() should not even be emitted. + if (typeof GL !== 'undefined') { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } + } else { + ctx = canvas.getContext('2d'); + } + + if (!ctx) return null; + + if (setInModule) { + if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); + + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); + Browser.init(); + } + return ctx; + },destroyContext:function(canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer, resizeCanvas, vrDevice) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; + + var canvas = Module['canvas']; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } else { + // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } + if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); + if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); + } + + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener('fullscreenchange', fullscreenChange, false); + document.addEventListener('mozfullscreenchange', fullscreenChange, false); + document.addEventListener('webkitfullscreenchange', fullscreenChange, false); + document.addEventListener('MSFullscreenChange', fullscreenChange, false); + } + + // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) + canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || + canvasContainer['mozRequestFullScreen'] || + canvasContainer['msRequestFullscreen'] || + (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || + (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); + + if (vrDevice) { + canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullscreen(); + } + },requestFullScreen:function(lockPointer, resizeCanvas, vrDevice) { + err('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); + Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + } + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + },exitFullscreen:function() { + // This is workaround for chrome. Trying to exit from fullscreen + // not in fullscreen state will cause "TypeError: Document not active" + // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 + if (!Browser.isFullscreen) { + return false; + } + + var CFS = document['exitFullscreen'] || + document['cancelFullScreen'] || + document['mozCancelFullScreen'] || + document['msExitFullscreen'] || + document['webkitCancelFullScreen'] || + (function() {}); + CFS.apply(document, []); + return true; + },nextRAF:0,fakeRequestAnimationFrame:function(func) { + // try to keep 60fps between calls to here + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1000/60; + } else { + while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 + Browser.nextRAF += 1000/60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + },requestAnimationFrame:function(func) { + if (typeof requestAnimationFrame === 'function') { + requestAnimationFrame(func); + return; + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func); + },safeCallback:function(func) { + return function() { + if (!ABORT) return func.apply(null, arguments); + }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function() { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } + },safeRequestAnimationFrame:function(func) { + return Browser.requestAnimationFrame(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }); + },safeSetTimeout:function(func, timeout) { + noExitRuntime = true; + return setTimeout(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }, timeout); + },safeSetInterval:function(func, timeout) { + noExitRuntime = true; + return setInterval(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in + }, timeout); + },getMimetype:function(name) { + return { + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'png': 'image/png', + 'bmp': 'image/bmp', + 'ogg': 'audio/ogg', + 'wav': 'audio/wav', + 'mp3': 'audio/mpeg' + }[name.substr(name.lastIndexOf('.')+1)]; + },getUserMedia:function(func) { + if(!window.getUserMedia) { + window.getUserMedia = navigator['getUserMedia'] || + navigator['mozGetUserMedia']; + } + window.getUserMedia(func); + },getMovementX:function(event) { + return event['movementX'] || + event['mozMovementX'] || + event['webkitMovementX'] || + 0; + },getMovementY:function(event) { + return event['movementY'] || + event['mozMovementY'] || + event['webkitMovementY'] || + 0; + },getMouseWheelDelta:function(event) { + var delta = 0; + switch (event.type) { + case 'DOMMouseScroll': + // 3 lines make up a step + delta = event.detail / 3; + break; + case 'mousewheel': + // 120 units make up a step + delta = event.wheelDelta / 120; + break; + case 'wheel': + delta = event.deltaY + switch(event.deltaMode) { + case 0: + // DOM_DELTA_PIXEL: 100 pixels make up a step + delta /= 100; + break; + case 1: + // DOM_DELTA_LINE: 3 lines make up a step + delta /= 3; + break; + case 2: + // DOM_DELTA_PAGE: A page makes up 80 steps + delta *= 80; + break; + default: + throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; + } + break; + default: + throw 'unrecognized mouse wheel event: ' + event.type; + } + return delta; + },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event) { // event should be mousemove, mousedown or mouseup + if (Browser.pointerLock) { + // When the pointer is locked, calculate the coordinates + // based on the movement of the mouse. + // Workaround for Firefox bug 764498 + if (event.type != 'mousemove' && + ('mozMovementX' in event)) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + + // check if SDL is available + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + // just add the mouse delta to the current absolut mouse position + // FIXME: ideally this should be clamped against the canvas size and zero + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + // Otherwise, calculate the movement based on the changes + // in the coordinates. + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + + // Neither .scrollX or .pageXOffset are defined in a spec, but + // we prefer .scrollX because it is currently in a spec draft. + // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) + var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); + var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); + // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset + // and we have no viable fallback. + assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.'); + + if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { + var touch = event.touch; + if (touch === undefined) { + return; // the "touch" property is only defined in SDL + + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + + var coords = { x: adjustedX, y: adjustedY }; + + if (event.type === 'touchstart') { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === 'touchend' || event.type === 'touchmove') { + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + + // the canvas might be CSS-scaled compared to its backbuffer; + // SDL-using content will want mouse coordinates in terms + // of backbuffer units. + x = x * (cw / rect.width); + y = y * (ch / rect.height); + + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + } + },asyncLoad:function(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; + readAsync(url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); + },resizeListeners:[],updateResizeListeners:function() { + var canvas = Module['canvas']; + Browser.resizeListeners.forEach(function(listener) { + listener(canvas.width, canvas.height); + }); + },setCanvasSize:function(width, height, noUpdates) { + var canvas = Module['canvas']; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags | 0x00800000; // set SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },setWindowedCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },updateCanvasDimensions:function(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { + if (w/h < Module['forcedAspectRatio']) { + w = Math.round(h * Module['forcedAspectRatio']); + } else { + h = Math.round(w / Module['forcedAspectRatio']); + } + } + if (((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != 'undefined') { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != 'undefined') { + if (w != wNative || h != hNative) { + canvas.style.setProperty( "width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } + } + },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function() { + var handle = Browser.nextWgetRequestHandle; + Browser.nextWgetRequestHandle++; + return handle; + }};var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code) { + EGL.errorCode = code; + },chooseConfig:function(display, attribList, config, config_size, numConfigs) { + if (display != 62000 /* Magic ID for Emscripten 'default display' */) { + EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); + return 0; + } + + if (attribList) { + // read attribList if it is non-null + for(;;) { + var param = HEAP32[((attribList)>>2)]; + if (param == 0x3021 /*EGL_ALPHA_SIZE*/) { + var alphaSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.alpha = (alphaSize > 0); + } else if (param == 0x3025 /*EGL_DEPTH_SIZE*/) { + var depthSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.depth = (depthSize > 0); + } else if (param == 0x3026 /*EGL_STENCIL_SIZE*/) { + var stencilSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.stencil = (stencilSize > 0); + } else if (param == 0x3031 /*EGL_SAMPLES*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples > 0); + } else if (param == 0x3032 /*EGL_SAMPLE_BUFFERS*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples == 1); + } else if (param == 0x3100 /*EGL_CONTEXT_PRIORITY_LEVEL_IMG*/) { + var requestedPriority = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.lowLatency = (requestedPriority != 0x3103 /*EGL_CONTEXT_PRIORITY_LOW_IMG*/); + } else if (param == 0x3038 /*EGL_NONE*/) { + break; + } + attribList += 8; + } + } + + if ((!config || !config_size) && !numConfigs) { + EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); + return 0; + } + if (numConfigs) { + HEAP32[((numConfigs)>>2)]=1; // Total number of supported configs: 1. + } + if (config && config_size > 0) { + HEAP32[((config)>>2)]=62002; + } + + EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); + return 1; + }};function _eglGetProcAddress(name_) { + return _emscripten_GetProcAddress(name_); + } + + + var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function() { + for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { + JSEvents._removeHandler(i); + } + JSEvents.eventHandlers = []; + JSEvents.deferredCalls = []; + },registerRemoveEventListeners:function() { + if (!JSEvents.removeEventListenersRegistered) { + __ATEXIT__.push(JSEvents.removeAllEventListeners); + JSEvents.removeEventListenersRegistered = true; + } + },deferredCalls:[],deferCall:function(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) return false; + + for(var i in arrA) { + if (arrA[i] != arrB[i]) return false; + } + return true; + } + // Test if the given call was already queued, and if so, don't add it again. + for(var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return; + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + + JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); + },removeDeferredCalls:function(targetFunction) { + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i; + } + } + },canPerformEventHandlerRequests:function() { + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; + },runDeferredCalls:function() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return; + } + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + call.targetFunction.apply(this, call.argsList); + } + },inEventHandler:0,currentEventHandler:null,eventHandlers:[],isInternetExplorer:function() { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },removeAllHandlersOnTarget:function(target, eventTypeString) { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && + (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--); + } + } + },_removeHandler:function(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1); + },registerOrRemoveHandler:function(eventHandler) { + var jsEventHandler = function jsEventHandler(event) { + // Increment nesting count for the event handler. + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + // Process any old deferred calls the user has placed. + JSEvents.runDeferredCalls(); + // Process the actual event, calls back to user C code handler. + eventHandler.handlerFunc(event); + // Process any new deferred calls that were placed right now from this event handler. + JSEvents.runDeferredCalls(); + // Out of event handler - restore nesting count. + --JSEvents.inEventHandler; + }; + + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = jsEventHandler; + eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + JSEvents.registerRemoveEventListeners(); + } else { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target + && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--); + } + } + } + },getBoundingClientRectOrZeros:function(target) { + return target.getBoundingClientRect ? target.getBoundingClientRect() : { left: 0, top: 0 }; + },pageScrollPos:function() { + if (pageXOffset > 0 || pageYOffset > 0) { + return [pageXOffset, pageYOffset]; + } + if (typeof document.documentElement.scrollLeft !== 'undefined' || typeof document.documentElement.scrollTop !== 'undefined') { + return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; + } + return [document.body.scrollLeft|0, document.body.scrollTop|0]; + },getNodeNameForTarget:function(target) { + if (!target) return ''; + if (target == window) return '#window'; + if (target == screen) return '#screen'; + return (target && target.nodeName) ? target.nodeName : ''; + },tick:function() { + if (window['performance'] && window['performance']['now']) return window['performance']['now'](); + else return Date.now(); + },fullscreenEnabled:function() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled; + }}; + + function __requestPointerLock(target) { + if (target.requestPointerLock) { + target.requestPointerLock(); + } else if (target.mozRequestPointerLock) { + target.mozRequestPointerLock(); + } else if (target.webkitRequestPointerLock) { + target.webkitRequestPointerLock(); + } else if (target.msRequestPointerLock) { + target.msRequestPointerLock(); + } else { + // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, + // or if the whole browser just doesn't support the feature. + if (document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock || document.body.msRequestPointerLock) { + return -3; + } else { + return -1; + } + } + return 0; + }function _emscripten_exit_pointerlock() { + // Make sure no queued up calls will fire after this. + JSEvents.removeDeferredCalls(__requestPointerLock); + + if (document.exitPointerLock) { + document.exitPointerLock(); + } else if (document.msExitPointerLock) { + document.msExitPointerLock(); + } else if (document.mozExitPointerLock) { + document.mozExitPointerLock(); + } else if (document.webkitExitPointerLock) { + document.webkitExitPointerLock(); + } else { + return -1; + } + return 0; + } + + + function __fillGamepadEventData(eventStruct, e) { + HEAPF64[((eventStruct)>>3)]=e.timestamp; + for(var i = 0; i < e.axes.length; ++i) { + HEAPF64[(((eventStruct+i*8)+(16))>>3)]=e.axes[i]; + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i].value; + } else { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i]; + } + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i].pressed; + } else { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i] == 1.0; + } + } + HEAP32[(((eventStruct)+(1296))>>2)]=e.connected; + HEAP32[(((eventStruct)+(1300))>>2)]=e.index; + HEAP32[(((eventStruct)+(8))>>2)]=e.axes.length; + HEAP32[(((eventStruct)+(12))>>2)]=e.buttons.length; + stringToUTF8(e.id, eventStruct + 1304, 64); + stringToUTF8(e.mapping, eventStruct + 1368, 64); + }function _emscripten_get_gamepad_status(index, gamepadState) { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + + // INVALID_PARAM is returned on a Gamepad index that never was there. + if (index < 0 || index >= JSEvents.lastGamepadState.length) return -5; + + // NO_DATA is returned on a Gamepad index that was removed. + // For previously disconnected gamepads there should be an empty slot (null/undefined/false) at the index. + // This is because gamepads must keep their original position in the array. + // For example, removing the first of two gamepads produces [null/undefined/false, gamepad]. + if (!JSEvents.lastGamepadState[index]) return -7; + + __fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); + return 0; + } + + function _emscripten_get_heap_size() { + return HEAP8.length; + } + + function _emscripten_get_num_gamepads() { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + // N.B. Do not call emscripten_get_num_gamepads() unless having first called emscripten_sample_gamepad_data(), and that has returned EMSCRIPTEN_RESULT_SUCCESS. + // Otherwise the following line will throw an exception. + return JSEvents.lastGamepadState.length; + } + + + function __fillPointerlockChangeEventData(eventStruct, e) { + var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; + var isPointerlocked = !!pointerLockElement; + HEAP32[((eventStruct)>>2)]=isPointerlocked; + var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); + var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; + stringToUTF8(nodeName, eventStruct + 4, 128); + stringToUTF8(id, eventStruct + 132, 128); + }function _emscripten_get_pointerlock_status(pointerlockStatus) { + if (pointerlockStatus) __fillPointerlockChangeEventData(pointerlockStatus); + if (!document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { + return -1; + } + return 0; + } + + + var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function() { + GL.miniTempBuffer = new Float32Array(GL.MINI_TEMP_BUFFER_SIZE); + for (var i = 0; i < GL.MINI_TEMP_BUFFER_SIZE; i++) { + GL.miniTempBufferViews[i] = GL.miniTempBuffer.subarray(0, i+1); + } + },recordError:function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode; + } + },getNewId:function(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null; + } + return ret; + },MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader, count, string, length) { + var source = ''; + for (var i = 0; i < count; ++i) { + var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; + source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); + } + return source; + },createContext:function(canvas, webGLContextAttributes) { + + + + + var ctx = + (canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes)); + + + if (!ctx) return 0; + + var handle = GL.registerContext(ctx, webGLContextAttributes); + + + + return handle; + },registerContext:function(ctx, webGLContextAttributes) { + var handle = _malloc(8); // Make space on the heap to store GL context attributes that need to be accessible as shared between threads. + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + + + + // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. + if (ctx.canvas) ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { + GL.initExtensions(context); + } + + + + + return handle; + },makeContextCurrent:function(contextHandle) { + + GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. + Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. + return !(contextHandle && !GLctx); + },getContext:function(contextHandle) { + return GL.contexts[contextHandle]; + },deleteContext:function(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; + if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. + _free(GL.contexts[contextHandle]); + GL.contexts[contextHandle] = null; + },acquireInstancedArraysExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 26 and Google Chrome 30 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('ANGLE_instanced_arrays'); + if (ext) { + ctx['vertexAttribDivisor'] = function(index, divisor) { ext['vertexAttribDivisorANGLE'](index, divisor); }; + ctx['drawArraysInstanced'] = function(mode, first, count, primcount) { ext['drawArraysInstancedANGLE'](mode, first, count, primcount); }; + ctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { ext['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; + } + },acquireVertexArrayObjectExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 25 and WebKit 536.28/desktop Safari 6.0.3 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('OES_vertex_array_object'); + if (ext) { + ctx['createVertexArray'] = function() { return ext['createVertexArrayOES'](); }; + ctx['deleteVertexArray'] = function(vao) { ext['deleteVertexArrayOES'](vao); }; + ctx['bindVertexArray'] = function(vao) { ext['bindVertexArrayOES'](vao); }; + ctx['isVertexArray'] = function(vao) { return ext['isVertexArrayOES'](vao); }; + } + },acquireDrawBuffersExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 28 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('WEBGL_draw_buffers'); + if (ext) { + ctx['drawBuffers'] = function(n, bufs) { ext['drawBuffersWEBGL'](n, bufs); }; + } + },initExtensions:function(context) { + // If this function is called without a specific context object, init the extensions of the currently active context. + if (!context) context = GL.currentContext; + + if (context.initExtensionsDone) return; + context.initExtensionsDone = true; + + var GLctx = context.GLctx; + + // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. + + if (context.version < 2) { + GL.acquireInstancedArraysExtension(GLctx); + GL.acquireVertexArrayObjectExtension(GLctx); + GL.acquireDrawBuffersExtension(GLctx); + } + + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); + + // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and + // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. + // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions + // here, as long as they don't produce a performance impact for users that might not be using those extensions. + // E.g. debugging-related extensions should probably be off by default. + var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): + "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", + "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", + "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", + "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", + "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", + // Community approved WebGL extensions ordered by number: + "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", + "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", + "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", + "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2"]; + + function shouldEnableAutomatically(extension) { + var ret = false; + automaticallyEnabledExtensions.forEach(function(include) { + if (extension.indexOf(include) != -1) { + ret = true; + } + }); + return ret; + } + + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts.forEach(function(ext) { + if (automaticallyEnabledExtensions.indexOf(ext) != -1) { + GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. + } + }); + },populateUniformTable:function(program) { + var p = GL.programs[program]; + var ptable = GL.programInfos[program] = { + uniforms: {}, + maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. + maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. + maxUniformBlockNameLength: -1 // Lazily computed as well + }; + + var utable = ptable.uniforms; + // A program's uniform table maps the string name of an uniform to an integer location of that uniform. + // The global GL.uniforms map maps integer locations to WebGLUniformLocations. + var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); + for (var i = 0; i < numUniforms; ++i) { + var u = GLctx.getActiveUniform(p, i); + + var name = u.name; + ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); + + // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", + // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. + if (name.slice(-1) == ']') { + name = name.slice(0, name.lastIndexOf('[')); + } + + // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then + // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. + // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. + var loc = GLctx.getUniformLocation(p, name); + if (loc) { + var id = GL.getNewId(GL.uniforms); + utable[name] = [u.size, id]; + GL.uniforms[id] = loc; + + for (var j = 1; j < u.size; ++j) { + var n = name + '['+j+']'; + loc = GLctx.getUniformLocation(p, n); + id = GL.getNewId(GL.uniforms); + + GL.uniforms[id] = loc; + } + } + } + }};function _emscripten_glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _emscripten_glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glBeginQueryEXT(target, id) { + GLctx.disjointTimerQueryExt['beginQueryEXT'](target, GL.timerQueriesEXT[id]); + } + + function _emscripten_glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _emscripten_glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _emscripten_glBindFramebuffer(target, framebuffer) { + + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); + + } + + function _emscripten_glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _emscripten_glBindVertexArrayOES(vao) { + GLctx['bindVertexArray'](GL.vaos[vao]); + } + + function _emscripten_glBlendColor(x0, x1, x2, x3) { GLctx['blendColor'](x0, x1, x2, x3) } + + function _emscripten_glBlendEquation(x0) { GLctx['blendEquation'](x0) } + + function _emscripten_glBlendEquationSeparate(x0, x1) { GLctx['blendEquationSeparate'](x0, x1) } + + function _emscripten_glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _emscripten_glBlendFuncSeparate(x0, x1, x2, x3) { GLctx['blendFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _emscripten_glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _emscripten_glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } + + function _emscripten_glClear(x0) { GLctx['clear'](x0) } + + function _emscripten_glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _emscripten_glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _emscripten_glClearStencil(x0) { GLctx['clearStencil'](x0) } + + function _emscripten_glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha); + } + + function _emscripten_glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _emscripten_glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexSubImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _emscripten_glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _emscripten_glCullFace(x0) { GLctx['cullFace'](x0) } + + function _emscripten_glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _emscripten_glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[(((framebuffers)+(i*4))>>2)]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } + } + + function _emscripten_glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _emscripten_glDeleteQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((ids)+(i*4))>>2)]; + var query = GL.timerQueriesEXT[id]; + if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." + GLctx.disjointTimerQueryExt['deleteQueryEXT'](query); + GL.timerQueriesEXT[id] = null; + } + } + + function _emscripten_glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } + } + + function _emscripten_glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _emscripten_glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _emscripten_glDeleteVertexArraysOES(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((vaos)+(i*4))>>2)]; + GLctx['deleteVertexArray'](GL.vaos[id]); + GL.vaos[id] = null; + } + } + + function _emscripten_glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _emscripten_glDepthMask(flag) { + GLctx.depthMask(!!flag); + } + + function _emscripten_glDepthRangef(x0, x1) { GLctx['depthRange'](x0, x1) } + + function _emscripten_glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glDisable(x0) { GLctx['disable'](x0) } + + function _emscripten_glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _emscripten_glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _emscripten_glDrawArraysInstancedANGLE(mode, first, count, primcount) { + GLctx['drawArraysInstanced'](mode, first, count, primcount); + } + + + var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n, bufs) { + + var bufArray = __tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; + } + + GLctx['drawBuffers'](bufArray); + } + + function _emscripten_glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _emscripten_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount) { + GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); + } + + function _emscripten_glEnable(x0) { GLctx['enable'](x0) } + + function _emscripten_glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _emscripten_glEndQueryEXT(target) { + GLctx.disjointTimerQueryExt['endQueryEXT'](target); + } + + function _emscripten_glFinish() { GLctx['finish']() } + + function _emscripten_glFlush() { GLctx['flush']() } + + function _emscripten_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, + GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, + GL.textures[texture], level); + } + + function _emscripten_glFrontFace(x0) { GLctx['frontFace'](x0) } + + + function __glGenObject(n, buffers, createFunction, objectTable + ) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer; + } else { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + } + HEAP32[(((buffers)+(i*4))>>2)]=id; + } + }function _emscripten_glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _emscripten_glGenFramebuffers(n, ids) { + __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers + ); + } + + function _emscripten_glGenQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var query = GLctx.disjointTimerQueryExt['createQueryEXT'](); + if (!query) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + while(i < n) HEAP32[(((ids)+(i++*4))>>2)]=0; + return; + } + var id = GL.getNewId(GL.timerQueriesEXT); + query.name = id; + GL.timerQueriesEXT[id] = query; + HEAP32[(((ids)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers + ); + } + + function _emscripten_glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _emscripten_glGenVertexArraysOES(n, arrays) { + __glGenObject(n, arrays, 'createVertexArray', GL.vaos + ); + } + + function _emscripten_glGenerateMipmap(x0) { GLctx['generateMipmap'](x0) } + + function _emscripten_glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveAttrib(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size and type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetActiveUniform(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveUniform(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size, type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetAttachedShaders(program, maxCount, count, shaders) { + var result = GLctx.getAttachedShaders(GL.programs[program]); + var len = result.length; + if (len > maxCount) { + len = maxCount; + } + HEAP32[((count)>>2)]=len; + for (var i = 0; i < len; ++i) { + var id = GL.shaders.indexOf(result[i]); + HEAP32[(((shaders)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + + function emscriptenWebGLGet(name_, p, type) { + // Guard against user passing a null pointer. + // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. + // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but + // better to report an error instead of doing anything random. + if (!p) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var ret = undefined; + switch(name_) { // Handle a few trivial GLES values + case 0x8DFA: // GL_SHADER_COMPILER + ret = 1; + break; + case 0x8DF8: // GL_SHADER_BINARY_FORMATS + if (type != 0 && type != 1) { + GL.recordError(0x0500); // GL_INVALID_ENUM + } + return; // Do not write anything to the out pointer, since no binary formats are supported. + case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS + ret = 0; + break; + case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS + // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), + // so implement it ourselves to allow C++ GLES2 code get the length. + var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); + ret = formats ? formats.length : 0; + break; + } + + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (typeof(result)) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + case "object": + if (result === null) { + // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise + // can mean an invalid name_, which we need to report as an error + switch(name_) { + case 0x8894: // ARRAY_BUFFER_BINDING + case 0x8B8D: // CURRENT_PROGRAM + case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING + case 0x8CA6: // FRAMEBUFFER_BINDING + case 0x8CA7: // RENDERBUFFER_BINDING + case 0x8069: // TEXTURE_BINDING_2D + case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES + case 0x8514: { // TEXTURE_BINDING_CUBE_MAP + ret = 0; + break; + } + default: { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + } + } else if (result instanceof Float32Array || + result instanceof Uint32Array || + result instanceof Int32Array || + result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: HEAP32[(((p)+(i*4))>>2)]=result[i]; break; + case 2: HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; + case 4: HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; + } + } + return; + } else { + try { + ret = result.name | 0; + } catch(e) { + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); + return; + } + } + break; + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Native code calling glGet' + type + 'v(' + name_ + ') and it returns ' + result + ' of type ' + typeof(result) + '!'); + return; + } + } + + switch (type) { + case 1: (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((p)>>2)]=tempI64[0],HEAP32[(((p)+(4))>>2)]=tempI64[1]); break; + case 0: HEAP32[((p)>>2)]=ret; break; + case 2: HEAPF32[((p)>>2)]=ret; break; + case 4: HEAP8[((p)>>0)]=ret ? 1 : 0; break; + } + }function _emscripten_glGetBooleanv(name_, p) { + emscriptenWebGLGet(name_, p, 4); + } + + function _emscripten_glGetBufferParameteriv(target, value, data) { + if (!data) { + // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense + // if data == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((data)>>2)]=GLctx.getBufferParameter(target, value); + } + + function _emscripten_glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0/*GL_NO_ERROR*/; + return error; + } + + function _emscripten_glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _emscripten_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || + result instanceof WebGLTexture) { + result = result.name | 0; + } + HEAP32[((params)>>2)]=result; + } + + function _emscripten_glGetIntegerv(name_, p) { + emscriptenWebGLGet(name_, p, 0); + } + + function _emscripten_glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _emscripten_glGetQueryObjecti64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryObjectui64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectuivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryivEXT(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.disjointTimerQueryExt['getQueryEXT'](target, pname); + } + + function _emscripten_glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getRenderbufferParameter(target, pname); + } + + function _emscripten_glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[((range)>>2)]=result.rangeMin; + HEAP32[(((range)+(4))>>2)]=result.rangeMax; + HEAP32[((precision)>>2)]=result.precision; + } + + function _emscripten_glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) return; // If an error occurs, nothing will be written to length or source. + var numBytesWrittenExclNull = (bufSize > 0 && source) ? stringToUTF8(result, source, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + + function stringToNewUTF8(jsString) { + var length = lengthBytesUTF8(jsString)+1; + var cString = _malloc(length); + stringToUTF8(jsString, cString, length); + return cString; + }function _emscripten_glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _emscripten_glGetTexParameterfv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAPF32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetTexParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + + function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getUniform(GL.programs[program], GL.uniforms[location]); + if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetUniformfv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 2); + } + + function _emscripten_glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0); + } + + function _emscripten_glGetVertexAttribPointerv(index, pname, pointer) { + if (!pointer) { + // GLES2 specification does not specify how to behave if pointer is a null pointer. Since calling this function does not make sense + // if pointer == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((pointer)>>2)]=GLctx.getVertexAttribOffset(index, pname); + } + + + function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 0x889F/*VERTEX_ATTRIB_ARRAY_BUFFER_BINDING*/) { + HEAP32[((params)>>2)]=data["name"]; + } else if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + case 5: HEAP32[((params)>>2)]=Math.fround(data); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + case 5: HEAP32[(((params)+(i*4))>>2)]=Math.fround(data[i]); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetVertexAttribfv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 2); + } + + function _emscripten_glGetVertexAttribiv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 5); + } + + function _emscripten_glHint(x0, x1) { GLctx['hint'](x0, x1) } + + function _emscripten_glIsBuffer(buffer) { + var b = GL.buffers[buffer]; + if (!b) return 0; + return GLctx.isBuffer(b); + } + + function _emscripten_glIsEnabled(x0) { return GLctx['isEnabled'](x0) } + + function _emscripten_glIsFramebuffer(framebuffer) { + var fb = GL.framebuffers[framebuffer]; + if (!fb) return 0; + return GLctx.isFramebuffer(fb); + } + + function _emscripten_glIsProgram(program) { + program = GL.programs[program]; + if (!program) return 0; + return GLctx.isProgram(program); + } + + function _emscripten_glIsQueryEXT(id) { + var query = GL.timerQueriesEXT[id]; + if (!query) return 0; + return GLctx.disjointTimerQueryExt['isQueryEXT'](query); + } + + function _emscripten_glIsRenderbuffer(renderbuffer) { + var rb = GL.renderbuffers[renderbuffer]; + if (!rb) return 0; + return GLctx.isRenderbuffer(rb); + } + + function _emscripten_glIsShader(shader) { + var s = GL.shaders[shader]; + if (!s) return 0; + return GLctx.isShader(s); + } + + function _emscripten_glIsTexture(id) { + var texture = GL.textures[id]; + if (!texture) return 0; + return GLctx.isTexture(texture); + } + + function _emscripten_glIsVertexArrayOES(array) { + + var vao = GL.vaos[array]; + if (!vao) return 0; + return GLctx['isVertexArray'](vao); + } + + function _emscripten_glLineWidth(x0) { GLctx['lineWidth'](x0) } + + function _emscripten_glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _emscripten_glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _emscripten_glPolygonOffset(x0, x1) { GLctx['polygonOffset'](x0, x1) } + + function _emscripten_glQueryCounterEXT(id, target) { + GLctx.disjointTimerQueryExt['queryCounterEXT'](GL.timerQueriesEXT[id], target); + } + + + + function __computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return (x + y - 1) & -y; + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize; + } + + var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4}; + + var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var sizePerPixel = __colorChannelsInGlTextureFormat[format] * __sizeOfGlTextureElementType[type]; + if (!sizePerPixel) { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + var bytes = __computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + var end = pixels + bytes; + switch(type) { + case 0x1401 /* GL_UNSIGNED_BYTE */: + return HEAPU8.subarray(pixels, end); + case 0x1406 /* GL_FLOAT */: + return HEAPF32.subarray(pixels>>2, end>>2); + case 0x1405 /* GL_UNSIGNED_INT */: + case 0x84FA /* GL_UNSIGNED_INT_24_8_WEBGL/GL_UNSIGNED_INT_24_8 */: + return HEAPU32.subarray(pixels>>2, end>>2); + case 0x1403 /* GL_UNSIGNED_SHORT */: + case 0x8363 /* GL_UNSIGNED_SHORT_5_6_5 */: + case 0x8033 /* GL_UNSIGNED_SHORT_4_4_4_4 */: + case 0x8034 /* GL_UNSIGNED_SHORT_5_5_5_1 */: + case 0x8D61 /* GL_HALF_FLOAT_OES */: + return HEAPU16.subarray(pixels>>1, end>>1); + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + } + }function _emscripten_glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _emscripten_glReleaseShaderCompiler() { + // NOP (as allowed by GLES 2.0 spec) + } + + function _emscripten_glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } + + function _emscripten_glSampleCoverage(value, invert) { + GLctx.sampleCoverage(value, !!invert); + } + + function _emscripten_glScissor(x0, x1, x2, x3) { GLctx['scissor'](x0, x1, x2, x3) } + + function _emscripten_glShaderBinary() { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + + function _emscripten_glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _emscripten_glStencilFunc(x0, x1, x2) { GLctx['stencilFunc'](x0, x1, x2) } + + function _emscripten_glStencilFuncSeparate(x0, x1, x2, x3) { GLctx['stencilFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glStencilMask(x0) { GLctx['stencilMask'](x0) } + + function _emscripten_glStencilMaskSeparate(x0, x1) { GLctx['stencilMaskSeparate'](x0, x1) } + + function _emscripten_glStencilOp(x0, x1, x2) { GLctx['stencilOp'](x0, x1, x2) } + + function _emscripten_glStencilOpSeparate(x0, x1, x2, x3) { GLctx['stencilOpSeparate'](x0, x1, x2, x3) } + + function _emscripten_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _emscripten_glTexParameterf(x0, x1, x2) { GLctx['texParameterf'](x0, x1, x2) } + + function _emscripten_glTexParameterfv(target, pname, params) { + var param = HEAPF32[((params)>>2)]; + GLctx.texParameterf(target, pname, param); + } + + function _emscripten_glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _emscripten_glTexParameteriv(target, pname, params) { + var param = HEAP32[((params)>>2)]; + GLctx.texParameteri(target, pname, param); + } + + function _emscripten_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + var pixelData = null; + if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); + } + + function _emscripten_glUniform1f(location, v0) { + GLctx.uniform1f(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1fv(location, count, value) { + + + if (count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[count-1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*4)>>2); + } + GLctx.uniform1fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1iv(location, count, value) { + + + GLctx.uniform1iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*4)>>2)); + } + + function _emscripten_glUniform2f(location, v0, v1) { + GLctx.uniform2f(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2fv(location, count, value) { + + + if (2*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[2*count-1]; + for (var i = 0; i < 2*count; i += 2) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*8)>>2); + } + GLctx.uniform2fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform2i(location, v0, v1) { + GLctx.uniform2i(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2iv(location, count, value) { + + + GLctx.uniform2iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*8)>>2)); + } + + function _emscripten_glUniform3f(location, v0, v1, v2) { + GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3fv(location, count, value) { + + + if (3*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[3*count-1]; + for (var i = 0; i < 3*count; i += 3) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*12)>>2); + } + GLctx.uniform3fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform3i(location, v0, v1, v2) { + GLctx.uniform3i(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3iv(location, count, value) { + + + GLctx.uniform3iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*12)>>2)); + } + + function _emscripten_glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4fv(location, count, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniform4fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform4i(location, v0, v1, v2, v3) { + GLctx.uniform4i(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4iv(location, count, value) { + + + GLctx.uniform4iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*16)>>2)); + } + + function _emscripten_glUniformMatrix2fv(location, count, transpose, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix3fv(location, count, transpose, value) { + + + if (9*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[9*count-1]; + for (var i = 0; i < 9*count; i += 9) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*36)>>2); + } + GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _emscripten_glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]); + } + + function _emscripten_glVertexAttrib1f(x0, x1) { GLctx['vertexAttrib1f'](x0, x1) } + + function _emscripten_glVertexAttrib1fv(index, v) { + + GLctx.vertexAttrib1f(index, HEAPF32[v>>2]); + } + + function _emscripten_glVertexAttrib2f(x0, x1, x2) { GLctx['vertexAttrib2f'](x0, x1, x2) } + + function _emscripten_glVertexAttrib2fv(index, v) { + + GLctx.vertexAttrib2f(index, HEAPF32[v>>2], HEAPF32[v+4>>2]); + } + + function _emscripten_glVertexAttrib3f(x0, x1, x2, x3) { GLctx['vertexAttrib3f'](x0, x1, x2, x3) } + + function _emscripten_glVertexAttrib3fv(index, v) { + + GLctx.vertexAttrib3f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2]); + } + + function _emscripten_glVertexAttrib4f(x0, x1, x2, x3, x4) { GLctx['vertexAttrib4f'](x0, x1, x2, x3, x4) } + + function _emscripten_glVertexAttrib4fv(index, v) { + + GLctx.vertexAttrib4f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2], HEAPF32[v+12>>2]); + } + + function _emscripten_glVertexAttribDivisorANGLE(index, divisor) { + GLctx['vertexAttribDivisor'](index, divisor); + } + + function _emscripten_glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _emscripten_glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + + var __specialEventTargets=[0, typeof document !== 'undefined' ? document : 0, typeof window !== 'undefined' ? window : 0];function __findEventTarget(target) { + warnOnce('Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.'); + try { + // The sensible "default" target varies between events, but use window as the default + // since DOM events mostly can default to that. Specific callback registrations + // override their own defaults. + if (!target) return window; + if (typeof target === "number") target = __specialEventTargets[target] || UTF8ToString(target); + if (target === '#window') return window; + else if (target === '#document') return document; + else if (target === '#screen') return screen; + else if (target === '#canvas') return Module['canvas']; + return (typeof target === 'string') ? document.getElementById(target) : target; + } catch(e) { + // In Web Workers, some objects above, such as '#document' do not exist. Gracefully + // return null for them. + return null; + } + }function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { + if (!target) target = '#canvas'; + target = __findEventTarget(target); + if (!target) return -4; + if (!target.requestPointerLock && !target.mozRequestPointerLock && !target.webkitRequestPointerLock && !target.msRequestPointerLock) { + return -1; + } + + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + + // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. + if (!canPerformRequests) { + if (deferUntilInEventHandler) { + JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); + return 1; + } else { + return -2; + } + } + + return __requestPointerLock(target); + } + + function _emscripten_run_script(ptr) { + eval(UTF8ToString(ptr)); + } + + function _emscripten_sample_gamepad_data() { + return (JSEvents.lastGamepadState = (navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null))) + ? 0 : -1; + } + + + + function __fillMouseEventData(eventStruct, e, target) { + HEAPF64[((eventStruct)>>3)]=JSEvents.tick(); + HEAP32[(((eventStruct)+(8))>>2)]=e.screenX; + HEAP32[(((eventStruct)+(12))>>2)]=e.screenY; + HEAP32[(((eventStruct)+(16))>>2)]=e.clientX; + HEAP32[(((eventStruct)+(20))>>2)]=e.clientY; + HEAP32[(((eventStruct)+(24))>>2)]=e.ctrlKey; + HEAP32[(((eventStruct)+(28))>>2)]=e.shiftKey; + HEAP32[(((eventStruct)+(32))>>2)]=e.altKey; + HEAP32[(((eventStruct)+(36))>>2)]=e.metaKey; + HEAP16[(((eventStruct)+(40))>>1)]=e.button; + HEAP16[(((eventStruct)+(42))>>1)]=e.buttons; + HEAP32[(((eventStruct)+(44))>>2)]=e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX); + HEAP32[(((eventStruct)+(48))>>2)]=e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY); + + if (Module['canvas']) { + var rect = Module['canvas'].getBoundingClientRect(); + HEAP32[(((eventStruct)+(60))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(64))>>2)]=e.clientY - rect.top; + } else { // Canvas is not initialized, return 0. + HEAP32[(((eventStruct)+(60))>>2)]=0; + HEAP32[(((eventStruct)+(64))>>2)]=0; + } + if (target) { + var rect = JSEvents.getBoundingClientRectOrZeros(target); + HEAP32[(((eventStruct)+(52))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(56))>>2)]=e.clientY - rect.top; + } else { // No specific target passed, return 0. + HEAP32[(((eventStruct)+(52))>>2)]=0; + HEAP32[(((eventStruct)+(56))>>2)]=0; + } + // wheel and mousewheel events contain wrong screenX/screenY on chrome/opera + // https://github.com/emscripten-core/emscripten/pull/4997 + // https://bugs.chromium.org/p/chromium/issues/detail?id=699956 + if (e.type !== 'wheel' && e.type !== 'mousewheel') { + JSEvents.previousScreenX = e.screenX; + JSEvents.previousScreenY = e.screenY; + } + }function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 72 ); + target = __findEventTarget(target); + + var mouseEventHandlerFunc = function(ev) { + var e = ev || event; + + // TODO: Make this access thread safe, or this could update live while app is reading it. + __fillMouseEventData(JSEvents.mouseEvent, e, target); + + if (dynCall_iiii(callbackfunc, eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: mouseEventHandlerFunc, + useCapture: useCapture + }; + // In IE, mousedown events don't either allow deferred calls to be run! + if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_click_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 4, "click", targetThread); + return 0; + } + + + + function __fillFullscreenChangeEventData(eventStruct, e) { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + var isFullscreen = !!fullscreenElement; + HEAP32[((eventStruct)>>2)]=isFullscreen; + HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); + // If transitioning to fullscreen, report info about the element that is now fullscreen. + // If transitioning to windowed mode, report info about the element that just was fullscreen. + var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; + var nodeName = JSEvents.getNodeNameForTarget(reportedElement); + var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; + stringToUTF8(nodeName, eventStruct + 8, 128); + stringToUTF8(id, eventStruct + 136, 128); + HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; + HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; + HEAP32[(((eventStruct)+(272))>>2)]=screen.width; + HEAP32[(((eventStruct)+(276))>>2)]=screen.height; + if (isFullscreen) { + JSEvents.previousFullscreenElement = fullscreenElement; + } + }function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); + + var fullscreenChangeEventhandlerFunc = function(ev) { + var e = ev || event; + + var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; + + __fillFullscreenChangeEventData(fullscreenChangeEvent, e); + + if (dynCall_iiii(callbackfunc, eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: false, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: fullscreenChangeEventhandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (!JSEvents.fullscreenEnabled()) return -1; + target = target ? __findEventTarget(target) : __specialEventTargets[1]; + if (!target) return -4; + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "msfullscreenchange", targetThread); + return 0; + } + + + function __registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.gamepadEvent) JSEvents.gamepadEvent = _malloc( 1432 ); + + var gamepadEventHandlerFunc = function(ev) { + var e = ev || event; + + var gamepadEvent = JSEvents.gamepadEvent; + __fillGamepadEventData(gamepadEvent, e["gamepad"]); + + if (dynCall_iiii(callbackfunc, eventTypeId, gamepadEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: gamepadEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread); + return 0; + } + + function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread); + return 0; + } + + + function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); + + var keyEventHandlerFunc = function(ev) { + var e = ev || event; + + var keyEventData = JSEvents.keyEvent; + stringToUTF8(e.key ? e.key : "", keyEventData + 0, 32); + stringToUTF8(e.code ? e.code : "", keyEventData + 32, 32); + HEAP32[(((keyEventData)+(64))>>2)]=e.location; + HEAP32[(((keyEventData)+(68))>>2)]=e.ctrlKey; + HEAP32[(((keyEventData)+(72))>>2)]=e.shiftKey; + HEAP32[(((keyEventData)+(76))>>2)]=e.altKey; + HEAP32[(((keyEventData)+(80))>>2)]=e.metaKey; + HEAP32[(((keyEventData)+(84))>>2)]=e.repeat; + stringToUTF8(e.locale ? e.locale : "", keyEventData + 88, 32); + stringToUTF8(e.char ? e.char : "", keyEventData + 120, 32); + HEAP32[(((keyEventData)+(152))>>2)]=e.charCode; + HEAP32[(((keyEventData)+(156))>>2)]=e.keyCode; + HEAP32[(((keyEventData)+(160))>>2)]=e.which; + + if (dynCall_iiii(callbackfunc, eventTypeId, keyEventData, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do. + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: keyEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); + return 0; + } + + + + function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); + + target = __findEventTarget(target); + + var touchEventHandlerFunc = function(ev) { + var e = ev || event; + + var touches = {}; + for(var i = 0; i < e.touches.length; ++i) { + var touch = e.touches[i]; + touch.changed = false; + touches[touch.identifier] = touch; + } + for(var i = 0; i < e.changedTouches.length; ++i) { + var touch = e.changedTouches[i]; + touches[touch.identifier] = touch; + touch.changed = true; + } + for(var i = 0; i < e.targetTouches.length; ++i) { + var touch = e.targetTouches[i]; + touches[touch.identifier].onTarget = true; + } + + var touchEvent = JSEvents.touchEvent; + var ptr = touchEvent; + HEAP32[(((ptr)+(4))>>2)]=e.ctrlKey; + HEAP32[(((ptr)+(8))>>2)]=e.shiftKey; + HEAP32[(((ptr)+(12))>>2)]=e.altKey; + HEAP32[(((ptr)+(16))>>2)]=e.metaKey; + ptr += 20; // Advance to the start of the touch array. + var canvasRect = Module['canvas'] ? Module['canvas'].getBoundingClientRect() : undefined; + var targetRect = JSEvents.getBoundingClientRectOrZeros(target); + var numTouches = 0; + for(var i in touches) { + var t = touches[i]; + HEAP32[((ptr)>>2)]=t.identifier; + HEAP32[(((ptr)+(4))>>2)]=t.screenX; + HEAP32[(((ptr)+(8))>>2)]=t.screenY; + HEAP32[(((ptr)+(12))>>2)]=t.clientX; + HEAP32[(((ptr)+(16))>>2)]=t.clientY; + HEAP32[(((ptr)+(20))>>2)]=t.pageX; + HEAP32[(((ptr)+(24))>>2)]=t.pageY; + HEAP32[(((ptr)+(28))>>2)]=t.changed; + HEAP32[(((ptr)+(32))>>2)]=t.onTarget; + if (canvasRect) { + HEAP32[(((ptr)+(44))>>2)]=t.clientX - canvasRect.left; + HEAP32[(((ptr)+(48))>>2)]=t.clientY - canvasRect.top; + } else { + HEAP32[(((ptr)+(44))>>2)]=0; + HEAP32[(((ptr)+(48))>>2)]=0; + } + HEAP32[(((ptr)+(36))>>2)]=t.clientX - targetRect.left; + HEAP32[(((ptr)+(40))>>2)]=t.clientY - targetRect.top; + + ptr += 52; + + if (++numTouches >= 32) { + break; + } + } + HEAP32[((touchEvent)>>2)]=numTouches; + + if (dynCall_iiii(callbackfunc, eventTypeId, touchEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: touchEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); + return 0; + } + + function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); + return 0; + } + + function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); + return 0; + } + + function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); + return 0; + } + + function _exit(status) { + // void _exit(int status); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html + exit(status); + } + + function _glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _glClear(x0) { GLctx['clear'](x0) } + + function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _glCullFace(x0) { GLctx['cullFace'](x0) } + + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glDisable(x0) { GLctx['disable'](x0) } + + function _glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _glEnable(x0) { GLctx['enable'](x0) } + + function _glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _glFrontFace(x0) { GLctx['frontFace'](x0) } + + function _glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + function _glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + function _glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + function _glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + var GLFW={Window:function(id, width, height, title, monitor, share) { + this.id = id; + this.x = 0; + this.y = 0; + this.fullscreen = false; // Used to determine if app in fullscreen mode + this.storedX = 0; // Used to store X before fullscreen + this.storedY = 0; // Used to store Y before fullscreen + this.width = width; + this.height = height; + this.storedWidth = width; // Used to store width before fullscreen + this.storedHeight = height; // Used to store height before fullscreen + this.title = title; + this.monitor = monitor; + this.share = share; + this.attributes = GLFW.hints; + this.inputModes = { + 0x00033001:0x00034001, // GLFW_CURSOR (GLFW_CURSOR_NORMAL) + 0x00033002:0, // GLFW_STICKY_KEYS + 0x00033003:0, // GLFW_STICKY_MOUSE_BUTTONS + }; + this.buttons = 0; + this.keys = new Array(); + this.domKeys = new Array(); + this.shouldClose = 0; + this.title = null; + this.windowPosFunc = null; // GLFWwindowposfun + this.windowSizeFunc = null; // GLFWwindowsizefun + this.windowCloseFunc = null; // GLFWwindowclosefun + this.windowRefreshFunc = null; // GLFWwindowrefreshfun + this.windowFocusFunc = null; // GLFWwindowfocusfun + this.windowIconifyFunc = null; // GLFWwindowiconifyfun + this.framebufferSizeFunc = null; // GLFWframebuffersizefun + this.mouseButtonFunc = null; // GLFWmousebuttonfun + this.cursorPosFunc = null; // GLFWcursorposfun + this.cursorEnterFunc = null; // GLFWcursorenterfun + this.scrollFunc = null; // GLFWscrollfun + this.dropFunc = null; // GLFWdropfun + this.keyFunc = null; // GLFWkeyfun + this.charFunc = null; // GLFWcharfun + this.userptr = null; + },WindowFromId:function(id) { + if (id <= 0 || !GLFW.windows) return null; + return GLFW.windows[id - 1]; + },joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode) { + switch (keycode) { + // these keycodes are only defined for GLFW3, assume they are the same for GLFW2 + case 0x20:return 32; // DOM_VK_SPACE -> GLFW_KEY_SPACE + case 0xDE:return 39; // DOM_VK_QUOTE -> GLFW_KEY_APOSTROPHE + case 0xBC:return 44; // DOM_VK_COMMA -> GLFW_KEY_COMMA + case 0xAD:return 45; // DOM_VK_HYPHEN_MINUS -> GLFW_KEY_MINUS + case 0xBD:return 45; // DOM_VK_MINUS -> GLFW_KEY_MINUS + case 0xBE:return 46; // DOM_VK_PERIOD -> GLFW_KEY_PERIOD + case 0xBF:return 47; // DOM_VK_SLASH -> GLFW_KEY_SLASH + case 0x30:return 48; // DOM_VK_0 -> GLFW_KEY_0 + case 0x31:return 49; // DOM_VK_1 -> GLFW_KEY_1 + case 0x32:return 50; // DOM_VK_2 -> GLFW_KEY_2 + case 0x33:return 51; // DOM_VK_3 -> GLFW_KEY_3 + case 0x34:return 52; // DOM_VK_4 -> GLFW_KEY_4 + case 0x35:return 53; // DOM_VK_5 -> GLFW_KEY_5 + case 0x36:return 54; // DOM_VK_6 -> GLFW_KEY_6 + case 0x37:return 55; // DOM_VK_7 -> GLFW_KEY_7 + case 0x38:return 56; // DOM_VK_8 -> GLFW_KEY_8 + case 0x39:return 57; // DOM_VK_9 -> GLFW_KEY_9 + case 0x3B:return 59; // DOM_VK_SEMICOLON -> GLFW_KEY_SEMICOLON + case 0x3D:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0xBB:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0x41:return 65; // DOM_VK_A -> GLFW_KEY_A + case 0x42:return 66; // DOM_VK_B -> GLFW_KEY_B + case 0x43:return 67; // DOM_VK_C -> GLFW_KEY_C + case 0x44:return 68; // DOM_VK_D -> GLFW_KEY_D + case 0x45:return 69; // DOM_VK_E -> GLFW_KEY_E + case 0x46:return 70; // DOM_VK_F -> GLFW_KEY_F + case 0x47:return 71; // DOM_VK_G -> GLFW_KEY_G + case 0x48:return 72; // DOM_VK_H -> GLFW_KEY_H + case 0x49:return 73; // DOM_VK_I -> GLFW_KEY_I + case 0x4A:return 74; // DOM_VK_J -> GLFW_KEY_J + case 0x4B:return 75; // DOM_VK_K -> GLFW_KEY_K + case 0x4C:return 76; // DOM_VK_L -> GLFW_KEY_L + case 0x4D:return 77; // DOM_VK_M -> GLFW_KEY_M + case 0x4E:return 78; // DOM_VK_N -> GLFW_KEY_N + case 0x4F:return 79; // DOM_VK_O -> GLFW_KEY_O + case 0x50:return 80; // DOM_VK_P -> GLFW_KEY_P + case 0x51:return 81; // DOM_VK_Q -> GLFW_KEY_Q + case 0x52:return 82; // DOM_VK_R -> GLFW_KEY_R + case 0x53:return 83; // DOM_VK_S -> GLFW_KEY_S + case 0x54:return 84; // DOM_VK_T -> GLFW_KEY_T + case 0x55:return 85; // DOM_VK_U -> GLFW_KEY_U + case 0x56:return 86; // DOM_VK_V -> GLFW_KEY_V + case 0x57:return 87; // DOM_VK_W -> GLFW_KEY_W + case 0x58:return 88; // DOM_VK_X -> GLFW_KEY_X + case 0x59:return 89; // DOM_VK_Y -> GLFW_KEY_Y + case 0x5a:return 90; // DOM_VK_Z -> GLFW_KEY_Z + case 0xDB:return 91; // DOM_VK_OPEN_BRACKET -> GLFW_KEY_LEFT_BRACKET + case 0xDC:return 92; // DOM_VK_BACKSLASH -> GLFW_KEY_BACKSLASH + case 0xDD:return 93; // DOM_VK_CLOSE_BRACKET -> GLFW_KEY_RIGHT_BRACKET + case 0xC0:return 94; // DOM_VK_BACK_QUOTE -> GLFW_KEY_GRAVE_ACCENT + + + case 0x1B:return 256; // DOM_VK_ESCAPE -> GLFW_KEY_ESCAPE + case 0x0D:return 257; // DOM_VK_RETURN -> GLFW_KEY_ENTER + case 0x09:return 258; // DOM_VK_TAB -> GLFW_KEY_TAB + case 0x08:return 259; // DOM_VK_BACK -> GLFW_KEY_BACKSPACE + case 0x2D:return 260; // DOM_VK_INSERT -> GLFW_KEY_INSERT + case 0x2E:return 261; // DOM_VK_DELETE -> GLFW_KEY_DELETE + case 0x27:return 262; // DOM_VK_RIGHT -> GLFW_KEY_RIGHT + case 0x25:return 263; // DOM_VK_LEFT -> GLFW_KEY_LEFT + case 0x28:return 264; // DOM_VK_DOWN -> GLFW_KEY_DOWN + case 0x26:return 265; // DOM_VK_UP -> GLFW_KEY_UP + case 0x21:return 266; // DOM_VK_PAGE_UP -> GLFW_KEY_PAGE_UP + case 0x22:return 267; // DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGE_DOWN + case 0x24:return 268; // DOM_VK_HOME -> GLFW_KEY_HOME + case 0x23:return 269; // DOM_VK_END -> GLFW_KEY_END + case 0x14:return 280; // DOM_VK_CAPS_LOCK -> GLFW_KEY_CAPS_LOCK + case 0x91:return 281; // DOM_VK_SCROLL_LOCK -> GLFW_KEY_SCROLL_LOCK + case 0x90:return 282; // DOM_VK_NUM_LOCK -> GLFW_KEY_NUM_LOCK + case 0x2C:return 283; // DOM_VK_SNAPSHOT -> GLFW_KEY_PRINT_SCREEN + case 0x13:return 284; // DOM_VK_PAUSE -> GLFW_KEY_PAUSE + case 0x70:return 290; // DOM_VK_F1 -> GLFW_KEY_F1 + case 0x71:return 291; // DOM_VK_F2 -> GLFW_KEY_F2 + case 0x72:return 292; // DOM_VK_F3 -> GLFW_KEY_F3 + case 0x73:return 293; // DOM_VK_F4 -> GLFW_KEY_F4 + case 0x74:return 294; // DOM_VK_F5 -> GLFW_KEY_F5 + case 0x75:return 295; // DOM_VK_F6 -> GLFW_KEY_F6 + case 0x76:return 296; // DOM_VK_F7 -> GLFW_KEY_F7 + case 0x77:return 297; // DOM_VK_F8 -> GLFW_KEY_F8 + case 0x78:return 298; // DOM_VK_F9 -> GLFW_KEY_F9 + case 0x79:return 299; // DOM_VK_F10 -> GLFW_KEY_F10 + case 0x7A:return 300; // DOM_VK_F11 -> GLFW_KEY_F11 + case 0x7B:return 301; // DOM_VK_F12 -> GLFW_KEY_F12 + case 0x7C:return 302; // DOM_VK_F13 -> GLFW_KEY_F13 + case 0x7D:return 303; // DOM_VK_F14 -> GLFW_KEY_F14 + case 0x7E:return 304; // DOM_VK_F15 -> GLFW_KEY_F15 + case 0x7F:return 305; // DOM_VK_F16 -> GLFW_KEY_F16 + case 0x80:return 306; // DOM_VK_F17 -> GLFW_KEY_F17 + case 0x81:return 307; // DOM_VK_F18 -> GLFW_KEY_F18 + case 0x82:return 308; // DOM_VK_F19 -> GLFW_KEY_F19 + case 0x83:return 309; // DOM_VK_F20 -> GLFW_KEY_F20 + case 0x84:return 310; // DOM_VK_F21 -> GLFW_KEY_F21 + case 0x85:return 311; // DOM_VK_F22 -> GLFW_KEY_F22 + case 0x86:return 312; // DOM_VK_F23 -> GLFW_KEY_F23 + case 0x87:return 313; // DOM_VK_F24 -> GLFW_KEY_F24 + case 0x88:return 314; // 0x88 (not used?) -> GLFW_KEY_F25 + case 0x60:return 320; // DOM_VK_NUMPAD0 -> GLFW_KEY_KP_0 + case 0x61:return 321; // DOM_VK_NUMPAD1 -> GLFW_KEY_KP_1 + case 0x62:return 322; // DOM_VK_NUMPAD2 -> GLFW_KEY_KP_2 + case 0x63:return 323; // DOM_VK_NUMPAD3 -> GLFW_KEY_KP_3 + case 0x64:return 324; // DOM_VK_NUMPAD4 -> GLFW_KEY_KP_4 + case 0x65:return 325; // DOM_VK_NUMPAD5 -> GLFW_KEY_KP_5 + case 0x66:return 326; // DOM_VK_NUMPAD6 -> GLFW_KEY_KP_6 + case 0x67:return 327; // DOM_VK_NUMPAD7 -> GLFW_KEY_KP_7 + case 0x68:return 328; // DOM_VK_NUMPAD8 -> GLFW_KEY_KP_8 + case 0x69:return 329; // DOM_VK_NUMPAD9 -> GLFW_KEY_KP_9 + case 0x6E:return 330; // DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL + case 0x6F:return 331; // DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE + case 0x6A:return 332; // DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY + case 0x6D:return 333; // DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT + case 0x6B:return 334; // DOM_VK_ADD -> GLFW_KEY_KP_ADD + // case 0x0D:return 335; // DOM_VK_RETURN -> GLFW_KEY_KP_ENTER (DOM_KEY_LOCATION_RIGHT) + // case 0x61:return 336; // DOM_VK_EQUALS -> GLFW_KEY_KP_EQUAL (DOM_KEY_LOCATION_RIGHT) + case 0x10:return 340; // DOM_VK_SHIFT -> GLFW_KEY_LEFT_SHIFT + case 0x11:return 341; // DOM_VK_CONTROL -> GLFW_KEY_LEFT_CONTROL + case 0x12:return 342; // DOM_VK_ALT -> GLFW_KEY_LEFT_ALT + case 0x5B:return 343; // DOM_VK_WIN -> GLFW_KEY_LEFT_SUPER + // case 0x10:return 344; // DOM_VK_SHIFT -> GLFW_KEY_RIGHT_SHIFT (DOM_KEY_LOCATION_RIGHT) + // case 0x11:return 345; // DOM_VK_CONTROL -> GLFW_KEY_RIGHT_CONTROL (DOM_KEY_LOCATION_RIGHT) + // case 0x12:return 346; // DOM_VK_ALT -> GLFW_KEY_RIGHT_ALT (DOM_KEY_LOCATION_RIGHT) + // case 0x5B:return 347; // DOM_VK_WIN -> GLFW_KEY_RIGHT_SUPER (DOM_KEY_LOCATION_RIGHT) + case 0x5D:return 348; // DOM_VK_CONTEXT_MENU -> GLFW_KEY_MENU + // XXX: GLFW_KEY_WORLD_1, GLFW_KEY_WORLD_2 what are these? + default:return -1; // GLFW_KEY_UNKNOWN + }; + },getModBits:function(win) { + var mod = 0; + if (win.keys[340]) mod |= 0x0001; // GLFW_MOD_SHIFT + if (win.keys[341]) mod |= 0x0002; // GLFW_MOD_CONTROL + if (win.keys[342]) mod |= 0x0004; // GLFW_MOD_ALT + if (win.keys[343]) mod |= 0x0008; // GLFW_MOD_SUPER + return mod; + },onKeyPress:function(event) { + if (!GLFW.active || !GLFW.active.charFunc) return; + if (event.ctrlKey || event.metaKey) return; + + // correct unicode charCode is only available with onKeyPress event + var charCode = event.charCode; + if (charCode == 0 || (charCode >= 0x00 && charCode <= 0x1F)) return; + + + dynCall_vii(GLFW.active.charFunc, GLFW.active.id, charCode); + },onKeyChanged:function(keyCode, status) { + if (!GLFW.active) return; + + var key = GLFW.DOMToGLFWKeyCode(keyCode); + if (key == -1) return; + + var repeat = status && GLFW.active.keys[key]; + GLFW.active.keys[key] = status; + GLFW.active.domKeys[keyCode] = status; + if (!GLFW.active.keyFunc) return; + + + if (repeat) status = 2; // GLFW_REPEAT + dynCall_viiiii(GLFW.active.keyFunc, GLFW.active.id, key, keyCode, status, GLFW.getModBits(GLFW.active)); + },onGamepadConnected:function(event) { + GLFW.refreshJoysticks(); + },onGamepadDisconnected:function(event) { + GLFW.refreshJoysticks(); + },onKeydown:function(event) { + GLFW.onKeyChanged(event.keyCode, 1); // GLFW_PRESS or GLFW_REPEAT + + // This logic comes directly from the sdl implementation. We cannot + // call preventDefault on all keydown events otherwise onKeyPress will + // not get called + if (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */) { + event.preventDefault(); + } + },onKeyup:function(event) { + GLFW.onKeyChanged(event.keyCode, 0); // GLFW_RELEASE + },onBlur:function(event) { + if (!GLFW.active) return; + + for (var i = 0; i < GLFW.active.domKeys.length; ++i) { + if (GLFW.active.domKeys[i]) { + GLFW.onKeyChanged(i, 0); // GLFW_RELEASE + } + } + },onMousemove:function(event) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"] || !GLFW.active.cursorPosFunc) return; + + + dynCall_vidd(GLFW.active.cursorPosFunc, GLFW.active.id, Browser.mouseX, Browser.mouseY); + },DOMToGLFWMouseButton:function(event) { + // DOM and glfw have different button codes. + // See http://www.w3schools.com/jsref/event_button.asp. + var eventButton = event['button']; + if (eventButton > 0) { + if (eventButton == 1) { + eventButton = 2; + } else { + eventButton = 1; + } + } + return eventButton; + },onMouseenter:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 1); + },onMouseleave:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 0); + },onMouseButtonChanged:function(event, status) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"]) return; + + var eventButton = GLFW.DOMToGLFWMouseButton(event); + + if (status == 1) { // GLFW_PRESS + GLFW.active.buttons |= (1 << eventButton); + try { + event.target.setCapture(); + } catch (e) {} + } else { // GLFW_RELEASE + GLFW.active.buttons &= ~(1 << eventButton); + } + + if (!GLFW.active.mouseButtonFunc) return; + + + dynCall_viiii(GLFW.active.mouseButtonFunc, GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active)); + },onMouseButtonDown:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 1); // GLFW_PRESS + },onMouseButtonUp:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 0); // GLFW_RELEASE + },onMouseWheel:function(event) { + // Note the minus sign that flips browser wheel direction (positive direction scrolls page down) to native wheel direction (positive direction is mouse wheel up) + var delta = -Browser.getMouseWheelDelta(event); + delta = (delta == 0) ? 0 : (delta > 0 ? Math.max(delta, 1) : Math.min(delta, -1)); // Quantize to integer so that minimum scroll is at least +/- 1. + GLFW.wheelPos += delta; + + if (!GLFW.active || !GLFW.active.scrollFunc || event.target != Module['canvas']) return; + + + var sx = 0; + var sy = 0; + if (event.type == 'mousewheel') { + sx = event.wheelDeltaX; + sy = event.wheelDeltaY; + } else { + sx = event.deltaX; + sy = event.deltaY; + } + + dynCall_vidd(GLFW.active.scrollFunc, GLFW.active.id, sx, sy); + + event.preventDefault(); + },onCanvasResize:function(width, height) { + if (!GLFW.active) return; + + var resizeNeeded = true; + + // If the client is requesting fullscreen mode + if (document["fullscreen"] || document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) { + GLFW.active.storedX = GLFW.active.x; + GLFW.active.storedY = GLFW.active.y; + GLFW.active.storedWidth = GLFW.active.width; + GLFW.active.storedHeight = GLFW.active.height; + GLFW.active.x = GLFW.active.y = 0; + GLFW.active.width = screen.width; + GLFW.active.height = screen.height; + GLFW.active.fullscreen = true; + + // If the client is reverting from fullscreen mode + } else if (GLFW.active.fullscreen == true) { + GLFW.active.x = GLFW.active.storedX; + GLFW.active.y = GLFW.active.storedY; + GLFW.active.width = GLFW.active.storedWidth; + GLFW.active.height = GLFW.active.storedHeight; + GLFW.active.fullscreen = false; + + // If the width/height values do not match current active window sizes + } else if (GLFW.active.width != width || GLFW.active.height != height) { + GLFW.active.width = width; + GLFW.active.height = height; + } else { + resizeNeeded = false; + } + + // If any of the above conditions were true, we need to resize the canvas + if (resizeNeeded) { + // resets the canvas size to counter the aspect preservation of Browser.updateCanvasDimensions + Browser.setCanvasSize(GLFW.active.width, GLFW.active.height, true); + // TODO: Client dimensions (clientWidth/clientHeight) vs pixel dimensions (width/height) of + // the canvas should drive window and framebuffer size respectfully. + GLFW.onWindowSizeChanged(); + GLFW.onFramebufferSizeChanged(); + } + },onWindowSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.windowSizeFunc) return; + + + dynCall_viii(GLFW.active.windowSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },onFramebufferSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.framebufferSizeFunc) return; + + dynCall_viii(GLFW.active.framebufferSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },requestFullscreen:function() { + var RFS = Module["canvas"]['requestFullscreen'] || + Module["canvas"]['mozRequestFullScreen'] || + Module["canvas"]['webkitRequestFullScreen'] || + (function() {}); + RFS.apply(Module["canvas"], []); + },requestFullScreen:function() { + err('GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.'); + GLFW.requestFullScreen = function() { + return GLFW.requestFullscreen(); + } + return GLFW.requestFullscreen(); + },exitFullscreen:function() { + Browser.exitFullscreen(); + },cancelFullScreen:function() { + err('GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.'); + GLFW.cancelFullScreen = function() { + return GLFW.exitFullscreen(); + } + return GLFW.exitFullscreen(); + },getTime:function() { + return _emscripten_get_now() / 1000; + },setWindowTitle:function(winid, title) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + win.title = UTF8ToString(title); + if (GLFW.active.id == win.id) { + document.title = win.title; + } + },setJoystickCallback:function(cbfun) { + GLFW.joystickFunc = cbfun; + GLFW.refreshJoysticks(); + },joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function() { + // Produce a new Gamepad API sample if we are ticking a new game frame, or if not using emscripten_set_main_loop() at all to drive animation. + if (Browser.mainLoop.currentFrameNumber !== GLFW.lastGamepadStateFrame || !Browser.mainLoop.currentFrameNumber) { + GLFW.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null); + GLFW.lastGamepadStateFrame = Browser.mainLoop.currentFrameNumber; + + for (var joy = 0; joy < GLFW.lastGamepadState.length; ++joy) { + var gamepad = GLFW.lastGamepadState[joy]; + + if (gamepad) { + if (!GLFW.joys[joy]) { + console.log('glfw joystick connected:',joy); + GLFW.joys[joy] = { + id: allocate(intArrayFromString(gamepad.id), 'i8', ALLOC_NORMAL), + buttonsCount: gamepad.buttons.length, + axesCount: gamepad.axes.length, + buttons: allocate(new Array(gamepad.buttons.length), 'i8', ALLOC_NORMAL), + axes: allocate(new Array(gamepad.axes.length*4), 'float', ALLOC_NORMAL) + }; + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040001); // GLFW_CONNECTED + } + } + + var data = GLFW.joys[joy]; + + for (var i = 0; i < gamepad.buttons.length; ++i) { + setValue(data.buttons + i, gamepad.buttons[i].pressed, 'i8'); + } + + for (var i = 0; i < gamepad.axes.length; ++i) { + setValue(data.axes + i*4, gamepad.axes[i], 'float'); + } + } else { + if (GLFW.joys[joy]) { + console.log('glfw joystick disconnected',joy); + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040002); // GLFW_DISCONNECTED + } + + _free(GLFW.joys[joy].id); + _free(GLFW.joys[joy].buttons); + _free(GLFW.joys[joy].axes); + + delete GLFW.joys[joy]; + } + } + } + } + },setKeyCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.keyFunc = cbfun; + },setCharCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.charFunc = cbfun; + },setMouseButtonCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.mouseButtonFunc = cbfun; + },setCursorPosCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorPosFunc = cbfun; + },setScrollCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.scrollFunc = cbfun; + },setDropCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.dropFunc = cbfun; + console.log("--->LOG: setDropCallback assigned!"); + },onDrop:function(event) { + + console.log("--->LOG: OnDrop: GO!"); + + if (!GLFW.active || !GLFW.active.dropFunc) return; + if (!event.dataTransfer || !event.dataTransfer.files || event.dataTransfer.files.length == 0) return; + + console.log("--->LOG: OnDrop: STEP1"); + + event.preventDefault(); + + //#if '$FS' in addedLibraryItems + + console.log("--->LOG: OnDrop: STEP2"); + + var filenames = allocate(new Array(event.dataTransfer.files.length*4), 'i8*', ALLOC_NORMAL); + var filenamesArray = []; + var count = event.dataTransfer.files.length; + + // Read and save the files to emscripten's FS + var written = 0; + var drop_dir = '.glfw_dropped_files'; + FS.createPath('/', drop_dir); + + console.log("--->LOG: OnDrop: STEP3"); + + function save(file) { + var path = '/' + drop_dir + '/' + file.name.replace(/\//g, '_'); + var reader = new FileReader(); + reader.onloadend = function(e) { + if (reader.readyState != 2) { // not DONE + ++written; + console.log('failed to read dropped file: '+file.name+': '+reader.error); + return; + } + + var data = e.target.result; + FS.writeFile(path, new Uint8Array(data)); + if (++written === count) { + dynCall_viii(GLFW.active.dropFunc, GLFW.active.id, count, filenames); + + for (var i = 0; i < filenamesArray.length; ++i) { + _free(filenamesArray[i]); + } + _free(filenames); + } + }; + reader.readAsArrayBuffer(file); + + var filename = allocate(intArrayFromString(path), 'i8', ALLOC_NORMAL); + filenamesArray.push(filename); + setValue(filenames + i*4, filename, 'i8*'); + } + + for (var i = 0; i < count; ++i) { + save(event.dataTransfer.files[i]); + } + + //#endif // '$FS' in addedLibraryItems + + return false; + },onDragover:function(event) { + if (!GLFW.active || !GLFW.active.dropFunc) return; + + event.preventDefault(); + return false; + },setWindowSizeCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowSizeFunc = cbfun; + + },setWindowCloseCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowCloseFunc = cbfun; + },setWindowRefreshCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowRefreshFunc = cbfun; + },onClickRequestPointerLock:function(e) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + e.preventDefault(); + } + },setInputMode:function(winid, mode, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + switch(mode) { + case 0x00033001: { // GLFW_CURSOR + switch(value) { + case 0x00034001: { // GLFW_CURSOR_NORMAL + win.inputModes[mode] = value; + Module['canvas'].removeEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].exitPointerLock(); + break; + } + case 0x00034002: { // GLFW_CURSOR_HIDDEN + console.log("glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented."); + break; + } + case 0x00034003: { // GLFW_CURSOR_DISABLED + win.inputModes[mode] = value; + Module['canvas'].addEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].requestPointerLock(); + break; + } + default: { + console.log("glfwSetInputMode called with unknown value parameter value: " + value + "."); + break; + } + } + break; + } + case 0x00033002: { // GLFW_STICKY_KEYS + console.log("glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented."); + break; + } + case 0x00033003: { // GLFW_STICKY_MOUSE_BUTTONS + console.log("glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented."); + break; + } + default: { + console.log("glfwSetInputMode called with unknown mode parameter value: " + mode + "."); + break; + } + } + },getKey:function(winid, key) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return win.keys[key]; + },getMouseButton:function(winid, button) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return (win.buttons & (1 << button)) > 0; + },getCursorPos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'double'); + setValue(y, Browser.mouseY, 'double'); + },getMousePos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'i32'); + setValue(y, Browser.mouseY, 'i32'); + },setCursorPos:function(winid, x, y) { + },getWindowPos:function(winid, x, y) { + var wx = 0; + var wy = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + wx = win.x; + wy = win.y; + } + + setValue(x, wx, 'i32'); + setValue(y, wy, 'i32'); + },setWindowPos:function(winid, x, y) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.x = x; + win.y = y; + },getWindowSize:function(winid, width, height) { + var ww = 0; + var wh = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + ww = win.width; + wh = win.height; + } + + setValue(width, ww, 'i32'); + setValue(height, wh, 'i32'); + },setWindowSize:function(winid, width, height) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (GLFW.active.id == win.id) { + if (width == screen.width && height == screen.height) { + GLFW.requestFullscreen(); + } else { + GLFW.exitFullscreen(); + Browser.setCanvasSize(width, height); + win.width = width; + win.height = height; + } + } + + if (!win.windowSizeFunc) return; + + + dynCall_viii(win.windowSizeFunc, win.id, width, height); + },createWindow:function(width, height, title, monitor, share) { + var i, id; + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] !== null; i++); + if (i > 0) throw "glfwCreateWindow only supports one window at time currently"; + + // id for window + id = i + 1; + + // not valid + if (width <= 0 || height <= 0) return 0; + + if (monitor) { + GLFW.requestFullscreen(); + } else { + Browser.setCanvasSize(width, height); + } + + // Create context when there are no existing alive windows + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] == null; i++); + if (i == GLFW.windows.length) { + var contextAttributes = { + antialias: (GLFW.hints[0x0002100D] > 1), // GLFW_SAMPLES + depth: (GLFW.hints[0x00021005] > 0), // GLFW_DEPTH_BITS + stencil: (GLFW.hints[0x00021006] > 0), // GLFW_STENCIL_BITS + alpha: (GLFW.hints[0x00021004] > 0) // GLFW_ALPHA_BITS + } + Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes); + } + + // If context creation failed, do not return a valid window + if (!Module.ctx) return 0; + + // Get non alive id + var win = new GLFW.Window(id, width, height, title, monitor, share); + + // Set window to array + if (id - 1 == GLFW.windows.length) { + GLFW.windows.push(win); + } else { + GLFW.windows[id - 1] = win; + } + + GLFW.active = win; + return win.id; + },destroyWindow:function(winid) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (win.windowCloseFunc) + dynCall_vi(win.windowCloseFunc, win.id); + + GLFW.windows[win.id - 1] = null; + if (GLFW.active.id == win.id) + GLFW.active = null; + + // Destroy context when no alive windows + for (var i = 0; i < GLFW.windows.length; i++) + if (GLFW.windows[i] !== null) return; + + Module.ctx = Browser.destroyContext(Module['canvas'], true, true); + },swapBuffers:function(winid) { + },GLFW2ParamToGLFW3Param:function(param) { + var table = { + 0x00030001:0, // GLFW_MOUSE_CURSOR + 0x00030002:0, // GLFW_STICKY_KEYS + 0x00030003:0, // GLFW_STICKY_MOUSE_BUTTONS + 0x00030004:0, // GLFW_SYSTEM_KEYS + 0x00030005:0, // GLFW_KEY_REPEAT + 0x00030006:0, // GLFW_AUTO_POLL_EVENTS + 0x00020001:0, // GLFW_OPENED + 0x00020002:0, // GLFW_ACTIVE + 0x00020003:0, // GLFW_ICONIFIED + 0x00020004:0, // GLFW_ACCELERATED + 0x00020005:0x00021001, // GLFW_RED_BITS + 0x00020006:0x00021002, // GLFW_GREEN_BITS + 0x00020007:0x00021003, // GLFW_BLUE_BITS + 0x00020008:0x00021004, // GLFW_ALPHA_BITS + 0x00020009:0x00021005, // GLFW_DEPTH_BITS + 0x0002000A:0x00021006, // GLFW_STENCIL_BITS + 0x0002000B:0x0002100F, // GLFW_REFRESH_RATE + 0x0002000C:0x00021007, // GLFW_ACCUM_RED_BITS + 0x0002000D:0x00021008, // GLFW_ACCUM_GREEN_BITS + 0x0002000E:0x00021009, // GLFW_ACCUM_BLUE_BITS + 0x0002000F:0x0002100A, // GLFW_ACCUM_ALPHA_BITS + 0x00020010:0x0002100B, // GLFW_AUX_BUFFERS + 0x00020011:0x0002100C, // GLFW_STEREO + 0x00020012:0, // GLFW_WINDOW_NO_RESIZE + 0x00020013:0x0002100D, // GLFW_FSAA_SAMPLES + 0x00020014:0x00022002, // GLFW_OPENGL_VERSION_MAJOR + 0x00020015:0x00022003, // GLFW_OPENGL_VERSION_MINOR + 0x00020016:0x00022006, // GLFW_OPENGL_FORWARD_COMPAT + 0x00020017:0x00022007, // GLFW_OPENGL_DEBUG_CONTEXT + 0x00020018:0x00022008, // GLFW_OPENGL_PROFILE + }; + return table[param]; + }};function _glfwCreateWindow(width, height, title, monitor, share) { + return GLFW.createWindow(width, height, title, monitor, share); + } + + function _glfwDefaultWindowHints() { + GLFW.hints = GLFW.defaultHints; + } + + function _glfwDestroyWindow(winid) { + return GLFW.destroyWindow(winid); + } + + function _glfwGetCursorPos(winid, x, y) { + GLFW.getCursorPos(winid, x, y); + } + + function _glfwGetPrimaryMonitor() { + return 1; + } + + function _glfwGetTime() { + return GLFW.getTime() - GLFW.initialTime; + } + + function _glfwGetVideoModes(monitor, count) { + setValue(count, 0, 'i32'); + return 0; + } + + function _glfwInit() { + if (GLFW.windows) return 1; // GL_TRUE + + GLFW.initialTime = GLFW.getTime(); + GLFW.hints = GLFW.defaultHints; + GLFW.windows = new Array() + GLFW.active = null; + + window.addEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.addEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.addEventListener("keydown", GLFW.onKeydown, true); + window.addEventListener("keypress", GLFW.onKeyPress, true); + window.addEventListener("keyup", GLFW.onKeyup, true); + window.addEventListener("blur", GLFW.onBlur, true); + Module["canvas"].addEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].addEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].addEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].addEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].addEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].addEventListener('drop', GLFW.onDrop, true); + Module["canvas"].addEventListener('dragover', GLFW.onDragover, true); + + Browser.resizeListeners.push(function(width, height) { + GLFW.onCanvasResize(width, height); + }); + return 1; // GL_TRUE + } + + function _glfwMakeContextCurrent(winid) {} + + function _glfwSetCharCallback(winid, cbfun) { + GLFW.setCharCallback(winid, cbfun); + } + + function _glfwSetCursorEnterCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorEnterFunc = cbfun; + } + + function _glfwSetCursorPosCallback(winid, cbfun) { + GLFW.setCursorPosCallback(winid, cbfun); + } + + function _glfwSetDropCallback(winid, cbfun) { + GLFW.setDropCallback(winid, cbfun); + console.log("--->LOG: glfwSetDropCallback set!"); + } + + function _glfwSetErrorCallback(cbfun) { + GLFW.errorFunc = cbfun; + } + + function _glfwSetKeyCallback(winid, cbfun) { + GLFW.setKeyCallback(winid, cbfun); + } + + function _glfwSetMouseButtonCallback(winid, cbfun) { + GLFW.setMouseButtonCallback(winid, cbfun); + } + + function _glfwSetScrollCallback(winid, cbfun) { + GLFW.setScrollCallback(winid, cbfun); + } + + function _glfwSetWindowIconifyCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowIconifyFunc = cbfun; + } + + function _glfwSetWindowShouldClose(winid, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.shouldClose = value; + } + + function _glfwSetWindowSizeCallback(winid, cbfun) { + GLFW.setWindowSizeCallback(winid, cbfun); + } + + function _glfwSwapBuffers(winid) { + GLFW.swapBuffers(winid); + } + + function _glfwSwapInterval(interval) { + interval = Math.abs(interval); // GLFW uses negative values to enable GLX_EXT_swap_control_tear, which we don't have, so just treat negative and positive the same. + if (interval == 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 0); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, interval); + } + + function _glfwTerminate() { + window.removeEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.removeEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.removeEventListener("keydown", GLFW.onKeydown, true); + window.removeEventListener("keypress", GLFW.onKeyPress, true); + window.removeEventListener("keyup", GLFW.onKeyup, true); + window.removeEventListener("blur", GLFW.onBlur, true); + Module["canvas"].removeEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].removeEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].removeEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].removeEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].removeEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].removeEventListener('drop', GLFW.onDrop, true); + Module["canvas"].removeEventListener('dragover', GLFW.onDragover, true); + + + Module["canvas"].width = Module["canvas"].height = 1; + GLFW.windows = null; + GLFW.active = null; + } + + function _glfwWindowHint(target, hint) { + GLFW.hints[target] = hint; + } + + + + + function _llvm_stackrestore(p) { + var self = _llvm_stacksave; + var ret = self.LLVM_SAVEDSTACKS[p]; + self.LLVM_SAVEDSTACKS.splice(p, 1); + stackRestore(ret); + } + + function _llvm_stacksave() { + var self = _llvm_stacksave; + if (!self.LLVM_SAVEDSTACKS) { + self.LLVM_SAVEDSTACKS = []; + } + self.LLVM_SAVEDSTACKS.push(stackSave()); + return self.LLVM_SAVEDSTACKS.length-1; + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + } + + + + + + + + + function _usleep(useconds) { + // int usleep(useconds_t useconds); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/usleep.html + // We're single-threaded, so use a busy loop. Super-ugly. + var msec = useconds / 1000; + if ((ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && self['performance'] && self['performance']['now']) { + var start = self['performance']['now'](); + while (self['performance']['now']() - start < msec) { + // Do nothing. + } + } else { + var start = Date.now(); + while (Date.now() - start < msec) { + // Do nothing. + } + } + return 0; + }function _nanosleep(rqtp, rmtp) { + // int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); + if (rqtp === 0) { + ___setErrNo(22); + return -1; + } + var seconds = HEAP32[((rqtp)>>2)]; + var nanoseconds = HEAP32[(((rqtp)+(4))>>2)]; + if (nanoseconds < 0 || nanoseconds > 999999999 || seconds < 0) { + ___setErrNo(22); + return -1; + } + if (rmtp !== 0) { + HEAP32[((rmtp)>>2)]=0; + HEAP32[(((rmtp)+(4))>>2)]=0; + } + return _usleep((seconds * 1e6) + (nanoseconds / 1000)); + } + + + + function abortOnCannotGrowMemory(requestedSize) { + abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); + }function _emscripten_resize_heap(requestedSize) { + abortOnCannotGrowMemory(requestedSize); + } + + function _time(ptr) { + var ret = (Date.now()/1000)|0; + if (ptr) { + HEAP32[((ptr)>>2)]=ret; + } + return ret; + } + +FS.staticInit();Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink;; +if (ENVIRONMENT_HAS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); }; +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."); Module["requestFullScreen"] = Module["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; + Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; +if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = function _emscripten_get_now_actual() { + var t = process['hrtime'](); + return t[0] * 1e3 + t[1] / 1e6; + }; + } else if (typeof dateNow !== 'undefined') { + _emscripten_get_now = dateNow; + } else if (typeof performance === 'object' && performance && typeof performance['now'] === 'function') { + _emscripten_get_now = function() { return performance['now'](); }; + } else { + _emscripten_get_now = Date.now; + }; +var GLctx; GL.init(); +for (var i = 0; i < 32; i++) __tempFixedLengthArray.push(new Array(i));; +var ASSERTIONS = true; + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil,Int8Array,Int32Array + +function nullFunc_ff(x) { abortFnPtrError(x, 'ff'); } +function nullFunc_fff(x) { abortFnPtrError(x, 'fff'); } +function nullFunc_i(x) { abortFnPtrError(x, 'i'); } +function nullFunc_ii(x) { abortFnPtrError(x, 'ii'); } +function nullFunc_iidiiii(x) { abortFnPtrError(x, 'iidiiii'); } +function nullFunc_iii(x) { abortFnPtrError(x, 'iii'); } +function nullFunc_iiii(x) { abortFnPtrError(x, 'iiii'); } +function nullFunc_iiiii(x) { abortFnPtrError(x, 'iiiii'); } +function nullFunc_jiji(x) { abortFnPtrError(x, 'jiji'); } +function nullFunc_v(x) { abortFnPtrError(x, 'v'); } +function nullFunc_vf(x) { abortFnPtrError(x, 'vf'); } +function nullFunc_vff(x) { abortFnPtrError(x, 'vff'); } +function nullFunc_vffff(x) { abortFnPtrError(x, 'vffff'); } +function nullFunc_vfi(x) { abortFnPtrError(x, 'vfi'); } +function nullFunc_vi(x) { abortFnPtrError(x, 'vi'); } +function nullFunc_vidd(x) { abortFnPtrError(x, 'vidd'); } +function nullFunc_vif(x) { abortFnPtrError(x, 'vif'); } +function nullFunc_viff(x) { abortFnPtrError(x, 'viff'); } +function nullFunc_vifff(x) { abortFnPtrError(x, 'vifff'); } +function nullFunc_viffff(x) { abortFnPtrError(x, 'viffff'); } +function nullFunc_vii(x) { abortFnPtrError(x, 'vii'); } +function nullFunc_viif(x) { abortFnPtrError(x, 'viif'); } +function nullFunc_viii(x) { abortFnPtrError(x, 'viii'); } +function nullFunc_viiii(x) { abortFnPtrError(x, 'viiii'); } +function nullFunc_viiiii(x) { abortFnPtrError(x, 'viiiii'); } +function nullFunc_viiiiii(x) { abortFnPtrError(x, 'viiiiii'); } +function nullFunc_viiiiiii(x) { abortFnPtrError(x, 'viiiiiii'); } +function nullFunc_viiiiiiii(x) { abortFnPtrError(x, 'viiiiiiii'); } +function nullFunc_viiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiii'); } +function nullFunc_viiji(x) { abortFnPtrError(x, 'viiji'); } + +var asmGlobalArg = {}; + +var asmLibraryArg = { + "abort": abort, + "setTempRet0": setTempRet0, + "getTempRet0": getTempRet0, + "abortStackOverflow": abortStackOverflow, + "nullFunc_ff": nullFunc_ff, + "nullFunc_fff": nullFunc_fff, + "nullFunc_i": nullFunc_i, + "nullFunc_ii": nullFunc_ii, + "nullFunc_iidiiii": nullFunc_iidiiii, + "nullFunc_iii": nullFunc_iii, + "nullFunc_iiii": nullFunc_iiii, + "nullFunc_iiiii": nullFunc_iiiii, + "nullFunc_jiji": nullFunc_jiji, + "nullFunc_v": nullFunc_v, + "nullFunc_vf": nullFunc_vf, + "nullFunc_vff": nullFunc_vff, + "nullFunc_vffff": nullFunc_vffff, + "nullFunc_vfi": nullFunc_vfi, + "nullFunc_vi": nullFunc_vi, + "nullFunc_vidd": nullFunc_vidd, + "nullFunc_vif": nullFunc_vif, + "nullFunc_viff": nullFunc_viff, + "nullFunc_vifff": nullFunc_vifff, + "nullFunc_viffff": nullFunc_viffff, + "nullFunc_vii": nullFunc_vii, + "nullFunc_viif": nullFunc_viif, + "nullFunc_viii": nullFunc_viii, + "nullFunc_viiii": nullFunc_viiii, + "nullFunc_viiiii": nullFunc_viiiii, + "nullFunc_viiiiii": nullFunc_viiiiii, + "nullFunc_viiiiiii": nullFunc_viiiiiii, + "nullFunc_viiiiiiii": nullFunc_viiiiiiii, + "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, + "nullFunc_viiji": nullFunc_viiji, + "___assert_fail": ___assert_fail, + "___lock": ___lock, + "___setErrNo": ___setErrNo, + "___syscall140": ___syscall140, + "___syscall145": ___syscall145, + "___syscall221": ___syscall221, + "___syscall5": ___syscall5, + "___syscall54": ___syscall54, + "___syscall6": ___syscall6, + "___unlock": ___unlock, + "___wasi_fd_write": ___wasi_fd_write, + "__computeUnpackAlignedImageSize": __computeUnpackAlignedImageSize, + "__fillFullscreenChangeEventData": __fillFullscreenChangeEventData, + "__fillGamepadEventData": __fillGamepadEventData, + "__fillMouseEventData": __fillMouseEventData, + "__fillPointerlockChangeEventData": __fillPointerlockChangeEventData, + "__findEventTarget": __findEventTarget, + "__glGenObject": __glGenObject, + "__registerFullscreenChangeEventCallback": __registerFullscreenChangeEventCallback, + "__registerGamepadEventCallback": __registerGamepadEventCallback, + "__registerKeyEventCallback": __registerKeyEventCallback, + "__registerMouseEventCallback": __registerMouseEventCallback, + "__registerTouchEventCallback": __registerTouchEventCallback, + "__requestPointerLock": __requestPointerLock, + "_eglGetProcAddress": _eglGetProcAddress, + "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, + "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, + "_emscripten_get_heap_size": _emscripten_get_heap_size, + "_emscripten_get_now": _emscripten_get_now, + "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, + "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, + "_emscripten_glActiveTexture": _emscripten_glActiveTexture, + "_emscripten_glAttachShader": _emscripten_glAttachShader, + "_emscripten_glBeginQueryEXT": _emscripten_glBeginQueryEXT, + "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, + "_emscripten_glBindBuffer": _emscripten_glBindBuffer, + "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, + "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, + "_emscripten_glBindTexture": _emscripten_glBindTexture, + "_emscripten_glBindVertexArrayOES": _emscripten_glBindVertexArrayOES, + "_emscripten_glBlendColor": _emscripten_glBlendColor, + "_emscripten_glBlendEquation": _emscripten_glBlendEquation, + "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, + "_emscripten_glBlendFunc": _emscripten_glBlendFunc, + "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, + "_emscripten_glBufferData": _emscripten_glBufferData, + "_emscripten_glBufferSubData": _emscripten_glBufferSubData, + "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, + "_emscripten_glClear": _emscripten_glClear, + "_emscripten_glClearColor": _emscripten_glClearColor, + "_emscripten_glClearDepthf": _emscripten_glClearDepthf, + "_emscripten_glClearStencil": _emscripten_glClearStencil, + "_emscripten_glColorMask": _emscripten_glColorMask, + "_emscripten_glCompileShader": _emscripten_glCompileShader, + "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, + "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, + "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, + "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, + "_emscripten_glCreateProgram": _emscripten_glCreateProgram, + "_emscripten_glCreateShader": _emscripten_glCreateShader, + "_emscripten_glCullFace": _emscripten_glCullFace, + "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, + "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, + "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, + "_emscripten_glDeleteQueriesEXT": _emscripten_glDeleteQueriesEXT, + "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, + "_emscripten_glDeleteShader": _emscripten_glDeleteShader, + "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, + "_emscripten_glDeleteVertexArraysOES": _emscripten_glDeleteVertexArraysOES, + "_emscripten_glDepthFunc": _emscripten_glDepthFunc, + "_emscripten_glDepthMask": _emscripten_glDepthMask, + "_emscripten_glDepthRangef": _emscripten_glDepthRangef, + "_emscripten_glDetachShader": _emscripten_glDetachShader, + "_emscripten_glDisable": _emscripten_glDisable, + "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, + "_emscripten_glDrawArrays": _emscripten_glDrawArrays, + "_emscripten_glDrawArraysInstancedANGLE": _emscripten_glDrawArraysInstancedANGLE, + "_emscripten_glDrawBuffersWEBGL": _emscripten_glDrawBuffersWEBGL, + "_emscripten_glDrawElements": _emscripten_glDrawElements, + "_emscripten_glDrawElementsInstancedANGLE": _emscripten_glDrawElementsInstancedANGLE, + "_emscripten_glEnable": _emscripten_glEnable, + "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, + "_emscripten_glEndQueryEXT": _emscripten_glEndQueryEXT, + "_emscripten_glFinish": _emscripten_glFinish, + "_emscripten_glFlush": _emscripten_glFlush, + "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, + "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, + "_emscripten_glFrontFace": _emscripten_glFrontFace, + "_emscripten_glGenBuffers": _emscripten_glGenBuffers, + "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, + "_emscripten_glGenQueriesEXT": _emscripten_glGenQueriesEXT, + "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, + "_emscripten_glGenTextures": _emscripten_glGenTextures, + "_emscripten_glGenVertexArraysOES": _emscripten_glGenVertexArraysOES, + "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, + "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, + "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, + "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, + "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, + "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, + "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, + "_emscripten_glGetError": _emscripten_glGetError, + "_emscripten_glGetFloatv": _emscripten_glGetFloatv, + "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, + "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, + "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, + "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, + "_emscripten_glGetQueryObjecti64vEXT": _emscripten_glGetQueryObjecti64vEXT, + "_emscripten_glGetQueryObjectivEXT": _emscripten_glGetQueryObjectivEXT, + "_emscripten_glGetQueryObjectui64vEXT": _emscripten_glGetQueryObjectui64vEXT, + "_emscripten_glGetQueryObjectuivEXT": _emscripten_glGetQueryObjectuivEXT, + "_emscripten_glGetQueryivEXT": _emscripten_glGetQueryivEXT, + "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, + "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, + "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, + "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, + "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, + "_emscripten_glGetString": _emscripten_glGetString, + "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, + "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, + "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, + "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, + "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, + "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, + "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, + "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, + "_emscripten_glHint": _emscripten_glHint, + "_emscripten_glIsBuffer": _emscripten_glIsBuffer, + "_emscripten_glIsEnabled": _emscripten_glIsEnabled, + "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, + "_emscripten_glIsProgram": _emscripten_glIsProgram, + "_emscripten_glIsQueryEXT": _emscripten_glIsQueryEXT, + "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, + "_emscripten_glIsShader": _emscripten_glIsShader, + "_emscripten_glIsTexture": _emscripten_glIsTexture, + "_emscripten_glIsVertexArrayOES": _emscripten_glIsVertexArrayOES, + "_emscripten_glLineWidth": _emscripten_glLineWidth, + "_emscripten_glLinkProgram": _emscripten_glLinkProgram, + "_emscripten_glPixelStorei": _emscripten_glPixelStorei, + "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, + "_emscripten_glQueryCounterEXT": _emscripten_glQueryCounterEXT, + "_emscripten_glReadPixels": _emscripten_glReadPixels, + "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, + "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, + "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, + "_emscripten_glScissor": _emscripten_glScissor, + "_emscripten_glShaderBinary": _emscripten_glShaderBinary, + "_emscripten_glShaderSource": _emscripten_glShaderSource, + "_emscripten_glStencilFunc": _emscripten_glStencilFunc, + "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, + "_emscripten_glStencilMask": _emscripten_glStencilMask, + "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, + "_emscripten_glStencilOp": _emscripten_glStencilOp, + "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, + "_emscripten_glTexImage2D": _emscripten_glTexImage2D, + "_emscripten_glTexParameterf": _emscripten_glTexParameterf, + "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, + "_emscripten_glTexParameteri": _emscripten_glTexParameteri, + "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, + "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, + "_emscripten_glUniform1f": _emscripten_glUniform1f, + "_emscripten_glUniform1fv": _emscripten_glUniform1fv, + "_emscripten_glUniform1i": _emscripten_glUniform1i, + "_emscripten_glUniform1iv": _emscripten_glUniform1iv, + "_emscripten_glUniform2f": _emscripten_glUniform2f, + "_emscripten_glUniform2fv": _emscripten_glUniform2fv, + "_emscripten_glUniform2i": _emscripten_glUniform2i, + "_emscripten_glUniform2iv": _emscripten_glUniform2iv, + "_emscripten_glUniform3f": _emscripten_glUniform3f, + "_emscripten_glUniform3fv": _emscripten_glUniform3fv, + "_emscripten_glUniform3i": _emscripten_glUniform3i, + "_emscripten_glUniform3iv": _emscripten_glUniform3iv, + "_emscripten_glUniform4f": _emscripten_glUniform4f, + "_emscripten_glUniform4fv": _emscripten_glUniform4fv, + "_emscripten_glUniform4i": _emscripten_glUniform4i, + "_emscripten_glUniform4iv": _emscripten_glUniform4iv, + "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, + "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, + "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, + "_emscripten_glUseProgram": _emscripten_glUseProgram, + "_emscripten_glValidateProgram": _emscripten_glValidateProgram, + "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, + "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, + "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, + "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, + "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, + "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, + "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, + "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, + "_emscripten_glVertexAttribDivisorANGLE": _emscripten_glVertexAttribDivisorANGLE, + "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, + "_emscripten_glViewport": _emscripten_glViewport, + "_emscripten_memcpy_big": _emscripten_memcpy_big, + "_emscripten_request_pointerlock": _emscripten_request_pointerlock, + "_emscripten_resize_heap": _emscripten_resize_heap, + "_emscripten_run_script": _emscripten_run_script, + "_emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, + "_emscripten_set_click_callback_on_thread": _emscripten_set_click_callback_on_thread, + "_emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, + "_emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, + "_emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, + "_emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, + "_emscripten_set_main_loop": _emscripten_set_main_loop, + "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, + "_emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, + "_emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, + "_emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, + "_emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, + "_exit": _exit, + "_fd_write": _fd_write, + "_glActiveTexture": _glActiveTexture, + "_glAttachShader": _glAttachShader, + "_glBindAttribLocation": _glBindAttribLocation, + "_glBindBuffer": _glBindBuffer, + "_glBindTexture": _glBindTexture, + "_glBlendFunc": _glBlendFunc, + "_glBufferData": _glBufferData, + "_glBufferSubData": _glBufferSubData, + "_glClear": _glClear, + "_glClearColor": _glClearColor, + "_glClearDepthf": _glClearDepthf, + "_glCompileShader": _glCompileShader, + "_glCompressedTexImage2D": _glCompressedTexImage2D, + "_glCreateProgram": _glCreateProgram, + "_glCreateShader": _glCreateShader, + "_glCullFace": _glCullFace, + "_glDeleteBuffers": _glDeleteBuffers, + "_glDeleteProgram": _glDeleteProgram, + "_glDeleteShader": _glDeleteShader, + "_glDeleteTextures": _glDeleteTextures, + "_glDepthFunc": _glDepthFunc, + "_glDetachShader": _glDetachShader, + "_glDisable": _glDisable, + "_glDisableVertexAttribArray": _glDisableVertexAttribArray, + "_glDrawArrays": _glDrawArrays, + "_glDrawElements": _glDrawElements, + "_glEnable": _glEnable, + "_glEnableVertexAttribArray": _glEnableVertexAttribArray, + "_glFrontFace": _glFrontFace, + "_glGenBuffers": _glGenBuffers, + "_glGenTextures": _glGenTextures, + "_glGetAttribLocation": _glGetAttribLocation, + "_glGetFloatv": _glGetFloatv, + "_glGetProgramInfoLog": _glGetProgramInfoLog, + "_glGetProgramiv": _glGetProgramiv, + "_glGetShaderInfoLog": _glGetShaderInfoLog, + "_glGetShaderiv": _glGetShaderiv, + "_glGetString": _glGetString, + "_glGetUniformLocation": _glGetUniformLocation, + "_glLinkProgram": _glLinkProgram, + "_glPixelStorei": _glPixelStorei, + "_glReadPixels": _glReadPixels, + "_glShaderSource": _glShaderSource, + "_glTexImage2D": _glTexImage2D, + "_glTexParameteri": _glTexParameteri, + "_glUniform1i": _glUniform1i, + "_glUniform4f": _glUniform4f, + "_glUniformMatrix4fv": _glUniformMatrix4fv, + "_glUseProgram": _glUseProgram, + "_glVertexAttribPointer": _glVertexAttribPointer, + "_glViewport": _glViewport, + "_glfwCreateWindow": _glfwCreateWindow, + "_glfwDefaultWindowHints": _glfwDefaultWindowHints, + "_glfwDestroyWindow": _glfwDestroyWindow, + "_glfwGetCursorPos": _glfwGetCursorPos, + "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, + "_glfwGetTime": _glfwGetTime, + "_glfwGetVideoModes": _glfwGetVideoModes, + "_glfwInit": _glfwInit, + "_glfwMakeContextCurrent": _glfwMakeContextCurrent, + "_glfwSetCharCallback": _glfwSetCharCallback, + "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, + "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, + "_glfwSetDropCallback": _glfwSetDropCallback, + "_glfwSetErrorCallback": _glfwSetErrorCallback, + "_glfwSetKeyCallback": _glfwSetKeyCallback, + "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, + "_glfwSetScrollCallback": _glfwSetScrollCallback, + "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, + "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, + "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, + "_glfwSwapBuffers": _glfwSwapBuffers, + "_glfwSwapInterval": _glfwSwapInterval, + "_glfwTerminate": _glfwTerminate, + "_glfwWindowHint": _glfwWindowHint, + "_llvm_stackrestore": _llvm_stackrestore, + "_llvm_stacksave": _llvm_stacksave, + "_nanosleep": _nanosleep, + "_time": _time, + "_usleep": _usleep, + "abortOnCannotGrowMemory": abortOnCannotGrowMemory, + "demangle": demangle, + "demangleAll": demangleAll, + "emscriptenWebGLGet": emscriptenWebGLGet, + "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, + "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, + "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, + "jsStackTrace": jsStackTrace, + "stackTrace": stackTrace, + "stringToNewUTF8": stringToNewUTF8, + "tempDoublePtr": tempDoublePtr, + "DYNAMICTOP_PTR": DYNAMICTOP_PTR +}; +// EMSCRIPTEN_START_ASM +var asm =Module["asm"]// EMSCRIPTEN_END_ASM +(asmGlobalArg, asmLibraryArg, buffer); + +Module["asm"] = asm; +var ___errno_location = Module["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___errno_location"].apply(null, arguments) +}; + +var _emscripten_GetProcAddress = Module["_emscripten_GetProcAddress"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_GetProcAddress"].apply(null, arguments) +}; + +var _fflush = Module["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_fflush"].apply(null, arguments) +}; + +var _free = Module["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_free"].apply(null, arguments) +}; + +var _llvm_round_f32 = Module["_llvm_round_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_llvm_round_f32"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_capture__webaudio = Module["_ma_device_process_pcm_frames_capture__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_capture__webaudio"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_playback__webaudio = Module["_ma_device_process_pcm_frames_playback__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_playback__webaudio"].apply(null, arguments) +}; + +var _main = Module["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_main"].apply(null, arguments) +}; + +var _malloc = Module["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_malloc"].apply(null, arguments) +}; + +var _memcpy = Module["_memcpy"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memcpy"].apply(null, arguments) +}; + +var _memmove = Module["_memmove"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memmove"].apply(null, arguments) +}; + +var _memset = Module["_memset"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memset"].apply(null, arguments) +}; + +var _sbrk = Module["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_sbrk"].apply(null, arguments) +}; + +var _strstr = Module["_strstr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_strstr"].apply(null, arguments) +}; + +var establishStackSpace = Module["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["establishStackSpace"].apply(null, arguments) +}; + +var stackAlloc = Module["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackAlloc"].apply(null, arguments) +}; + +var stackRestore = Module["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackRestore"].apply(null, arguments) +}; + +var stackSave = Module["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackSave"].apply(null, arguments) +}; + +var dynCall_ff = Module["dynCall_ff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ff"].apply(null, arguments) +}; + +var dynCall_fff = Module["dynCall_fff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_fff"].apply(null, arguments) +}; + +var dynCall_i = Module["dynCall_i"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_i"].apply(null, arguments) +}; + +var dynCall_ii = Module["dynCall_ii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ii"].apply(null, arguments) +}; + +var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iidiiii"].apply(null, arguments) +}; + +var dynCall_iii = Module["dynCall_iii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iii"].apply(null, arguments) +}; + +var dynCall_iiii = Module["dynCall_iiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiii"].apply(null, arguments) +}; + +var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiii"].apply(null, arguments) +}; + +var dynCall_jiji = Module["dynCall_jiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_jiji"].apply(null, arguments) +}; + +var dynCall_v = Module["dynCall_v"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_v"].apply(null, arguments) +}; + +var dynCall_vf = Module["dynCall_vf"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vf"].apply(null, arguments) +}; + +var dynCall_vff = Module["dynCall_vff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vff"].apply(null, arguments) +}; + +var dynCall_vffff = Module["dynCall_vffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vffff"].apply(null, arguments) +}; + +var dynCall_vfi = Module["dynCall_vfi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vfi"].apply(null, arguments) +}; + +var dynCall_vi = Module["dynCall_vi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vi"].apply(null, arguments) +}; + +var dynCall_vidd = Module["dynCall_vidd"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vidd"].apply(null, arguments) +}; + +var dynCall_vif = Module["dynCall_vif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vif"].apply(null, arguments) +}; + +var dynCall_viff = Module["dynCall_viff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viff"].apply(null, arguments) +}; + +var dynCall_vifff = Module["dynCall_vifff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vifff"].apply(null, arguments) +}; + +var dynCall_viffff = Module["dynCall_viffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viffff"].apply(null, arguments) +}; + +var dynCall_vii = Module["dynCall_vii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vii"].apply(null, arguments) +}; + +var dynCall_viif = Module["dynCall_viif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viif"].apply(null, arguments) +}; + +var dynCall_viii = Module["dynCall_viii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viii"].apply(null, arguments) +}; + +var dynCall_viiii = Module["dynCall_viiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiii"].apply(null, arguments) +}; + +var dynCall_viiiii = Module["dynCall_viiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiii"].apply(null, arguments) +}; + +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiji = Module["dynCall_viiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiji"].apply(null, arguments) +}; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["getMemory"] = getMemory; +if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["addRunDependency"] = addRunDependency; +Module["removeRunDependency"] = removeRunDependency; +if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["FS_createFolder"] = FS.createFolder; +Module["FS_createPath"] = FS.createPath; +Module["FS_createDataFile"] = FS.createDataFile; +Module["FS_createPreloadedFile"] = FS.createPreloadedFile; +Module["FS_createLazyFile"] = FS.createLazyFile; +Module["FS_createLink"] = FS.createLink; +Module["FS_createDevice"] = FS.createDevice; +Module["FS_unlink"] = FS.unlink; +if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "establishStackSpace")) Module["establishStackSpace"] = function() { abort("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +Module["calledRun"] = calledRun; + + + +var calledRun; + + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + + args = args || []; + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + + var ret = Module['_main'](argc, argv); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + noExitRuntime = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exception thrown: ' + toLog); + quit_(1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = out; + var printErr = err; + var has = false; + out = err = function(x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = Module['_fflush']; + if (flush) flush(0); + // also flush in the JS FS layer + ['stdout', 'stderr'].forEach(function(name) { + var info = FS.analyzePath('/dev/' + name); + if (!info) return; + var stream = info.object; + var rdev = stream.rdev; + var tty = TTY.ttys[rdev]; + if (tty && tty.output && tty.output.length) { + has = true; + } + }); + } catch(e) {} + out = print; + err = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + err('exit(' + status + ') called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + + + noExitRuntime = true; + +run(); + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/examples/web/core/core_drop_files.wasm b/examples/web/core/core_drop_files.wasm index a286227..26797ce 100644 Binary files a/examples/web/core/core_drop_files.wasm and b/examples/web/core/core_drop_files.wasm differ diff --git a/examples/web/core/core_drop_files.wasm.map b/examples/web/core/core_drop_files.wasm.map new file mode 100644 index 0000000..07533b2 --- /dev/null +++ b/examples/web/core/core_drop_files.wasm.map @@ -0,0 +1 @@ +{"version":3,"sources":["core/core_drop_files.c"],"names":[],"mappings":"43pBAsCA,aAGA,SAcA,GAEA,OAGA,mKAmBA,GAEA,gEAEA,yFAgBA,OAEA,EAfA,8EAEA,2BAEA,4IACA,gGAEA,oHALA,mBAQA,6FAGA,OAEA"} \ No newline at end of file diff --git a/examples/web/core/core_drop_files.wast b/examples/web/core/core_drop_files.wast new file mode 100644 index 0000000..17ae638 --- /dev/null +++ b/examples/web/core/core_drop_files.wast @@ -0,0 +1,148111 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iidiiii (func (param i32 f64 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$jiji (func (param i32 i64 i32) (result i64))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vf (func (param f32))) + (type $FUNCSIG$vff (func (param f32 f32))) + (type $FUNCSIG$vffff (func (param f32 f32 f32 f32))) + (type $FUNCSIG$vfi (func (param f32 i32))) + (type $FUNCSIG$vidd (func (param i32 f64 f64))) + (type $FUNCSIG$vif (func (param i32 f32))) + (type $FUNCSIG$viff (func (param i32 f32 f32))) + (type $FUNCSIG$vifff (func (param i32 f32 f32 f32))) + (type $FUNCSIG$viffff (func (param i32 f32 f32 f32 f32))) + (type $FUNCSIG$viif (func (param i32 i32 f32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiii (func (param i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiii (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$vdddd (func (param f64 f64 f64 f64))) + (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$vdd (func (param f64 f64))) + (type $FUNCSIG$vdi (func (param f64 i32))) + (type $FUNCSIG$viid (func (param i32 i32 f64))) + (type $FUNCSIG$vid (func (param i32 f64))) + (type $FUNCSIG$viddd (func (param i32 f64 f64 f64))) + (type $FUNCSIG$vidddd (func (param i32 f64 f64 f64 f64))) + (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$d (func (result f64))) + (import "env" "memory" (memory $memory 1024 1024)) + (data (i32.const 1024) "\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00 \00\00\b0\01\00\00\00\00\00\00\00\00\00 %\f9\8e\00\n\02\00\00\80\be}_\f4}\1f\a0\f2+J\1e\tR\08\00@\"AP\14\04\10 ).\12\08\"\08\00 \"AP\14\04\10 \f9\10L\08\fa><\10\"}\de\f7}\10 \a1\e82\08\"\08\00\08\"\05\10\04E\10\00\f0\a3\a42\08R\08\00\04\"\05\10\04E\10 \f9\e2^\08\02\00\81\02>}\1f\f4}\10\00\00 \00\00\b0\01\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\be\0f\00\c0\0f\e0\f7\fb}~\bf_\e8\beP\00\a2\08\08D\e8/\14\n\85\02\81PH\a0P\00\a2(\e4I((\14\n\84\02\81@H\a0H\00\be\0f\02\10\af\eb\f7\t\84>\9f\d8O\a0G\00\"\88\e4\t\a1*\14\n\84\02\81PH\a0H\00\"(\08\04\a0/\14\n\85\02\81PH\a2P\00\be\8f\00\00! \f4\fb}~\81_\e8\9c\d0\07\00\80\00\00\e0\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\01\0c\00\82B\bf\df\ef\f7\fb\0b\05\05\85B\bf\04H\00\c6B\a1P(\14@\08\05%\85B\a0\08\a8\00\aaF\a1P(\14@\08\05%\85B\90\10\08\00\92J\a1_\e8\f7C\08\05%y~\88 \08\00\82R\a1@(\01B\08\89$\85@\84@\08\00\82b\a1@*\02B\08Q$\85@\82\80\08\00\82B\bf\c0/\f4C\f8!\fc\85~\bf\00\t>\00\00\00\00\04\00\00\00\00\00\00\00\80\01\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\04\00\04\00 HA\00\00\00\00\00\08\00\00\04\04\00\04< \00A\00\00\00\00\00\08\00\00\f0}\df\f7\85\efKQ\be\ef\fb\be\ef;Q\04\00EA\14\85(JI\aa(\8a\a2 \08Q\04\f0EA\f4\9d(JG\aa(\8a\a2\e0\0bQ\04\10EA\14\84(JI\aa(\8a\a2\00\n\91\02\f0}\df\f7\85/J\d1\aa\e8\fb\be\e0{\1f\01\00\00\00\00\04\08@\00\00\00\08 \00\00\00\00\00\00\00\00\84\0f`\00\00\00\08 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ac\01\0f\00\00\00\00\00\00\00\00\00\00\00\00\00$\01\0f\00\00\00\00\00\00\00\00\00\06\00\00\00$\01\0f\00\00\00\00\00\00\00\80\10\t\a2(\fa$\01\0f\00\00\00\00\00\00\00\00>\01*%B\"R\0f\00\00\00\00\00\00\00\80\8a\03*\"\"$)\0f\00\00\00\00\00\00\00\80\n\01*%\12$\01\0f\00\00\00\00\00\00\00\80\n\01\be\e8\fb$\01\0f\00\00\00\00\00\00\00\80\be\0e\00\00\02\ac\01\0f\00\00\00\00\00\00\00\80\04\00\00\e0\03\00\00\0f\00\00\00\00\00\00\00\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\008\00\00\00\0e\b8C\84\03: \00\80\a0\be\02 \00\00\f0\8a R\c4\02+ \04\"\91\02\f8;\00\f0\07\8e8K\e4\02: \02\1c\8a\1e\08*\e9\11\04\e0\0bB\f4\02\82$\01\14\04\14\e8\ba\04\d1\05\80\b8\c3\e7\n:\89\00\1c\0e<(\02\tP\04\80\00@\c4\02\80D\00\"\84 \e8\02\00P\04\00\00@\80\02\00 \05\00\8e>\08\02\00\10\04\e0\03@\80B\00\00\07\00\84\00\f8\03\00\f0\07\00\00@\80\"\00\00\04\00\00\00\00\00\00\00\00\00\00@\80\02\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\07\80\00\c2\a0H\18\00\00\01\84!\t\92\02B&\04\01!Q\00\00\7f?\02B\02\10)\00\"\14\c0\ef\f7\fb\fd~\t\a1\df\ef\f7\bb\bb\03\12\0fD(\14\n\85B\t\81@ \10\10\11\01\08\04D(\14\n\85B\7f\81@ \10\10\11\01\04\82\c7\ef\f7\fb\fd~\t\81\cf\e7\f3\11\11\012\a9P(\14\n\85B\t\a1@ \10\10\11\01@\b8P(\14\n\85By\bf\df\ef\f7\bb\bb\03 \a0\1f\00\00\00\00\00\00\10\00\00\00\00\00\00p \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\02\08\83\"\01\00\02\08C\02\01\00\01\01|\14\04\84D\01\00 \04\84\04\80\08?\82\00\84B\bf\df\ef\f7\03~\a1P(\14\n!\00\00\84F\a1P(\14\8aR\a1P(\14z\a1\ef\03\9eJ\a1P(\14RR\a1P(\14J\1f\08\02\84R\a1P(\14\"J\a1P(\f4K\a1\ef\03\84b\a1P(\14RJ\a1P(\04z\a1(\02|B\bf\df\ef\f7\8b~\bf\df\ef\f7\0b\bd\ef\03\00\00\00\00\00\00\00\04\00\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\05 \00\00\04\84\00\"\81E\11\10B\01\00\94BQ\00\00\08BQ\94*\a2 \08\a5P\00\00\00 \00\00\00\00\00\00\00\05\00\00\00\00\08\be\ef\fb\fe\fb\be\ef\fb\14\91\eb\fb\be\ef\fb\00 \08\82 \n\a2(\8a\14\91(\8a\a2(\8a>\be\ef\fb\fe\0b\be\ef\fb\14\91(\8a\a2(\8a\00\a2(\8a\"\08\82 \08\14\91(\8a\a2(\8a\08\be\ef\fb\fe\fb\be\ef\fb\14\91/\fa\be\ef\fb\00\00\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01!\00\04\00\00\00\00\00\00\00\00\00\00\00\00\82P\14\02\14\00\00\00\00\00\00\00\00\00\00\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\be(\8a\a2(\"\00\00\00\00\00\00\00\00\00\00\aa(\8a\a2\e8\"\00\00\00\00\00\00\00\00\00\00\aa(\8a\a2\a8\"\00\00\00\00\00\00\00\00\00\00\aa(\8a\a2\e8\"\00\00\00\00\00\00\00\00\00\00\be\ef\fb\be/>\00\00\00\00\00\00\00\00\00\00\04\00\00\00( \00\00\00\00\00\00\00\00\00\00\00\00\00\80\0f>\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\01\00\00\00\04\00\00\00\06\00\00\00\05\00\00\00\07\00\00\00\06\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\05\00\00\00\05\00\00\00\02\00\00\00\04\00\00\00\01\00\00\00\07\00\00\00\05\00\00\00\02\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\01\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\03\00\00\00\06\00\00\00\07\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\03\00\00\00\05\00\00\00\06\00\00\00\05\00\00\00\07\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\07\00\00\00\06\00\00\00\07\00\00\00\07\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\02\00\00\00\07\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\02\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00\02\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\07\00\00\00\01\00\00\00\05\00\00\00\03\00\00\00\07\00\00\00\03\00\00\00\05\00\00\00\04\00\00\00\01\00\00\00\07\00\00\00\04\00\00\00\03\00\00\00\05\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\05\00\00\00\06\00\00\00\01\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\07\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\07\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\05\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\06\00\00\00\04\00\00\00\06\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\t\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\03\00\00\00\05\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\07\00\00\00\t\00\00\00\07\00\00\00\00\00\00\000b\9f9\15\1f\1f:-\d0n:\15\1f\9f:\a1\f7\c6:\9f\ae\ee:\96C\0b;\15\1f\1f;[\0b3;\da\e6F;XY[;\d3\f9p;&\e4\83;a\e2\8f;a\88\9c;\c4\cd\a9;&\aa\b7;\b16\c6;\9eb\d5;P6\e5;,\ba\f5;\e7r\03<\cc`\0c<\c6\a6\15<\d4D\1f<)?)<\92\913<8KI<\a6\b6T\8c=\e7\18\90=X\03\94=\82\fd\97=\e2\06\9c=\81 \a0=bJ\a4=\fd\83\a8=S\cd\ac=\e9&\b1=G\91\b5=_\0b\ba=\b8\95\be=Q0\c3=\b1\db\c7=\d9\97\cc=Ad\d1=\ea@\d6=\e0.\db=\9d-\e0=\9b<\e5=\e6\\\ea=~\8e\ef=W\d0\f4=\03$\fa=v\88\ff=\1b\7f\02>_B\05>\8d\0e\08>a\e3\n>\1e\c1\0d>?\a7\10>J\96\13>?\8e\16>\1d\8f\19>\a2\98\1c>\11\ab\1f>\ac\c6\">\ee\ea%>]\18)>\b5N,>;\8e/>\aa\d62>F(6>\0e\839>\04\e7<>&T@>u\caC>\f1IG>\9a\d2J>\b2dN>;\00R>\f0\a4U>\15SY>\aa\n]>l\cb`>\e1\95d>\c6ih>\1bGl>#.p>\9b\1et>\83\18x>\1d\1c|>\b6\14\80>6 \82>\900\84>\c3E\86>\d0_\88>\b7~\8a>w\a2\8c>2\cb\8e>\e8\f8\90>w+\93>\02c\95>f\9f\97>\e7\e0\99>B\'\9c>\b9r\9e>+\c3\a0>\98\18\a3>\00s\a5>\85\d2\a7>&7\aa>\c3\a0\ac>Z\0f\af>0\83\b1>\"\fc\b3>\10z\b6>;\fd\b8>\83\85\bb>\e8\12\be>j\a5\c0>)=\c3>\'\da\c5>B|\c8>y#\cb>\0f\d0\cd>\c3\81\d0>\d68\d3>\06\f5\d5>\95\b6\d8>c}\db>oI\de>\b9\1a\e1>c\f1\e3>l\cd\e6>\b4\ae\e9>[\95\ec>b\81\ef>\c9r\f2>ni\f5>\95e\f8>\1bg\fb>\01n\fe>4\bd\00?\06F\02?\ab\d1\03?\fe_\05?\02\f1\06?\c7\84\08?\\\1b\n?\a2\b4\0b?\98P\0d?_\ef\0e?\f7\90\10??5\12?Y\dc\13?#\86\15?\cf2\17?;\e2\18?h\94\1a?wI\1c?G\01\1e?\d8\bb\1f?Jy!?\8f9#?\a4\fc$?\8b\c2&?D\8b(?\cdV*?9%,?\88\f6-?\97\ca/?\98\a11?l{3?!X5?\b977?\"\1a9?~\ff:?\bc\e7?\cf\c0@?\c4\b1B?\8b\a5D?E\9cF?\f2\95H?\81\92J?\04\92L?h\94N?\d0\99P?\1a\a2R?X\adT?\88\bbV?\ab\ccX?\d2\e0Z?\db\f7\\?\e8\11_?\e8.a?\ecNc?\e3qe?\dd\97g?\db\c0i?\cc\eck?\c1\1bn?\baMp?\b6\82r?\b6\bat?\a9\f5v?\b13y?\cdt{?\dc\b8}?\00\00\80?\0d\00s\00\0d\00z\00\0d\00\80\00\0d\00\87\00\0d\00\8d\00\0d\00\94\00\0d\00\9a\00\0d\00\a1\00\1a\00\a7\00\1a\00\b4\00\1a\00\c1\00\1a\00\ce\00\1a\00\da\00\1a\00\e7\00\1a\00\f4\00\1a\00\01\013\00\0e\013\00(\013\00A\013\00[\013\00u\013\00\8f\013\00\a8\013\00\c2\01g\00\dc\01g\00\0f\02g\00C\02g\00v\02g\00\aa\02g\00\dd\02g\00\11\03g\00D\03\ce\00x\03\ce\00\df\03\ce\00F\04\ce\00\ad\04\ce\00\14\05\c5\00{\05\bc\00\dd\05\b5\00;\06X\01\97\06B\01B\070\01\e3\07 \01{\08\12\01\0b\t\06\01\94\t\fc\00\17\n\f2\00\95\n\cb\01\0f\0b\ae\01\f4\0b\95\01\cb\0c\80\01\95\0dn\01V\0e^\01\0d\0fP\01\bc\0fC\01c\10d\02\07\11>\028\12\1d\02W\13\01\02f\14\e9\01f\15\d3\01Z\16\c0\01D\17\af\01$\181\03\fe\18\fe\02\96\1a\d2\02\15\1c\ad\02~\1d\8d\02\d4\1ep\02\1a V\02R!@\02}\"C\04\9f#\fe\03\c0%\c4\03\bf\'\92\03\a1)g\03j+A\03\1d-\1f\03\be.\00\03M0\b0\05\d11U\05\a84\07\05R7\c5\04\d59\8b\047*\04\a8@\01\04\bdB\98\07\c2D\1e\07\8eH\b6\06\1cL]\06vO\10\06\a5R\cc\05\acU\8f\05\92XY\05Y[#\n\0c^\80\t\1cc\f6\08\dbg\7f\08Ul\18\08\94p\bd\07\a0tl\07}x#\073|\ff\ff\ff\ff\00\00\00\00\04\00\00\00\02\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\960\07w,a\0e\ee\baQ\t\99\19\c4m\07\8f\f4jp5\a5c\e9\a3\95d\9e2\88\db\0e\a4\b8\dcy\1e\e9\d5\e0\88\d9\d2\97+L\b6\t\bd|\b1~\07-\b8\e7\91\1d\bf\90d\10\b7\1d\f2 \b0jHq\b9\f3\deA\be\84}\d4\da\1a\eb\e4\ddmQ\b5\d4\f4\c7\85\d3\83V\98l\13\c0\a8kdz\f9b\fd\ec\c9e\8aO\\\01\14\d9l\06cc=\0f\fa\f5\0d\08\8d\c8 n;^\10iL\e4A`\d5rqg\a2\d1\e4\03jm\0d\a8Zjz\0b\cf\0e\e4\9d\ff\t\93\'\ae\00\n\b1\9e\07}D\93\0f\f0\d2\a3\08\87h\f2\01\1e\fe\c2\06i]Wb\f7\cbge\80q6l\19\e7\06knv\1b\d4\fe\e0+\d3\89Zz\da\10\ccJ\ddgo\df\b9\f9\f9\ef\be\8eC\be\b7\17\d5\8e\b0`\e8\a3\d6\d6~\93\d1\a1\c4\c2\d88R\f2\dfO\f1g\bb\d1gW\bc\a6\dd\06\b5?K6\b2H\da+\0d\d8L\1b\n\af\f6J\036`z\04A\c3\ef`\dfU\dfg\a8\ef\8en1y\beiF\8c\b3a\cb\1a\83f\bc\a0\d2o%6\e2hR\95w\0c\cc\03G\0b\bb\b9\16\02\"/&\05U\be;\ba\c5(\0b\bd\b2\92Z\b4+\04j\b3\\\a7\ff\d7\c21\cf\d0\b5\8b\9e\d9,\1d\ae\de[\b0\c2d\9b&\f2c\ec\9c\a3ju\n\93m\02\a9\06\t\9c?6\0e\eb\85g\07r\13W\00\05\82J\bf\95\14z\b8\e2\ae+\b1{8\1b\b6\0c\9b\8e\d2\92\0d\be\d5\e5\b7\ef\dc|!\df\db\0b\d4\d2\d3\86B\e2\d4\f1\f8\b3\ddhn\83\da\1f\cd\16\be\81[&\b9\f6\e1w\b0owG\b7\18\e6Z\08\88pj\0f\ff\ca;\06f\\\0b\01\11\ff\9ee\8fi\aeb\f8\d3\ffkaE\cfl\16x\e2\n\a0\ee\d2\0d\d7T\83\04N\c2\b3\039a&g\a7\f7\16`\d0MGiI\dbwn>Jj\d1\ae\dcZ\d6\d9f\0b\df@\f0;\d87S\ae\bc\a9\c5\9e\bb\de\7f\cf\b2G\e9\ff\b50\1c\f2\bd\bd\8a\c2\ba\ca0\93\b3S\a6\a3\b4$\056\d0\ba\93\06\d7\cd)W\deT\bfg\d9#.zf\b3\b8Ja\c4\02\1bh]\94+o*7\be\0b\b4\a1\8e\0c\c3\1b\df\05Z\8d\ef\02-\03\00\04\00\05\00\06\00\07\00\08\00\t\00\n\00\0b\00\0d\00\0f\00\11\00\13\00\17\00\1b\00\1f\00#\00+\003\00;\00C\00S\00c\00s\00\83\00\a3\00\c3\00\e3\00\02\01\03\01\00\00\00\00\00\00\00\00\00\00\00\00\01\01\01\01\02\02\02\02\03\03\03\03\04\04\04\04\05\05\05\05\00\00\00\00\01\00\02\00\03\00\04\00\05\00\07\00\t\00\0d\00\11\00\19\00!\001\00A\00a\00\81\00\c1\00\01\01\81\01\01\02\01\03\01\04\01\06\01\08\01\0c\01\10\01\18\01 \010\01@\01`\00\80\00\00\00\00\00\00\01\01\02\02\03\03\04\04\05\05\06\06\07\07\08\08\t\t\n\n\0b\0b\0c\0c\0d\0d\00\00\00\00\00\00\01\00\00\00\00\00\00\00\05\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\11\00\n\00\11\11\11\00\00\00\00\05\00\00\00\00\00\00\t\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\0f\n\11\11\11\03\n\07\00\01\13\t\0b\0b\00\00\t\06\0b\00\00\0b\00\06\11\00\00\00\11\11\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\n\n\11\11\11\00\n\00\00\02\00\t\0b\00\00\00\t\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\04\0d\00\00\00\00\t\0e\00\00\00\00\00\0e\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\00\0f\00\00\00\00\t\10\00\00\00\00\00\10\00\00\10\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\n\00\00\00\00\t\0b\00\00\00\00\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\000123456789ABCDEF\03\00\00\00\04\00\00\00\04\00\00\00\06\00\00\00\83\f9\a2\00DNn\00\fc)\15\00\d1W\'\00\dd4\f5\00b\db\c0\00<\99\95\00A\90C\00cQ\fe\00\bb\de\ab\00\b7a\c5\00:n$\00\d2MB\00I\06\e0\00\t\ea.\00\1c\92\d1\00\eb\1d\fe\00)\b1\1c\00\e8>\a7\00\f55\82\00D\bb.\00\9c\e9\84\00\b4&p\00A~_\00\d6\919\00S\839\00\9c\f49\00\8b_\84\00(\f9\bd\00\f8\1f;\00\de\ff\97\00\0f\98\05\00\11/\ef\00\nZ\8b\00m\1fm\00\cf~6\00\t\cb\'\00FO\b7\00\9ef?\00-\ea_\00\ba\'u\00\e5\eb\c7\00={\f1\00\f79\07\00\92R\8a\00\fbk\ea\00\1f\b1_\00\08]\8d\000\03V\00{\fcF\00\f0\abk\00 \bc\cf\006\f4\9a\00\e3\a9\1d\00^a\91\00\08\1b\e6\00\85\99e\00\a0\14_\00\8d@h\00\80\d8\ff\00\'sM\00\06\061\00\caV\15\00\c9\a8s\00{\e2`\00k\8c\c0\00\00\00\00\00\00\00\00\00\00\00\00@\fb!\f9?\00\00\00\00-Dt>\00\00\00\80\98F\f8<\00\00\00`Q\ccx;\00\00\00\80\83\1b\f09\00\00\00@ %z8\00\00\00\80\"\82\e36\00\00\00\00\1d\f3i58c\ed>\da\0fI?^\98{?\da\0f\c9?i7\ac1h!\"3\b4\0f\143h!\a23\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8?\00\00\00\00\00\00\00\00\06\d0\cfC\eb\fdL>\00\00\00\00\00\00\00\00\00\00\00@\03\b8\e2?\05\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\0c\00\00\008k\00\00\00\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\00\00\80\bf\ff\ff\ff\ff \1e\00\00 \1e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\b4r\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00raylib [core] example - drop files\00Drop your files to this window!\00Dropped files:\00Drop new files...\00frameCount > 0\00./external/miniaudio.h\00ma_device__handle_duplex_callback_playback\00pFramesInInternalFormat != ((void*)0)\00ma_device__read_frames_from_client\00pFramesOut != ((void*)0)\00pDSP->isPostFormatConversionRequired == 1\00ma_pcm_converter_read\00ma_device__handle_duplex_callback_capture\00Failed to acquire capture PCM frames from ring buffer.\00Failed to commit capture PCM frames to ring buffer.\00ma_device__send_frames_to_client\00pFrames != ((void*)0)\00Matrix stack overflow\00INFO: \00WARNING: \00MAX_BATCH_ELEMENTS overflow\00GPU: Vendor: %s\00GPU: Renderer: %s\00GPU: Version: %s\00GPU: GLSL: %s\00Number of supported extensions: %i\00GL_OES_vertex_array_object\00GL_OES_texture_npot\00GL_OES_texture_float\00GL_OES_depth_texture\00GL_OES_depth24\00GL_OES_depth32\00GL_EXT_texture_compression_s3tc\00GL_WEBGL_compressed_texture_s3tc\00GL_WEBKIT_WEBGL_compressed_texture_s3tc\00GL_OES_compressed_ETC1_RGB8_texture\00GL_WEBGL_compressed_texture_etc1\00GL_ARB_ES3_compatibility\00GL_IMG_texture_compression_pvrtc\00GL_KHR_texture_compression_astc_hdr\00GL_EXT_texture_filter_anisotropic\00GL_EXT_texture_mirror_clamp\00GL_EXT_debug_marker\00[EXTENSION] VAO extension detected, VAO functions initialized successfully\00[EXTENSION] VAO extension not found, VAO usage not supported\00[EXTENSION] NPOT textures extension detected, full NPOT textures supported\00[EXTENSION] NPOT textures extension not found, limited NPOT support (no-mipmaps, no-repeat)\00[EXTENSION] DXT compressed textures supported\00[EXTENSION] ETC1 compressed textures supported\00[EXTENSION] ETC2/EAC compressed textures supported\00[EXTENSION] PVRT compressed textures supported\00[EXTENSION] ASTC compressed textures supported\00[EXTENSION] Anisotropic textures filtering supported (max: %.0fX)\00[EXTENSION] Mirror clamp wrap texture mode supported\00[EXTENSION] Debug Marker supported\00[TEX ID %i] Base white texture loaded successfully\00Base white texture could not be loaded\00OpenGL default states initialized successfully\00Internal buffers initialized successfully (CPU)\00Internal buffers uploaded successfully (GPU)\00#version 100 \nattribute vec3 vertexPosition; \nattribute vec2 vertexTexCoord; \nattribute vec4 vertexColor; \nvarying vec2 fragTexCoord; \nvarying vec4 fragColor; \nuniform mat4 mvp; \nvoid main() \n{ \n fragTexCoord = vertexTexCoord; \n fragColor = vertexColor; \n gl_Position = mvp*vec4(vertexPosition, 1.0); \n} \n\00#version 100 \nprecision mediump float; \nvarying vec2 fragTexCoord; \nvarying vec4 fragColor; \nuniform sampler2D texture0; \nuniform vec4 colDiffuse; \nvoid main() \n{ \n vec4 texelColor = texture2D(texture0, fragTexCoord); \n gl_FragColor = texelColor*colDiffuse*fragColor; \n} \n\00[SHDR ID %i] Default shader loaded successfully\00vertexPosition\00vertexTexCoord\00vertexColor\00mvp\00colDiffuse\00texture0\00[SHDR ID %i] Default shader could not be loaded\00vertexNormal\00vertexTangent\00vertexTexCoord2\00[SHDR ID %i] Failed to link shader program...\00%s\00[SHDR ID %i] Shader program loaded successfully\00[SHDR ID %i] Failed to compile shader...\00[SHDR ID %i] Shader compiled successfully\00DXT compressed texture format not supported\00ETC1 compressed texture format not supported\00ETC2 compressed texture format not supported\00PVRT compressed texture format not supported\00ASTC compressed texture format not supported\00Load texture from data memory address: 0x%x\00Load mipmap level %i (%i x %i), size: %i, offset: %i\00[TEX ID %i] Texture created successfully (%ix%i - %i mipmaps)\00Texture could not be created\00Texture format not supported\00[TEX ID %i] Unloaded texture data (base white texture) from VRAM\00GIF89a\00NETSCAPE2.0\00Initializing raylib %s\002.6.5-dev\00#canvas\00Escape\00Canvas scaled to fullscreen. ElementSize: (%ix%i), ScreenSize(%ix%i)\00Canvas scaled to windowed. ElementSize: (%ix%i), ScreenSize(%ix%i)\00[TEX ID %i] Default font loaded successfully\00Image can not be cropped, crop rectangle out of bounds\00Pixel data retrieval not supported for compressed image formats\0032bit pixel format converted to 8bit per channel\00Texture could not be loaded from Image\00Image data format is compressed, can not be converted\00Next mipmap level: %i x %i - current size %i\00Mipmaps available: %i - Mipmaps required: %i\00Mipmaps total size required: %i\00Image data memory start address: 0x%x\00Image data memory point reallocated: 0x%x\00Mipmaps required memory could not be allocated\00Gen mipmap level: %i (%i x %i) - size: %i - offset: 0x%x\00Image mipmaps already available\00\01\02\04\04info->channels >= 0\00./external/stb_image_resize.h\00stbir__resize_allocated\00info->channels <= 64\00info->horizontal_filter < (sizeof((stbir__filter_info_table))/sizeof((stbir__filter_info_table)[0]))\00info->vertical_filter < (sizeof((stbir__filter_info_table))/sizeof((stbir__filter_info_table)[0]))\00alpha_channel >= 0 && alpha_channel < info->channels\00tempmem\00tempmem_size_in_bytes >= memory_required\00(size_t)(unsigned char*)(((unsigned char*)info->encode_buffer) + info->encode_buffer_size) == (size_t)tempmem + tempmem_size_in_bytes\00(size_t)(unsigned char*)(((unsigned char*)info->ring_buffer) + info->ring_buffer_size) == (size_t)tempmem + tempmem_size_in_bytes\00!stbir__use_height_upsampling(stbir_info)\00stbir__buffer_loop_downsample\00out_last_scanline - out_first_scanline + 1 <= stbir_info->ring_buffer_num_entries\00stbir__resample_vertical_downsample\00ring_buffer_index != stbir_info->ring_buffer_begin_index\00stbir__add_empty_ring_buffer_entry\00!stbir__use_width_upsampling(stbir_info)\00stbir__resample_horizontal_downsample\00coefficient != 0\00n1 >= n0\00stbir__resample_horizontal_upsample\00n0 >= -stbir_info->horizontal_filter_pixel_margin\00n1 >= -stbir_info->horizontal_filter_pixel_margin\00n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin\00n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin\00!\"Unknown type/colorspace/channels combination.\"\00stbir__decode_scanline\00!\"Unimplemented edge type\"\00stbir__edge_wrap_slow\00stbir__encode_scanline\00scale <= 1\00stbir__support_trapezoid\00stbir__filter_trapezoid\00stbir__use_height_upsampling(stbir_info)\00stbir__buffer_loop_upsample\00in_last_scanline - in_first_scanline + 1 <= stbir_info->ring_buffer_num_entries\00stbir__resample_vertical_upsample\00total > 0.9f\00stbir__normalize_downsample_coefficients\00total < 1.1f\00out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)\00stbir__calculate_coefficients_downsample\00contributor->n1 >= contributor->n0\00stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0\00in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)\00stbir__calculate_coefficients_upsample\00stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0\00total_filter > 0.9\00total_filter < 1.1f\00filter != 0\00stbir__get_filter_pixel_width\00filter < (sizeof((stbir__filter_info_table))/sizeof((stbir__filter_info_table)[0]))\00info->horizontal_filter != 0\00stbir__calculate_memory\00info->vertical_filter != 0\00Failed to initialize GLFW\00Closest fullscreen videomode: %i x %i\00GLFW Failed to initialize Window\00Display device initialized successfully\00Render size: %i x %i\00Screen size: %i x %i\00Viewport offsets: %i, %i\00Setting drop callback!\00Trying to enable VSYNC\00Drop callback called!\00screenrec%03i.gif\00saveFileFromMEMFSToDisk(\'%s\',\'%s\')\00End animated GIF recording\00./screenrec%03i.gif\00Begin animated GIF recording: %s\00screenshot%03i.png\00Screenshot taken: %s\00\\/\00.png\00.raw\00wb\00Image exported successfully: %s\00Image could not be exported.\00o == out + *out_len\00./external/stb_image_write.h\00stbi_write_png_to_mem\00d <= 32767 && best <= 258\00stbi_zlib_compress\00p\00stbiw__sbgrowf\00DOWNSCALING: Required screen size (%ix%i) is bigger than display size (%ix%i)\00Downscale matrix generated, content will be rendered at: %i x %i\00UPSCALING: Required screen size: %i x %i -> Display size: %i x %i\00[GLFW3 Error] Code: %i Decription: %s\00Window closed successfully\00[TEX ID %i] Unloaded texture data from VRAM (GPU)\00RECORDING\00-+ 0X0x\00(null)\00-0X+0X 0X-0x+0x 0x\00inf\00INF\00nan\00NAN\00.\00rwa\00EXT\00ARB\00OES\00ANGLE\00WEBGL\00glGenQueries\00glDeleteQueries\00glIsQuery\00glBeginQuery\00glEndQuery\00glQueryCounter\00glGetQueryiv\00glGetQueryObjectiv\00glGetQueryObjectuiv\00glGetQueryObjecti64v\00glGetQueryObjectui64v\00glBindVertexArray\00glDeleteVertexArrays\00glGenVertexArrays\00glIsVertexArray\00glDrawBuffers\00glDrawArraysInstanced\00glDrawElementsInstanced\00glVertexAttribDivisor\00glActiveTexture\00glAttachShader\00glBindAttribLocation\00glBindBuffer\00glBindFramebuffer\00glBindRenderbuffer\00glBindTexture\00glBlendColor\00glBlendEquation\00glBlendEquationSeparate\00glBlendFunc\00glBlendFuncSeparate\00glBufferData\00glBufferSubData\00glCheckFramebufferStatus\00glClear\00glClearColor\00glClearDepthf\00glClearStencil\00glColorMask\00glCompileShader\00glCompressedTexImage2D\00glCompressedTexSubImage2D\00glCopyTexImage2D\00glCopyTexSubImage2D\00glCreateProgram\00glCreateShader\00glCullFace\00glDeleteBuffers\00glDeleteFramebuffers\00glDeleteProgram\00glDeleteRenderbuffers\00glDeleteShader\00glDeleteTextures\00glDepthFunc\00glDepthMask\00glDepthRangef\00glDetachShader\00glDisable\00glDisableVertexAttribArray\00glDrawArrays\00glDrawElements\00glEnable\00glEnableVertexAttribArray\00glFinish\00glFlush\00glFramebufferRenderbuffer\00glFramebufferTexture2D\00glFrontFace\00glGenBuffers\00glGenerateMipmap\00glGenFramebuffers\00glGenRenderbuffers\00glGenTextures\00glGetActiveAttrib\00glGetActiveUniform\00glGetAttachedShaders\00glGetAttribLocation\00glGetBooleanv\00glGetBufferParameteriv\00glGetError\00glGetFloatv\00glGetFramebufferAttachmentParameteriv\00glGetIntegerv\00glGetProgramiv\00glGetProgramInfoLog\00glGetRenderbufferParameteriv\00glGetShaderiv\00glGetShaderInfoLog\00glGetShaderPrecisionFormat\00glGetShaderSource\00glGetString\00glGetTexParameterfv\00glGetTexParameteriv\00glGetUniformfv\00glGetUniformiv\00glGetUniformLocation\00glGetVertexAttribfv\00glGetVertexAttribiv\00glGetVertexAttribPointerv\00glHint\00glIsBuffer\00glIsEnabled\00glIsFramebuffer\00glIsProgram\00glIsRenderbuffer\00glIsShader\00glIsTexture\00glLineWidth\00glLinkProgram\00glPixelStorei\00glPolygonOffset\00glReadPixels\00glReleaseShaderCompiler\00glRenderbufferStorage\00glSampleCoverage\00glScissor\00glShaderBinary\00glShaderSource\00glStencilFunc\00glStencilFuncSeparate\00glStencilMask\00glStencilMaskSeparate\00glStencilOp\00glStencilOpSeparate\00glTexImage2D\00glTexParameterf\00glTexParameterfv\00glTexParameteri\00glTexParameteriv\00glTexSubImage2D\00glUniform1f\00glUniform1fv\00glUniform1i\00glUniform1iv\00glUniform2f\00glUniform2fv\00glUniform2i\00glUniform2iv\00glUniform3f\00glUniform3fv\00glUniform3i\00glUniform3iv\00glUniform4f\00glUniform4fv\00glUniform4i\00glUniform4iv\00glUniformMatrix2fv\00glUniformMatrix3fv\00glUniformMatrix4fv\00glUseProgram\00glValidateProgram\00glVertexAttrib1f\00glVertexAttrib1fv\00glVertexAttrib2f\00glVertexAttrib2fv\00glVertexAttrib3f\00glVertexAttrib3fv\00glVertexAttrib4f\00glVertexAttrib4fv\00glVertexAttribPointer\00glViewport\00glGenQueriesEXT\00glDeleteQueriesEXT\00glIsQueryEXT\00glBeginQueryEXT\00glEndQueryEXT\00glQueryCounterEXT\00glGetQueryivEXT\00glGetQueryObjectivEXT\00glGetQueryObjectuivEXT\00glGetQueryObjecti64vEXT\00glGetQueryObjectui64vEXT\00glBindVertexArrayOES\00glDeleteVertexArraysOES\00glGenVertexArraysOES\00glIsVertexArrayOES\00glDrawBuffersWEBGL\00glDrawArraysInstancedANGLE\00glDrawElementsInstancedANGLE\00glVertexAttribDivisorANGLE") + (import "env" "table" (table $table 4954 4954 funcref)) + (elem (global.get $__table_base) $b0 $_stbir__support_zero $b0 $_stbir__support_trapezoid $b0 $_stbir__support_one $b0 $_stbir__support_two $b1 $b1 $_stbir__filter_trapezoid $b1 $_stbir__filter_triangle $b1 $_stbir__filter_cubic $b1 $_stbir__filter_catmullrom $_stbir__filter_mitchell $b1 $b1 $b1 $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $_emscripten_glCreateProgram $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $_emscripten_glGetError $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b2 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $___emscripten_stdout_close $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $___stdio_close $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glCheckFramebufferStatus $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glCreateShader $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glGetString $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glIsBuffer $_emscripten_glIsEnabled $_emscripten_glIsFramebuffer $_emscripten_glIsProgram $_emscripten_glIsRenderbuffer $_emscripten_glIsShader $_emscripten_glIsTexture $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glIsQueryEXT $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $_emscripten_glIsVertexArrayOES $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $b4 $_fmt_fp $b4 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $_emscripten_glGetAttribLocation $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $_emscripten_glGetUniformLocation $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b5 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $___stdio_write $b6 $_sn_write $b6 $_EmscriptenFullscreenChangeCallback $_EmscriptenKeyboardCallback $_EmscriptenMouseCallback $_EmscriptenTouchCallback $_EmscriptenGamepadCallback $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $___stdio_read $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b7 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $___emscripten_stdout_seek $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $___stdio_seek $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b8 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $_UpdateDrawFrame $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $_emscripten_glFinish $_emscripten_glFlush $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $_emscripten_glReleaseShaderCompiler $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b9 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $_emscripten_glClearDepthf$legalf32 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $b10 $_emscripten_glLineWidth$legalf32 $b10 $b10 $b10 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $_emscripten_glDepthRangef$legalf32 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $b11 $_emscripten_glPolygonOffset$legalf32 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $_emscripten_glBlendColor$legalf32 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $_emscripten_glClearColor$legalf32 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b12 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $_emscripten_glSampleCoverage$legalf32 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b13 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glActiveTexture $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glBlendEquation $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glClear $b14 $b14 $_emscripten_glClearStencil $b14 $_emscripten_glCompileShader $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glCullFace $b14 $b14 $_emscripten_glDeleteProgram $b14 $_emscripten_glDeleteShader $b14 $_emscripten_glDepthFunc $_emscripten_glDepthMask $b14 $b14 $_emscripten_glDisable $_emscripten_glDisableVertexAttribArray $b14 $b14 $_emscripten_glEnable $_emscripten_glEnableVertexAttribArray $b14 $b14 $b14 $b14 $_emscripten_glFrontFace $b14 $_emscripten_glGenerateMipmap $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glLinkProgram $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glStencilMask $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glUseProgram $_emscripten_glValidateProgram $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glEndQueryEXT $b14 $b14 $b14 $b14 $b14 $b14 $_emscripten_glBindVertexArrayOES $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b14 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $b15 $_MouseCursorPosCallback $b15 $_ScrollCallback $b15 $b15 $b15 $b15 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $_emscripten_glUniform1f$legalf32 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $_emscripten_glVertexAttrib1f$legalf32 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b16 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $_emscripten_glUniform2f$legalf32 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $_emscripten_glVertexAttrib2f$legalf32 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b17 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $_emscripten_glUniform3f$legalf32 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $_emscripten_glVertexAttrib3f$legalf32 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b18 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $_emscripten_glUniform4f$legalf32 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $_emscripten_glVertexAttrib4f$legalf32 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b19 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_ErrorCallback $b20 $_CursorEnterCallback $b20 $b20 $b20 $_CharCallback $b20 $_WindowIconifyCallback $b20 $b20 $_pop_arg_long_double $b20 $b20 $b20 $_emscripten_glVertexAttribDivisorANGLE $b20 $_emscripten_glAttachShader $b20 $_emscripten_glBindBuffer $_emscripten_glBindFramebuffer $_emscripten_glBindRenderbuffer $_emscripten_glBindTexture $b20 $b20 $_emscripten_glBlendEquationSeparate $_emscripten_glBlendFunc $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glDeleteBuffers $_emscripten_glDeleteFramebuffers $b20 $_emscripten_glDeleteRenderbuffers $b20 $_emscripten_glDeleteTextures $b20 $b20 $b20 $_emscripten_glDetachShader $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glGenBuffers $b20 $_emscripten_glGenFramebuffers $_emscripten_glGenRenderbuffers $_emscripten_glGenTextures $b20 $b20 $b20 $b20 $_emscripten_glGetBooleanv $b20 $b20 $_emscripten_glGetFloatv $b20 $_emscripten_glGetIntegerv $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glHint $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glPixelStorei $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glStencilMaskSeparate $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glUniform1i $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glVertexAttrib1fv $b20 $_emscripten_glVertexAttrib2fv $b20 $_emscripten_glVertexAttrib3fv $b20 $_emscripten_glVertexAttrib4fv $b20 $b20 $_emscripten_glGenQueriesEXT $_emscripten_glDeleteQueriesEXT $b20 $_emscripten_glBeginQueryEXT $b20 $_emscripten_glQueryCounterEXT $b20 $b20 $b20 $b20 $b20 $b20 $_emscripten_glDeleteVertexArraysOES $_emscripten_glGenVertexArraysOES $b20 $_emscripten_glDrawBuffersWEBGL $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $_emscripten_glTexParameterf$legalf32 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b21 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_WindowSizeCallback $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_WindowDropCallback $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_emscripten_glBindAttribLocation $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_emscripten_glDrawArrays $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_emscripten_glGetBufferParameteriv $b22 $b22 $b22 $b22 $_emscripten_glGetProgramiv $b22 $_emscripten_glGetRenderbufferParameteriv $_emscripten_glGetShaderiv $b22 $b22 $b22 $b22 $_emscripten_glGetTexParameterfv $_emscripten_glGetTexParameteriv $_emscripten_glGetUniformfv $_emscripten_glGetUniformiv $b22 $_emscripten_glGetVertexAttribfv $_emscripten_glGetVertexAttribiv $_emscripten_glGetVertexAttribPointerv $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_emscripten_glStencilFunc $b22 $b22 $b22 $_emscripten_glStencilOp $b22 $b22 $b22 $_emscripten_glTexParameterfv $_emscripten_glTexParameteri $_emscripten_glTexParameteriv $b22 $b22 $_emscripten_glUniform1fv $b22 $_emscripten_glUniform1iv $b22 $_emscripten_glUniform2fv $_emscripten_glUniform2i $_emscripten_glUniform2iv $b22 $_emscripten_glUniform3fv $b22 $_emscripten_glUniform3iv $b22 $_emscripten_glUniform4fv $b22 $_emscripten_glUniform4iv $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $_emscripten_glGetQueryivEXT $_emscripten_glGetQueryObjectivEXT $_emscripten_glGetQueryObjectuivEXT $_emscripten_glGetQueryObjecti64vEXT $_emscripten_glGetQueryObjectui64vEXT $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b22 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_MouseButtonCallback $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glBlendFuncSeparate $_emscripten_glBufferData $_emscripten_glBufferSubData $b23 $b23 $b23 $b23 $b23 $_emscripten_glColorMask $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glDrawElements $b23 $b23 $b23 $b23 $_emscripten_glFramebufferRenderbuffer $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glGetAttachedShaders $b23 $b23 $b23 $b23 $b23 $_emscripten_glGetFramebufferAttachmentParameteriv $b23 $b23 $_emscripten_glGetProgramInfoLog $b23 $b23 $_emscripten_glGetShaderInfoLog $_emscripten_glGetShaderPrecisionFormat $_emscripten_glGetShaderSource $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glRenderbufferStorage $b23 $_emscripten_glScissor $b23 $_emscripten_glShaderSource $b23 $_emscripten_glStencilFuncSeparate $b23 $b23 $b23 $_emscripten_glStencilOpSeparate $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glUniform3i $b23 $b23 $b23 $b23 $b23 $_emscripten_glUniformMatrix2fv $_emscripten_glUniformMatrix3fv $_emscripten_glUniformMatrix4fv $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glViewport $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $_emscripten_glDrawArraysInstancedANGLE $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b23 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $_KeyCallback $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $_emscripten_glFramebufferTexture2D $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $_emscripten_glShaderBinary $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $_emscripten_glUniform4i $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $_emscripten_glDrawElementsInstancedANGLE $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b24 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $_emscripten_glVertexAttribPointer $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b25 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $_emscripten_glGetActiveAttrib $_emscripten_glGetActiveUniform $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $_emscripten_glReadPixels $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $b27 $_emscripten_glCompressedTexImage2D $b27 $_emscripten_glCopyTexImage2D $_emscripten_glCopyTexSubImage2D $b27 $b27 $b27 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $_emscripten_glCompressedTexSubImage2D $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $_emscripten_glTexImage2D $b28 $b28 $b28 $b28 $_emscripten_glTexSubImage2D $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b28 $b29) + (import "env" "__memory_base" (global $__memory_base i32)) + (import "env" "__table_base" (global $__table_base i32)) + (import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32)) + (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32)) + (import "global" "Infinity" (global $inf$asm2wasm$import f64)) + (import "env" "abortStackOverflow" (func $abortStackOverflow (param i32))) + (import "env" "nullFunc_ff" (func $nullFunc_ff (param i32))) + (import "env" "nullFunc_fff" (func $nullFunc_fff (param i32))) + (import "env" "nullFunc_i" (func $nullFunc_i (param i32))) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iidiiii" (func $nullFunc_iidiiii (param i32))) + (import "env" "nullFunc_iii" (func $nullFunc_iii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_iiiii" (func $nullFunc_iiiii (param i32))) + (import "env" "nullFunc_jiji" (func $nullFunc_jiji (param i32))) + (import "env" "nullFunc_v" (func $nullFunc_v (param i32))) + (import "env" "nullFunc_vf" (func $nullFunc_vf (param i32))) + (import "env" "nullFunc_vff" (func $nullFunc_vff (param i32))) + (import "env" "nullFunc_vffff" (func $nullFunc_vffff (param i32))) + (import "env" "nullFunc_vfi" (func $nullFunc_vfi (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "nullFunc_vidd" (func $nullFunc_vidd (param i32))) + (import "env" "nullFunc_vif" (func $nullFunc_vif (param i32))) + (import "env" "nullFunc_viff" (func $nullFunc_viff (param i32))) + (import "env" "nullFunc_vifff" (func $nullFunc_vifff (param i32))) + (import "env" "nullFunc_viffff" (func $nullFunc_viffff (param i32))) + (import "env" "nullFunc_vii" (func $nullFunc_vii (param i32))) + (import "env" "nullFunc_viif" (func $nullFunc_viif (param i32))) + (import "env" "nullFunc_viii" (func $nullFunc_viii (param i32))) + (import "env" "nullFunc_viiii" (func $nullFunc_viiii (param i32))) + (import "env" "nullFunc_viiiii" (func $nullFunc_viiiii (param i32))) + (import "env" "nullFunc_viiiiii" (func $nullFunc_viiiiii (param i32))) + (import "env" "nullFunc_viiiiiii" (func $nullFunc_viiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiii" (func $nullFunc_viiiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiiii" (func $nullFunc_viiiiiiiii (param i32))) + (import "env" "nullFunc_viiji" (func $nullFunc_viiji (param i32))) + (import "env" "___assert_fail" (func $___assert_fail (param i32 i32 i32 i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___setErrNo" (func $___setErrNo (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall145" (func $___syscall145 (param i32 i32) (result i32))) + (import "env" "___syscall221" (func $___syscall221 (param i32 i32) (result i32))) + (import "env" "___syscall5" (func $___syscall5 (param i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___wasi_fd_write" (func $___wasi_fd_write (param i32 i32 i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_eglGetProcAddress" (func $_eglGetProcAddress (param i32) (result i32))) + (import "env" "_emscripten_exit_pointerlock" (func $_emscripten_exit_pointerlock (result i32))) + (import "env" "_emscripten_get_gamepad_status" (func $_emscripten_get_gamepad_status (param i32 i32) (result i32))) + (import "env" "_emscripten_get_heap_size" (func $_emscripten_get_heap_size (result i32))) + (import "env" "_emscripten_get_num_gamepads" (func $_emscripten_get_num_gamepads (result i32))) + (import "env" "_emscripten_get_pointerlock_status" (func $_emscripten_get_pointerlock_status (param i32) (result i32))) + (import "env" "_emscripten_glActiveTexture" (func $_emscripten_glActiveTexture (param i32))) + (import "env" "_emscripten_glAttachShader" (func $_emscripten_glAttachShader (param i32 i32))) + (import "env" "_emscripten_glBeginQueryEXT" (func $_emscripten_glBeginQueryEXT (param i32 i32))) + (import "env" "_emscripten_glBindAttribLocation" (func $_emscripten_glBindAttribLocation (param i32 i32 i32))) + (import "env" "_emscripten_glBindBuffer" (func $_emscripten_glBindBuffer (param i32 i32))) + (import "env" "_emscripten_glBindFramebuffer" (func $_emscripten_glBindFramebuffer (param i32 i32))) + (import "env" "_emscripten_glBindRenderbuffer" (func $_emscripten_glBindRenderbuffer (param i32 i32))) + (import "env" "_emscripten_glBindTexture" (func $_emscripten_glBindTexture (param i32 i32))) + (import "env" "_emscripten_glBindVertexArrayOES" (func $_emscripten_glBindVertexArrayOES (param i32))) + (import "env" "_emscripten_glBlendColor" (func $_emscripten_glBlendColor (param f64 f64 f64 f64))) + (import "env" "_emscripten_glBlendEquation" (func $_emscripten_glBlendEquation (param i32))) + (import "env" "_emscripten_glBlendEquationSeparate" (func $_emscripten_glBlendEquationSeparate (param i32 i32))) + (import "env" "_emscripten_glBlendFunc" (func $_emscripten_glBlendFunc (param i32 i32))) + (import "env" "_emscripten_glBlendFuncSeparate" (func $_emscripten_glBlendFuncSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glBufferData" (func $_emscripten_glBufferData (param i32 i32 i32 i32))) + (import "env" "_emscripten_glBufferSubData" (func $_emscripten_glBufferSubData (param i32 i32 i32 i32))) + (import "env" "_emscripten_glCheckFramebufferStatus" (func $_emscripten_glCheckFramebufferStatus (param i32) (result i32))) + (import "env" "_emscripten_glClear" (func $_emscripten_glClear (param i32))) + (import "env" "_emscripten_glClearColor" (func $_emscripten_glClearColor (param f64 f64 f64 f64))) + (import "env" "_emscripten_glClearDepthf" (func $_emscripten_glClearDepthf (param f64))) + (import "env" "_emscripten_glClearStencil" (func $_emscripten_glClearStencil (param i32))) + (import "env" "_emscripten_glColorMask" (func $_emscripten_glColorMask (param i32 i32 i32 i32))) + (import "env" "_emscripten_glCompileShader" (func $_emscripten_glCompileShader (param i32))) + (import "env" "_emscripten_glCompressedTexImage2D" (func $_emscripten_glCompressedTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCompressedTexSubImage2D" (func $_emscripten_glCompressedTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCopyTexImage2D" (func $_emscripten_glCopyTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCopyTexSubImage2D" (func $_emscripten_glCopyTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCreateProgram" (func $_emscripten_glCreateProgram (result i32))) + (import "env" "_emscripten_glCreateShader" (func $_emscripten_glCreateShader (param i32) (result i32))) + (import "env" "_emscripten_glCullFace" (func $_emscripten_glCullFace (param i32))) + (import "env" "_emscripten_glDeleteBuffers" (func $_emscripten_glDeleteBuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteFramebuffers" (func $_emscripten_glDeleteFramebuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteProgram" (func $_emscripten_glDeleteProgram (param i32))) + (import "env" "_emscripten_glDeleteQueriesEXT" (func $_emscripten_glDeleteQueriesEXT (param i32 i32))) + (import "env" "_emscripten_glDeleteRenderbuffers" (func $_emscripten_glDeleteRenderbuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteShader" (func $_emscripten_glDeleteShader (param i32))) + (import "env" "_emscripten_glDeleteTextures" (func $_emscripten_glDeleteTextures (param i32 i32))) + (import "env" "_emscripten_glDeleteVertexArraysOES" (func $_emscripten_glDeleteVertexArraysOES (param i32 i32))) + (import "env" "_emscripten_glDepthFunc" (func $_emscripten_glDepthFunc (param i32))) + (import "env" "_emscripten_glDepthMask" (func $_emscripten_glDepthMask (param i32))) + (import "env" "_emscripten_glDepthRangef" (func $_emscripten_glDepthRangef (param f64 f64))) + (import "env" "_emscripten_glDetachShader" (func $_emscripten_glDetachShader (param i32 i32))) + (import "env" "_emscripten_glDisable" (func $_emscripten_glDisable (param i32))) + (import "env" "_emscripten_glDisableVertexAttribArray" (func $_emscripten_glDisableVertexAttribArray (param i32))) + (import "env" "_emscripten_glDrawArrays" (func $_emscripten_glDrawArrays (param i32 i32 i32))) + (import "env" "_emscripten_glDrawArraysInstancedANGLE" (func $_emscripten_glDrawArraysInstancedANGLE (param i32 i32 i32 i32))) + (import "env" "_emscripten_glDrawBuffersWEBGL" (func $_emscripten_glDrawBuffersWEBGL (param i32 i32))) + (import "env" "_emscripten_glDrawElements" (func $_emscripten_glDrawElements (param i32 i32 i32 i32))) + (import "env" "_emscripten_glDrawElementsInstancedANGLE" (func $_emscripten_glDrawElementsInstancedANGLE (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glEnable" (func $_emscripten_glEnable (param i32))) + (import "env" "_emscripten_glEnableVertexAttribArray" (func $_emscripten_glEnableVertexAttribArray (param i32))) + (import "env" "_emscripten_glEndQueryEXT" (func $_emscripten_glEndQueryEXT (param i32))) + (import "env" "_emscripten_glFinish" (func $_emscripten_glFinish)) + (import "env" "_emscripten_glFlush" (func $_emscripten_glFlush)) + (import "env" "_emscripten_glFramebufferRenderbuffer" (func $_emscripten_glFramebufferRenderbuffer (param i32 i32 i32 i32))) + (import "env" "_emscripten_glFramebufferTexture2D" (func $_emscripten_glFramebufferTexture2D (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glFrontFace" (func $_emscripten_glFrontFace (param i32))) + (import "env" "_emscripten_glGenBuffers" (func $_emscripten_glGenBuffers (param i32 i32))) + (import "env" "_emscripten_glGenFramebuffers" (func $_emscripten_glGenFramebuffers (param i32 i32))) + (import "env" "_emscripten_glGenQueriesEXT" (func $_emscripten_glGenQueriesEXT (param i32 i32))) + (import "env" "_emscripten_glGenRenderbuffers" (func $_emscripten_glGenRenderbuffers (param i32 i32))) + (import "env" "_emscripten_glGenTextures" (func $_emscripten_glGenTextures (param i32 i32))) + (import "env" "_emscripten_glGenVertexArraysOES" (func $_emscripten_glGenVertexArraysOES (param i32 i32))) + (import "env" "_emscripten_glGenerateMipmap" (func $_emscripten_glGenerateMipmap (param i32))) + (import "env" "_emscripten_glGetActiveAttrib" (func $_emscripten_glGetActiveAttrib (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glGetActiveUniform" (func $_emscripten_glGetActiveUniform (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glGetAttachedShaders" (func $_emscripten_glGetAttachedShaders (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetAttribLocation" (func $_emscripten_glGetAttribLocation (param i32 i32) (result i32))) + (import "env" "_emscripten_glGetBooleanv" (func $_emscripten_glGetBooleanv (param i32 i32))) + (import "env" "_emscripten_glGetBufferParameteriv" (func $_emscripten_glGetBufferParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetError" (func $_emscripten_glGetError (result i32))) + (import "env" "_emscripten_glGetFloatv" (func $_emscripten_glGetFloatv (param i32 i32))) + (import "env" "_emscripten_glGetFramebufferAttachmentParameteriv" (func $_emscripten_glGetFramebufferAttachmentParameteriv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetIntegerv" (func $_emscripten_glGetIntegerv (param i32 i32))) + (import "env" "_emscripten_glGetProgramInfoLog" (func $_emscripten_glGetProgramInfoLog (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetProgramiv" (func $_emscripten_glGetProgramiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjecti64vEXT" (func $_emscripten_glGetQueryObjecti64vEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectivEXT" (func $_emscripten_glGetQueryObjectivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectui64vEXT" (func $_emscripten_glGetQueryObjectui64vEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectuivEXT" (func $_emscripten_glGetQueryObjectuivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryivEXT" (func $_emscripten_glGetQueryivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetRenderbufferParameteriv" (func $_emscripten_glGetRenderbufferParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetShaderInfoLog" (func $_emscripten_glGetShaderInfoLog (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderPrecisionFormat" (func $_emscripten_glGetShaderPrecisionFormat (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderSource" (func $_emscripten_glGetShaderSource (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderiv" (func $_emscripten_glGetShaderiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetString" (func $_emscripten_glGetString (param i32) (result i32))) + (import "env" "_emscripten_glGetTexParameterfv" (func $_emscripten_glGetTexParameterfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetTexParameteriv" (func $_emscripten_glGetTexParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetUniformLocation" (func $_emscripten_glGetUniformLocation (param i32 i32) (result i32))) + (import "env" "_emscripten_glGetUniformfv" (func $_emscripten_glGetUniformfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetUniformiv" (func $_emscripten_glGetUniformiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribPointerv" (func $_emscripten_glGetVertexAttribPointerv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribfv" (func $_emscripten_glGetVertexAttribfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribiv" (func $_emscripten_glGetVertexAttribiv (param i32 i32 i32))) + (import "env" "_emscripten_glHint" (func $_emscripten_glHint (param i32 i32))) + (import "env" "_emscripten_glIsBuffer" (func $_emscripten_glIsBuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsEnabled" (func $_emscripten_glIsEnabled (param i32) (result i32))) + (import "env" "_emscripten_glIsFramebuffer" (func $_emscripten_glIsFramebuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsProgram" (func $_emscripten_glIsProgram (param i32) (result i32))) + (import "env" "_emscripten_glIsQueryEXT" (func $_emscripten_glIsQueryEXT (param i32) (result i32))) + (import "env" "_emscripten_glIsRenderbuffer" (func $_emscripten_glIsRenderbuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsShader" (func $_emscripten_glIsShader (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $_emscripten_glIsTexture (param i32) (result i32))) + (import "env" "_emscripten_glIsVertexArrayOES" (func $_emscripten_glIsVertexArrayOES (param i32) (result i32))) + (import "env" "_emscripten_glLineWidth" (func $_emscripten_glLineWidth (param f64))) + (import "env" "_emscripten_glLinkProgram" (func $_emscripten_glLinkProgram (param i32))) + (import "env" "_emscripten_glPixelStorei" (func $_emscripten_glPixelStorei (param i32 i32))) + (import "env" "_emscripten_glPolygonOffset" (func $_emscripten_glPolygonOffset (param f64 f64))) + (import "env" "_emscripten_glQueryCounterEXT" (func $_emscripten_glQueryCounterEXT (param i32 i32))) + (import "env" "_emscripten_glReadPixels" (func $_emscripten_glReadPixels (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glReleaseShaderCompiler" (func $_emscripten_glReleaseShaderCompiler)) + (import "env" "_emscripten_glRenderbufferStorage" (func $_emscripten_glRenderbufferStorage (param i32 i32 i32 i32))) + (import "env" "_emscripten_glSampleCoverage" (func $_emscripten_glSampleCoverage (param f64 i32))) + (import "env" "_emscripten_glScissor" (func $_emscripten_glScissor (param i32 i32 i32 i32))) + (import "env" "_emscripten_glShaderBinary" (func $_emscripten_glShaderBinary (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glShaderSource" (func $_emscripten_glShaderSource (param i32 i32 i32 i32))) + (import "env" "_emscripten_glStencilFunc" (func $_emscripten_glStencilFunc (param i32 i32 i32))) + (import "env" "_emscripten_glStencilFuncSeparate" (func $_emscripten_glStencilFuncSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glStencilMask" (func $_emscripten_glStencilMask (param i32))) + (import "env" "_emscripten_glStencilMaskSeparate" (func $_emscripten_glStencilMaskSeparate (param i32 i32))) + (import "env" "_emscripten_glStencilOp" (func $_emscripten_glStencilOp (param i32 i32 i32))) + (import "env" "_emscripten_glStencilOpSeparate" (func $_emscripten_glStencilOpSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glTexImage2D" (func $_emscripten_glTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glTexParameterf" (func $_emscripten_glTexParameterf (param i32 i32 f64))) + (import "env" "_emscripten_glTexParameterfv" (func $_emscripten_glTexParameterfv (param i32 i32 i32))) + (import "env" "_emscripten_glTexParameteri" (func $_emscripten_glTexParameteri (param i32 i32 i32))) + (import "env" "_emscripten_glTexParameteriv" (func $_emscripten_glTexParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glTexSubImage2D" (func $_emscripten_glTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform1f" (func $_emscripten_glUniform1f (param i32 f64))) + (import "env" "_emscripten_glUniform1fv" (func $_emscripten_glUniform1fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform1i" (func $_emscripten_glUniform1i (param i32 i32))) + (import "env" "_emscripten_glUniform1iv" (func $_emscripten_glUniform1iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2f" (func $_emscripten_glUniform2f (param i32 f64 f64))) + (import "env" "_emscripten_glUniform2fv" (func $_emscripten_glUniform2fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2i" (func $_emscripten_glUniform2i (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2iv" (func $_emscripten_glUniform2iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform3f" (func $_emscripten_glUniform3f (param i32 f64 f64 f64))) + (import "env" "_emscripten_glUniform3fv" (func $_emscripten_glUniform3fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform3i" (func $_emscripten_glUniform3i (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform3iv" (func $_emscripten_glUniform3iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform4f" (func $_emscripten_glUniform4f (param i32 f64 f64 f64 f64))) + (import "env" "_emscripten_glUniform4fv" (func $_emscripten_glUniform4fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform4i" (func $_emscripten_glUniform4i (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform4iv" (func $_emscripten_glUniform4iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix2fv" (func $_emscripten_glUniformMatrix2fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix3fv" (func $_emscripten_glUniformMatrix3fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix4fv" (func $_emscripten_glUniformMatrix4fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUseProgram" (func $_emscripten_glUseProgram (param i32))) + (import "env" "_emscripten_glValidateProgram" (func $_emscripten_glValidateProgram (param i32))) + (import "env" "_emscripten_glVertexAttrib1f" (func $_emscripten_glVertexAttrib1f (param i32 f64))) + (import "env" "_emscripten_glVertexAttrib1fv" (func $_emscripten_glVertexAttrib1fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib2f" (func $_emscripten_glVertexAttrib2f (param i32 f64 f64))) + (import "env" "_emscripten_glVertexAttrib2fv" (func $_emscripten_glVertexAttrib2fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib3f" (func $_emscripten_glVertexAttrib3f (param i32 f64 f64 f64))) + (import "env" "_emscripten_glVertexAttrib3fv" (func $_emscripten_glVertexAttrib3fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib4f" (func $_emscripten_glVertexAttrib4f (param i32 f64 f64 f64 f64))) + (import "env" "_emscripten_glVertexAttrib4fv" (func $_emscripten_glVertexAttrib4fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttribDivisorANGLE" (func $_emscripten_glVertexAttribDivisorANGLE (param i32 i32))) + (import "env" "_emscripten_glVertexAttribPointer" (func $_emscripten_glVertexAttribPointer (param i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glViewport" (func $_emscripten_glViewport (param i32 i32 i32 i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "_emscripten_request_pointerlock" (func $_emscripten_request_pointerlock (param i32 i32) (result i32))) + (import "env" "_emscripten_resize_heap" (func $_emscripten_resize_heap (param i32) (result i32))) + (import "env" "_emscripten_run_script" (func $_emscripten_run_script (param i32))) + (import "env" "_emscripten_sample_gamepad_data" (func $_emscripten_sample_gamepad_data (result i32))) + (import "env" "_emscripten_set_click_callback_on_thread" (func $_emscripten_set_click_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_fullscreenchange_callback_on_thread" (func $_emscripten_set_fullscreenchange_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_gamepadconnected_callback_on_thread" (func $_emscripten_set_gamepadconnected_callback_on_thread (param i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_gamepaddisconnected_callback_on_thread" (func $_emscripten_set_gamepaddisconnected_callback_on_thread (param i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_keypress_callback_on_thread" (func $_emscripten_set_keypress_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_main_loop" (func $_emscripten_set_main_loop (param i32 i32 i32))) + (import "env" "_emscripten_set_touchcancel_callback_on_thread" (func $_emscripten_set_touchcancel_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchend_callback_on_thread" (func $_emscripten_set_touchend_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchmove_callback_on_thread" (func $_emscripten_set_touchmove_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchstart_callback_on_thread" (func $_emscripten_set_touchstart_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_exit" (func $_exit (param i32))) + (import "env" "_glActiveTexture" (func $_glActiveTexture (param i32))) + (import "env" "_glAttachShader" (func $_glAttachShader (param i32 i32))) + (import "env" "_glBindAttribLocation" (func $_glBindAttribLocation (param i32 i32 i32))) + (import "env" "_glBindBuffer" (func $_glBindBuffer (param i32 i32))) + (import "env" "_glBindTexture" (func $_glBindTexture (param i32 i32))) + (import "env" "_glBlendFunc" (func $_glBlendFunc (param i32 i32))) + (import "env" "_glBufferData" (func $_glBufferData (param i32 i32 i32 i32))) + (import "env" "_glBufferSubData" (func $_glBufferSubData (param i32 i32 i32 i32))) + (import "env" "_glClear" (func $_glClear (param i32))) + (import "env" "_glClearColor" (func $_glClearColor (param f64 f64 f64 f64))) + (import "env" "_glClearDepthf" (func $_glClearDepthf (param f64))) + (import "env" "_glCompileShader" (func $_glCompileShader (param i32))) + (import "env" "_glCompressedTexImage2D" (func $_glCompressedTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glCreateProgram" (func $_glCreateProgram (result i32))) + (import "env" "_glCreateShader" (func $_glCreateShader (param i32) (result i32))) + (import "env" "_glCullFace" (func $_glCullFace (param i32))) + (import "env" "_glDeleteBuffers" (func $_glDeleteBuffers (param i32 i32))) + (import "env" "_glDeleteProgram" (func $_glDeleteProgram (param i32))) + (import "env" "_glDeleteShader" (func $_glDeleteShader (param i32))) + (import "env" "_glDeleteTextures" (func $_glDeleteTextures (param i32 i32))) + (import "env" "_glDepthFunc" (func $_glDepthFunc (param i32))) + (import "env" "_glDetachShader" (func $_glDetachShader (param i32 i32))) + (import "env" "_glDisable" (func $_glDisable (param i32))) + (import "env" "_glDisableVertexAttribArray" (func $_glDisableVertexAttribArray (param i32))) + (import "env" "_glDrawArrays" (func $_glDrawArrays (param i32 i32 i32))) + (import "env" "_glDrawElements" (func $_glDrawElements (param i32 i32 i32 i32))) + (import "env" "_glEnable" (func $_glEnable (param i32))) + (import "env" "_glEnableVertexAttribArray" (func $_glEnableVertexAttribArray (param i32))) + (import "env" "_glFrontFace" (func $_glFrontFace (param i32))) + (import "env" "_glGenBuffers" (func $_glGenBuffers (param i32 i32))) + (import "env" "_glGenTextures" (func $_glGenTextures (param i32 i32))) + (import "env" "_glGetAttribLocation" (func $_glGetAttribLocation (param i32 i32) (result i32))) + (import "env" "_glGetFloatv" (func $_glGetFloatv (param i32 i32))) + (import "env" "_glGetProgramInfoLog" (func $_glGetProgramInfoLog (param i32 i32 i32 i32))) + (import "env" "_glGetProgramiv" (func $_glGetProgramiv (param i32 i32 i32))) + (import "env" "_glGetShaderInfoLog" (func $_glGetShaderInfoLog (param i32 i32 i32 i32))) + (import "env" "_glGetShaderiv" (func $_glGetShaderiv (param i32 i32 i32))) + (import "env" "_glGetString" (func $_glGetString (param i32) (result i32))) + (import "env" "_glGetUniformLocation" (func $_glGetUniformLocation (param i32 i32) (result i32))) + (import "env" "_glLinkProgram" (func $_glLinkProgram (param i32))) + (import "env" "_glPixelStorei" (func $_glPixelStorei (param i32 i32))) + (import "env" "_glReadPixels" (func $_glReadPixels (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glShaderSource" (func $_glShaderSource (param i32 i32 i32 i32))) + (import "env" "_glTexImage2D" (func $_glTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glTexParameteri" (func $_glTexParameteri (param i32 i32 i32))) + (import "env" "_glUniform1i" (func $_glUniform1i (param i32 i32))) + (import "env" "_glUniform4f" (func $_glUniform4f (param i32 f64 f64 f64 f64))) + (import "env" "_glUniformMatrix4fv" (func $_glUniformMatrix4fv (param i32 i32 i32 i32))) + (import "env" "_glUseProgram" (func $_glUseProgram (param i32))) + (import "env" "_glVertexAttribPointer" (func $_glVertexAttribPointer (param i32 i32 i32 i32 i32 i32))) + (import "env" "_glViewport" (func $_glViewport (param i32 i32 i32 i32))) + (import "env" "_glfwCreateWindow" (func $_glfwCreateWindow (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_glfwDefaultWindowHints" (func $_glfwDefaultWindowHints)) + (import "env" "_glfwDestroyWindow" (func $_glfwDestroyWindow (param i32))) + (import "env" "_glfwGetCursorPos" (func $_glfwGetCursorPos (param i32 i32 i32))) + (import "env" "_glfwGetPrimaryMonitor" (func $_glfwGetPrimaryMonitor (result i32))) + (import "env" "_glfwGetTime" (func $_glfwGetTime (result f64))) + (import "env" "_glfwGetVideoModes" (func $_glfwGetVideoModes (param i32 i32) (result i32))) + (import "env" "_glfwInit" (func $_glfwInit (result i32))) + (import "env" "_glfwMakeContextCurrent" (func $_glfwMakeContextCurrent (param i32))) + (import "env" "_glfwSetCharCallback" (func $_glfwSetCharCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetCursorEnterCallback" (func $_glfwSetCursorEnterCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetCursorPosCallback" (func $_glfwSetCursorPosCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetDropCallback" (func $_glfwSetDropCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetErrorCallback" (func $_glfwSetErrorCallback (param i32) (result i32))) + (import "env" "_glfwSetKeyCallback" (func $_glfwSetKeyCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetMouseButtonCallback" (func $_glfwSetMouseButtonCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetScrollCallback" (func $_glfwSetScrollCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetWindowIconifyCallback" (func $_glfwSetWindowIconifyCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetWindowShouldClose" (func $_glfwSetWindowShouldClose (param i32 i32))) + (import "env" "_glfwSetWindowSizeCallback" (func $_glfwSetWindowSizeCallback (param i32 i32) (result i32))) + (import "env" "_glfwSwapBuffers" (func $_glfwSwapBuffers (param i32))) + (import "env" "_glfwSwapInterval" (func $_glfwSwapInterval (param i32))) + (import "env" "_glfwTerminate" (func $_glfwTerminate)) + (import "env" "_glfwWindowHint" (func $_glfwWindowHint (param i32 i32))) + (import "env" "_llvm_stackrestore" (func $_llvm_stackrestore (param i32))) + (import "env" "_llvm_stacksave" (func $_llvm_stacksave (result i32))) + (import "env" "_nanosleep" (func $_nanosleep (param i32 i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "abortOnCannotGrowMemory" (func $abortOnCannotGrowMemory (param i32) (result i32))) + (import "env" "setTempRet0" (func $setTempRet0 (param i32))) + (global $tempDoublePtr (mut i32) (global.get $tempDoublePtr$asm2wasm$import)) + (global $DYNAMICTOP_PTR (mut i32) (global.get $DYNAMICTOP_PTR$asm2wasm$import)) + (global $__THREW__ (mut i32) (i32.const 0)) + (global $threwValue (mut i32) (i32.const 0)) + (global $setjmpId (mut i32) (i32.const 0)) + (global $tempInt (mut i32) (i32.const 0)) + (global $tempBigInt (mut i32) (i32.const 0)) + (global $tempBigIntS (mut i32) (i32.const 0)) + (global $tempValue (mut i32) (i32.const 0)) + (global $tempDouble (mut f64) (f64.const 0)) + (global $inf (mut f64) (global.get $inf$asm2wasm$import)) + (global $STACKTOP (mut i32) (i32.const 31168)) + (global $STACK_MAX (mut i32) (i32.const 5274048)) + (global $tempFloat (mut f32) (f32.const 0)) + (global $f0 (mut f32) (f32.const 0)) + (export "___errno_location" (func $___errno_location)) + (export "_emscripten_GetProcAddress" (func $_emscripten_GetProcAddress)) + (export "_fflush" (func $_fflush)) + (export "_free" (func $_free)) + (export "_llvm_round_f32" (func $_llvm_round_f32)) + (export "_ma_device_process_pcm_frames_capture__webaudio" (func $_ma_device_process_pcm_frames_capture__webaudio)) + (export "_ma_device_process_pcm_frames_playback__webaudio" (func $_ma_device_process_pcm_frames_playback__webaudio)) + (export "_main" (func $_main)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_memmove" (func $_memmove)) + (export "_memset" (func $_memset)) + (export "_sbrk" (func $_sbrk)) + (export "_strstr" (func $_strstr)) + (export "dynCall_ff" (func $dynCall_ff)) + (export "dynCall_fff" (func $dynCall_fff)) + (export "dynCall_i" (func $dynCall_i)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iidiiii" (func $dynCall_iidiiii)) + (export "dynCall_iii" (func $dynCall_iii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_iiiii" (func $dynCall_iiiii)) + (export "dynCall_jiji" (func $legalstub$dynCall_jiji)) + (export "dynCall_v" (func $dynCall_v)) + (export "dynCall_vf" (func $dynCall_vf)) + (export "dynCall_vff" (func $dynCall_vff)) + (export "dynCall_vffff" (func $dynCall_vffff)) + (export "dynCall_vfi" (func $dynCall_vfi)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "dynCall_vidd" (func $dynCall_vidd)) + (export "dynCall_vif" (func $dynCall_vif)) + (export "dynCall_viff" (func $dynCall_viff)) + (export "dynCall_vifff" (func $dynCall_vifff)) + (export "dynCall_viffff" (func $dynCall_viffff)) + (export "dynCall_vii" (func $dynCall_vii)) + (export "dynCall_viif" (func $dynCall_viif)) + (export "dynCall_viii" (func $dynCall_viii)) + (export "dynCall_viiii" (func $dynCall_viiii)) + (export "dynCall_viiiii" (func $dynCall_viiiii)) + (export "dynCall_viiiiii" (func $dynCall_viiiiii)) + (export "dynCall_viiiiiii" (func $dynCall_viiiiiii)) + (export "dynCall_viiiiiiii" (func $dynCall_viiiiiiii)) + (export "dynCall_viiiiiiiii" (func $dynCall_viiiiiiiii)) + (export "dynCall_viiji" (func $legalstub$dynCall_viiji)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackRestore" (func $stackRestore)) + (export "stackSave" (func $stackSave)) + (func $stackAlloc (; 307 ;) (param $size i32) (result i32) + (local $ret i32) + (local.set $ret + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (local.get $size) + ) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 15) + ) + (i32.const -16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (local.get $size) + ) + ) + (return + (local.get $ret) + ) + ) + (func $stackSave (; 308 ;) (result i32) + (return + (global.get $STACKTOP) + ) + ) + (func $stackRestore (; 309 ;) (param $top i32) + (global.set $STACKTOP + (local.get $top) + ) + ) + (func $establishStackSpace (; 310 ;) (param $stackBase i32) (param $stackMax i32) + (global.set $STACKTOP + (local.get $stackBase) + ) + (global.set $STACK_MAX + (local.get $stackMax) + ) + ) + (func $_main (; 311 ;) (result i32) + (local $$retval i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$retval + (i32.const 0) + ) + ;;@ core/core_drop_files.c:39:0 + (call $_InitWindow + (i32.const 800) + (i32.const 450) + (i32.const 8264) + ) + ;;@ core/core_drop_files.c:42:0 + (call $_emscripten_set_main_loop + (i32.const 14) + (i32.const 0) + (i32.const 1) + ) + ;;@ core/core_drop_files.c:56:0 + (call $_ClearDroppedFiles) + ;;@ core/core_drop_files.c:58:0 + (call $_CloseWindow) + (global.set $STACKTOP + (local.get $sp) + ) + ;;@ core/core_drop_files.c:61:0 + (return + (i32.const 0) + ) + ) + (func $_UpdateDrawFrame (; 312 ;) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$$compoundliteral15 i32) + (local $$$compoundliteral15$byval_copy i32) + (local $$$compoundliteral2 i32) + (local $$$compoundliteral2$byval_copy i32) + (local $$$compoundliteral24 i32) + (local $$$compoundliteral24$byval_copy i32) + (local $$$compoundliteral32 i32) + (local $$$compoundliteral32$byval_copy i32) + (local $$$compoundliteral39 i32) + (local $$$compoundliteral39$byval_copy i32) + (local $$$compoundliteral7 i32) + (local $$$compoundliteral7$byval_copy i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$a i32) + (local $$a11 i32) + (local $$a19 i32) + (local $$a28 i32) + (local $$a36 i32) + (local $$a43 i32) + (local $$a6 i32) + (local $$add i32) + (local $$add31 i32) + (local $$add38 i32) + (local $$agg$tmp i32) + (local $$agg$tmp$byval_copy i32) + (local $$agg$tmp23 i32) + (local $$agg$tmp23$byval_copy i32) + (local $$arrayidx i32) + (local $$b i32) + (local $$b10 i32) + (local $$b18 i32) + (local $$b27 i32) + (local $$b35 i32) + (local $$b42 i32) + (local $$b5 i32) + (local $$cmp i32) + (local $$cmp12 i32) + (local $$cmp13 i32) + (local $$g i32) + (local $$g17 i32) + (local $$g26 i32) + (local $$g34 i32) + (local $$g4 i32) + (local $$g41 i32) + (local $$g9 i32) + (local $$i i32) + (local $$inc i32) + (local $$mul i32) + (local $$mul30 i32) + (local $$mul37 i32) + (local $$rem i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 80) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 80) + ) + ) + (local.set $$$compoundliteral39$byval_copy + (i32.add + (local.get $sp) + (i32.const 72) + ) + ) + (local.set $$$compoundliteral32$byval_copy + (i32.add + (local.get $sp) + (i32.const 68) + ) + ) + (local.set $$agg$tmp23$byval_copy + (i32.add + (local.get $sp) + (i32.const 64) + ) + ) + (local.set $$$compoundliteral24$byval_copy + (i32.add + (local.get $sp) + (i32.const 60) + ) + ) + (local.set $$agg$tmp$byval_copy + (i32.add + (local.get $sp) + (i32.const 56) + ) + ) + (local.set $$$compoundliteral15$byval_copy + (i32.add + (local.get $sp) + (i32.const 52) + ) + ) + (local.set $$$compoundliteral7$byval_copy + (i32.add + (local.get $sp) + (i32.const 48) + ) + ) + (local.set $$$compoundliteral2$byval_copy + (i32.add + (local.get $sp) + (i32.const 44) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp) + (i32.const 40) + ) + ) + (local.set $$$compoundliteral + (i32.add + (local.get $sp) + (i32.const 36) + ) + ) + (local.set $$$compoundliteral2 + (i32.add + (local.get $sp) + (i32.const 32) + ) + ) + (local.set $$$compoundliteral7 + (i32.add + (local.get $sp) + (i32.const 28) + ) + ) + (local.set $$agg$tmp + (i32.add + (local.get $sp) + (i32.const 24) + ) + ) + (local.set $$$compoundliteral15 + (i32.add + (local.get $sp) + (i32.const 20) + ) + ) + (local.set $$agg$tmp23 + (i32.add + (local.get $sp) + (i32.const 16) + ) + ) + (local.set $$$compoundliteral24 + (i32.add + (local.get $sp) + (i32.const 12) + ) + ) + (local.set $$$compoundliteral32 + (i32.add + (local.get $sp) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral39 + (i32.add + (local.get $sp) + (i32.const 4) + ) + ) + ;;@ core/core_drop_files.c:80:0 + (call $_BeginDrawing) + ;;@ core/core_drop_files.c:82:0 + (i32.store8 + (local.get $$$compoundliteral) + (i32.const -11) + ) + (local.set $$g + (i32.add + (local.get $$$compoundliteral) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g) + (i32.const -11) + ) + (local.set $$b + (i32.add + (local.get $$$compoundliteral) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b) + (i32.const -11) + ) + (local.set $$a + (i32.add + (local.get $$$compoundliteral) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral) + ) + ) + (call $_ClearBackground + (local.get $$$compoundliteral$byval_copy) + ) + ;;@ core/core_drop_files.c:84:0 + (local.set $$cmp + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (i32.store8 + (local.get $$$compoundliteral2) + (i32.const 80) + ) + (local.set $$g4 + (i32.add + (local.get $$$compoundliteral2) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g4) + (i32.const 80) + ) + (local.set $$b5 + (i32.add + (local.get $$$compoundliteral2) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b5) + (i32.const 80) + ) + (local.set $$a6 + (i32.add + (local.get $$$compoundliteral2) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a6) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral2$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral2) + ) + ) + (call $_DrawText + (i32.const 8299) + (i32.const 100) + (i32.const 40) + (i32.const 20) + (local.get $$$compoundliteral2$byval_copy) + ) + ;;@ core/core_drop_files.c:100:0 + (call $_EndDrawing) + (global.set $STACKTOP + (local.get $sp) + ) + ;;@ core/core_drop_files.c:102:0 + (return) + ) + ) + ;;@ core/core_drop_files.c:87:0 + (i32.store8 + (local.get $$$compoundliteral7) + (i32.const 80) + ) + (local.set $$g9 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g9) + (i32.const 80) + ) + (local.set $$b10 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b10) + (i32.const 80) + ) + (local.set $$a11 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a11) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral7$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral7) + ) + ) + (call $_DrawText + (i32.const 8331) + (i32.const 100) + (i32.const 40) + (i32.const 20) + (local.get $$$compoundliteral7$byval_copy) + ) + ;;@ core/core_drop_files.c:89:0 + (local.set $$i + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (local.get $$i) + ) + (local.set $$cmp12 + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp12) + ) + (br $while-out) + ) + ;;@ core/core_drop_files.c:91:0 + (local.set $$1 + (local.get $$i) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$1) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp13 + (i32.eq + (local.get $$rem) + (i32.const 0) + ) + ) + (local.set $$2 + (local.get $$i) + ) + (local.set $$mul + (i32.mul + (local.get $$2) + (i32.const 40) + ) + ) + (local.set $$add + (i32.add + (i32.const 85) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp13) + (block + (i32.store8 + (local.get $$$compoundliteral15) + (i32.const -56) + ) + (local.set $$g17 + (i32.add + (local.get $$$compoundliteral15) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g17) + (i32.const -56) + ) + (local.set $$b18 + (i32.add + (local.get $$$compoundliteral15) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b18) + (i32.const -56) + ) + (local.set $$a19 + (i32.add + (local.get $$$compoundliteral15) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a19) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral15$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral15) + ) + ) + (call $_Fade + (local.get $$agg$tmp) + (local.get $$$compoundliteral15$byval_copy) + (f32.const 0.5) + ) + (i32.store align=1 + (local.get $$agg$tmp$byval_copy) + (i32.load align=1 + (local.get $$agg$tmp) + ) + ) + (call $_DrawRectangle + (i32.const 0) + (local.get $$add) + (i32.const 800) + (i32.const 40) + (local.get $$agg$tmp$byval_copy) + ) + ) + (block + ;;@ core/core_drop_files.c:92:0 + (i32.store8 + (local.get $$$compoundliteral24) + (i32.const -56) + ) + (local.set $$g26 + (i32.add + (local.get $$$compoundliteral24) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g26) + (i32.const -56) + ) + (local.set $$b27 + (i32.add + (local.get $$$compoundliteral24) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b27) + (i32.const -56) + ) + (local.set $$a28 + (i32.add + (local.get $$$compoundliteral24) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a28) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral24$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral24) + ) + ) + (call $_Fade + (local.get $$agg$tmp23) + (local.get $$$compoundliteral24$byval_copy) + (f32.const 0.30000001192092896) + ) + (i32.store align=1 + (local.get $$agg$tmp23$byval_copy) + (i32.load align=1 + (local.get $$agg$tmp23) + ) + ) + (call $_DrawRectangle + (i32.const 0) + (local.get $$add) + (i32.const 800) + (i32.const 40) + (local.get $$agg$tmp23$byval_copy) + ) + ) + ) + ;;@ core/core_drop_files.c:94:0 + (local.set $$3 + (local.get $$i) + ) + (local.set $$arrayidx + (i32.add + (i32.const 0) + (i32.shl + (local.get $$3) + (i32.const 2) + ) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$5 + (local.get $$i) + ) + (local.set $$mul30 + (i32.mul + (local.get $$5) + (i32.const 40) + ) + ) + (local.set $$add31 + (i32.add + (i32.const 100) + (local.get $$mul30) + ) + ) + (i32.store8 + (local.get $$$compoundliteral32) + (i32.const -126) + ) + (local.set $$g34 + (i32.add + (local.get $$$compoundliteral32) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g34) + (i32.const -126) + ) + (local.set $$b35 + (i32.add + (local.get $$$compoundliteral32) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b35) + (i32.const -126) + ) + (local.set $$a36 + (i32.add + (local.get $$$compoundliteral32) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a36) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral32$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral32) + ) + ) + (call $_DrawText + (local.get $$4) + (i32.const 120) + (local.get $$add31) + (i32.const 10) + (local.get $$$compoundliteral32$byval_copy) + ) + ;;@ core/core_drop_files.c:89:0 + (local.set $$6 + (local.get $$i) + ) + (local.set $$inc + (i32.add + (local.get $$6) + (i32.const 1) + ) + ) + (local.set $$i + (local.get $$inc) + ) + (br $while-in) + ) + ) + ;;@ core/core_drop_files.c:97:0 + (local.set $$mul37 + (i32.mul + (i32.const 0) + (i32.const 40) + ) + ) + (local.set $$add38 + (i32.add + (i32.const 110) + (local.get $$mul37) + ) + ) + (i32.store8 + (local.get $$$compoundliteral39) + (i32.const 80) + ) + (local.set $$g41 + (i32.add + (local.get $$$compoundliteral39) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g41) + (i32.const 80) + ) + (local.set $$b42 + (i32.add + (local.get $$$compoundliteral39) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b42) + (i32.const 80) + ) + (local.set $$a43 + (i32.add + (local.get $$$compoundliteral39) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a43) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral39$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral39) + ) + ) + (call $_DrawText + (i32.const 8346) + (i32.const 100) + (local.get $$add38) + (i32.const 20) + (local.get $$$compoundliteral39$byval_copy) + ) + ;;@ core/core_drop_files.c:100:0 + (call $_EndDrawing) + (global.set $STACKTOP + (local.get $sp) + ) + ;;@ core/core_drop_files.c:102:0 + (return) + ) + (func $_ma_device_process_pcm_frames_capture__webaudio (; 313 ;) (param $$pDevice i32) (param $$frameCount i32) (param $$pFrames i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 f32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 f32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 f32) + (local $$3 i32) + (local $$4 i32) + (local $$5 f32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$_dspFrameCount$i i32) + (local $$_dspFrameCount$i14 i32) + (local $$_dspFrames$i i32) + (local $$_dspFrames$i15 i32) + (local $$add$i$i i32) + (local $$add$i51$i i32) + (local $$add$ptr$i$i i32) + (local $$add$ptr$i48$i i32) + (local $$add$ptr29$i$i i32) + (local $$add$ptr29$i50$i i32) + (local $$bf$clear$i i32) + (local $$bf$load$i i32) + (local $$call$i i32) + (local $$call$i$i i32) + (local $$call$i$i$i i32) + (local $$call$i$i33$i i32) + (local $$call$i52$i$i i32) + (local $$call$i52$i37$i i32) + (local $$call$lcssa$i i32) + (local $$call14$i i32) + (local $$call15$i18 i64) + (local $$call1558$i i64) + (local $$call18$i i32) + (local $$call19$i i32) + (local $$call25$i i64) + (local $$call27$i i32) + (local $$channels$i i32) + (local $$channels12$i$i i32) + (local $$channels16$i$i i32) + (local $$channels16$i36$i i32) + (local $$chunkBuffer$i i32) + (local $$cmp i32) + (local $$cmp1$i i32) + (local $$cmp1$i5 i32) + (local $$cmp14$i i32) + (local $$cmp1415$i i32) + (local $$cmp16$i i32) + (local $$cmp17$i i32) + (local $$cmp1760$i i32) + (local $$cmp18$i$i i32) + (local $$cmp18$i52$i i32) + (local $$cmp19$i$i i32) + (local $$cmp19$i45$i i32) + (local $$cmp20$i i32) + (local $$cmp21$i i32) + (local $$cmp28$i i32) + (local $$cmp33$i i32) + (local $$cmp5$i i32) + (local $$cmp5$i8 i32) + (local $$cmp8$i$i i32) + (local $$cmp8$i29$i i32) + (local $$conv$i i64) + (local $$conv$i16 i64) + (local $$conv16$i i32) + (local $$conv1659$i i32) + (local $$conv1661$i i32) + (local $$conv26$i i32) + (local $$converter$i i32) + (local $$converter$i11 i32) + (local $$div$i i32) + (local $$div$i$i i32) + (local $$div$i44$i i32) + (local $$duplexRB i32) + (local $$format$i i32) + (local $$format10$i$i i32) + (local $$format14$i$i i32) + (local $$format14$i35$i i32) + (local $$framesToProcess$i i32) + (local $$isPassthrough$i i32) + (local $$masterVolumeFactor$i$i i32) + (local $$masterVolumeFactor$i28$i i32) + (local $$mul$i$i i32) + (local $$mul$i$i$i i32) + (local $$mul$i$i34$i i32) + (local $$mul$i18$i i32) + (local $$mul$i47$i i32) + (local $$mul$i53$i$i i32) + (local $$mul$i53$i38$i i32) + (local $$mul28$i$i i32) + (local $$mul28$i49$i i32) + (local $$onData1$i$i i32) + (local $$onData1$i20$i i32) + (local $$pFramesInExternalFormat$i i32) + (local $$spec$select$i$i i32) + (local $$spec$select$i46$i i32) + (local $$sub$i$i i32) + (local $$sub$i43$i i32) + (local $$tempFramesIn$i$i i32) + (local $$tobool$i i32) + (local $$tobool$i$i i32) + (local $$tobool$i22$i i32) + (local $$totalFramesProcessed$056$i$i i32) + (local $$totalFramesProcessed$056$i42$i i32) + (local $$type i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 12304) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 12304) + ) + ) + (local.set $$tempFramesIn$i$i + (i32.add + (local.get $sp) + (i32.const 4096) + ) + ) + (local.set $$chunkBuffer$i + (local.get $sp) + ) + (local.set $$framesToProcess$i + (i32.add + (local.get $sp) + (i32.const 12292) + ) + ) + (local.set $$pFramesInExternalFormat$i + (i32.add + (local.get $sp) + (i32.const 12288) + ) + ) + (local.set $$type + (i32.add + (local.get $$pDevice) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$type) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 3) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$duplexRB + (i32.add + (local.get $$pDevice) + (i32.const 94344) + ) + ) + (local.set $$cmp1$i + (i32.eq + (local.get $$frameCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1$i) + (call $___assert_fail + (i32.const 8364) + (i32.const 8379) + (i32.const 5897) + (i32.const 8607) + ) + ) + (local.set $$cmp5$i + (i32.eq + (local.get $$pFrames) + (i32.const 0) + ) + ) + (if + (local.get $$cmp5$i) + (call $___assert_fail + (i32.const 8445) + (i32.const 8379) + (i32.const 5898) + (i32.const 8607) + ) + ) + (local.set $$_dspFrameCount$i + (i32.add + (local.get $$pDevice) + (i32.const 94272) + ) + ) + (i32.store + (local.get $$_dspFrameCount$i) + (local.get $$frameCount) + ) + (local.set $$_dspFrames$i + (i32.add + (local.get $$pDevice) + (i32.const 94276) + ) + ) + (i32.store + (local.get $$_dspFrames$i) + (local.get $$pFrames) + ) + (i32.store + (local.get $$framesToProcess$i) + (i32.const 256) + ) + (local.set $$call14$i + (call $_ma_pcm_rb_acquire_write + (local.get $$duplexRB) + (local.get $$framesToProcess$i) + (local.get $$pFramesInExternalFormat$i) + ) + ) + (local.set $$cmp1415$i + (i32.eq + (local.get $$call14$i) + (i32.const 0) + ) + ) + (block $label$break$L9 + (if + (local.get $$cmp1415$i) + (block + (local.set $$converter$i + (i32.add + (local.get $$pDevice) + (i32.const 47744) + ) + ) + (loop $while-in + (block $while-out + (local.set $$1 + (i32.load + (local.get $$framesToProcess$i) + ) + ) + (local.set $$cmp16$i + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp16$i) + (block + (local.set $$call18$i + (call $_ma_pcm_rb_pointer_disance + (local.get $$duplexRB) + ) + ) + (local.set $$call19$i + (call $_ma_pcm_rb_get_subbuffer_size + (local.get $$duplexRB) + ) + ) + (local.set $$cmp20$i + (i32.eq + (local.get $$call18$i) + (local.get $$call19$i) + ) + ) + (if + (local.get $$cmp20$i) + (block + (local.set $label + (i32.const 15) + ) + (br $while-out) + ) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$pFramesInExternalFormat$i) + ) + ) + (local.set $$conv$i + (i64.extend_i32_u + (local.get $$1) + ) + ) + (local.set $$call25$i + (call $_ma_pcm_converter_read + (local.get $$converter$i) + (local.get $$2) + (local.get $$conv$i) + ) + ) + (local.set $$conv26$i + (i32.wrap_i64 + (local.get $$call25$i) + ) + ) + (local.set $$3 + (i32.load + (local.get $$pFramesInExternalFormat$i) + ) + ) + (local.set $$call27$i + (call $_ma_pcm_rb_commit_write + (local.get $$duplexRB) + (local.get $$conv26$i) + (local.get $$3) + ) + ) + (local.set $$cmp28$i + (i32.eq + (local.get $$call27$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp28$i) + ) + (block + (local.set $label + (i32.const 13) + ) + (br $while-out) + ) + ) + (local.set $$cmp33$i + (i32.gt_u + (local.get $$1) + (local.get $$conv26$i) + ) + ) + (if + (local.get $$cmp33$i) + (block + (local.set $label + (i32.const 38) + ) + (br $while-out) + ) + ) + (i32.store + (local.get $$framesToProcess$i) + (i32.const 256) + ) + (local.set $$call$i + (call $_ma_pcm_rb_acquire_write + (local.get $$duplexRB) + (local.get $$framesToProcess$i) + (local.get $$pFramesInExternalFormat$i) + ) + ) + (local.set $$cmp14$i + (i32.eq + (local.get $$call$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp14$i) + ) + (block + (local.set $$call$lcssa$i + (local.get $$call$i) + ) + (br $label$break$L9) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 13) + ) + (block + (drop + (call $_ma_post_error + (local.get $$pDevice) + (i32.const 1) + (i32.const 8704) + (local.get $$call27$i) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (if + (i32.eq + (local.get $label) + (i32.const 15) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (if + (i32.eq + (local.get $label) + (i32.const 38) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + ) + (local.set $$call$lcssa$i + (local.get $$call14$i) + ) + ) + ) + (drop + (call $_ma_post_error + (local.get $$pDevice) + (i32.const 1) + (i32.const 8649) + (local.get $$call$lcssa$i) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp1$i5 + (i32.eq + (local.get $$frameCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1$i5) + (call $___assert_fail + (i32.const 8364) + (i32.const 8379) + (i32.const 5863) + (i32.const 8756) + ) + ) + (local.set $$cmp5$i8 + (i32.eq + (local.get $$pFrames) + (i32.const 0) + ) + ) + (if + (local.get $$cmp5$i8) + (call $___assert_fail + (i32.const 8789) + (i32.const 8379) + (i32.const 5864) + (i32.const 8756) + ) + ) + (local.set $$converter$i11 + (i32.add + (local.get $$pDevice) + (i32.const 47744) + ) + ) + (local.set $$isPassthrough$i + (i32.add + (local.get $$pDevice) + (i32.const 94208) + ) + ) + (local.set $$bf$load$i + (i32.load8_s + (local.get $$isPassthrough$i) + ) + ) + (local.set $$bf$clear$i + (i32.and + (local.get $$bf$load$i) + (i32.const 64) + ) + ) + (local.set $$tobool$i + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool$i) + ) + (block + (local.set $$onData1$i$i + (i32.add + (local.get $$pDevice) + (i32.const 16) + ) + ) + (local.set $$4 + (i32.load + (local.get $$onData1$i$i) + ) + ) + (local.set $$tobool$i$i + (i32.eq + (local.get $$4) + (i32.const 0) + ) + ) + (if + (local.get $$tobool$i$i) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$masterVolumeFactor$i$i + (i32.add + (local.get $$pDevice) + (i32.const 328) + ) + ) + (local.set $$5 + (f32.load + (local.get $$masterVolumeFactor$i$i) + ) + ) + (local.set $$cmp8$i$i + (f32.lt + (local.get $$5) + (f32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp8$i$i) + ) + (block + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (i32.const 0) + (local.get $$pFrames) + (local.get $$frameCount) + (i32.add + (i32.and + (local.get $$4) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$format10$i$i + (i32.add + (local.get $$pDevice) + (i32.const 47624) + ) + ) + (local.set $$6 + (i32.load + (local.get $$format10$i$i) + ) + ) + (local.set $$channels12$i$i + (i32.add + (local.get $$pDevice) + (i32.const 47628) + ) + ) + (local.set $$7 + (i32.load + (local.get $$channels12$i$i) + ) + ) + (local.set $$call$i$i$i + (call $_ma_get_bytes_per_sample + (local.get $$6) + ) + ) + (local.set $$mul$i$i$i + (i32.mul + (local.get $$call$i$i$i) + (local.get $$7) + ) + ) + (local.set $$format14$i$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$8 + (i32.load + (local.get $$format14$i$i) + ) + ) + (local.set $$channels16$i$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$9 + (i32.load + (local.get $$channels16$i$i) + ) + ) + (local.set $$call$i52$i$i + (call $_ma_get_bytes_per_sample + (local.get $$8) + ) + ) + (local.set $$mul$i53$i$i + (i32.mul + (local.get $$call$i52$i$i) + (local.get $$9) + ) + ) + (local.set $$totalFramesProcessed$056$i$i + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$sub$i$i + (i32.sub + (local.get $$frameCount) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$div$i$i + (i32.and + (i32.div_u + (i32.const 8192) + (local.get $$mul$i$i$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp19$i$i + (i32.gt_u + (local.get $$sub$i$i) + (local.get $$div$i$i) + ) + ) + (local.set $$spec$select$i$i + (if (result i32) + (local.get $$cmp19$i$i) + (local.get $$div$i$i) + (local.get $$sub$i$i) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$totalFramesProcessed$056$i$i) + (local.get $$mul$i$i$i) + ) + ) + (local.set $$add$ptr$i$i + (i32.add + (local.get $$pFrames) + (local.get $$mul$i$i) + ) + ) + (local.set $$10 + (i32.load + (local.get $$format10$i$i) + ) + ) + (local.set $$11 + (i32.load + (local.get $$channels12$i$i) + ) + ) + (local.set $$12 + (f32.load + (local.get $$masterVolumeFactor$i$i) + ) + ) + (call $_ma_copy_and_apply_volume_factor_pcm_frames + (local.get $$tempFramesIn$i$i) + (local.get $$add$ptr$i$i) + (local.get $$spec$select$i$i) + (local.get $$10) + (local.get $$11) + (local.get $$12) + ) + (local.set $$mul28$i$i + (i32.mul + (local.get $$mul$i53$i$i) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$add$ptr29$i$i + (i32.add + (i32.const 0) + (local.get $$mul28$i$i) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$add$ptr29$i$i) + (local.get $$tempFramesIn$i$i) + (local.get $$spec$select$i$i) + (i32.add + (i32.and + (local.get $$4) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (local.set $$add$i$i + (i32.add + (local.get $$spec$select$i$i) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$cmp18$i$i + (i32.lt_u + (local.get $$add$i$i) + (local.get $$frameCount) + ) + ) + (if + (local.get $$cmp18$i$i) + (local.set $$totalFramesProcessed$056$i$i + (local.get $$add$i$i) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$_dspFrameCount$i14 + (i32.add + (local.get $$pDevice) + (i32.const 94272) + ) + ) + (i32.store + (local.get $$_dspFrameCount$i14) + (local.get $$frameCount) + ) + (local.set $$_dspFrames$i15 + (i32.add + (local.get $$pDevice) + (i32.const 94276) + ) + ) + (i32.store + (local.get $$_dspFrames$i15) + (local.get $$pFrames) + ) + (local.set $$format$i + (i32.add + (local.get $$pDevice) + (i32.const 47624) + ) + ) + (local.set $$13 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pDevice) + (i32.const 47628) + ) + ) + (local.set $$14 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$13) + ) + ) + (local.set $$mul$i18$i + (i32.mul + (local.get $$call$i$i) + (local.get $$14) + ) + ) + (local.set $$div$i + (i32.and + (i32.div_u + (i32.const 4096) + (local.get $$mul$i18$i) + ) + (i32.const -1) + ) + ) + (local.set $$conv$i16 + (i64.extend_i32_u + (local.get $$div$i) + ) + ) + (local.set $$call1558$i + (call $_ma_pcm_converter_read + (local.get $$converter$i11) + (local.get $$chunkBuffer$i) + (local.get $$conv$i16) + ) + ) + (local.set $$conv1659$i + (i32.wrap_i64 + (local.get $$call1558$i) + ) + ) + (local.set $$cmp1760$i + (i32.eq + (local.get $$conv1659$i) + (i32.const 0) + ) + ) + (block $label$break$L47 + (if + (i32.eqz + (local.get $$cmp1760$i) + ) + (block + (local.set $$onData1$i20$i + (i32.add + (local.get $$pDevice) + (i32.const 16) + ) + ) + (local.set $$masterVolumeFactor$i28$i + (i32.add + (local.get $$pDevice) + (i32.const 328) + ) + ) + (local.set $$format14$i35$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$channels16$i36$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$conv1661$i + (local.get $$conv1659$i) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$15 + (i32.load + (local.get $$onData1$i20$i) + ) + ) + (local.set $$tobool$i22$i + (i32.eq + (local.get $$15) + (i32.const 0) + ) + ) + (block $do-once + (if + (i32.eqz + (local.get $$tobool$i22$i) + ) + (block + (local.set $$16 + (f32.load + (local.get $$masterVolumeFactor$i28$i) + ) + ) + (local.set $$cmp8$i29$i + (f32.lt + (local.get $$16) + (f32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp8$i29$i) + ) + (block + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (i32.const 0) + (local.get $$chunkBuffer$i) + (local.get $$conv1661$i) + (i32.add + (i32.and + (local.get $$15) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (br $do-once) + ) + ) + (local.set $$17 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$18 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i33$i + (call $_ma_get_bytes_per_sample + (local.get $$17) + ) + ) + (local.set $$mul$i$i34$i + (i32.mul + (local.get $$call$i$i33$i) + (local.get $$18) + ) + ) + (local.set $$19 + (i32.load + (local.get $$format14$i35$i) + ) + ) + (local.set $$20 + (i32.load + (local.get $$channels16$i36$i) + ) + ) + (local.set $$call$i52$i37$i + (call $_ma_get_bytes_per_sample + (local.get $$19) + ) + ) + (local.set $$mul$i53$i38$i + (i32.mul + (local.get $$call$i52$i37$i) + (local.get $$20) + ) + ) + (local.set $$totalFramesProcessed$056$i42$i + (i32.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$sub$i43$i + (i32.sub + (local.get $$conv1661$i) + (local.get $$totalFramesProcessed$056$i42$i) + ) + ) + (local.set $$div$i44$i + (i32.and + (i32.div_u + (i32.const 8192) + (local.get $$mul$i$i34$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp19$i45$i + (i32.gt_u + (local.get $$sub$i43$i) + (local.get $$div$i44$i) + ) + ) + (local.set $$spec$select$i46$i + (if (result i32) + (local.get $$cmp19$i45$i) + (local.get $$div$i44$i) + (local.get $$sub$i43$i) + ) + ) + (local.set $$mul$i47$i + (i32.mul + (local.get $$totalFramesProcessed$056$i42$i) + (local.get $$mul$i$i34$i) + ) + ) + (local.set $$add$ptr$i48$i + (i32.add + (local.get $$chunkBuffer$i) + (local.get $$mul$i47$i) + ) + ) + (local.set $$21 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$22 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$23 + (f32.load + (local.get $$masterVolumeFactor$i28$i) + ) + ) + (call $_ma_copy_and_apply_volume_factor_pcm_frames + (local.get $$tempFramesIn$i$i) + (local.get $$add$ptr$i48$i) + (local.get $$spec$select$i46$i) + (local.get $$21) + (local.get $$22) + (local.get $$23) + ) + (local.set $$mul28$i49$i + (i32.mul + (local.get $$mul$i53$i38$i) + (local.get $$totalFramesProcessed$056$i42$i) + ) + ) + (local.set $$add$ptr29$i50$i + (i32.add + (i32.const 0) + (local.get $$mul28$i49$i) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$add$ptr29$i50$i) + (local.get $$tempFramesIn$i$i) + (local.get $$spec$select$i46$i) + (i32.add + (i32.and + (local.get $$15) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (local.set $$add$i51$i + (i32.add + (local.get $$spec$select$i46$i) + (local.get $$totalFramesProcessed$056$i42$i) + ) + ) + (local.set $$cmp18$i52$i + (i32.lt_u + (local.get $$add$i51$i) + (local.get $$conv1661$i) + ) + ) + (if + (local.get $$cmp18$i52$i) + (local.set $$totalFramesProcessed$056$i42$i + (local.get $$add$i51$i) + ) + (br $while-out6) + ) + (br $while-in7) + ) + ) + ) + ) + ) + (local.set $$cmp21$i + (i32.gt_u + (local.get $$div$i) + (local.get $$conv1661$i) + ) + ) + (if + (local.get $$cmp21$i) + (br $label$break$L47) + ) + (local.set $$call15$i18 + (call $_ma_pcm_converter_read + (local.get $$converter$i11) + (local.get $$chunkBuffer$i) + (local.get $$conv$i16) + ) + ) + (local.set $$conv16$i + (i32.wrap_i64 + (local.get $$call15$i18) + ) + ) + (local.set $$cmp17$i + (i32.eq + (local.get $$conv16$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp17$i) + (br $while-out3) + (local.set $$conv1661$i + (local.get $$conv16$i) + ) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_ma_device_process_pcm_frames_playback__webaudio (; 314 ;) (param $$pDevice i32) (param $$frameCount i32) (param $$pFrames i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 f32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 f32) + (local $$18 f32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 f32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 f32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 f32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$_dspFrameCount$i i32) + (local $$_dspFrames$i i32) + (local $$add$i i32) + (local $$add$i$i i32) + (local $$add$i46$i i32) + (local $$add$ptr$i i32) + (local $$add$ptr$i$i i32) + (local $$add$ptr$i43$i i32) + (local $$add$ptr29$i$i i32) + (local $$add$ptr29$i45$i i32) + (local $$bf$clear$i i32) + (local $$bf$clear$i$i i32) + (local $$bf$clear$i$i18 i32) + (local $$bf$clear$i16$i i32) + (local $$bf$clear48$i$i i32) + (local $$bf$clear48$i$i26 i32) + (local $$bf$clear48$i55$i i32) + (local $$bf$load$i i32) + (local $$bf$load$i$i i32) + (local $$bf$load$i$i17 i32) + (local $$bf$load$i15$i i32) + (local $$bf$load46$i$i i32) + (local $$bf$load46$i$i25 i32) + (local $$bf$load46$i54$i i32) + (local $$call$i i64) + (local $$call$i$i i32) + (local $$call$i$i$i i32) + (local $$call$i$i28$i i32) + (local $$call$i2$i i32) + (local $$call$i4$i i32) + (local $$call$i52$i$i i32) + (local $$call$i52$i32$i i32) + (local $$call$i65$i i32) + (local $$call16$i i32) + (local $$call22$i i32) + (local $$call30$i i32) + (local $$call36$i i32) + (local $$channels$i i32) + (local $$channels$i$i i32) + (local $$channels42$i$i i32) + (local $$channels50$i i32) + (local $$channels57$i$i i32) + (local $$cmp i32) + (local $$cmp1$i i32) + (local $$cmp1$i5 i32) + (local $$cmp14$i i32) + (local $$cmp1469$i i32) + (local $$cmp18$i$i i32) + (local $$cmp18$i47$i i32) + (local $$cmp1855$i34$i i32) + (local $$cmp19$i$i i32) + (local $$cmp19$i40$i i32) + (local $$cmp20$i i32) + (local $$cmp23$i i32) + (local $$cmp26$i i32) + (local $$cmp31$i i32) + (local $$cmp35$i$i i32) + (local $$cmp35$i$i23 i32) + (local $$cmp37$i i32) + (local $$cmp5$i i32) + (local $$cmp5$i8 i32) + (local $$cmp53$i i32) + (local $$cmp54$i$i i32) + (local $$cmp54$i$i29 i32) + (local $$cmp54$i59$i i32) + (local $$cmp6$i$i i32) + (local $$cmp8$i$i i32) + (local $$cmp8$i24$i i32) + (local $$cond$i i32) + (local $$conv$i i64) + (local $$conv$i34 i64) + (local $$conv13$i i32) + (local $$conv74$i i64) + (local $$converter$i i32) + (local $$converter$i33 i32) + (local $$div$i i32) + (local $$div$i$i i32) + (local $$div$i39$i i32) + (local $$div47$i i32) + (local $$div52$i i32) + (local $$duplexRB i32) + (local $$format$i i32) + (local $$format$i$i i32) + (local $$format40$i$i i32) + (local $$format48$i i32) + (local $$format53$i$i i32) + (local $$inputFrameCount$i i32) + (local $$internalChannels$i i32) + (local $$internalFormat$i i32) + (local $$internalSampleRate$i i32) + (local $$isPassthrough$i i32) + (local $$masterVolumeFactor$i23$i i32) + (local $$masterVolumeFactor34$i$i22 i32) + (local $$mul$i i32) + (local $$mul$i$i i32) + (local $$mul$i$i$i i32) + (local $$mul$i$i29$i i32) + (local $$mul$i1$i i32) + (local $$mul$i3$i i32) + (local $$mul$i42$i i32) + (local $$mul$i5$i i32) + (local $$mul$i53$i$i i32) + (local $$mul$i53$i33$i i32) + (local $$mul$i54$i$i i32) + (local $$mul$i54$i$i31 i32) + (local $$mul$i54$i62$i i32) + (local $$mul$i66$i i32) + (local $$mul28$i$i i32) + (local $$mul28$i44$i i32) + (local $$noPreZeroedOutputBuffer$i$i16 i32) + (local $$noPreZeroedOutputBuffer$i14$i i32) + (local $$onData1$i$i13 i32) + (local $$onData1$i11$i i32) + (local $$or$cond1$i$i i32) + (local $$pFramesInInternalFormat$addr$071$i i32) + (local $$pInputFrames$i i32) + (local $$playbackFramesInExternalFormat$i i32) + (local $$sampleRate$i i32) + (local $$silentInputFrames$i i32) + (local $$spec$select$i i32) + (local $$spec$select$i$i i32) + (local $$spec$select$i41$i i32) + (local $$spec$select67$i i32) + (local $$sub$i i32) + (local $$sub$i$i i32) + (local $$sub$i38$i i32) + (local $$tempFramesIn$i$i i32) + (local $$tobool$i i32) + (local $$tobool$i$i i32) + (local $$tobool$i$i15 i32) + (local $$tobool$i11 i32) + (local $$tobool$i13$i i32) + (local $$tobool3$i$i i32) + (local $$tobool3$i$i19 i32) + (local $$tobool3$i17$i i32) + (local $$tobool50$i$i i32) + (local $$tobool50$i$i27 i32) + (local $$tobool50$i56$i i32) + (local $$totalFramesProcessed$056$i$i i32) + (local $$totalFramesProcessed$056$i37$i i32) + (local $$totalFramesReadFromClient$070$i i32) + (local $$type i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16400) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16400) + ) + ) + (local.set $$tempFramesIn$i$i + (i32.add + (local.get $sp) + (i32.const 8192) + ) + ) + (local.set $$playbackFramesInExternalFormat$i + (i32.add + (local.get $sp) + (i32.const 4096) + ) + ) + (local.set $$silentInputFrames$i + (local.get $sp) + ) + (local.set $$inputFrameCount$i + (i32.add + (local.get $sp) + (i32.const 16388) + ) + ) + (local.set $$pInputFrames$i + (i32.add + (local.get $sp) + (i32.const 16384) + ) + ) + (local.set $$type + (i32.add + (local.get $$pDevice) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$type) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 3) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (local.set $$cmp1$i5 + (i32.eq + (local.get $$frameCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1$i5) + (call $___assert_fail + (i32.const 8364) + (i32.const 8379) + (i32.const 5849) + (i32.const 8483) + ) + ) + (local.set $$cmp5$i8 + (i32.eq + (local.get $$pFrames) + (i32.const 0) + ) + ) + (if + (local.get $$cmp5$i8) + (call $___assert_fail + (i32.const 8518) + (i32.const 8379) + (i32.const 5850) + (i32.const 8483) + ) + ) + (local.set $$isPassthrough$i + (i32.add + (local.get $$pDevice) + (i32.const 47232) + ) + ) + (local.set $$bf$load$i + (i32.load8_s + (local.get $$isPassthrough$i) + ) + ) + (local.set $$bf$clear$i + (i32.and + (local.get $$bf$load$i) + (i32.const 64) + ) + ) + (local.set $$tobool$i11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool$i11) + (block + (local.set $$converter$i33 + (i32.add + (local.get $$pDevice) + (i32.const 768) + ) + ) + (local.set $$conv$i34 + (i64.extend_i32_u + (local.get $$frameCount) + ) + ) + (drop + (call $_ma_pcm_converter_read + (local.get $$converter$i33) + (local.get $$pFrames) + (local.get $$conv$i34) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$onData1$i$i13 + (i32.add + (local.get $$pDevice) + (i32.const 16) + ) + ) + (local.set $$44 + (i32.load + (local.get $$onData1$i$i13) + ) + ) + (local.set $$tobool$i$i15 + (i32.eq + (local.get $$44) + (i32.const 0) + ) + ) + (if + (local.get $$tobool$i$i15) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$noPreZeroedOutputBuffer$i$i16 + (i32.add + (local.get $$pDevice) + (i32.const 324) + ) + ) + (local.set $$bf$load$i$i17 + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i$i16) + ) + ) + (local.set $$bf$clear$i$i18 + (i32.and + (local.get $$bf$load$i$i17) + (i32.const 16) + ) + ) + (local.set $$tobool3$i$i19 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear$i$i18) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3$i$i19) + (block + (local.set $$format$i$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$45 + (i32.load + (local.get $$format$i$i) + ) + ) + (local.set $$channels$i$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$46 + (i32.load + (local.get $$channels$i$i) + ) + ) + (call $_ma_zero_pcm_frames + (local.get $$pFrames) + (local.get $$frameCount) + (local.get $$45) + (local.get $$46) + ) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$pFrames) + (i32.const 0) + (local.get $$frameCount) + (i32.add + (i32.and + (local.get $$44) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (local.set $$masterVolumeFactor34$i$i22 + (i32.add + (local.get $$pDevice) + (i32.const 328) + ) + ) + (local.set $$47 + (f32.load + (local.get $$masterVolumeFactor34$i$i22) + ) + ) + (local.set $$cmp35$i$i23 + (f32.lt + (local.get $$47) + (f32.const 1) + ) + ) + (if + (local.get $$cmp35$i$i23) + (block + (local.set $$format40$i$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$48 + (i32.load + (local.get $$format40$i$i) + ) + ) + (local.set $$channels42$i$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$49 + (i32.load + (local.get $$channels42$i$i) + ) + ) + (call $_ma_apply_volume_factor_pcm_frames + (local.get $$pFrames) + (local.get $$frameCount) + (local.get $$48) + (local.get $$49) + (local.get $$47) + ) + ) + ) + (local.set $$bf$load46$i$i25 + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i$i16) + ) + ) + (local.set $$bf$clear48$i$i26 + (i32.and + (local.get $$bf$load46$i$i25) + (i32.const 32) + ) + ) + (local.set $$tobool50$i$i27 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear48$i$i26) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool50$i$i27) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$format53$i$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$50 + (i32.load + (local.get $$format53$i$i) + ) + ) + (local.set $$cmp54$i$i29 + (i32.eq + (local.get $$50) + (i32.const 5) + ) + ) + (if + (i32.eqz + (local.get $$cmp54$i$i29) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$channels57$i$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$51 + (i32.load + (local.get $$channels57$i$i) + ) + ) + (local.set $$mul$i54$i$i31 + (i32.mul + (local.get $$51) + (local.get $$frameCount) + ) + ) + (call $_ma_clip_samples_f32 + (local.get $$pFrames) + (local.get $$mul$i54$i$i31) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$duplexRB + (i32.add + (local.get $$pDevice) + (i32.const 94344) + ) + ) + (local.set $$cmp1$i + (i32.eq + (local.get $$frameCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1$i) + (call $___assert_fail + (i32.const 8364) + (i32.const 8379) + (i32.const 5948) + (i32.const 8402) + ) + ) + (local.set $$cmp5$i + (i32.eq + (local.get $$pFrames) + (i32.const 0) + ) + ) + (if + (local.get $$cmp5$i) + (call $___assert_fail + (i32.const 8445) + (i32.const 8379) + (i32.const 5949) + (i32.const 8402) + ) + ) + (drop + (call $_memset + (local.get $$silentInputFrames$i) + (i32.const 0) + (i32.const 4096) + ) + ) + (local.set $$sampleRate$i + (i32.add + (local.get $$pDevice) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$sampleRate$i) + ) + ) + (local.set $$internalSampleRate$i + (i32.add + (local.get $$pDevice) + (i32.const 696) + ) + ) + (local.set $$2 + (i32.load + (local.get $$internalSampleRate$i) + ) + ) + (local.set $$conv$i + (i64.extend_i32_u + (local.get $$frameCount) + ) + ) + (local.set $$call$i + (call $_ma_calculate_frame_count_after_src + (local.get $$1) + (local.get $$2) + (local.get $$conv$i) + ) + ) + (local.set $$conv13$i + (i32.wrap_i64 + (local.get $$call$i) + ) + ) + (local.set $$cmp1469$i + (i32.eq + (local.get $$conv13$i) + (i32.const 0) + ) + ) + (block $label$break$L36 + (if + (i32.eqz + (local.get $$cmp1469$i) + ) + (block + (local.set $$format$i + (i32.add + (local.get $$pDevice) + (i32.const 648) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pDevice) + (i32.const 652) + ) + ) + (local.set $$_dspFrameCount$i + (i32.add + (local.get $$pDevice) + (i32.const 47296) + ) + ) + (local.set $$_dspFrames$i + (i32.add + (local.get $$pDevice) + (i32.const 47300) + ) + ) + (local.set $$converter$i + (i32.add + (local.get $$pDevice) + (i32.const 768) + ) + ) + (local.set $$internalFormat$i + (i32.add + (local.get $$pDevice) + (i32.const 688) + ) + ) + (local.set $$internalChannels$i + (i32.add + (local.get $$pDevice) + (i32.const 692) + ) + ) + (local.set $$format48$i + (i32.add + (local.get $$pDevice) + (i32.const 47624) + ) + ) + (local.set $$channels50$i + (i32.add + (local.get $$pDevice) + (i32.const 47628) + ) + ) + (local.set $$onData1$i11$i + (i32.add + (local.get $$pDevice) + (i32.const 16) + ) + ) + (local.set $$noPreZeroedOutputBuffer$i14$i + (i32.add + (local.get $$pDevice) + (i32.const 324) + ) + ) + (local.set $$masterVolumeFactor$i23$i + (i32.add + (local.get $$pDevice) + (i32.const 328) + ) + ) + (local.set $$pFramesInInternalFormat$addr$071$i + (local.get $$pFrames) + ) + (local.set $$totalFramesReadFromClient$070$i + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$call16$i + (call $_ma_device_is_started + (local.get $$pDevice) + ) + ) + (local.set $$tobool$i + (i32.eq + (local.get $$call16$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool$i) + (br $label$break$L36) + ) + (local.set $$sub$i + (i32.sub + (local.get $$conv13$i) + (local.get $$totalFramesReadFromClient$070$i) + ) + ) + (local.set $$3 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$4 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$3) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$call$i$i) + (local.get $$4) + ) + ) + (local.set $$div$i + (i32.and + (i32.div_u + (i32.const 4096) + (local.get $$mul$i$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp20$i + (i32.gt_u + (local.get $$div$i) + (local.get $$sub$i) + ) + ) + (local.set $$spec$select$i + (if (result i32) + (local.get $$cmp20$i) + (local.get $$sub$i) + (local.get $$div$i) + ) + ) + (i32.store + (local.get $$inputFrameCount$i) + (local.get $$spec$select$i) + ) + (local.set $$call22$i + (call $_ma_pcm_rb_acquire_read + (local.get $$duplexRB) + (local.get $$inputFrameCount$i) + (local.get $$pInputFrames$i) + ) + ) + (local.set $$cmp23$i + (i32.eq + (local.get $$call22$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp23$i) + (block + (local.set $$5 + (i32.load + (local.get $$inputFrameCount$i) + ) + ) + (local.set $$cmp26$i + (i32.eq + (local.get $$5) + (i32.const 0) + ) + ) + (if + (local.get $$cmp26$i) + (block + (local.set $$call30$i + (call $_ma_pcm_rb_pointer_disance + (local.get $$duplexRB) + ) + ) + (local.set $$cmp31$i + (i32.eq + (local.get $$call30$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp31$i) + (br $while-out) + ) + ) + (block + (local.set $$6 + (i32.load + (local.get $$pInputFrames$i) + ) + ) + (local.set $$7 + (i32.load + (local.get $$onData1$i11$i) + ) + ) + (local.set $$tobool$i$i + (i32.eq + (local.get $$7) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool$i$i) + ) + (block + (local.set $$bf$load$i$i + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i14$i) + ) + ) + (local.set $$bf$clear$i$i + (i32.and + (local.get $$bf$load$i$i) + (i32.const 16) + ) + ) + (local.set $$tobool3$i$i + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear$i$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3$i$i) + (block + (local.set $$8 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$9 + (i32.load + (local.get $$channels$i) + ) + ) + (call $_ma_zero_pcm_frames + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$5) + (local.get $$8) + (local.get $$9) + ) + ) + ) + (local.set $$cmp6$i$i + (i32.eq + (local.get $$6) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6$i$i) + (local.set $label + (i32.const 19) + ) + (block + (local.set $$10 + (f32.load + (local.get $$masterVolumeFactor$i23$i) + ) + ) + (local.set $$cmp8$i$i + (f32.lt + (local.get $$10) + (f32.const 1) + ) + ) + (if + (local.get $$cmp8$i$i) + (block + (local.set $$11 + (i32.load + (local.get $$format48$i) + ) + ) + (local.set $$12 + (i32.load + (local.get $$channels50$i) + ) + ) + (local.set $$call$i$i$i + (call $_ma_get_bytes_per_sample + (local.get $$11) + ) + ) + (local.set $$mul$i$i$i + (i32.mul + (local.get $$call$i$i$i) + (local.get $$12) + ) + ) + (local.set $$13 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$14 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i52$i$i + (call $_ma_get_bytes_per_sample + (local.get $$13) + ) + ) + (local.set $$mul$i53$i$i + (i32.mul + (local.get $$call$i52$i$i) + (local.get $$14) + ) + ) + (local.set $$totalFramesProcessed$056$i$i + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$sub$i$i + (i32.sub + (local.get $$5) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$div$i$i + (i32.and + (i32.div_u + (i32.const 8192) + (local.get $$mul$i$i$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp19$i$i + (i32.gt_u + (local.get $$sub$i$i) + (local.get $$div$i$i) + ) + ) + (local.set $$spec$select$i$i + (if (result i32) + (local.get $$cmp19$i$i) + (local.get $$div$i$i) + (local.get $$sub$i$i) + ) + ) + (local.set $$mul$i1$i + (i32.mul + (local.get $$totalFramesProcessed$056$i$i) + (local.get $$mul$i$i$i) + ) + ) + (local.set $$add$ptr$i$i + (i32.add + (local.get $$6) + (local.get $$mul$i1$i) + ) + ) + (local.set $$15 + (i32.load + (local.get $$format48$i) + ) + ) + (local.set $$16 + (i32.load + (local.get $$channels50$i) + ) + ) + (local.set $$17 + (f32.load + (local.get $$masterVolumeFactor$i23$i) + ) + ) + (call $_ma_copy_and_apply_volume_factor_pcm_frames + (local.get $$tempFramesIn$i$i) + (local.get $$add$ptr$i$i) + (local.get $$spec$select$i$i) + (local.get $$15) + (local.get $$16) + (local.get $$17) + ) + (local.set $$mul28$i$i + (i32.mul + (local.get $$mul$i53$i$i) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$add$ptr29$i$i + (i32.add + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$mul28$i$i) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$add$ptr29$i$i) + (local.get $$tempFramesIn$i$i) + (local.get $$spec$select$i$i) + (i32.add + (i32.and + (local.get $$7) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (local.set $$add$i$i + (i32.add + (local.get $$spec$select$i$i) + (local.get $$totalFramesProcessed$056$i$i) + ) + ) + (local.set $$cmp18$i$i + (i32.lt_u + (local.get $$add$i$i) + (local.get $$5) + ) + ) + (if + (local.get $$cmp18$i$i) + (local.set $$totalFramesProcessed$056$i$i + (local.get $$add$i$i) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + (local.set $label + (i32.const 19) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 19) + ) + (block + (local.set $label + (i32.const 0) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$6) + (local.get $$5) + (i32.add + (i32.and + (local.get $$7) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + ) + ) + (local.set $$18 + (f32.load + (local.get $$masterVolumeFactor$i23$i) + ) + ) + (local.set $$cmp35$i$i + (f32.lt + (local.get $$18) + (f32.const 1) + ) + ) + (local.set $$or$cond1$i$i + (i32.and + (local.get $$cmp6$i$i) + (local.get $$cmp35$i$i) + ) + ) + (if + (local.get $$or$cond1$i$i) + (block + (local.set $$19 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$20 + (i32.load + (local.get $$channels$i) + ) + ) + (call $_ma_apply_volume_factor_pcm_frames + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$5) + (local.get $$19) + (local.get $$20) + (local.get $$18) + ) + ) + ) + (local.set $$bf$load46$i$i + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i14$i) + ) + ) + (local.set $$bf$clear48$i$i + (i32.and + (local.get $$bf$load46$i$i) + (i32.const 32) + ) + ) + (local.set $$tobool50$i$i + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear48$i$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool50$i$i) + (block + (local.set $$21 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$cmp54$i$i + (i32.eq + (local.get $$21) + (i32.const 5) + ) + ) + (if + (local.get $$cmp54$i$i) + (block + (local.set $$22 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$mul$i54$i$i + (i32.mul + (local.get $$22) + (local.get $$5) + ) + ) + (call $_ma_clip_samples_f32 + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$mul$i54$i$i) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$23 + (i32.load + (local.get $$inputFrameCount$i) + ) + ) + (local.set $$24 + (i32.load + (local.get $$pInputFrames$i) + ) + ) + (local.set $$call36$i + (call $_ma_pcm_rb_commit_read + (local.get $$duplexRB) + (local.get $$23) + (local.get $$24) + ) + ) + (local.set $$cmp37$i + (i32.eq + (local.get $$call36$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp37$i) + ) + (br $while-out) + ) + ) + (block + (local.set $$25 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$26 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i2$i + (call $_ma_get_bytes_per_sample + (local.get $$25) + ) + ) + (local.set $$mul$i3$i + (i32.mul + (local.get $$call$i2$i) + (local.get $$26) + ) + ) + (local.set $$div47$i + (i32.and + (i32.div_u + (i32.const 4096) + (local.get $$mul$i3$i) + ) + (i32.const -1) + ) + ) + (local.set $$27 + (i32.load + (local.get $$format48$i) + ) + ) + (local.set $$28 + (i32.load + (local.get $$channels50$i) + ) + ) + (local.set $$call$i4$i + (call $_ma_get_bytes_per_sample + (local.get $$27) + ) + ) + (local.set $$mul$i5$i + (i32.mul + (local.get $$call$i4$i) + (local.get $$28) + ) + ) + (local.set $$div52$i + (i32.and + (i32.div_u + (i32.const 4096) + (local.get $$mul$i5$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp53$i + (i32.lt_u + (local.get $$div47$i) + (local.get $$div52$i) + ) + ) + (local.set $$spec$select67$i + (if (result i32) + (local.get $$cmp53$i) + (local.get $$mul$i3$i) + (local.get $$mul$i5$i) + ) + ) + (local.set $$cond$i + (i32.and + (i32.div_u + (i32.const 4096) + (local.get $$spec$select67$i) + ) + (i32.const -1) + ) + ) + (i32.store + (local.get $$inputFrameCount$i) + (local.get $$cond$i) + ) + (local.set $$29 + (i32.load + (local.get $$onData1$i11$i) + ) + ) + (local.set $$tobool$i13$i + (i32.eq + (local.get $$29) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool$i13$i) + ) + (block + (local.set $$bf$load$i15$i + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i14$i) + ) + ) + (local.set $$bf$clear$i16$i + (i32.and + (local.get $$bf$load$i15$i) + (i32.const 16) + ) + ) + (local.set $$tobool3$i17$i + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear$i16$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3$i17$i) + (call $_ma_zero_pcm_frames + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$cond$i) + (local.get $$25) + (local.get $$26) + ) + ) + (local.set $$30 + (f32.load + (local.get $$masterVolumeFactor$i23$i) + ) + ) + (local.set $$cmp8$i24$i + (f32.lt + (local.get $$30) + (f32.const 1) + ) + ) + (if + (local.get $$cmp8$i24$i) + (block + (local.set $$31 + (i32.load + (local.get $$format48$i) + ) + ) + (local.set $$32 + (i32.load + (local.get $$channels50$i) + ) + ) + (local.set $$call$i$i28$i + (call $_ma_get_bytes_per_sample + (local.get $$31) + ) + ) + (local.set $$mul$i$i29$i + (i32.mul + (local.get $$call$i$i28$i) + (local.get $$32) + ) + ) + (local.set $$33 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$34 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i52$i32$i + (call $_ma_get_bytes_per_sample + (local.get $$33) + ) + ) + (local.set $$mul$i53$i33$i + (i32.mul + (local.get $$call$i52$i32$i) + (local.get $$34) + ) + ) + (local.set $$cmp1855$i34$i + (i32.gt_u + (local.get $$spec$select67$i) + (i32.const 4096) + ) + ) + (if + (i32.eqz + (local.get $$cmp1855$i34$i) + ) + (block + (local.set $$totalFramesProcessed$056$i37$i + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$sub$i38$i + (i32.sub + (local.get $$cond$i) + (local.get $$totalFramesProcessed$056$i37$i) + ) + ) + (local.set $$div$i39$i + (i32.and + (i32.div_u + (i32.const 8192) + (local.get $$mul$i$i29$i) + ) + (i32.const -1) + ) + ) + (local.set $$cmp19$i40$i + (i32.gt_u + (local.get $$sub$i38$i) + (local.get $$div$i39$i) + ) + ) + (local.set $$spec$select$i41$i + (if (result i32) + (local.get $$cmp19$i40$i) + (local.get $$div$i39$i) + (local.get $$sub$i38$i) + ) + ) + (local.set $$mul$i42$i + (i32.mul + (local.get $$totalFramesProcessed$056$i37$i) + (local.get $$mul$i$i29$i) + ) + ) + (local.set $$add$ptr$i43$i + (i32.add + (local.get $$silentInputFrames$i) + (local.get $$mul$i42$i) + ) + ) + (local.set $$35 + (i32.load + (local.get $$format48$i) + ) + ) + (local.set $$36 + (i32.load + (local.get $$channels50$i) + ) + ) + (local.set $$37 + (f32.load + (local.get $$masterVolumeFactor$i23$i) + ) + ) + (call $_ma_copy_and_apply_volume_factor_pcm_frames + (local.get $$tempFramesIn$i$i) + (local.get $$add$ptr$i43$i) + (local.get $$spec$select$i41$i) + (local.get $$35) + (local.get $$36) + (local.get $$37) + ) + (local.set $$mul28$i44$i + (i32.mul + (local.get $$mul$i53$i33$i) + (local.get $$totalFramesProcessed$056$i37$i) + ) + ) + (local.set $$add$ptr29$i45$i + (i32.add + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$mul28$i44$i) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$add$ptr29$i45$i) + (local.get $$tempFramesIn$i$i) + (local.get $$spec$select$i41$i) + (i32.add + (i32.and + (local.get $$29) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (local.set $$add$i46$i + (i32.add + (local.get $$spec$select$i41$i) + (local.get $$totalFramesProcessed$056$i37$i) + ) + ) + (local.set $$cmp18$i47$i + (i32.lt_u + (local.get $$add$i46$i) + (local.get $$cond$i) + ) + ) + (if + (local.get $$cmp18$i47$i) + (local.set $$totalFramesProcessed$056$i37$i + (local.get $$add$i46$i) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + ) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pDevice) + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$silentInputFrames$i) + (local.get $$cond$i) + (i32.add + (i32.and + (local.get $$29) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + ) + (local.set $$bf$load46$i54$i + (i32.load8_s + (local.get $$noPreZeroedOutputBuffer$i14$i) + ) + ) + (local.set $$bf$clear48$i55$i + (i32.and + (local.get $$bf$load46$i54$i) + (i32.const 32) + ) + ) + (local.set $$tobool50$i56$i + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear48$i55$i) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool50$i56$i) + (block + (local.set $$38 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$cmp54$i59$i + (i32.eq + (local.get $$38) + (i32.const 5) + ) + ) + (if + (local.get $$cmp54$i59$i) + (block + (local.set $$39 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$mul$i54$i62$i + (i32.mul + (local.get $$39) + (local.get $$cond$i) + ) + ) + (call $_ma_clip_samples_f32 + (local.get $$playbackFramesInExternalFormat$i) + (local.get $$mul$i54$i62$i) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$40 + (i32.load + (local.get $$inputFrameCount$i) + ) + ) + (i32.store + (local.get $$_dspFrameCount$i) + (local.get $$40) + ) + (i32.store + (local.get $$_dspFrames$i) + (local.get $$playbackFramesInExternalFormat$i) + ) + (local.set $$conv74$i + (i64.extend_i32_u + (local.get $$40) + ) + ) + (drop + (call $_ma_pcm_converter_read + (local.get $$converter$i) + (local.get $$pFramesInInternalFormat$addr$071$i) + (local.get $$conv74$i) + ) + ) + (local.set $$41 + (i32.load + (local.get $$inputFrameCount$i) + ) + ) + (local.set $$add$i + (i32.add + (local.get $$41) + (local.get $$totalFramesReadFromClient$070$i) + ) + ) + (local.set $$42 + (i32.load + (local.get $$internalFormat$i) + ) + ) + (local.set $$43 + (i32.load + (local.get $$internalChannels$i) + ) + ) + (local.set $$call$i65$i + (call $_ma_get_bytes_per_sample + (local.get $$42) + ) + ) + (local.set $$mul$i66$i + (i32.mul + (local.get $$43) + (local.get $$41) + ) + ) + (local.set $$mul$i + (i32.mul + (local.get $$mul$i66$i) + (local.get $$call$i65$i) + ) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$pFramesInInternalFormat$addr$071$i) + (local.get $$mul$i) + ) + ) + (local.set $$cmp14$i + (i32.lt_u + (local.get $$add$i) + (local.get $$conv13$i) + ) + ) + (if + (local.get $$cmp14$i) + (block + (local.set $$pFramesInInternalFormat$addr$071$i + (local.get $$add$ptr$i) + ) + (local.set $$totalFramesReadFromClient$070$i + (local.get $$add$i) + ) + ) + (br $label$break$L36) + ) + (br $while-in) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_ma_calculate_frame_count_after_src (; 315 ;) (param $$sampleRateOut i32) (param $$sampleRateIn i32) (param $$frameCountIn i64) (result i64) + (local $$add i64) + (local $$cmp i32) + (local $$conv f64) + (local $$conv1 f64) + (local $$conv2 f64) + (local $$conv3 i64) + (local $$conv4 f64) + (local $$div f64) + (local $$frameCountOut$0 i64) + (local $$mul f64) + (local $$sub f64) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv + (f64.convert_i32_u + (local.get $$sampleRateOut) + ) + ) + (local.set $$conv1 + (f64.convert_i32_u + (local.get $$sampleRateIn) + ) + ) + (local.set $$div + (f64.div + (local.get $$conv) + (local.get $$conv1) + ) + ) + (local.set $$conv2 + (f64.convert_i64_s + (local.get $$frameCountIn) + ) + ) + (local.set $$mul + (f64.mul + (local.get $$div) + (local.get $$conv2) + ) + ) + (local.set $$conv3 + (i64.trunc_f64_u + (local.get $$mul) + ) + ) + (local.set $$conv4 + (f64.convert_i64_s + (local.get $$conv3) + ) + ) + (local.set $$sub + (f64.sub + (local.get $$mul) + (local.get $$conv4) + ) + ) + (local.set $$cmp + (f64.gt + (local.get $$sub) + (f64.const 0) + ) + ) + (local.set $$add + (i64.extend_i32_u + (i32.and + (local.get $$cmp) + (i32.const 1) + ) + ) + ) + (local.set $$frameCountOut$0 + (i64.add + (local.get $$add) + (local.get $$conv3) + ) + ) + (return + (local.get $$frameCountOut$0) + ) + ) + (func $_ma_device_is_started (; 316 ;) (param $$pDevice i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$conv i32) + (local $$retval$0 i32) + (local $$state$i i32) + (local $$state1$i i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$state$i + (local.get $sp) + ) + (local.set $$cmp + (i32.eq + (local.get $$pDevice) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$state1$i + (i32.add + (local.get $$pDevice) + (i32.const 12) + ) + ) + (local.set $$0 + (i32.load + (local.get $$state1$i) + ) + ) + (local.set $$1 + (i32.load + (local.get $$state$i) + ) + ) + (i32.store + (local.get $$state$i) + (local.get $$0) + ) + (local.set $$2 + (i32.load + (local.get $$state$i) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$2) + (i32.const 2) + ) + ) + (local.set $$conv + (i32.and + (local.get $$cmp1) + (i32.const 1) + ) + ) + (local.set $$retval$0 + (local.get $$conv) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_get_bytes_per_sample (; 317 ;) (param $$format i32) (result i32) + (local $$0 i32) + (local $$arrayidx i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$arrayidx + (i32.add + (i32.const 1024) + (i32.shl + (local.get $$format) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$arrayidx) + ) + ) + (return + (local.get $$0) + ) + ) + (func $_ma_pcm_rb_acquire_read (; 318 ;) (param $$pRB i32) (param $$pSizeInFrames i32) (param $$ppBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$call$i$i i32) + (local $$call$i$i12 i32) + (local $$call2 i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp3 i32) + (local $$div i32) + (local $$format$i i32) + (local $$mul i32) + (local $$mul$i$i i32) + (local $$mul$i$i13 i32) + (local $$or$cond i32) + (local $$retval$0 i32) + (local $$sizeInBytes i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$sizeInBytes + (local.get $sp) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$pSizeInFrames) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pSizeInFrames) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$1 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$2 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$1) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$2) + (local.get $$0) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$mul$i$i) + (local.get $$call$i$i) + ) + ) + (i32.store + (local.get $$sizeInBytes) + (local.get $$mul) + ) + (local.set $$call2 + (call $_ma_rb_acquire_read + (local.get $$pRB) + (local.get $$sizeInBytes) + (local.get $$ppBufferOut) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$call2) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp3) + ) + (block + (local.set $$retval$0 + (local.get $$call2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$sizeInBytes) + ) + ) + (local.set $$4 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$5 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i12 + (call $_ma_get_bytes_per_sample + (local.get $$4) + ) + ) + (local.set $$mul$i$i13 + (i32.mul + (local.get $$call$i$i12) + (local.get $$5) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$3) + (local.get $$mul$i$i13) + ) + (i32.const -1) + ) + ) + (i32.store + (local.get $$pSizeInFrames) + (local.get $$div) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_zero_pcm_frames (; 319 ;) (param $$p i32) (param $$frameCount i32) (param $$format i32) (param $$channels i32) + (local $$call$i i32) + (local $$mul i32) + (local $$mul$i i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call$i + (call $_ma_get_bytes_per_sample + (local.get $$format) + ) + ) + (local.set $$mul$i + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$mul$i) + (local.get $$call$i) + ) + ) + (drop + (call $_memset + (local.get $$p) + (i32.const 0) + (local.get $$mul) + ) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames (; 320 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$format i32) (param $$channels i32) (param $$factor f32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (block $switch + (block $switch-default + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-default + (i32.sub + (local.get $$format) + (i32.const 1) + ) + ) + ) + (block + (call $_ma_copy_and_apply_volume_factor_pcm_frames_u8 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$frameCount) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + ) + (block + (call $_ma_copy_and_apply_volume_factor_pcm_frames_s16 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$frameCount) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + ) + (block + (call $_ma_copy_and_apply_volume_factor_pcm_frames_s24 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$frameCount) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + ) + (block + (call $_ma_copy_and_apply_volume_factor_pcm_frames_s32 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$frameCount) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + ) + (block + (call $_ma_copy_and_apply_volume_factor_pcm_frames_f32 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$frameCount) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + ) + (return) + ) + ) + (func $_ma_apply_volume_factor_pcm_frames (; 321 ;) (param $$pPCMFrames i32) (param $$frameCount i32) (param $$format i32) (param $$channels i32) (param $$factor f32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_ma_copy_and_apply_volume_factor_pcm_frames + (local.get $$pPCMFrames) + (local.get $$pPCMFrames) + (local.get $$frameCount) + (local.get $$format) + (local.get $$channels) + (local.get $$factor) + ) + (return) + ) + (func $_ma_clip_samples_f32 (; 322 ;) (param $$p i32) (param $$sampleCount i32) + (local $$$x$i f32) + (local $$0 f32) + (local $$add i32) + (local $$arrayidx i32) + (local $$cmp$i i32) + (local $$cmp1$i i32) + (local $$cmp6 i32) + (local $$exitcond i32) + (local $$iSample$07 i32) + (local $$retval$0$i f32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6) + (return) + ) + (local.set $$iSample$07 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$p) + (i32.shl + (local.get $$iSample$07) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (f32.load + (local.get $$arrayidx) + ) + ) + (local.set $$cmp$i + (f32.lt + (local.get $$0) + (f32.const -1) + ) + ) + (local.set $$cmp1$i + (f32.gt + (local.get $$0) + (f32.const 1) + ) + ) + (local.set $$$x$i + (if (result f32) + (local.get $$cmp1$i) + (f32.const 1) + (local.get $$0) + ) + ) + (local.set $$retval$0$i + (if (result f32) + (local.get $$cmp$i) + (f32.const -1) + (local.get $$$x$i) + ) + ) + (f32.store + (local.get $$arrayidx) + (local.get $$retval$0$i) + ) + (local.set $$add + (i32.add + (local.get $$iSample$07) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$07 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_pcm_rb_pointer_disance (; 323 ;) (param $$pRB i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call i32) + (local $$call$i$i i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$div i32) + (local $$format$i i32) + (local $$mul$i$i i32) + (local $$retval$0 i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call + (call $_ma_rb_pointer_distance + (local.get $$pRB) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$0) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$call$i$i) + (local.get $$1) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$call) + (local.get $$mul$i$i) + ) + (i32.const -1) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_pcm_rb_commit_read (; 324 ;) (param $$pRB i32) (param $$sizeInFrames i32) (param $$pBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call$i$i i32) + (local $$call1 i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$format$i i32) + (local $$mul i32) + (local $$mul$i$i i32) + (local $$retval$0 i32) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$0) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$1) + (local.get $$sizeInFrames) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$mul$i$i) + (local.get $$call$i$i) + ) + ) + (local.set $$call1 + (call $_ma_rb_commit_read + (local.get $$pRB) + (local.get $$mul) + (local.get $$pBufferOut) + ) + ) + (local.set $$retval$0 + (local.get $$call1) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_pcm_converter_read (; 325 ;) (param $$pDSP i32) (param $$pFramesOut i32) (param $$frameCount i64) (result i64) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add i64) + (local $$add$ptr i32) + (local $$bf$clear i32) + (local $$bf$clear31 i32) + (local $$bf$load i32) + (local $$call i32) + (local $$call15 i32) + (local $$call21 i32) + (local $$call38 i64) + (local $$channelsOut i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp16 i32) + (local $$cmp3 i32) + (local $$cmp33 i32) + (local $$cmp6 i32) + (local $$conv i32) + (local $$conv13 i32) + (local $$conv23 i64) + (local $$conv5 i64) + (local $$data i32) + (local $$formatConverterOut37 i32) + (local $$formatOut i32) + (local $$isPassthrough i32) + (local $$mul i32) + (local $$mul22 i32) + (local $$or$cond i32) + (local $$pNextFramesOut$037 i32) + (local $$pUserData i32) + (local $$pUserData14 i32) + (local $$pUserData36 i32) + (local $$pUserDataForClient i32) + (local $$retval$0 i64) + (local $$spec$store$select i64) + (local $$sub i64) + (local $$tobool i32) + (local $$totalFramesRead$036 i64) + (local $label i32) + (local $sp i32) + (local.set $sp + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$data + (local.get $sp) + ) + (local.set $$cmp + (i32.eq + (local.get $$pDSP) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$pFramesOut) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (i64.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$isPassthrough + (i32.add + (local.get $$pDSP) + (i32.const 46464) + ) + ) + (local.set $$bf$load + (i32.load8_s + (local.get $$isPassthrough) + ) + ) + (local.set $$bf$clear + (i32.and + (local.get $$bf$load) + (i32.const 64) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$bf$clear31 + (i32.and + (local.get $$bf$load) + (i32.const 4) + ) + ) + (local.set $$cmp33 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear31) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$cmp33) + (call $___assert_fail + (i32.const 8543) + (i32.const 8379) + (i32.const 32512) + (i32.const 8585) + ) + ) + (i32.store + (local.get $$data) + (local.get $$pDSP) + ) + (local.set $$pUserData36 + (i32.add + (local.get $$pDSP) + (i32.const 4) + ) + ) + (local.set $$7 + (i32.load + (local.get $$pUserData36) + ) + ) + (local.set $$pUserDataForClient + (i32.add + (local.get $$data) + (i32.const 4) + ) + ) + (i32.store + (local.get $$pUserDataForClient) + (local.get $$7) + ) + (local.set $$formatConverterOut37 + (i32.add + (local.get $$pDSP) + (i32.const 64) + ) + ) + (local.set $$call38 + (call $_ma_format_converter_read + (local.get $$formatConverterOut37) + (local.get $$frameCount) + (local.get $$pFramesOut) + (local.get $$data) + ) + ) + (local.set $$retval$0 + (local.get $$call38) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp3 + (i64.lt_u + (local.get $$frameCount) + (i64.const 4294967296) + ) + ) + (if + (local.get $$cmp3) + (block + (local.set $$0 + (i32.load + (local.get $$pDSP) + ) + ) + (local.set $$conv + (i32.wrap_i64 + (local.get $$frameCount) + ) + ) + (local.set $$pUserData + (i32.add + (local.get $$pDSP) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$pUserData) + ) + ) + (local.set $$call + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pDSP) + (local.get $$pFramesOut) + (local.get $$conv) + (local.get $$1) + (i32.add + (i32.and + (local.get $$0) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$conv5 + (i64.extend_i32_u + (local.get $$call) + ) + ) + (local.set $$retval$0 + (local.get $$conv5) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$pUserData14 + (i32.add + (local.get $$pDSP) + (i32.const 4) + ) + ) + (local.set $$channelsOut + (i32.add + (local.get $$pDSP) + (i32.const 124) + ) + ) + (local.set $$formatOut + (i32.add + (local.get $$pDSP) + (i32.const 68) + ) + ) + (local.set $$pNextFramesOut$037 + (local.get $$pFramesOut) + ) + (local.set $$totalFramesRead$036 + (i64.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$sub + (i64.sub + (local.get $$frameCount) + (local.get $$totalFramesRead$036) + ) + ) + (local.set $$2 + (i64.lt_u + (local.get $$sub) + (i64.const 4294967295) + ) + ) + (local.set $$spec$store$select + (if (result i64) + (local.get $$2) + (local.get $$sub) + (i64.const 4294967295) + ) + ) + (local.set $$3 + (i32.load + (local.get $$pDSP) + ) + ) + (local.set $$conv13 + (i32.wrap_i64 + (local.get $$spec$store$select) + ) + ) + (local.set $$4 + (i32.load + (local.get $$pUserData14) + ) + ) + (local.set $$call15 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pDSP) + (local.get $$pNextFramesOut$037) + (local.get $$conv13) + (local.get $$4) + (i32.add + (i32.and + (local.get $$3) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$call15) + (i32.const 0) + ) + ) + (if + (local.get $$cmp16) + (block + (local.set $$retval$0 + (local.get $$totalFramesRead$036) + ) + (local.set $label + (i32.const 11) + ) + (br $while-out) + ) + ) + (local.set $$5 + (i32.load + (local.get $$channelsOut) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$5) + (local.get $$call15) + ) + ) + (local.set $$6 + (i32.load + (local.get $$formatOut) + ) + ) + (local.set $$call21 + (call $_ma_get_bytes_per_sample + (local.get $$6) + ) + ) + (local.set $$mul22 + (i32.mul + (local.get $$mul) + (local.get $$call21) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$pNextFramesOut$037) + (local.get $$mul22) + ) + ) + (local.set $$conv23 + (i64.extend_i32_u + (local.get $$call15) + ) + ) + (local.set $$add + (i64.add + (local.get $$totalFramesRead$036) + (local.get $$conv23) + ) + ) + (local.set $$cmp6 + (i64.lt_u + (local.get $$add) + (local.get $$frameCount) + ) + ) + (if + (local.get $$cmp6) + (block + (local.set $$pNextFramesOut$037 + (local.get $$add$ptr) + ) + (local.set $$totalFramesRead$036 + (local.get $$add) + ) + ) + (block + (local.set $$retval$0 + (local.get $$add) + ) + (local.set $label + (i32.const 11) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 11) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (return + (i64.const 0) + ) + ) + (func $_ma_format_converter_read (; 326 ;) (param $$pConverter i32) (param $$frameCount i64) (param $$pFramesOut i32) (param $$pUserData i32) (result i64) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i64) + (local $$add$ptr i32) + (local $$add$ptr161 i32) + (local $$add$ptr68 i32) + (local $$add146 i32) + (local $$add159 i64) + (local $$add66 i64) + (local $$arrayidx i32) + (local $$arrayidx142 i32) + (local $$brmerge i32) + (local $$call i32) + (local $$call111 i32) + (local $$call132 i32) + (local $$call20 i32) + (local $$call3 i32) + (local $$call54 i32) + (local $$channels i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp105 i32) + (local $$cmp112 i32) + (local $$cmp12 i32) + (local $$cmp122 i32) + (local $$cmp133 i32) + (local $$cmp139 i32) + (local $$cmp139112 i32) + (local $$cmp14 i32) + (local $$cmp14119 i32) + (local $$cmp163 i32) + (local $$cmp21 i32) + (local $$cmp28 i32) + (local $$cmp38 i32) + (local $$cmp38124 i32) + (local $$cmp46 i32) + (local $$cmp55 i32) + (local $$cmp6 i32) + (local $$cmp70 i32) + (local $$cmp88 i32) + (local $$cmp88114 i32) + (local $$cmp96 i32) + (local $$conv i32) + (local $$conv109 i32) + (local $$conv121 i64) + (local $$conv130 i32) + (local $$conv143 i64) + (local $$conv155 i64) + (local $$conv25 i64) + (local $$conv45 i64) + (local $$conv53 i32) + (local $$conv63 i64) + (local $$conv65 i64) + (local $$conv95 i64) + (local $$ditherMode i32) + (local $$ditherMode145 i32) + (local $$div i32) + (local $$div120 i32) + (local $$div36 i32) + (local $$div86 i32) + (local $$formatOut i32) + (local $$framesJustRead91$0 i32) + (local $$framesToReadRightNow94$2 i64) + (local $$iChannel$0113 i32) + (local $$mul i32) + (local $$mul160 i32) + (local $$mul26 i32) + (local $$mul62 i32) + (local $$mul67 i32) + (local $$onConvertPCM i32) + (local $$onConvertPCM141 i32) + (local $$onInterleavePCM i32) + (local $$onRead i32) + (local $$onReadDeinterleaved i32) + (local $$onReadDeinterleaved129 i32) + (local $$or$cond i32) + (local $$pNextFramesOut$0120 i32) + (local $$pNextFramesOut$2125 i32) + (local $$pNextFramesOut$4115 i32) + (local $$ppTempSamplesOfInFormat i32) + (local $$ppTempSamplesOfOutFormat i32) + (local $$retval$0 i64) + (local $$spec$select i64) + (local $$spec$select105 i64) + (local $$spec$select106 i64) + (local $$spec$store$select i64) + (local $$splitBufferSizeIn i32) + (local $$splitBufferSizeOut i32) + (local $$sub i64) + (local $$sub43 i64) + (local $$sub93 i64) + (local $$temp i32) + (local $$tempSamplesOfInFormat i32) + (local $$tempSamplesOfOutFormat i32) + (local $$totalFramesRead$0$mux$le i64) + (local $$totalFramesRead$0121 i64) + (local $$totalFramesRead$2126 i64) + (local $$totalFramesRead$4 i64) + (local $$totalFramesRead$5116 i64) + (local $$totalFramesRead$7 i64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 98576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 98576) + ) + ) + (local.set $$temp + (i32.add + (local.get $sp_a) + (i32.const 65536) + ) + ) + (local.set $$ppTempSamplesOfOutFormat + (i32.add + (local.get $sp_a) + (i32.const 98432) + ) + ) + (local.set $$splitBufferSizeOut + (i32.add + (local.get $sp_a) + (i32.const 98564) + ) + ) + (local.set $$tempSamplesOfOutFormat + (i32.add + (local.get $sp_a) + (i32.const 32768) + ) + ) + (local.set $$ppTempSamplesOfInFormat + (i32.add + (local.get $sp_a) + (i32.const 98304) + ) + ) + (local.set $$splitBufferSizeIn + (i32.add + (local.get $sp_a) + (i32.const 98560) + ) + ) + (local.set $$tempSamplesOfInFormat + (local.get $sp_a) + ) + (local.set $$cmp + (i32.eq + (local.get $$pConverter) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$pFramesOut) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (i64.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pConverter) + ) + ) + (local.set $$call + (call $_ma_get_bytes_per_sample + (local.get $$0) + ) + ) + (local.set $$formatOut + (i32.add + (local.get $$pConverter) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$formatOut) + ) + ) + (local.set $$call3 + (call $_ma_get_bytes_per_sample + (local.get $$1) + ) + ) + (local.set $$channels + (i32.add + (local.get $$pConverter) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$2) + (local.get $$call3) + ) + ) + (local.set $$onRead + (i32.add + (local.get $$pConverter) + (i32.const 28) + ) + ) + (local.set $$3 + (i32.load + (local.get $$onRead) + ) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6) + (block + (call $_ma_split_buffer + (local.get $$tempSamplesOfOutFormat) + (i32.const 32768) + (local.get $$2) + (i32.const 64) + (local.get $$ppTempSamplesOfOutFormat) + (local.get $$splitBufferSizeOut) + ) + (local.set $$cmp88114 + (i64.eq + (local.get $$frameCount) + (i64.const 0) + ) + ) + (block $label$break$L6 + (if + (local.get $$cmp88114) + (local.set $$totalFramesRead$7 + (i64.const 0) + ) + (block + (local.set $$10 + (i32.load + (local.get $$splitBufferSizeOut) + ) + ) + (local.set $$div86 + (i32.and + (i32.div_u + (local.get $$10) + (local.get $$call) + ) + (i32.const -1) + ) + ) + (local.set $$conv95 + (i64.extend_i32_u + (local.get $$div86) + ) + ) + (local.set $$onReadDeinterleaved + (i32.add + (local.get $$pConverter) + (i32.const 32) + ) + ) + (local.set $$onInterleavePCM + (i32.add + (local.get $$pConverter) + (i32.const 48) + ) + ) + (local.set $$onReadDeinterleaved129 + (i32.add + (local.get $$pConverter) + (i32.const 32) + ) + ) + (local.set $$onConvertPCM141 + (i32.add + (local.get $$pConverter) + (i32.const 44) + ) + ) + (local.set $$ditherMode145 + (i32.add + (local.get $$pConverter) + (i32.const 20) + ) + ) + (local.set $$pNextFramesOut$4115 + (local.get $$pFramesOut) + ) + (local.set $$totalFramesRead$5116 + (i64.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$sub93 + (i64.sub + (local.get $$frameCount) + (local.get $$totalFramesRead$5116) + ) + ) + (local.set $$cmp96 + (i64.gt_u + (local.get $$sub93) + (local.get $$conv95) + ) + ) + (local.set $$spec$select105 + (if (result i64) + (local.get $$cmp96) + (local.get $$conv95) + (local.get $$sub93) + ) + ) + (local.set $$11 + (i32.load + (local.get $$pConverter) + ) + ) + (local.set $$12 + (i32.load + (local.get $$formatOut) + ) + ) + (local.set $$cmp105 + (i32.eq + (local.get $$11) + (local.get $$12) + ) + ) + (if + (local.get $$cmp105) + (block + (local.set $$13 + (i32.load + (local.get $$onReadDeinterleaved) + ) + ) + (local.set $$conv109 + (i32.wrap_i64 + (local.get $$spec$select105) + ) + ) + (local.set $$call111 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pConverter) + (local.get $$conv109) + (local.get $$ppTempSamplesOfOutFormat) + (local.get $$pUserData) + (i32.add + (i32.and + (local.get $$13) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$cmp112 + (i32.eq + (local.get $$call111) + (i32.const 0) + ) + ) + (if + (local.get $$cmp112) + (block + (local.set $$totalFramesRead$7 + (local.get $$totalFramesRead$5116) + ) + (br $label$break$L6) + ) + (block + (local.set $$framesJustRead91$0 + (local.get $$call111) + ) + (local.set $$framesToReadRightNow94$2 + (local.get $$spec$select105) + ) + ) + ) + ) + (block + (local.set $$14 + (i32.load + (local.get $$channels) + ) + ) + (call $_ma_split_buffer + (local.get $$tempSamplesOfInFormat) + (i32.const 32768) + (local.get $$14) + (i32.const 64) + (local.get $$ppTempSamplesOfInFormat) + (local.get $$splitBufferSizeIn) + ) + (local.set $$15 + (i32.load + (local.get $$splitBufferSizeIn) + ) + ) + (local.set $$div120 + (i32.and + (i32.div_u + (local.get $$15) + (local.get $$call) + ) + (i32.const -1) + ) + ) + (local.set $$conv121 + (i64.extend_i32_u + (local.get $$div120) + ) + ) + (local.set $$cmp122 + (i64.gt_u + (local.get $$spec$select105) + (local.get $$conv121) + ) + ) + (local.set $$spec$select106 + (if (result i64) + (local.get $$cmp122) + (local.get $$conv121) + (local.get $$spec$select105) + ) + ) + (local.set $$16 + (i32.load + (local.get $$onReadDeinterleaved129) + ) + ) + (local.set $$conv130 + (i32.wrap_i64 + (local.get $$spec$select106) + ) + ) + (local.set $$call132 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pConverter) + (local.get $$conv130) + (local.get $$ppTempSamplesOfInFormat) + (local.get $$pUserData) + (i32.add + (i32.and + (local.get $$16) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$cmp133 + (i32.eq + (local.get $$call132) + (i32.const 0) + ) + ) + (if + (local.get $$cmp133) + (br $while-out) + ) + (local.set $$17 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$cmp139112 + (i32.eq + (local.get $$17) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp139112) + ) + (block + (local.set $$conv143 + (i64.extend_i32_u + (local.get $$call132) + ) + ) + (local.set $$iChannel$0113 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$18 + (i32.load + (local.get $$onConvertPCM141) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$ppTempSamplesOfOutFormat) + (i32.shl + (local.get $$iChannel$0113) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx142 + (i32.add + (local.get $$ppTempSamplesOfInFormat) + (i32.shl + (local.get $$iChannel$0113) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (i32.load + (local.get $$arrayidx142) + ) + ) + (local.set $$21 + (i32.load + (local.get $$ditherMode145) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (local.get $$19) + (local.get $$20) + (local.get $$conv143) + (local.get $$21) + (i32.add + (i32.and + (local.get $$18) + (i32.const 0) + ) + (i32.const 4953) + ) + ) + (local.set $$add146 + (i32.add + (local.get $$iChannel$0113) + (i32.const 1) + ) + ) + (local.set $$22 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$cmp139 + (i32.lt_u + (local.get $$add146) + (local.get $$22) + ) + ) + (if + (local.get $$cmp139) + (local.set $$iChannel$0113 + (local.get $$add146) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$framesJustRead91$0 + (local.get $$call132) + ) + (local.set $$framesToReadRightNow94$2 + (local.get $$spec$select106) + ) + ) + ) + (local.set $$23 + (i32.load + (local.get $$onInterleavePCM) + ) + ) + (local.set $$conv155 + (i64.extend_i32_u + (local.get $$framesJustRead91$0) + ) + ) + (local.set $$24 + (i32.load + (local.get $$channels) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (local.get $$pNextFramesOut$4115) + (local.get $$ppTempSamplesOfOutFormat) + (local.get $$conv155) + (local.get $$24) + (i32.add + (i32.and + (local.get $$23) + (i32.const 0) + ) + (i32.const 4953) + ) + ) + (local.set $$add159 + (i64.add + (local.get $$totalFramesRead$5116) + (local.get $$conv155) + ) + ) + (local.set $$cmp163 + (i64.gt_u + (local.get $$framesToReadRightNow94$2) + (local.get $$conv155) + ) + ) + (if + (local.get $$cmp163) + (block + (local.set $$totalFramesRead$7 + (local.get $$add159) + ) + (br $label$break$L6) + ) + ) + (local.set $$mul160 + (i32.mul + (local.get $$framesJustRead91$0) + (local.get $$mul) + ) + ) + (local.set $$add$ptr161 + (i32.add + (local.get $$pNextFramesOut$4115) + (local.get $$mul160) + ) + ) + (local.set $$cmp88 + (i64.lt_u + (local.get $$add159) + (local.get $$frameCount) + ) + ) + (if + (local.get $$cmp88) + (block + (local.set $$pNextFramesOut$4115 + (local.get $$add$ptr161) + ) + (local.set $$totalFramesRead$5116 + (local.get $$add159) + ) + ) + (block + (local.set $$totalFramesRead$7 + (local.get $$add159) + ) + (br $label$break$L6) + ) + ) + (br $while-in) + ) + ) + (local.set $$totalFramesRead$7 + (local.get $$totalFramesRead$5116) + ) + ) + ) + ) + (local.set $$retval$0 + (local.get $$totalFramesRead$7) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp12 + (i32.eq + (local.get $$0) + (local.get $$1) + ) + ) + (if + (i32.eqz + (local.get $$cmp12) + ) + (block + (local.set $$onConvertPCM + (i32.add + (local.get $$pConverter) + (i32.const 44) + ) + ) + (local.set $$cmp38124 + (i64.eq + (local.get $$frameCount) + (i64.const 0) + ) + ) + (block $label$break$L27 + (if + (local.get $$cmp38124) + (local.set $$totalFramesRead$4 + (i64.const 0) + ) + (block + (local.set $$div + (i32.and + (i32.div_u + (i32.const 32768) + (local.get $$call) + ) + (i32.const -1) + ) + ) + (local.set $$div36 + (i32.and + (i32.div_u + (local.get $$div) + (local.get $$2) + ) + (i32.const -1) + ) + ) + (local.set $$conv45 + (i64.extend_i32_u + (local.get $$div36) + ) + ) + (local.set $$ditherMode + (i32.add + (local.get $$pConverter) + (i32.const 20) + ) + ) + (local.set $$pNextFramesOut$2125 + (local.get $$pFramesOut) + ) + (local.set $$totalFramesRead$2126 + (i64.const 0) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$sub43 + (i64.sub + (local.get $$frameCount) + (local.get $$totalFramesRead$2126) + ) + ) + (local.set $$cmp46 + (i64.gt_u + (local.get $$sub43) + (local.get $$conv45) + ) + ) + (local.set $$spec$select + (if (result i64) + (local.get $$cmp46) + (local.get $$conv45) + (local.get $$sub43) + ) + ) + (local.set $$6 + (i32.load + (local.get $$onRead) + ) + ) + (local.set $$conv53 + (i32.wrap_i64 + (local.get $$spec$select) + ) + ) + (local.set $$call54 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pConverter) + (local.get $$conv53) + (local.get $$temp) + (local.get $$pUserData) + (i32.add + (i32.and + (local.get $$6) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$cmp55 + (i32.eq + (local.get $$call54) + (i32.const 0) + ) + ) + (if + (local.get $$cmp55) + (block + (local.set $$totalFramesRead$4 + (local.get $$totalFramesRead$2126) + ) + (br $label$break$L27) + ) + ) + (local.set $$7 + (i32.load + (local.get $$onConvertPCM) + ) + ) + (local.set $$8 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$mul62 + (i32.mul + (local.get $$8) + (local.get $$call54) + ) + ) + (local.set $$conv63 + (i64.extend_i32_u + (local.get $$mul62) + ) + ) + (local.set $$9 + (i32.load + (local.get $$ditherMode) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (local.get $$pNextFramesOut$2125) + (local.get $$temp) + (local.get $$conv63) + (local.get $$9) + (i32.add + (i32.and + (local.get $$7) + (i32.const 0) + ) + (i32.const 4953) + ) + ) + (local.set $$conv65 + (i64.extend_i32_u + (local.get $$call54) + ) + ) + (local.set $$add66 + (i64.add + (local.get $$totalFramesRead$2126) + (local.get $$conv65) + ) + ) + (local.set $$cmp70 + (i64.gt_u + (local.get $$spec$select) + (local.get $$conv65) + ) + ) + (if + (local.get $$cmp70) + (block + (local.set $$totalFramesRead$4 + (local.get $$add66) + ) + (br $label$break$L27) + ) + ) + (local.set $$mul67 + (i32.mul + (local.get $$call54) + (local.get $$mul) + ) + ) + (local.set $$add$ptr68 + (i32.add + (local.get $$pNextFramesOut$2125) + (local.get $$mul67) + ) + ) + (local.set $$cmp38 + (i64.lt_u + (local.get $$add66) + (local.get $$frameCount) + ) + ) + (if + (local.get $$cmp38) + (block + (local.set $$pNextFramesOut$2125 + (local.get $$add$ptr68) + ) + (local.set $$totalFramesRead$2126 + (local.get $$add66) + ) + ) + (block + (local.set $$totalFramesRead$4 + (local.get $$add66) + ) + (br $while-out3) + ) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (local.set $$retval$0 + (local.get $$totalFramesRead$4) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp14119 + (i64.eq + (local.get $$frameCount) + (i64.const 0) + ) + ) + (if + (local.get $$cmp14119) + (block + (local.set $$retval$0 + (i64.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$pNextFramesOut$0120 + (local.get $$pFramesOut) + ) + (local.set $$totalFramesRead$0121 + (i64.const 0) + ) + (loop $while-in6 + (block $while-out5 + (local.set $$sub + (i64.sub + (local.get $$frameCount) + (local.get $$totalFramesRead$0121) + ) + ) + (local.set $$4 + (i64.lt_u + (local.get $$sub) + (i64.const 4294967295) + ) + ) + (local.set $$spec$store$select + (if (result i64) + (local.get $$4) + (local.get $$sub) + (i64.const 4294967295) + ) + ) + (local.set $$5 + (i32.load + (local.get $$onRead) + ) + ) + (local.set $$conv + (i32.wrap_i64 + (local.get $$spec$store$select) + ) + ) + (local.set $$call20 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $$pConverter) + (local.get $$conv) + (local.get $$pNextFramesOut$0120) + (local.get $$pUserData) + (i32.add + (i32.and + (local.get $$5) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + (local.set $$cmp21 + (i32.eq + (local.get $$call20) + (i32.const 0) + ) + ) + (local.set $$conv25 + (i64.extend_i32_u + (local.get $$call20) + ) + ) + (local.set $$add + (i64.add + (local.get $$totalFramesRead$0121) + (local.get $$conv25) + ) + ) + (local.set $$cmp28 + (i64.gt_u + (local.get $$spec$store$select) + (local.get $$conv25) + ) + ) + (local.set $$brmerge + (i32.or + (local.get $$cmp21) + (local.get $$cmp28) + ) + ) + (if + (local.get $$brmerge) + (br $while-out5) + ) + (local.set $$mul26 + (i32.mul + (local.get $$call20) + (local.get $$mul) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$pNextFramesOut$0120) + (local.get $$mul26) + ) + ) + (local.set $$cmp14 + (i64.lt_u + (local.get $$add) + (local.get $$frameCount) + ) + ) + (if + (local.get $$cmp14) + (block + (local.set $$pNextFramesOut$0120 + (local.get $$add$ptr) + ) + (local.set $$totalFramesRead$0121 + (local.get $$add) + ) + ) + (block + (local.set $$retval$0 + (local.get $$add) + ) + (local.set $label + (i32.const 28) + ) + (br $while-out5) + ) + ) + (br $while-in6) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 28) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$totalFramesRead$0$mux$le + (if (result i64) + (local.get $$cmp21) + (local.get $$totalFramesRead$0121) + (local.get $$add) + ) + ) + (local.set $$retval$0 + (local.get $$totalFramesRead$0$mux$le) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_split_buffer (; 327 ;) (param $$pBuffer i32) (param $$bufferSize i32) (param $$splitCount i32) (param $$alignment i32) (param $$ppBuffersOut i32) (param $$pSplitSizeOut i32) + (local $$0 i32) + (local $$1 i32) + (local $$add i32) + (local $$add21 i32) + (local $$and i32) + (local $$and16 i32) + (local $$arrayidx i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp11 i32) + (local $$cmp18 i32) + (local $$cmp3 i32) + (local $$cmp6 i32) + (local $$div i32) + (local $$exitcond i32) + (local $$i$028 i32) + (local $$inc i32) + (local $$mul i32) + (local $$neg i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$spec$select i32) + (local $$splitSize$0 i32) + (local $$sub i32) + (local $$sub10 i32) + (local $$sub13 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool + (i32.ne + (local.get $$pSplitSizeOut) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (i32.store + (local.get $$pSplitSizeOut) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$pBuffer) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$bufferSize) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$splitCount) + (i32.const 0) + ) + ) + (local.set $$or$cond1 + (i32.or + (local.get $$or$cond) + (local.get $$cmp3) + ) + ) + (if + (local.get $$or$cond1) + (return) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$alignment) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp6) + (i32.const 1) + (local.get $$alignment) + ) + ) + (local.set $$0 + (local.get $$pBuffer) + ) + (local.set $$sub + (i32.add + (local.get $$0) + (i32.const -1) + ) + ) + (local.set $$add + (i32.add + (local.get $$sub) + (local.get $$spec$select) + ) + ) + (local.set $$neg + (i32.sub + (i32.const 0) + (local.get $$spec$select) + ) + ) + (local.set $$and + (i32.and + (local.get $$add) + (local.get $$neg) + ) + ) + (local.set $$sub10 + (i32.sub + (local.get $$and) + (local.get $$0) + ) + ) + (local.set $$cmp11 + (i32.gt_u + (local.get $$sub10) + (local.get $$bufferSize) + ) + ) + (if + (local.get $$cmp11) + (local.set $$splitSize$0 + (i32.const 0) + ) + (block + (local.set $$sub13 + (i32.sub + (local.get $$bufferSize) + (local.get $$sub10) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$sub13) + (local.get $$splitCount) + ) + (i32.const -1) + ) + ) + (local.set $$and16 + (i32.and + (local.get $$div) + (local.get $$neg) + ) + ) + (local.set $$splitSize$0 + (local.get $$and16) + ) + ) + ) + (local.set $$cmp18 + (i32.eq + (local.get $$ppBuffersOut) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp18) + ) + (block + (local.set $$i$028 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$mul + (i32.mul + (local.get $$i$028) + (local.get $$splitSize$0) + ) + ) + (local.set $$add21 + (i32.add + (local.get $$mul) + (local.get $$and) + ) + ) + (local.set $$1 + (local.get $$add21) + ) + (local.set $$arrayidx + (i32.add + (local.get $$ppBuffersOut) + (i32.shl + (local.get $$i$028) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx) + (local.get $$1) + ) + (local.set $$inc + (i32.add + (local.get $$i$028) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$splitCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$i$028 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (return) + ) + (i32.store + (local.get $$pSplitSizeOut) + (local.get $$splitSize$0) + ) + (return) + ) + (func $_ma_rb_commit_read (; 328 ;) (param $$pRB i32) (param $$sizeInBytes i32) (param $$pBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$add i32) + (local $$add$ptr$i i32) + (local $$and$i$i i32) + (local $$and$i$i13 i32) + (local $$and$i4$i i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp4 i32) + (local $$cmp8 i32) + (local $$encodedReadOffset$i i32) + (local $$or$i i32) + (local $$retval$0 i32) + (local $$subbufferSizeInBytes i32) + (local $$xor i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pRB) + ) + ) + (local.set $$encodedReadOffset$i + (i32.add + (local.get $$pRB) + (i32.const 16) + ) + ) + (local.set $$1 + (i32.load + (local.get $$encodedReadOffset$i) + ) + ) + (local.set $$and$i$i + (i32.and + (local.get $$1) + (i32.const 2147483647) + ) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$0) + (local.get $$and$i$i) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$add$ptr$i) + (local.get $$pBufferOut) + ) + ) + (if + (i32.eqz + (local.get $$cmp1) + ) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$encodedReadOffset$i) + ) + ) + (local.set $$and$i$i13 + (i32.and + (local.get $$2) + (i32.const 2147483647) + ) + ) + (local.set $$and$i4$i + (i32.and + (local.get $$2) + (i32.const -2147483648) + ) + ) + (local.set $$add + (i32.add + (local.get $$and$i$i13) + (local.get $$sizeInBytes) + ) + ) + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$cmp4 + (i32.gt_u + (local.get $$add) + (local.get $$3) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp8 + (i32.eq + (local.get $$add) + (local.get $$3) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$and$i4$i) + (i32.const -2147483648) + ) + ) + (local.set $$4 + (i32.or + (local.get $$add) + (local.get $$and$i4$i) + ) + ) + (local.set $$or$i + (if (result i32) + (local.get $$cmp8) + (local.get $$xor) + (local.get $$4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$encodedReadOffset$i) + ) + ) + (i32.store + (local.get $$encodedReadOffset$i) + (local.get $$or$i) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_rb_pointer_distance (; 329 ;) (param $$pRB i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$add i32) + (local $$and$i$i i32) + (local $$and$i$i6 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$encodedReadOffset i32) + (local $$encodedWriteOffset i32) + (local $$retval$0 i32) + (local $$sub i32) + (local $$sub3 i32) + (local $$subbufferSizeInBytes i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$encodedReadOffset + (i32.add + (local.get $$pRB) + (i32.const 16) + ) + ) + (local.set $$0 + (i32.load + (local.get $$encodedReadOffset) + ) + ) + (local.set $$and$i$i + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$encodedWriteOffset + (i32.add + (local.get $$pRB) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$encodedWriteOffset) + ) + ) + (local.set $$and$i$i6 + (i32.and + (local.get $$1) + (i32.const 2147483647) + ) + ) + (local.set $$2 + (i32.xor + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$cmp1 + (i32.gt_s + (local.get $$2) + (i32.const -1) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$sub + (i32.sub + (local.get $$and$i$i6) + (local.get $$and$i$i) + ) + ) + (local.set $$retval$0 + (local.get $$sub) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$sub3 + (i32.sub + (local.get $$and$i$i6) + (local.get $$and$i$i) + ) + ) + (local.set $$add + (i32.add + (local.get $$sub3) + (local.get $$3) + ) + ) + (local.set $$retval$0 + (local.get $$add) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames_u8 (; 330 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$channels i32) (param $$factor f32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (call $_ma_copy_and_apply_volume_factor_u8 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$mul) + (local.get $$factor) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames_s16 (; 331 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$channels i32) (param $$factor f32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (call $_ma_copy_and_apply_volume_factor_s16 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$mul) + (local.get $$factor) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames_s24 (; 332 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$channels i32) (param $$factor f32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (call $_ma_copy_and_apply_volume_factor_s24 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$mul) + (local.get $$factor) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames_s32 (; 333 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$channels i32) (param $$factor f32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (call $_ma_copy_and_apply_volume_factor_s32 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$mul) + (local.get $$factor) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_pcm_frames_f32 (; 334 ;) (param $$pPCMFramesOut i32) (param $$pPCMFramesIn i32) (param $$frameCount i32) (param $$channels i32) (param $$factor f32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$channels) + (local.get $$frameCount) + ) + ) + (call $_ma_copy_and_apply_volume_factor_f32 + (local.get $$pPCMFramesOut) + (local.get $$pPCMFramesIn) + (local.get $$mul) + (local.get $$factor) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_f32 (; 335 ;) (param $$pSamplesOut i32) (param $$pSamplesIn i32) (param $$sampleCount i32) (param $$factor f32) + (local $$0 f32) + (local $$add i32) + (local $$arrayidx i32) + (local $$arrayidx3 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp27 i32) + (local $$exitcond i32) + (local $$iSample$08 i32) + (local $$mul f32) + (local $$or$cond$not i32) + (local $$or$cond9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pSamplesOut) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pSamplesIn) + (i32.const 0) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (local.set $$cmp27 + (i32.ne + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (local.set $$or$cond9 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp27) + ) + ) + (if + (i32.eqz + (local.get $$or$cond9) + ) + (return) + ) + (local.set $$iSample$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$pSamplesIn) + (i32.shl + (local.get $$iSample$08) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (f32.load + (local.get $$arrayidx) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$factor) + ) + ) + (local.set $$arrayidx3 + (i32.add + (local.get $$pSamplesOut) + (i32.shl + (local.get $$iSample$08) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx3) + (local.get $$mul) + ) + (local.set $$add + (i32.add + (local.get $$iSample$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$08 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_s32 (; 336 ;) (param $$pSamplesOut i32) (param $$pSamplesIn i32) (param $$sampleCount i32) (param $$factor f32) + (local $$0 i32) + (local $$add i32) + (local $$arrayidx i32) + (local $$arrayidx4 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp27 i32) + (local $$conv f32) + (local $$conv3 i32) + (local $$exitcond i32) + (local $$iSample$08 i32) + (local $$mul f32) + (local $$or$cond$not i32) + (local $$or$cond9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pSamplesOut) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pSamplesIn) + (i32.const 0) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (local.set $$cmp27 + (i32.ne + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (local.set $$or$cond9 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp27) + ) + ) + (if + (i32.eqz + (local.get $$or$cond9) + ) + (return) + ) + (local.set $$iSample$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$pSamplesIn) + (i32.shl + (local.get $$iSample$08) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$0) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$conv) + (local.get $$factor) + ) + ) + (local.set $$conv3 + (i32.trunc_f32_s + (local.get $$mul) + ) + ) + (local.set $$arrayidx4 + (i32.add + (local.get $$pSamplesOut) + (i32.shl + (local.get $$iSample$08) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx4) + (local.get $$conv3) + ) + (local.set $$add + (i32.add + (local.get $$iSample$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$08 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_s24 (; 337 ;) (param $$pSamplesOut i32) (param $$pSamplesIn i32) (param $$sampleCount i32) (param $$factor f32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add33 i32) + (local $$add4 i32) + (local $$add9 i32) + (local $$and i32) + (local $$and21 i32) + (local $$arrayidx i32) + (local $$arrayidx10 i32) + (local $$arrayidx20 i32) + (local $$arrayidx26 i32) + (local $$arrayidx32 i32) + (local $$arrayidx5 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp221 i32) + (local $$conv i32) + (local $$conv11 i32) + (local $$conv14 f32) + (local $$conv16 i32) + (local $$conv17 i32) + (local $$conv23 i32) + (local $$conv29 i32) + (local $$conv6 i32) + (local $$exitcond i32) + (local $$iSample$022 i32) + (local $$mul i32) + (local $$mul15 f32) + (local $$or i32) + (local $$or$cond$not i32) + (local $$or$cond23 i32) + (local $$or13 i32) + (local $$shl i32) + (local $$shl12 i32) + (local $$shl7 i32) + (local $$shr28 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pSamplesOut) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pSamplesIn) + (i32.const 0) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (local.set $$cmp221 + (i32.ne + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (local.set $$or$cond23 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp221) + ) + ) + (if + (i32.eqz + (local.get $$or$cond23) + ) + (return) + ) + (local.set $$iSample$022 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$mul + (i32.mul + (local.get $$iSample$022) + (i32.const 3) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$pSamplesIn) + (local.get $$mul) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv) + (i32.const 8) + ) + ) + (local.set $$add4 + (i32.add + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$pSamplesIn) + (local.get $$add4) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx5) + ) + ) + (local.set $$conv6 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$shl7 + (i32.shl + (local.get $$conv6) + (i32.const 16) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl7) + (local.get $$shl) + ) + ) + (local.set $$add9 + (i32.add + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$pSamplesIn) + (local.get $$add9) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx10) + ) + ) + (local.set $$conv11 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$shl12 + (i32.shl + (local.get $$conv11) + (i32.const 24) + ) + ) + (local.set $$or13 + (i32.or + (local.get $$or) + (local.get $$shl12) + ) + ) + (local.set $$conv14 + (f32.convert_i32_s + (local.get $$or13) + ) + ) + (local.set $$mul15 + (f32.mul + (local.get $$conv14) + (local.get $$factor) + ) + ) + (local.set $$conv16 + (i32.trunc_f32_s + (local.get $$mul15) + ) + ) + (local.set $$and + (i32.shr_u + (local.get $$conv16) + (i32.const 8) + ) + ) + (local.set $$conv17 + (i32.and + (local.get $$and) + (i32.const 255) + ) + ) + (local.set $$arrayidx20 + (i32.add + (local.get $$pSamplesOut) + (local.get $$mul) + ) + ) + (i32.store8 + (local.get $$arrayidx20) + (local.get $$conv17) + ) + (local.set $$and21 + (i32.shr_u + (local.get $$conv16) + (i32.const 16) + ) + ) + (local.set $$conv23 + (i32.and + (local.get $$and21) + (i32.const 255) + ) + ) + (local.set $$arrayidx26 + (i32.add + (local.get $$pSamplesOut) + (local.get $$add4) + ) + ) + (i32.store8 + (local.get $$arrayidx26) + (local.get $$conv23) + ) + (local.set $$shr28 + (i32.shr_u + (local.get $$conv16) + (i32.const 24) + ) + ) + (local.set $$conv29 + (i32.and + (local.get $$shr28) + (i32.const 255) + ) + ) + (local.set $$arrayidx32 + (i32.add + (local.get $$pSamplesOut) + (local.get $$add9) + ) + ) + (i32.store8 + (local.get $$arrayidx32) + (local.get $$conv29) + ) + (local.set $$add33 + (i32.add + (local.get $$iSample$022) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add33) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$022 + (local.get $$add33) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_s16 (; 338 ;) (param $$pSamplesOut i32) (param $$pSamplesIn i32) (param $$sampleCount i32) (param $$factor f32) + (local $$0 i32) + (local $$add i32) + (local $$arrayidx i32) + (local $$arrayidx5 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp27 i32) + (local $$conv3 f32) + (local $$conv4 i32) + (local $$exitcond i32) + (local $$iSample$08 i32) + (local $$mul f32) + (local $$or$cond$not i32) + (local $$or$cond9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pSamplesOut) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pSamplesIn) + (i32.const 0) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (local.set $$cmp27 + (i32.ne + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (local.set $$or$cond9 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp27) + ) + ) + (if + (i32.eqz + (local.get $$or$cond9) + ) + (return) + ) + (local.set $$iSample$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$pSamplesIn) + (i32.shl + (local.get $$iSample$08) + (i32.const 1) + ) + ) + ) + (local.set $$0 + (i32.load16_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv3 + (f32.convert_i32_s + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$conv3) + (local.get $$factor) + ) + ) + (local.set $$conv4 + (i32.trunc_f32_s + (local.get $$mul) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$pSamplesOut) + (i32.shl + (local.get $$iSample$08) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx5) + (local.get $$conv4) + ) + (local.set $$add + (i32.add + (local.get $$iSample$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$08 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_copy_and_apply_volume_factor_u8 (; 339 ;) (param $$pSamplesOut i32) (param $$pSamplesIn i32) (param $$sampleCount i32) (param $$factor f32) + (local $$0 i32) + (local $$add i32) + (local $$arrayidx i32) + (local $$arrayidx5 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp27 i32) + (local $$conv3 f32) + (local $$conv4 i32) + (local $$exitcond i32) + (local $$iSample$08 i32) + (local $$mul f32) + (local $$or$cond$not i32) + (local $$or$cond9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pSamplesOut) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pSamplesIn) + (i32.const 0) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (local.set $$cmp27 + (i32.ne + (local.get $$sampleCount) + (i32.const 0) + ) + ) + (local.set $$or$cond9 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp27) + ) + ) + (if + (i32.eqz + (local.get $$or$cond9) + ) + (return) + ) + (local.set $$iSample$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$pSamplesIn) + (local.get $$iSample$08) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv3 + (f32.convert_i32_s + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$conv3) + (local.get $$factor) + ) + ) + (local.set $$conv4 + (i32.and + (i32.trunc_f32_s + (local.get $$mul) + ) + (i32.const 255) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$pSamplesOut) + (local.get $$iSample$08) + ) + ) + (i32.store8 + (local.get $$arrayidx5) + (local.get $$conv4) + ) + (local.set $$add + (i32.add + (local.get $$iSample$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$add) + (local.get $$sampleCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$iSample$08 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_ma_rb_acquire_read (; 340 ;) (param $$pRB i32) (param $$pSizeInBytes i32) (param $$ppBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$add$ptr$i i32) + (local $$and$i$i i32) + (local $$and$i$i$pn i32) + (local $$and$i$i15 i32) + (local $$and$i$i16 i32) + (local $$bytesAvailable$0 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp3 i32) + (local $$cmp4 i32) + (local $$cmp8 i32) + (local $$encodedReadOffset i32) + (local $$encodedWriteOffset i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$subbufferSizeInBytes i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$pSizeInBytes) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$ppBufferOut) + (i32.const 0) + ) + ) + (local.set $$or$cond1 + (i32.or + (local.get $$or$cond) + (local.get $$cmp3) + ) + ) + (if + (local.get $$or$cond1) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$encodedWriteOffset + (i32.add + (local.get $$pRB) + (i32.const 20) + ) + ) + (local.set $$0 + (i32.load + (local.get $$encodedWriteOffset) + ) + ) + (local.set $$encodedReadOffset + (i32.add + (local.get $$pRB) + (i32.const 16) + ) + ) + (local.set $$1 + (i32.load + (local.get $$encodedReadOffset) + ) + ) + (local.set $$and$i$i16 + (i32.and + (local.get $$1) + (i32.const 2147483647) + ) + ) + (local.set $$2 + (i32.xor + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$2) + (i32.const -1) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$and$i$i + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$and$i$i$pn + (local.get $$and$i$i) + ) + ) + (block + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$and$i$i$pn + (local.get $$3) + ) + ) + ) + (local.set $$bytesAvailable$0 + (i32.sub + (local.get $$and$i$i$pn) + (local.get $$and$i$i16) + ) + ) + (local.set $$4 + (i32.load + (local.get $$pSizeInBytes) + ) + ) + (local.set $$cmp8 + (i32.gt_u + (local.get $$4) + (local.get $$bytesAvailable$0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp8) + (local.get $$bytesAvailable$0) + (local.get $$4) + ) + ) + (i32.store + (local.get $$pSizeInBytes) + (local.get $$spec$select) + ) + (local.set $$5 + (i32.load + (local.get $$pRB) + ) + ) + (local.set $$6 + (i32.load + (local.get $$encodedReadOffset) + ) + ) + (local.set $$and$i$i15 + (i32.and + (local.get $$6) + (i32.const 2147483647) + ) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$5) + (local.get $$and$i$i15) + ) + ) + (i32.store + (local.get $$ppBufferOut) + (local.get $$add$ptr$i) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_pcm_rb_acquire_write (; 341 ;) (param $$pRB i32) (param $$pSizeInFrames i32) (param $$ppBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$call$i$i i32) + (local $$call$i$i11 i32) + (local $$call1 i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$cmp2 i32) + (local $$div i32) + (local $$format$i i32) + (local $$mul i32) + (local $$mul$i$i i32) + (local $$mul$i$i12 i32) + (local $$retval$0 i32) + (local $$sizeInBytes i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$sizeInBytes + (local.get $sp_a) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pSizeInFrames) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$1 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$2 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$1) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$2) + (local.get $$0) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$mul$i$i) + (local.get $$call$i$i) + ) + ) + (i32.store + (local.get $$sizeInBytes) + (local.get $$mul) + ) + (local.set $$call1 + (call $_ma_rb_acquire_write + (local.get $$pRB) + (local.get $$sizeInBytes) + (local.get $$ppBufferOut) + ) + ) + (local.set $$cmp2 + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp2) + ) + (block + (local.set $$retval$0 + (local.get $$call1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$sizeInBytes) + ) + ) + (local.set $$4 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$5 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i11 + (call $_ma_get_bytes_per_sample + (local.get $$4) + ) + ) + (local.set $$mul$i$i12 + (i32.mul + (local.get $$call$i$i11) + (local.get $$5) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$3) + (local.get $$mul$i$i12) + ) + (i32.const -1) + ) + ) + (i32.store + (local.get $$pSizeInFrames) + (local.get $$div) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_post_error (; 342 ;) (param $$pDevice i32) (param $$logLevel i32) (param $$message i32) (param $$resultCode i32) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_ma_context_post_error + (i32.const 0) + (local.get $$pDevice) + (local.get $$logLevel) + (local.get $$message) + (local.get $$resultCode) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_ma_pcm_rb_get_subbuffer_size (; 343 ;) (param $$pRB i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call i32) + (local $$call$i$i i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$div i32) + (local $$format$i i32) + (local $$mul$i$i i32) + (local $$retval$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call + (call $_ma_rb_get_subbuffer_size + (local.get $$pRB) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$0) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$call$i$i) + (local.get $$1) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$call) + (local.get $$mul$i$i) + ) + (i32.const -1) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_pcm_rb_commit_write (; 344 ;) (param $$pRB i32) (param $$sizeInFrames i32) (param $$pBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call$i$i i32) + (local $$call1 i32) + (local $$channels$i i32) + (local $$cmp i32) + (local $$format$i i32) + (local $$mul i32) + (local $$mul$i$i i32) + (local $$retval$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$format$i + (i32.add + (local.get $$pRB) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$format$i) + ) + ) + (local.set $$channels$i + (i32.add + (local.get $$pRB) + (i32.const 32) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels$i) + ) + ) + (local.set $$call$i$i + (call $_ma_get_bytes_per_sample + (local.get $$0) + ) + ) + (local.set $$mul$i$i + (i32.mul + (local.get $$1) + (local.get $$sizeInFrames) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$mul$i$i) + (local.get $$call$i$i) + ) + ) + (local.set $$call1 + (call $_ma_rb_commit_write + (local.get $$pRB) + (local.get $$mul) + (local.get $$pBufferOut) + ) + ) + (local.set $$retval$0 + (local.get $$call1) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_rb_commit_write (; 345 ;) (param $$pRB i32) (param $$sizeInBytes i32) (param $$pBufferOut i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$add i32) + (local $$add$ptr$i i32) + (local $$and$i$i i32) + (local $$and$i$i13 i32) + (local $$and$i4$i i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp4 i32) + (local $$cmp8 i32) + (local $$encodedWriteOffset$i i32) + (local $$or$i i32) + (local $$retval$0 i32) + (local $$subbufferSizeInBytes i32) + (local $$xor i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pRB) + ) + ) + (local.set $$encodedWriteOffset$i + (i32.add + (local.get $$pRB) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$encodedWriteOffset$i) + ) + ) + (local.set $$and$i$i + (i32.and + (local.get $$1) + (i32.const 2147483647) + ) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$0) + (local.get $$and$i$i) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$add$ptr$i) + (local.get $$pBufferOut) + ) + ) + (if + (i32.eqz + (local.get $$cmp1) + ) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$encodedWriteOffset$i) + ) + ) + (local.set $$and$i$i13 + (i32.and + (local.get $$2) + (i32.const 2147483647) + ) + ) + (local.set $$and$i4$i + (i32.and + (local.get $$2) + (i32.const -2147483648) + ) + ) + (local.set $$add + (i32.add + (local.get $$and$i$i13) + (local.get $$sizeInBytes) + ) + ) + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$cmp4 + (i32.gt_u + (local.get $$add) + (local.get $$3) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp8 + (i32.eq + (local.get $$add) + (local.get $$3) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$and$i4$i) + (i32.const -2147483648) + ) + ) + (local.set $$4 + (i32.or + (local.get $$add) + (local.get $$and$i4$i) + ) + ) + (local.set $$or$i + (if (result i32) + (local.get $$cmp8) + (local.get $$xor) + (local.get $$4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$encodedWriteOffset$i) + ) + ) + (i32.store + (local.get $$encodedWriteOffset$i) + (local.get $$or$i) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_rb_get_subbuffer_size (; 346 ;) (param $$pRB i32) (result i32) + (local $$0 i32) + (local $$cmp i32) + (local $$retval$0 i32) + (local $$subbufferSizeInBytes i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$retval$0 + (local.get $$0) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_ma_context_post_error (; 347 ;) (param $$pContext i32) (param $$pDevice i32) (param $$logLevel i32) (param $$message i32) (param $$resultCode i32) (result i32) + (local $$0 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$or$cond i32) + (local $$pContext$addr$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pContext) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.ne + (local.get $$pDevice) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$0 + (i32.load + (local.get $$pDevice) + ) + ) + (local.set $$pContext$addr$0 + (local.get $$0) + ) + ) + (local.set $$pContext$addr$0 + (local.get $$pContext) + ) + ) + (call $_ma_log + (local.get $$pContext$addr$0) + (local.get $$pDevice) + (local.get $$logLevel) + (local.get $$message) + ) + (return + (local.get $$resultCode) + ) + ) + (func $_ma_log (; 348 ;) (param $$pContext i32) (param $$pDevice i32) (param $$logLevel i32) (param $$message i32) + (local $$0 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$logCallback i32) + (local $$or$cond i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.ne + (local.get $$pContext) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.lt_u + (local.get $$logLevel) + (i32.const 2) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (return) + ) + (local.set $$logCallback + (i32.add + (local.get $$pContext) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$logCallback) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (return) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $$pContext) + (local.get $$pDevice) + (local.get $$logLevel) + (local.get $$message) + (i32.add + (i32.and + (local.get $$0) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + (return) + ) + (func $_ma_rb_acquire_write (; 349 ;) (param $$pRB i32) (param $$pSizeInBytes i32) (param $$ppBufferOut i32) (result i32) + (local $$$pn i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add$ptr$i i32) + (local $$and$i$i i32) + (local $$and$i$i18 i32) + (local $$and$i$i19 i32) + (local $$bf$clear i32) + (local $$bf$load i32) + (local $$bytesAvailable$0 i32) + (local $$clearOnWriteAcquire i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp3 i32) + (local $$cmp4 i32) + (local $$cmp8 i32) + (local $$encodedReadOffset i32) + (local $$encodedWriteOffset i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$subbufferSizeInBytes i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$pRB) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$pSizeInBytes) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$ppBufferOut) + (i32.const 0) + ) + ) + (local.set $$or$cond1 + (i32.or + (local.get $$or$cond) + (local.get $$cmp3) + ) + ) + (if + (local.get $$or$cond1) + (block + (local.set $$retval$0 + (i32.const -2) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$encodedReadOffset + (i32.add + (local.get $$pRB) + (i32.const 16) + ) + ) + (local.set $$0 + (i32.load + (local.get $$encodedReadOffset) + ) + ) + (local.set $$encodedWriteOffset + (i32.add + (local.get $$pRB) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$encodedWriteOffset) + ) + ) + (local.set $$and$i$i19 + (i32.and + (local.get $$1) + (i32.const 2147483647) + ) + ) + (local.set $$2 + (i32.xor + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$2) + (i32.const -1) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$subbufferSizeInBytes + (i32.add + (local.get $$pRB) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$subbufferSizeInBytes) + ) + ) + (local.set $$$pn + (local.get $$3) + ) + ) + (block + (local.set $$and$i$i + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$$pn + (local.get $$and$i$i) + ) + ) + ) + (local.set $$bytesAvailable$0 + (i32.sub + (local.get $$$pn) + (local.get $$and$i$i19) + ) + ) + (local.set $$4 + (i32.load + (local.get $$pSizeInBytes) + ) + ) + (local.set $$cmp8 + (i32.gt_u + (local.get $$4) + (local.get $$bytesAvailable$0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp8) + (local.get $$bytesAvailable$0) + (local.get $$4) + ) + ) + (i32.store + (local.get $$pSizeInBytes) + (local.get $$spec$select) + ) + (local.set $$5 + (i32.load + (local.get $$pRB) + ) + ) + (local.set $$6 + (i32.load + (local.get $$encodedWriteOffset) + ) + ) + (local.set $$and$i$i18 + (i32.and + (local.get $$6) + (i32.const 2147483647) + ) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$5) + (local.get $$and$i$i18) + ) + ) + (i32.store + (local.get $$ppBufferOut) + (local.get $$add$ptr$i) + ) + (local.set $$clearOnWriteAcquire + (i32.add + (local.get $$pRB) + (i32.const 24) + ) + ) + (local.set $$bf$load + (i32.load8_s + (local.get $$clearOnWriteAcquire) + ) + ) + (local.set $$bf$clear + (i32.and + (local.get $$bf$load) + (i32.const 2) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$bf$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$7 + (i32.load + (local.get $$pSizeInBytes) + ) + ) + (drop + (call $_memset + (local.get $$add$ptr$i) + (i32.const 0) + (local.get $$7) + ) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_Vector2Distance (; 350 ;) (param $$v1 i32) (param $$v2 i32) (result f32) + (local $$0 f32) + (local $$1 f32) + (local $$2 f32) + (local $$3 f32) + (local $$4 f32) + (local $$add f32) + (local $$mul f32) + (local $$mul10 f32) + (local $$sub f32) + (local $$sub6 f32) + (local $$y i32) + (local $$y5 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (local.get $$v1) + ) + ) + (local.set $$1 + (f32.load + (local.get $$v2) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$sub) + (local.get $$sub) + ) + ) + (local.set $$y + (i32.add + (local.get $$v1) + (i32.const 4) + ) + ) + (local.set $$2 + (f32.load + (local.get $$y) + ) + ) + (local.set $$y5 + (i32.add + (local.get $$v2) + (i32.const 4) + ) + ) + (local.set $$3 + (f32.load + (local.get $$y5) + ) + ) + (local.set $$sub6 + (f32.sub + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$sub6) + (local.get $$sub6) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (local.get $$mul10) + ) + ) + (local.set $$4 + (f32.sqrt + (local.get $$add) + ) + ) + (return + (local.get $$4) + ) + ) + (func $_Vector2Angle (; 351 ;) (param $$v1 i32) (param $$v2 i32) (result f32) + (local $$0 f32) + (local $$1 f32) + (local $$2 f32) + (local $$3 f32) + (local $$add f32) + (local $$call f32) + (local $$cmp i32) + (local $$mul f32) + (local $$result$0 f32) + (local $$sub f32) + (local $$sub3 f32) + (local $$y i32) + (local $$y1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$y + (i32.add + (local.get $$v2) + (i32.const 4) + ) + ) + (local.set $$0 + (f32.load + (local.get $$y) + ) + ) + (local.set $$y1 + (i32.add + (local.get $$v1) + (i32.const 4) + ) + ) + (local.set $$1 + (f32.load + (local.get $$y1) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$2 + (f32.load + (local.get $$v2) + ) + ) + (local.set $$3 + (f32.load + (local.get $$v1) + ) + ) + (local.set $$sub3 + (f32.sub + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$call + (call $_atan2f + (local.get $$sub) + (local.get $$sub3) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$call) + (f32.const 57.2957763671875) + ) + ) + (local.set $$cmp + (f32.lt + (local.get $$mul) + (f32.const 0) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (f32.const 360) + ) + ) + (local.set $$result$0 + (if (result f32) + (local.get $$cmp) + (local.get $$add) + (local.get $$mul) + ) + ) + (return + (local.get $$result$0) + ) + ) + (func $_Vector3Length (; 352 ;) (param $$v i32) (result f32) + (local $$0 f32) + (local $$1 f32) + (local $$2 f32) + (local $$3 f32) + (local $$add f32) + (local $$add6 f32) + (local $$mul f32) + (local $$mul3 f32) + (local $$mul5 f32) + (local $$y i32) + (local $$z i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (local.get $$v) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$0) + ) + ) + (local.set $$y + (i32.add + (local.get $$v) + (i32.const 4) + ) + ) + (local.set $$1 + (f32.load + (local.get $$y) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$1) + (local.get $$1) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (local.get $$mul3) + ) + ) + (local.set $$z + (i32.add + (local.get $$v) + (i32.const 8) + ) + ) + (local.set $$2 + (f32.load + (local.get $$z) + ) + ) + (local.set $$mul5 + (f32.mul + (local.get $$2) + (local.get $$2) + ) + ) + (local.set $$add6 + (f32.add + (local.get $$add) + (local.get $$mul5) + ) + ) + (local.set $$3 + (f32.sqrt + (local.get $$add6) + ) + ) + (return + (local.get $$3) + ) + ) + (func $_Vector3Normalize (; 353 ;) (param $$agg$result i32) (param $$v i32) + (local $$call f32) + (local $$call$op f32) + (local $$cmp i32) + (local $$div f32) + (local $$mul f32) + (local $$mul1 f32) + (local $$mul2 f32) + (local $$result$sroa$0$0$copyload f32) + (local $$result$sroa$6$0$$sroa_idx10 i32) + (local $$result$sroa$6$0$$sroa_idx9 i32) + (local $$result$sroa$6$0$copyload f32) + (local $$result$sroa$8$0$$sroa_idx13 i32) + (local $$result$sroa$8$0$$sroa_idx14 i32) + (local $$result$sroa$8$0$copyload f32) + (local $$v$byval_copy i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$v$byval_copy + (local.get $sp_a) + ) + (local.set $$result$sroa$0$0$copyload + (f32.load + (local.get $$v) + ) + ) + (local.set $$result$sroa$6$0$$sroa_idx9 + (i32.add + (local.get $$v) + (i32.const 4) + ) + ) + (local.set $$result$sroa$6$0$copyload + (f32.load + (local.get $$result$sroa$6$0$$sroa_idx9) + ) + ) + (local.set $$result$sroa$8$0$$sroa_idx13 + (i32.add + (local.get $$v) + (i32.const 8) + ) + ) + (local.set $$result$sroa$8$0$copyload + (f32.load + (local.get $$result$sroa$8$0$$sroa_idx13) + ) + ) + (i64.store align=4 + (local.get $$v$byval_copy) + (i64.load align=4 + (local.get $$v) + ) + ) + (i32.store + (i32.add + (local.get $$v$byval_copy) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $$v) + (i32.const 8) + ) + ) + ) + (local.set $$call + (call $_Vector3Length + (local.get $$v$byval_copy) + ) + ) + (local.set $$cmp + (f32.eq + (local.get $$call) + (f32.const 0) + ) + ) + (local.set $$call$op + (f32.div + (f32.const 1) + (local.get $$call) + ) + ) + (local.set $$div + (if (result f32) + (local.get $$cmp) + (f32.const 1) + (local.get $$call$op) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$result$sroa$0$0$copyload) + (local.get $$div) + ) + ) + (local.set $$mul1 + (f32.mul + (local.get $$result$sroa$6$0$copyload) + (local.get $$div) + ) + ) + (local.set $$mul2 + (f32.mul + (local.get $$result$sroa$8$0$copyload) + (local.get $$div) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$mul) + ) + (local.set $$result$sroa$6$0$$sroa_idx10 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx10) + (local.get $$mul1) + ) + (local.set $$result$sroa$8$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$8$0$$sroa_idx14) + (local.get $$mul2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_Vector3Transform (; 354 ;) (param $$agg$result i32) (param $$v i32) (param $$mat i32) + (local $$0 f32) + (local $$1 f32) + (local $$10 f32) + (local $$11 f32) + (local $$12 f32) + (local $$13 f32) + (local $$14 f32) + (local $$2 f32) + (local $$3 f32) + (local $$4 f32) + (local $$5 f32) + (local $$6 f32) + (local $$7 f32) + (local $$8 f32) + (local $$9 f32) + (local $$add f32) + (local $$add11 f32) + (local $$add13 f32) + (local $$add14 f32) + (local $$add18 f32) + (local $$add20 f32) + (local $$add21 f32) + (local $$add6 f32) + (local $$add7 f32) + (local $$m1 i32) + (local $$m10 i32) + (local $$m12 i32) + (local $$m13 i32) + (local $$m14 i32) + (local $$m2 i32) + (local $$m4 i32) + (local $$m5 i32) + (local $$m6 i32) + (local $$m8 i32) + (local $$m9 i32) + (local $$mul f32) + (local $$mul10 f32) + (local $$mul12 f32) + (local $$mul16 f32) + (local $$mul17 f32) + (local $$mul19 f32) + (local $$mul4 f32) + (local $$mul5 f32) + (local $$mul9 f32) + (local $$result$sroa$5$0$$sroa_idx11 i32) + (local $$result$sroa$6$0$$sroa_idx13 i32) + (local $$y2 i32) + (local $$z3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (local.get $$v) + ) + ) + (local.set $$y2 + (i32.add + (local.get $$v) + (i32.const 4) + ) + ) + (local.set $$1 + (f32.load + (local.get $$y2) + ) + ) + (local.set $$z3 + (i32.add + (local.get $$v) + (i32.const 8) + ) + ) + (local.set $$2 + (f32.load + (local.get $$z3) + ) + ) + (local.set $$3 + (f32.load + (local.get $$mat) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$3) + ) + ) + (local.set $$m4 + (i32.add + (local.get $$mat) + (i32.const 4) + ) + ) + (local.set $$4 + (f32.load + (local.get $$m4) + ) + ) + (local.set $$mul4 + (f32.mul + (local.get $$1) + (local.get $$4) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (local.get $$mul4) + ) + ) + (local.set $$m8 + (i32.add + (local.get $$mat) + (i32.const 8) + ) + ) + (local.set $$5 + (f32.load + (local.get $$m8) + ) + ) + (local.set $$mul5 + (f32.mul + (local.get $$2) + (local.get $$5) + ) + ) + (local.set $$add6 + (f32.add + (local.get $$add) + (local.get $$mul5) + ) + ) + (local.set $$m12 + (i32.add + (local.get $$mat) + (i32.const 12) + ) + ) + (local.set $$6 + (f32.load + (local.get $$m12) + ) + ) + (local.set $$add7 + (f32.add + (local.get $$6) + (local.get $$add6) + ) + ) + (local.set $$m1 + (i32.add + (local.get $$mat) + (i32.const 16) + ) + ) + (local.set $$7 + (f32.load + (local.get $$m1) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$0) + (local.get $$7) + ) + ) + (local.set $$m5 + (i32.add + (local.get $$mat) + (i32.const 20) + ) + ) + (local.set $$8 + (f32.load + (local.get $$m5) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$1) + (local.get $$8) + ) + ) + (local.set $$add11 + (f32.add + (local.get $$mul9) + (local.get $$mul10) + ) + ) + (local.set $$m9 + (i32.add + (local.get $$mat) + (i32.const 24) + ) + ) + (local.set $$9 + (f32.load + (local.get $$m9) + ) + ) + (local.set $$mul12 + (f32.mul + (local.get $$2) + (local.get $$9) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$add11) + (local.get $$mul12) + ) + ) + (local.set $$m13 + (i32.add + (local.get $$mat) + (i32.const 28) + ) + ) + (local.set $$10 + (f32.load + (local.get $$m13) + ) + ) + (local.set $$add14 + (f32.add + (local.get $$10) + (local.get $$add13) + ) + ) + (local.set $$m2 + (i32.add + (local.get $$mat) + (i32.const 32) + ) + ) + (local.set $$11 + (f32.load + (local.get $$m2) + ) + ) + (local.set $$mul16 + (f32.mul + (local.get $$0) + (local.get $$11) + ) + ) + (local.set $$m6 + (i32.add + (local.get $$mat) + (i32.const 36) + ) + ) + (local.set $$12 + (f32.load + (local.get $$m6) + ) + ) + (local.set $$mul17 + (f32.mul + (local.get $$1) + (local.get $$12) + ) + ) + (local.set $$add18 + (f32.add + (local.get $$mul16) + (local.get $$mul17) + ) + ) + (local.set $$m10 + (i32.add + (local.get $$mat) + (i32.const 40) + ) + ) + (local.set $$13 + (f32.load + (local.get $$m10) + ) + ) + (local.set $$mul19 + (f32.mul + (local.get $$2) + (local.get $$13) + ) + ) + (local.set $$add20 + (f32.add + (local.get $$add18) + (local.get $$mul19) + ) + ) + (local.set $$m14 + (i32.add + (local.get $$mat) + (i32.const 44) + ) + ) + (local.set $$14 + (f32.load + (local.get $$m14) + ) + ) + (local.set $$add21 + (f32.add + (local.get $$14) + (local.get $$add20) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$add7) + ) + (local.set $$result$sroa$5$0$$sroa_idx11 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$5$0$$sroa_idx11) + (local.get $$add14) + ) + (local.set $$result$sroa$6$0$$sroa_idx13 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx13) + (local.get $$add21) + ) + (return) + ) + (func $_MatrixIdentity (; 355 ;) (param $$agg$result i32) + (local $$result$sroa$5$0$$sroa_idx i32) + (local $$result$sroa$56$0$$sroa_idx7 i32) + (local $$result$sroa$6$0$$sroa_idx i32) + (local $$result$sroa$613$0$$sroa_idx14 i32) + (local $$result$sroa$7$0$$sroa_idx i32) + (local $$result$sroa$720$0$$sroa_idx21 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (f32.store + (local.get $$agg$result) + (f32.const 1) + ) + (local.set $$result$sroa$5$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$5$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$5$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$56$0$$sroa_idx7 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$56$0$$sroa_idx7) + (f32.const 1) + ) + (local.set $$result$sroa$6$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$6$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$6$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$613$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$613$0$$sroa_idx14) + (f32.const 1) + ) + (local.set $$result$sroa$7$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$7$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$7$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$720$0$$sroa_idx21 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (f32.store + (local.get $$result$sroa$720$0$$sroa_idx21) + (f32.const 1) + ) + (return) + ) + (func $_MatrixTranslate (; 356 ;) (param $$agg$result i32) (param $$x f32) (param $$y f32) (param $$z f32) + (local $$result$sroa$10$0$$sroa_idx14 i32) + (local $$result$sroa$11$0$$sroa_idx16 i32) + (local $$result$sroa$12$0$$sroa_idx18 i32) + (local $$result$sroa$13$0$$sroa_idx20 i32) + (local $$result$sroa$14$0$$sroa_idx22 i32) + (local $$result$sroa$15$0$$sroa_idx24 i32) + (local $$result$sroa$16$0$$sroa_idx26 i32) + (local $$result$sroa$17$0$$sroa_idx28 i32) + (local $$result$sroa$18$0$$sroa_idx30 i32) + (local $$result$sroa$4$0$$sroa_idx2 i32) + (local $$result$sroa$5$0$$sroa_idx4 i32) + (local $$result$sroa$6$0$$sroa_idx6 i32) + (local $$result$sroa$7$0$$sroa_idx8 i32) + (local $$result$sroa$8$0$$sroa_idx10 i32) + (local $$result$sroa$9$0$$sroa_idx12 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (f32.store + (local.get $$agg$result) + (f32.const 1) + ) + (local.set $$result$sroa$4$0$$sroa_idx2 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$4$0$$sroa_idx2) + (f32.const 0) + ) + (local.set $$result$sroa$5$0$$sroa_idx4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$5$0$$sroa_idx4) + (f32.const 0) + ) + (local.set $$result$sroa$6$0$$sroa_idx6 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx6) + (local.get $$x) + ) + (local.set $$result$sroa$7$0$$sroa_idx8 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (f32.store + (local.get $$result$sroa$7$0$$sroa_idx8) + (f32.const 0) + ) + (local.set $$result$sroa$8$0$$sroa_idx10 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$8$0$$sroa_idx10) + (f32.const 1) + ) + (local.set $$result$sroa$9$0$$sroa_idx12 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (f32.store + (local.get $$result$sroa$9$0$$sroa_idx12) + (f32.const 0) + ) + (local.set $$result$sroa$10$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 28) + ) + ) + (f32.store + (local.get $$result$sroa$10$0$$sroa_idx14) + (local.get $$y) + ) + (local.set $$result$sroa$11$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + ) + (f32.store + (local.get $$result$sroa$11$0$$sroa_idx16) + (f32.const 0) + ) + (local.set $$result$sroa$12$0$$sroa_idx18 + (i32.add + (local.get $$agg$result) + (i32.const 36) + ) + ) + (f32.store + (local.get $$result$sroa$12$0$$sroa_idx18) + (f32.const 0) + ) + (local.set $$result$sroa$13$0$$sroa_idx20 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$13$0$$sroa_idx20) + (f32.const 1) + ) + (local.set $$result$sroa$14$0$$sroa_idx22 + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (f32.store + (local.get $$result$sroa$14$0$$sroa_idx22) + (local.get $$z) + ) + (local.set $$result$sroa$15$0$$sroa_idx24 + (i32.add + (local.get $$agg$result) + (i32.const 48) + ) + ) + (f32.store + (local.get $$result$sroa$15$0$$sroa_idx24) + (f32.const 0) + ) + (local.set $$result$sroa$16$0$$sroa_idx26 + (i32.add + (local.get $$agg$result) + (i32.const 52) + ) + ) + (f32.store + (local.get $$result$sroa$16$0$$sroa_idx26) + (f32.const 0) + ) + (local.set $$result$sroa$17$0$$sroa_idx28 + (i32.add + (local.get $$agg$result) + (i32.const 56) + ) + ) + (f32.store + (local.get $$result$sroa$17$0$$sroa_idx28) + (f32.const 0) + ) + (local.set $$result$sroa$18$0$$sroa_idx30 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (f32.store + (local.get $$result$sroa$18$0$$sroa_idx30) + (f32.const 1) + ) + (return) + ) + (func $_MatrixRotate (; 357 ;) (param $$agg$result i32) (param $$axis i32) (param $$angle f32) + (local $$0 f32) + (local $$1 f32) + (local $$2 f32) + (local $$3 f32) + (local $$4 f32) + (local $$5 f32) + (local $$add f32) + (local $$add13 f32) + (local $$add17 f32) + (local $$add28 f32) + (local $$add32 f32) + (local $$add36 f32) + (local $$add43 f32) + (local $$add6 f32) + (local $$cmp i32) + (local $$cmp7 i32) + (local $$div f32) + (local $$mul f32) + (local $$mul10 f32) + (local $$mul11 f32) + (local $$mul12 f32) + (local $$mul14 f32) + (local $$mul15 f32) + (local $$mul16 f32) + (local $$mul18 f32) + (local $$mul19 f32) + (local $$mul20 f32) + (local $$mul26 f32) + (local $$mul27 f32) + (local $$mul29 f32) + (local $$mul30 f32) + (local $$mul31 f32) + (local $$mul4 f32) + (local $$mul41 f32) + (local $$mul42 f32) + (local $$mul5 f32) + (local $$mul8 f32) + (local $$mul9 f32) + (local $$or$cond i32) + (local $$result$sroa$10$0$$sroa_idx70 i32) + (local $$result$sroa$11$0$$sroa_idx72 i32) + (local $$result$sroa$12$0$$sroa_idx74 i32) + (local $$result$sroa$13$0$$sroa_idx76 i32) + (local $$result$sroa$14$0$$sroa_idx78 i32) + (local $$result$sroa$15$0$$sroa_idx80 i32) + (local $$result$sroa$19$0$$sroa_idx88 i32) + (local $$result$sroa$5$0$$sroa_idx60 i32) + (local $$result$sroa$6$0$$sroa_idx62 i32) + (local $$result$sroa$7$0$$sroa_idx64 i32) + (local $$result$sroa$8$0$$sroa_idx66 i32) + (local $$result$sroa$9$0$$sroa_idx68 i32) + (local $$spec$select f32) + (local $$spec$select91 f32) + (local $$spec$select92 f32) + (local $$sub f32) + (local $$sub21 f32) + (local $$sub25 f32) + (local $$sub40 f32) + (local $$y2 i32) + (local $$z3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (local.get $$axis) + ) + ) + (local.set $$y2 + (i32.add + (local.get $$axis) + (i32.const 4) + ) + ) + (local.set $$1 + (f32.load + (local.get $$y2) + ) + ) + (local.set $$z3 + (i32.add + (local.get $$axis) + (i32.const 8) + ) + ) + (local.set $$2 + (f32.load + (local.get $$z3) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$0) + ) + ) + (local.set $$mul4 + (f32.mul + (local.get $$1) + (local.get $$1) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (local.get $$mul4) + ) + ) + (local.set $$mul5 + (f32.mul + (local.get $$2) + (local.get $$2) + ) + ) + (local.set $$add6 + (f32.add + (local.get $$add) + (local.get $$mul5) + ) + ) + (local.set $$3 + (f32.sqrt + (local.get $$add6) + ) + ) + (local.set $$cmp + (f32.ne + (local.get $$3) + (f32.const 1) + ) + ) + (local.set $$cmp7 + (f32.ne + (local.get $$3) + (f32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp) + (local.get $$cmp7) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$3) + ) + ) + (local.set $$mul8 + (f32.mul + (local.get $$0) + (local.get $$div) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$1) + (local.get $$div) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$2) + (local.get $$div) + ) + ) + (local.set $$spec$select + (if (result f32) + (local.get $$or$cond) + (local.get $$mul8) + (local.get $$0) + ) + ) + (local.set $$spec$select91 + (if (result f32) + (local.get $$or$cond) + (local.get $$mul9) + (local.get $$1) + ) + ) + (local.set $$spec$select92 + (if (result f32) + (local.get $$or$cond) + (local.get $$mul10) + (local.get $$2) + ) + ) + (local.set $$4 + (call $_sinf + (local.get $$angle) + ) + ) + (local.set $$5 + (call $_cosf + (local.get $$angle) + ) + ) + (local.set $$sub + (f32.sub + (f32.const 1) + (local.get $$5) + ) + ) + (local.set $$mul11 + (f32.mul + (local.get $$spec$select) + (local.get $$spec$select) + ) + ) + (local.set $$mul12 + (f32.mul + (local.get $$sub) + (local.get $$mul11) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$5) + (local.get $$mul12) + ) + ) + (local.set $$mul14 + (f32.mul + (local.get $$spec$select91) + (local.get $$spec$select) + ) + ) + (local.set $$mul15 + (f32.mul + (local.get $$sub) + (local.get $$mul14) + ) + ) + (local.set $$mul16 + (f32.mul + (local.get $$4) + (local.get $$spec$select92) + ) + ) + (local.set $$add17 + (f32.add + (local.get $$mul16) + (local.get $$mul15) + ) + ) + (local.set $$mul18 + (f32.mul + (local.get $$spec$select92) + (local.get $$spec$select) + ) + ) + (local.set $$mul19 + (f32.mul + (local.get $$sub) + (local.get $$mul18) + ) + ) + (local.set $$mul20 + (f32.mul + (local.get $$4) + (local.get $$spec$select91) + ) + ) + (local.set $$sub21 + (f32.sub + (local.get $$mul19) + (local.get $$mul20) + ) + ) + (local.set $$sub25 + (f32.sub + (local.get $$mul15) + (local.get $$mul16) + ) + ) + (local.set $$mul26 + (f32.mul + (local.get $$spec$select91) + (local.get $$spec$select91) + ) + ) + (local.set $$mul27 + (f32.mul + (local.get $$sub) + (local.get $$mul26) + ) + ) + (local.set $$add28 + (f32.add + (local.get $$5) + (local.get $$mul27) + ) + ) + (local.set $$mul29 + (f32.mul + (local.get $$spec$select92) + (local.get $$spec$select91) + ) + ) + (local.set $$mul30 + (f32.mul + (local.get $$sub) + (local.get $$mul29) + ) + ) + (local.set $$mul31 + (f32.mul + (local.get $$4) + (local.get $$spec$select) + ) + ) + (local.set $$add32 + (f32.add + (local.get $$mul31) + (local.get $$mul30) + ) + ) + (local.set $$add36 + (f32.add + (local.get $$mul20) + (local.get $$mul19) + ) + ) + (local.set $$sub40 + (f32.sub + (local.get $$mul30) + (local.get $$mul31) + ) + ) + (local.set $$mul41 + (f32.mul + (local.get $$spec$select92) + (local.get $$spec$select92) + ) + ) + (local.set $$mul42 + (f32.mul + (local.get $$sub) + (local.get $$mul41) + ) + ) + (local.set $$add43 + (f32.add + (local.get $$5) + (local.get $$mul42) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$add13) + ) + (local.set $$result$sroa$5$0$$sroa_idx60 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$5$0$$sroa_idx60) + (local.get $$sub25) + ) + (local.set $$result$sroa$6$0$$sroa_idx62 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx62) + (local.get $$add36) + ) + (local.set $$result$sroa$7$0$$sroa_idx64 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (f32.store + (local.get $$result$sroa$7$0$$sroa_idx64) + (f32.const 0) + ) + (local.set $$result$sroa$8$0$$sroa_idx66 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (f32.store + (local.get $$result$sroa$8$0$$sroa_idx66) + (local.get $$add17) + ) + (local.set $$result$sroa$9$0$$sroa_idx68 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$9$0$$sroa_idx68) + (local.get $$add28) + ) + (local.set $$result$sroa$10$0$$sroa_idx70 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (f32.store + (local.get $$result$sroa$10$0$$sroa_idx70) + (local.get $$sub40) + ) + (local.set $$result$sroa$11$0$$sroa_idx72 + (i32.add + (local.get $$agg$result) + (i32.const 28) + ) + ) + (f32.store + (local.get $$result$sroa$11$0$$sroa_idx72) + (f32.const 0) + ) + (local.set $$result$sroa$12$0$$sroa_idx74 + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + ) + (f32.store + (local.get $$result$sroa$12$0$$sroa_idx74) + (local.get $$sub21) + ) + (local.set $$result$sroa$13$0$$sroa_idx76 + (i32.add + (local.get $$agg$result) + (i32.const 36) + ) + ) + (f32.store + (local.get $$result$sroa$13$0$$sroa_idx76) + (local.get $$add32) + ) + (local.set $$result$sroa$14$0$$sroa_idx78 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$14$0$$sroa_idx78) + (local.get $$add43) + ) + (local.set $$result$sroa$15$0$$sroa_idx80 + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (local.set $$result$sroa$19$0$$sroa_idx88 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$15$0$$sroa_idx80) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$15$0$$sroa_idx80) + (i32.const 8) + ) + (i64.const 0) + ) + (f32.store + (local.get $$result$sroa$19$0$$sroa_idx88) + (f32.const 1) + ) + (return) + ) + (func $_MatrixScale (; 358 ;) (param $$agg$result i32) (param $$x f32) (param $$y f32) (param $$z f32) + (local $$result$sroa$5$0$$sroa_idx i32) + (local $$result$sroa$56$0$$sroa_idx7 i32) + (local $$result$sroa$6$0$$sroa_idx i32) + (local $$result$sroa$613$0$$sroa_idx14 i32) + (local $$result$sroa$7$0$$sroa_idx i32) + (local $$result$sroa$720$0$$sroa_idx21 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (f32.store + (local.get $$agg$result) + (local.get $$x) + ) + (local.set $$result$sroa$5$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$5$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$5$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$56$0$$sroa_idx7 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$56$0$$sroa_idx7) + (local.get $$y) + ) + (local.set $$result$sroa$6$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$6$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$6$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$613$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$613$0$$sroa_idx14) + (local.get $$z) + ) + (local.set $$result$sroa$7$0$$sroa_idx + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (i64.store align=4 + (local.get $$result$sroa$7$0$$sroa_idx) + (i64.const 0) + ) + (i64.store align=4 + (i32.add + (local.get $$result$sroa$7$0$$sroa_idx) + (i32.const 8) + ) + (i64.const 0) + ) + (local.set $$result$sroa$720$0$$sroa_idx21 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (f32.store + (local.get $$result$sroa$720$0$$sroa_idx21) + (f32.const 1) + ) + (return) + ) + (func $_MatrixMultiply (; 359 ;) (param $$agg$result i32) (param $$left i32) (param $$right i32) + (local $$0 f32) + (local $$1 f32) + (local $$10 f32) + (local $$11 f32) + (local $$12 f32) + (local $$13 f32) + (local $$14 f32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 f32) + (local $$19 f32) + (local $$2 f32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 f32) + (local $$30 f32) + (local $$31 f32) + (local $$4 f32) + (local $$5 f32) + (local $$6 f32) + (local $$7 f32) + (local $$8 f32) + (local $$9 f32) + (local $$add f32) + (local $$add101 f32) + (local $$add105 f32) + (local $$add109 f32) + (local $$add117 f32) + (local $$add121 f32) + (local $$add125 f32) + (local $$add13 f32) + (local $$add133 f32) + (local $$add137 f32) + (local $$add141 f32) + (local $$add149 f32) + (local $$add153 f32) + (local $$add157 f32) + (local $$add16 f32) + (local $$add165 f32) + (local $$add169 f32) + (local $$add173 f32) + (local $$add181 f32) + (local $$add185 f32) + (local $$add189 f32) + (local $$add19 f32) + (local $$add197 f32) + (local $$add201 f32) + (local $$add205 f32) + (local $$add213 f32) + (local $$add217 f32) + (local $$add221 f32) + (local $$add229 f32) + (local $$add233 f32) + (local $$add237 f32) + (local $$add26 f32) + (local $$add29 f32) + (local $$add32 f32) + (local $$add39 f32) + (local $$add4 f32) + (local $$add42 f32) + (local $$add45 f32) + (local $$add53 f32) + (local $$add57 f32) + (local $$add6 f32) + (local $$add61 f32) + (local $$add69 f32) + (local $$add73 f32) + (local $$add77 f32) + (local $$add85 f32) + (local $$add89 f32) + (local $$add93 f32) + (local $$m1 i32) + (local $$m10 i32) + (local $$m10118 i32) + (local $$m11 i32) + (local $$m11122 i32) + (local $$m12 i32) + (local $$m12175 i32) + (local $$m13 i32) + (local $$m13178 i32) + (local $$m14 i32) + (local $$m14182 i32) + (local $$m15 i32) + (local $$m15186 i32) + (local $$m19 i32) + (local $$m2 i32) + (local $$m222 i32) + (local $$m3 i32) + (local $$m335 i32) + (local $$m4 i32) + (local $$m447 i32) + (local $$m5 i32) + (local $$m550 i32) + (local $$m6 i32) + (local $$m654 i32) + (local $$m7 i32) + (local $$m758 i32) + (local $$m8 i32) + (local $$m8111 i32) + (local $$m9 i32) + (local $$m9114 i32) + (local $$mul f32) + (local $$mul10 f32) + (local $$mul100 f32) + (local $$mul104 f32) + (local $$mul108 f32) + (local $$mul113 f32) + (local $$mul116 f32) + (local $$mul12 f32) + (local $$mul120 f32) + (local $$mul124 f32) + (local $$mul129 f32) + (local $$mul132 f32) + (local $$mul136 f32) + (local $$mul140 f32) + (local $$mul145 f32) + (local $$mul148 f32) + (local $$mul15 f32) + (local $$mul152 f32) + (local $$mul156 f32) + (local $$mul161 f32) + (local $$mul164 f32) + (local $$mul168 f32) + (local $$mul172 f32) + (local $$mul177 f32) + (local $$mul18 f32) + (local $$mul180 f32) + (local $$mul184 f32) + (local $$mul188 f32) + (local $$mul193 f32) + (local $$mul196 f32) + (local $$mul2 f32) + (local $$mul200 f32) + (local $$mul204 f32) + (local $$mul209 f32) + (local $$mul212 f32) + (local $$mul216 f32) + (local $$mul220 f32) + (local $$mul225 f32) + (local $$mul228 f32) + (local $$mul23 f32) + (local $$mul232 f32) + (local $$mul236 f32) + (local $$mul25 f32) + (local $$mul28 f32) + (local $$mul3 f32) + (local $$mul31 f32) + (local $$mul36 f32) + (local $$mul38 f32) + (local $$mul41 f32) + (local $$mul44 f32) + (local $$mul49 f32) + (local $$mul5 f32) + (local $$mul52 f32) + (local $$mul56 f32) + (local $$mul60 f32) + (local $$mul65 f32) + (local $$mul68 f32) + (local $$mul72 f32) + (local $$mul76 f32) + (local $$mul81 f32) + (local $$mul84 f32) + (local $$mul88 f32) + (local $$mul92 f32) + (local $$mul97 f32) + (local $$result$sroa$10$0$$sroa_idx12 i32) + (local $$result$sroa$11$0$$sroa_idx14 i32) + (local $$result$sroa$12$0$$sroa_idx16 i32) + (local $$result$sroa$13$0$$sroa_idx18 i32) + (local $$result$sroa$14$0$$sroa_idx20 i32) + (local $$result$sroa$15$0$$sroa_idx22 i32) + (local $$result$sroa$16$0$$sroa_idx24 i32) + (local $$result$sroa$17$0$$sroa_idx26 i32) + (local $$result$sroa$18$0$$sroa_idx28 i32) + (local $$result$sroa$19$0$$sroa_idx30 i32) + (local $$result$sroa$5$0$$sroa_idx2 i32) + (local $$result$sroa$6$0$$sroa_idx4 i32) + (local $$result$sroa$7$0$$sroa_idx6 i32) + (local $$result$sroa$8$0$$sroa_idx8 i32) + (local $$result$sroa$9$0$$sroa_idx10 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (local.get $$left) + ) + ) + (local.set $$1 + (f32.load + (local.get $$right) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$m1 + (i32.add + (local.get $$left) + (i32.const 16) + ) + ) + (local.set $$2 + (f32.load + (local.get $$m1) + ) + ) + (local.set $$m4 + (i32.add + (local.get $$right) + (i32.const 4) + ) + ) + (local.set $$3 + (f32.load + (local.get $$m4) + ) + ) + (local.set $$mul2 + (f32.mul + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul) + (local.get $$mul2) + ) + ) + (local.set $$m2 + (i32.add + (local.get $$left) + (i32.const 32) + ) + ) + (local.set $$4 + (f32.load + (local.get $$m2) + ) + ) + (local.set $$m8 + (i32.add + (local.get $$right) + (i32.const 8) + ) + ) + (local.set $$5 + (f32.load + (local.get $$m8) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$4) + (local.get $$5) + ) + ) + (local.set $$add4 + (f32.add + (local.get $$add) + (local.get $$mul3) + ) + ) + (local.set $$m3 + (i32.add + (local.get $$left) + (i32.const 48) + ) + ) + (local.set $$6 + (f32.load + (local.get $$m3) + ) + ) + (local.set $$m12 + (i32.add + (local.get $$right) + (i32.const 12) + ) + ) + (local.set $$7 + (f32.load + (local.get $$m12) + ) + ) + (local.set $$mul5 + (f32.mul + (local.get $$6) + (local.get $$7) + ) + ) + (local.set $$add6 + (f32.add + (local.get $$add4) + (local.get $$mul5) + ) + ) + (local.set $$m19 + (i32.add + (local.get $$right) + (i32.const 16) + ) + ) + (local.set $$8 + (f32.load + (local.get $$m19) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$0) + (local.get $$8) + ) + ) + (local.set $$m5 + (i32.add + (local.get $$right) + (i32.const 20) + ) + ) + (local.set $$9 + (f32.load + (local.get $$m5) + ) + ) + (local.set $$mul12 + (f32.mul + (local.get $$2) + (local.get $$9) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$mul10) + (local.get $$mul12) + ) + ) + (local.set $$m9 + (i32.add + (local.get $$right) + (i32.const 24) + ) + ) + (local.set $$10 + (f32.load + (local.get $$m9) + ) + ) + (local.set $$mul15 + (f32.mul + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$add16 + (f32.add + (local.get $$add13) + (local.get $$mul15) + ) + ) + (local.set $$m13 + (i32.add + (local.get $$right) + (i32.const 28) + ) + ) + (local.set $$11 + (f32.load + (local.get $$m13) + ) + ) + (local.set $$mul18 + (f32.mul + (local.get $$6) + (local.get $$11) + ) + ) + (local.set $$add19 + (f32.add + (local.get $$add16) + (local.get $$mul18) + ) + ) + (local.set $$m222 + (i32.add + (local.get $$right) + (i32.const 32) + ) + ) + (local.set $$12 + (f32.load + (local.get $$m222) + ) + ) + (local.set $$mul23 + (f32.mul + (local.get $$0) + (local.get $$12) + ) + ) + (local.set $$m6 + (i32.add + (local.get $$right) + (i32.const 36) + ) + ) + (local.set $$13 + (f32.load + (local.get $$m6) + ) + ) + (local.set $$mul25 + (f32.mul + (local.get $$2) + (local.get $$13) + ) + ) + (local.set $$add26 + (f32.add + (local.get $$mul23) + (local.get $$mul25) + ) + ) + (local.set $$m10 + (i32.add + (local.get $$right) + (i32.const 40) + ) + ) + (local.set $$14 + (f32.load + (local.get $$m10) + ) + ) + (local.set $$mul28 + (f32.mul + (local.get $$4) + (local.get $$14) + ) + ) + (local.set $$add29 + (f32.add + (local.get $$add26) + (local.get $$mul28) + ) + ) + (local.set $$m14 + (i32.add + (local.get $$right) + (i32.const 44) + ) + ) + (local.set $$15 + (f32.load + (local.get $$m14) + ) + ) + (local.set $$mul31 + (f32.mul + (local.get $$6) + (local.get $$15) + ) + ) + (local.set $$add32 + (f32.add + (local.get $$add29) + (local.get $$mul31) + ) + ) + (local.set $$m335 + (i32.add + (local.get $$right) + (i32.const 48) + ) + ) + (local.set $$16 + (f32.load + (local.get $$m335) + ) + ) + (local.set $$mul36 + (f32.mul + (local.get $$0) + (local.get $$16) + ) + ) + (local.set $$m7 + (i32.add + (local.get $$right) + (i32.const 52) + ) + ) + (local.set $$17 + (f32.load + (local.get $$m7) + ) + ) + (local.set $$mul38 + (f32.mul + (local.get $$2) + (local.get $$17) + ) + ) + (local.set $$add39 + (f32.add + (local.get $$mul36) + (local.get $$mul38) + ) + ) + (local.set $$m11 + (i32.add + (local.get $$right) + (i32.const 56) + ) + ) + (local.set $$18 + (f32.load + (local.get $$m11) + ) + ) + (local.set $$mul41 + (f32.mul + (local.get $$4) + (local.get $$18) + ) + ) + (local.set $$add42 + (f32.add + (local.get $$add39) + (local.get $$mul41) + ) + ) + (local.set $$m15 + (i32.add + (local.get $$right) + (i32.const 60) + ) + ) + (local.set $$19 + (f32.load + (local.get $$m15) + ) + ) + (local.set $$mul44 + (f32.mul + (local.get $$6) + (local.get $$19) + ) + ) + (local.set $$add45 + (f32.add + (local.get $$add42) + (local.get $$mul44) + ) + ) + (local.set $$m447 + (i32.add + (local.get $$left) + (i32.const 4) + ) + ) + (local.set $$20 + (f32.load + (local.get $$m447) + ) + ) + (local.set $$mul49 + (f32.mul + (local.get $$1) + (local.get $$20) + ) + ) + (local.set $$m550 + (i32.add + (local.get $$left) + (i32.const 20) + ) + ) + (local.set $$21 + (f32.load + (local.get $$m550) + ) + ) + (local.set $$mul52 + (f32.mul + (local.get $$3) + (local.get $$21) + ) + ) + (local.set $$add53 + (f32.add + (local.get $$mul49) + (local.get $$mul52) + ) + ) + (local.set $$m654 + (i32.add + (local.get $$left) + (i32.const 36) + ) + ) + (local.set $$22 + (f32.load + (local.get $$m654) + ) + ) + (local.set $$mul56 + (f32.mul + (local.get $$5) + (local.get $$22) + ) + ) + (local.set $$add57 + (f32.add + (local.get $$add53) + (local.get $$mul56) + ) + ) + (local.set $$m758 + (i32.add + (local.get $$left) + (i32.const 52) + ) + ) + (local.set $$23 + (f32.load + (local.get $$m758) + ) + ) + (local.set $$mul60 + (f32.mul + (local.get $$7) + (local.get $$23) + ) + ) + (local.set $$add61 + (f32.add + (local.get $$add57) + (local.get $$mul60) + ) + ) + (local.set $$mul65 + (f32.mul + (local.get $$8) + (local.get $$20) + ) + ) + (local.set $$mul68 + (f32.mul + (local.get $$9) + (local.get $$21) + ) + ) + (local.set $$add69 + (f32.add + (local.get $$mul65) + (local.get $$mul68) + ) + ) + (local.set $$mul72 + (f32.mul + (local.get $$10) + (local.get $$22) + ) + ) + (local.set $$add73 + (f32.add + (local.get $$add69) + (local.get $$mul72) + ) + ) + (local.set $$mul76 + (f32.mul + (local.get $$11) + (local.get $$23) + ) + ) + (local.set $$add77 + (f32.add + (local.get $$add73) + (local.get $$mul76) + ) + ) + (local.set $$mul81 + (f32.mul + (local.get $$12) + (local.get $$20) + ) + ) + (local.set $$mul84 + (f32.mul + (local.get $$13) + (local.get $$21) + ) + ) + (local.set $$add85 + (f32.add + (local.get $$mul81) + (local.get $$mul84) + ) + ) + (local.set $$mul88 + (f32.mul + (local.get $$14) + (local.get $$22) + ) + ) + (local.set $$add89 + (f32.add + (local.get $$add85) + (local.get $$mul88) + ) + ) + (local.set $$mul92 + (f32.mul + (local.get $$15) + (local.get $$23) + ) + ) + (local.set $$add93 + (f32.add + (local.get $$add89) + (local.get $$mul92) + ) + ) + (local.set $$mul97 + (f32.mul + (local.get $$16) + (local.get $$20) + ) + ) + (local.set $$mul100 + (f32.mul + (local.get $$17) + (local.get $$21) + ) + ) + (local.set $$add101 + (f32.add + (local.get $$mul97) + (local.get $$mul100) + ) + ) + (local.set $$mul104 + (f32.mul + (local.get $$18) + (local.get $$22) + ) + ) + (local.set $$add105 + (f32.add + (local.get $$add101) + (local.get $$mul104) + ) + ) + (local.set $$mul108 + (f32.mul + (local.get $$19) + (local.get $$23) + ) + ) + (local.set $$add109 + (f32.add + (local.get $$add105) + (local.get $$mul108) + ) + ) + (local.set $$m8111 + (i32.add + (local.get $$left) + (i32.const 8) + ) + ) + (local.set $$24 + (f32.load + (local.get $$m8111) + ) + ) + (local.set $$mul113 + (f32.mul + (local.get $$1) + (local.get $$24) + ) + ) + (local.set $$m9114 + (i32.add + (local.get $$left) + (i32.const 24) + ) + ) + (local.set $$25 + (f32.load + (local.get $$m9114) + ) + ) + (local.set $$mul116 + (f32.mul + (local.get $$3) + (local.get $$25) + ) + ) + (local.set $$add117 + (f32.add + (local.get $$mul113) + (local.get $$mul116) + ) + ) + (local.set $$m10118 + (i32.add + (local.get $$left) + (i32.const 40) + ) + ) + (local.set $$26 + (f32.load + (local.get $$m10118) + ) + ) + (local.set $$mul120 + (f32.mul + (local.get $$5) + (local.get $$26) + ) + ) + (local.set $$add121 + (f32.add + (local.get $$add117) + (local.get $$mul120) + ) + ) + (local.set $$m11122 + (i32.add + (local.get $$left) + (i32.const 56) + ) + ) + (local.set $$27 + (f32.load + (local.get $$m11122) + ) + ) + (local.set $$mul124 + (f32.mul + (local.get $$7) + (local.get $$27) + ) + ) + (local.set $$add125 + (f32.add + (local.get $$add121) + (local.get $$mul124) + ) + ) + (local.set $$mul129 + (f32.mul + (local.get $$8) + (local.get $$24) + ) + ) + (local.set $$mul132 + (f32.mul + (local.get $$9) + (local.get $$25) + ) + ) + (local.set $$add133 + (f32.add + (local.get $$mul129) + (local.get $$mul132) + ) + ) + (local.set $$mul136 + (f32.mul + (local.get $$10) + (local.get $$26) + ) + ) + (local.set $$add137 + (f32.add + (local.get $$add133) + (local.get $$mul136) + ) + ) + (local.set $$mul140 + (f32.mul + (local.get $$11) + (local.get $$27) + ) + ) + (local.set $$add141 + (f32.add + (local.get $$add137) + (local.get $$mul140) + ) + ) + (local.set $$mul145 + (f32.mul + (local.get $$12) + (local.get $$24) + ) + ) + (local.set $$mul148 + (f32.mul + (local.get $$13) + (local.get $$25) + ) + ) + (local.set $$add149 + (f32.add + (local.get $$mul145) + (local.get $$mul148) + ) + ) + (local.set $$mul152 + (f32.mul + (local.get $$14) + (local.get $$26) + ) + ) + (local.set $$add153 + (f32.add + (local.get $$add149) + (local.get $$mul152) + ) + ) + (local.set $$mul156 + (f32.mul + (local.get $$15) + (local.get $$27) + ) + ) + (local.set $$add157 + (f32.add + (local.get $$add153) + (local.get $$mul156) + ) + ) + (local.set $$mul161 + (f32.mul + (local.get $$16) + (local.get $$24) + ) + ) + (local.set $$mul164 + (f32.mul + (local.get $$17) + (local.get $$25) + ) + ) + (local.set $$add165 + (f32.add + (local.get $$mul161) + (local.get $$mul164) + ) + ) + (local.set $$mul168 + (f32.mul + (local.get $$18) + (local.get $$26) + ) + ) + (local.set $$add169 + (f32.add + (local.get $$add165) + (local.get $$mul168) + ) + ) + (local.set $$mul172 + (f32.mul + (local.get $$19) + (local.get $$27) + ) + ) + (local.set $$add173 + (f32.add + (local.get $$add169) + (local.get $$mul172) + ) + ) + (local.set $$m12175 + (i32.add + (local.get $$left) + (i32.const 12) + ) + ) + (local.set $$28 + (f32.load + (local.get $$m12175) + ) + ) + (local.set $$mul177 + (f32.mul + (local.get $$1) + (local.get $$28) + ) + ) + (local.set $$m13178 + (i32.add + (local.get $$left) + (i32.const 28) + ) + ) + (local.set $$29 + (f32.load + (local.get $$m13178) + ) + ) + (local.set $$mul180 + (f32.mul + (local.get $$3) + (local.get $$29) + ) + ) + (local.set $$add181 + (f32.add + (local.get $$mul177) + (local.get $$mul180) + ) + ) + (local.set $$m14182 + (i32.add + (local.get $$left) + (i32.const 44) + ) + ) + (local.set $$30 + (f32.load + (local.get $$m14182) + ) + ) + (local.set $$mul184 + (f32.mul + (local.get $$5) + (local.get $$30) + ) + ) + (local.set $$add185 + (f32.add + (local.get $$add181) + (local.get $$mul184) + ) + ) + (local.set $$m15186 + (i32.add + (local.get $$left) + (i32.const 60) + ) + ) + (local.set $$31 + (f32.load + (local.get $$m15186) + ) + ) + (local.set $$mul188 + (f32.mul + (local.get $$7) + (local.get $$31) + ) + ) + (local.set $$add189 + (f32.add + (local.get $$add185) + (local.get $$mul188) + ) + ) + (local.set $$mul193 + (f32.mul + (local.get $$8) + (local.get $$28) + ) + ) + (local.set $$mul196 + (f32.mul + (local.get $$9) + (local.get $$29) + ) + ) + (local.set $$add197 + (f32.add + (local.get $$mul193) + (local.get $$mul196) + ) + ) + (local.set $$mul200 + (f32.mul + (local.get $$10) + (local.get $$30) + ) + ) + (local.set $$add201 + (f32.add + (local.get $$add197) + (local.get $$mul200) + ) + ) + (local.set $$mul204 + (f32.mul + (local.get $$11) + (local.get $$31) + ) + ) + (local.set $$add205 + (f32.add + (local.get $$add201) + (local.get $$mul204) + ) + ) + (local.set $$mul209 + (f32.mul + (local.get $$12) + (local.get $$28) + ) + ) + (local.set $$mul212 + (f32.mul + (local.get $$13) + (local.get $$29) + ) + ) + (local.set $$add213 + (f32.add + (local.get $$mul209) + (local.get $$mul212) + ) + ) + (local.set $$mul216 + (f32.mul + (local.get $$14) + (local.get $$30) + ) + ) + (local.set $$add217 + (f32.add + (local.get $$add213) + (local.get $$mul216) + ) + ) + (local.set $$mul220 + (f32.mul + (local.get $$15) + (local.get $$31) + ) + ) + (local.set $$add221 + (f32.add + (local.get $$add217) + (local.get $$mul220) + ) + ) + (local.set $$mul225 + (f32.mul + (local.get $$16) + (local.get $$28) + ) + ) + (local.set $$mul228 + (f32.mul + (local.get $$17) + (local.get $$29) + ) + ) + (local.set $$add229 + (f32.add + (local.get $$mul225) + (local.get $$mul228) + ) + ) + (local.set $$mul232 + (f32.mul + (local.get $$18) + (local.get $$30) + ) + ) + (local.set $$add233 + (f32.add + (local.get $$add229) + (local.get $$mul232) + ) + ) + (local.set $$mul236 + (f32.mul + (local.get $$19) + (local.get $$31) + ) + ) + (local.set $$add237 + (f32.add + (local.get $$add233) + (local.get $$mul236) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$add6) + ) + (local.set $$result$sroa$5$0$$sroa_idx2 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$5$0$$sroa_idx2) + (local.get $$add61) + ) + (local.set $$result$sroa$6$0$$sroa_idx4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx4) + (local.get $$add125) + ) + (local.set $$result$sroa$7$0$$sroa_idx6 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (f32.store + (local.get $$result$sroa$7$0$$sroa_idx6) + (local.get $$add189) + ) + (local.set $$result$sroa$8$0$$sroa_idx8 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (f32.store + (local.get $$result$sroa$8$0$$sroa_idx8) + (local.get $$add19) + ) + (local.set $$result$sroa$9$0$$sroa_idx10 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$9$0$$sroa_idx10) + (local.get $$add77) + ) + (local.set $$result$sroa$10$0$$sroa_idx12 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (f32.store + (local.get $$result$sroa$10$0$$sroa_idx12) + (local.get $$add141) + ) + (local.set $$result$sroa$11$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 28) + ) + ) + (f32.store + (local.get $$result$sroa$11$0$$sroa_idx14) + (local.get $$add205) + ) + (local.set $$result$sroa$12$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + ) + (f32.store + (local.get $$result$sroa$12$0$$sroa_idx16) + (local.get $$add32) + ) + (local.set $$result$sroa$13$0$$sroa_idx18 + (i32.add + (local.get $$agg$result) + (i32.const 36) + ) + ) + (f32.store + (local.get $$result$sroa$13$0$$sroa_idx18) + (local.get $$add93) + ) + (local.set $$result$sroa$14$0$$sroa_idx20 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$14$0$$sroa_idx20) + (local.get $$add157) + ) + (local.set $$result$sroa$15$0$$sroa_idx22 + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (f32.store + (local.get $$result$sroa$15$0$$sroa_idx22) + (local.get $$add221) + ) + (local.set $$result$sroa$16$0$$sroa_idx24 + (i32.add + (local.get $$agg$result) + (i32.const 48) + ) + ) + (f32.store + (local.get $$result$sroa$16$0$$sroa_idx24) + (local.get $$add45) + ) + (local.set $$result$sroa$17$0$$sroa_idx26 + (i32.add + (local.get $$agg$result) + (i32.const 52) + ) + ) + (f32.store + (local.get $$result$sroa$17$0$$sroa_idx26) + (local.get $$add109) + ) + (local.set $$result$sroa$18$0$$sroa_idx28 + (i32.add + (local.get $$agg$result) + (i32.const 56) + ) + ) + (f32.store + (local.get $$result$sroa$18$0$$sroa_idx28) + (local.get $$add173) + ) + (local.set $$result$sroa$19$0$$sroa_idx30 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (f32.store + (local.get $$result$sroa$19$0$$sroa_idx30) + (local.get $$add237) + ) + (return) + ) + (func $_MatrixOrtho (; 360 ;) (param $$agg$result i32) (param $$left f64) (param $$right f64) (param $$bottom f64) (param $$top f64) (param $$near f64) (param $$far f64) + (local $$add f32) + (local $$add13 f32) + (local $$add18 f32) + (local $$conv f32) + (local $$conv11 f32) + (local $$conv12 f32) + (local $$conv16 f32) + (local $$conv17 f32) + (local $$conv2 f32) + (local $$conv4 f32) + (local $$conv7 f32) + (local $$conv8 f32) + (local $$div f32) + (local $$div10 f32) + (local $$div15 f32) + (local $$div20 f32) + (local $$div5 f32) + (local $$div6 f32) + (local $$result$sroa$10$0$$sroa_idx18 i32) + (local $$result$sroa$11$0$$sroa_idx20 i32) + (local $$result$sroa$12$0$$sroa_idx22 i32) + (local $$result$sroa$13$0$$sroa_idx24 i32) + (local $$result$sroa$14$0$$sroa_idx26 i32) + (local $$result$sroa$15$0$$sroa_idx28 i32) + (local $$result$sroa$16$0$$sroa_idx30 i32) + (local $$result$sroa$17$0$$sroa_idx32 i32) + (local $$result$sroa$18$0$$sroa_idx34 i32) + (local $$result$sroa$19$0$$sroa_idx36 i32) + (local $$result$sroa$5$0$$sroa_idx8 i32) + (local $$result$sroa$6$0$$sroa_idx10 i32) + (local $$result$sroa$7$0$$sroa_idx12 i32) + (local $$result$sroa$8$0$$sroa_idx14 i32) + (local $$result$sroa$9$0$$sroa_idx16 i32) + (local $$sub f64) + (local $$sub1 f64) + (local $$sub14 f32) + (local $$sub19 f32) + (local $$sub3 f64) + (local $$sub9 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (f64.sub + (local.get $$right) + (local.get $$left) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$sub) + ) + ) + (local.set $$sub1 + (f64.sub + (local.get $$top) + (local.get $$bottom) + ) + ) + (local.set $$conv2 + (f32.demote_f64 + (local.get $$sub1) + ) + ) + (local.set $$sub3 + (f64.sub + (local.get $$far) + (local.get $$near) + ) + ) + (local.set $$conv4 + (f32.demote_f64 + (local.get $$sub3) + ) + ) + (local.set $$div + (f32.div + (f32.const 2) + (local.get $$conv) + ) + ) + (local.set $$div5 + (f32.div + (f32.const 2) + (local.get $$conv2) + ) + ) + (local.set $$div6 + (f32.div + (f32.const -2) + (local.get $$conv4) + ) + ) + (local.set $$conv7 + (f32.demote_f64 + (local.get $$left) + ) + ) + (local.set $$conv8 + (f32.demote_f64 + (local.get $$right) + ) + ) + (local.set $$add + (f32.add + (local.get $$conv7) + (local.get $$conv8) + ) + ) + (local.set $$sub9 + (f32.neg + (local.get $$add) + ) + ) + (local.set $$div10 + (f32.div + (local.get $$sub9) + (local.get $$conv) + ) + ) + (local.set $$conv11 + (f32.demote_f64 + (local.get $$top) + ) + ) + (local.set $$conv12 + (f32.demote_f64 + (local.get $$bottom) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$conv12) + (local.get $$conv11) + ) + ) + (local.set $$sub14 + (f32.neg + (local.get $$add13) + ) + ) + (local.set $$div15 + (f32.div + (local.get $$sub14) + (local.get $$conv2) + ) + ) + (local.set $$conv16 + (f32.demote_f64 + (local.get $$far) + ) + ) + (local.set $$conv17 + (f32.demote_f64 + (local.get $$near) + ) + ) + (local.set $$add18 + (f32.add + (local.get $$conv17) + (local.get $$conv16) + ) + ) + (local.set $$sub19 + (f32.neg + (local.get $$add18) + ) + ) + (local.set $$div20 + (f32.div + (local.get $$sub19) + (local.get $$conv4) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$div) + ) + (local.set $$result$sroa$5$0$$sroa_idx8 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$result$sroa$5$0$$sroa_idx8) + (f32.const 0) + ) + (local.set $$result$sroa$6$0$$sroa_idx10 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (f32.store + (local.get $$result$sroa$6$0$$sroa_idx10) + (f32.const 0) + ) + (local.set $$result$sroa$7$0$$sroa_idx12 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (f32.store + (local.get $$result$sroa$7$0$$sroa_idx12) + (local.get $$div10) + ) + (local.set $$result$sroa$8$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (f32.store + (local.get $$result$sroa$8$0$$sroa_idx14) + (f32.const 0) + ) + (local.set $$result$sroa$9$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (f32.store + (local.get $$result$sroa$9$0$$sroa_idx16) + (local.get $$div5) + ) + (local.set $$result$sroa$10$0$$sroa_idx18 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (f32.store + (local.get $$result$sroa$10$0$$sroa_idx18) + (f32.const 0) + ) + (local.set $$result$sroa$11$0$$sroa_idx20 + (i32.add + (local.get $$agg$result) + (i32.const 28) + ) + ) + (f32.store + (local.get $$result$sroa$11$0$$sroa_idx20) + (local.get $$div15) + ) + (local.set $$result$sroa$12$0$$sroa_idx22 + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + ) + (f32.store + (local.get $$result$sroa$12$0$$sroa_idx22) + (f32.const 0) + ) + (local.set $$result$sroa$13$0$$sroa_idx24 + (i32.add + (local.get $$agg$result) + (i32.const 36) + ) + ) + (f32.store + (local.get $$result$sroa$13$0$$sroa_idx24) + (f32.const 0) + ) + (local.set $$result$sroa$14$0$$sroa_idx26 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (f32.store + (local.get $$result$sroa$14$0$$sroa_idx26) + (local.get $$div6) + ) + (local.set $$result$sroa$15$0$$sroa_idx28 + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (f32.store + (local.get $$result$sroa$15$0$$sroa_idx28) + (local.get $$div20) + ) + (local.set $$result$sroa$16$0$$sroa_idx30 + (i32.add + (local.get $$agg$result) + (i32.const 48) + ) + ) + (f32.store + (local.get $$result$sroa$16$0$$sroa_idx30) + (f32.const 0) + ) + (local.set $$result$sroa$17$0$$sroa_idx32 + (i32.add + (local.get $$agg$result) + (i32.const 52) + ) + ) + (f32.store + (local.get $$result$sroa$17$0$$sroa_idx32) + (f32.const 0) + ) + (local.set $$result$sroa$18$0$$sroa_idx34 + (i32.add + (local.get $$agg$result) + (i32.const 56) + ) + ) + (f32.store + (local.get $$result$sroa$18$0$$sroa_idx34) + (f32.const 0) + ) + (local.set $$result$sroa$19$0$$sroa_idx36 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (f32.store + (local.get $$result$sroa$19$0$$sroa_idx36) + (f32.const 1) + ) + (return) + ) + (func $_MatrixToFloatV (; 361 ;) (param $$agg$result i32) (param $$mat i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$buffer$sroa$10$0$$sroa_idx12 i32) + (local $$buffer$sroa$11$0$$sroa_idx14 i32) + (local $$buffer$sroa$12$0$$sroa_idx16 i32) + (local $$buffer$sroa$13$0$$sroa_idx18 i32) + (local $$buffer$sroa$14$0$$sroa_idx20 i32) + (local $$buffer$sroa$15$0$$sroa_idx22 i32) + (local $$buffer$sroa$16$0$$sroa_idx24 i32) + (local $$buffer$sroa$17$0$$sroa_idx26 i32) + (local $$buffer$sroa$18$0$$sroa_idx28 i32) + (local $$buffer$sroa$19$0$$sroa_idx30 i32) + (local $$buffer$sroa$5$0$$sroa_idx2 i32) + (local $$buffer$sroa$6$0$$sroa_idx4 i32) + (local $$buffer$sroa$7$0$$sroa_idx6 i32) + (local $$buffer$sroa$8$0$$sroa_idx8 i32) + (local $$buffer$sroa$9$0$$sroa_idx10 i32) + (local $$m1 i32) + (local $$m10 i32) + (local $$m11 i32) + (local $$m12 i32) + (local $$m13 i32) + (local $$m14 i32) + (local $$m15 i32) + (local $$m2 i32) + (local $$m3 i32) + (local $$m4 i32) + (local $$m5 i32) + (local $$m6 i32) + (local $$m7 i32) + (local $$m8 i32) + (local $$m9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$mat) + ) + ) + (local.set $$m1 + (i32.add + (local.get $$mat) + (i32.const 16) + ) + ) + (local.set $$1 + (i32.load + (local.get $$m1) + ) + ) + (local.set $$m2 + (i32.add + (local.get $$mat) + (i32.const 32) + ) + ) + (local.set $$2 + (i32.load + (local.get $$m2) + ) + ) + (local.set $$m3 + (i32.add + (local.get $$mat) + (i32.const 48) + ) + ) + (local.set $$3 + (i32.load + (local.get $$m3) + ) + ) + (local.set $$m4 + (i32.add + (local.get $$mat) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$m4) + ) + ) + (local.set $$m5 + (i32.add + (local.get $$mat) + (i32.const 20) + ) + ) + (local.set $$5 + (i32.load + (local.get $$m5) + ) + ) + (local.set $$m6 + (i32.add + (local.get $$mat) + (i32.const 36) + ) + ) + (local.set $$6 + (i32.load + (local.get $$m6) + ) + ) + (local.set $$m7 + (i32.add + (local.get $$mat) + (i32.const 52) + ) + ) + (local.set $$7 + (i32.load + (local.get $$m7) + ) + ) + (local.set $$m8 + (i32.add + (local.get $$mat) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.load + (local.get $$m8) + ) + ) + (local.set $$m9 + (i32.add + (local.get $$mat) + (i32.const 24) + ) + ) + (local.set $$9 + (i32.load + (local.get $$m9) + ) + ) + (local.set $$m10 + (i32.add + (local.get $$mat) + (i32.const 40) + ) + ) + (local.set $$10 + (i32.load + (local.get $$m10) + ) + ) + (local.set $$m11 + (i32.add + (local.get $$mat) + (i32.const 56) + ) + ) + (local.set $$11 + (i32.load + (local.get $$m11) + ) + ) + (local.set $$m12 + (i32.add + (local.get $$mat) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$m12) + ) + ) + (local.set $$m13 + (i32.add + (local.get $$mat) + (i32.const 28) + ) + ) + (local.set $$13 + (i32.load + (local.get $$m13) + ) + ) + (local.set $$m14 + (i32.add + (local.get $$mat) + (i32.const 44) + ) + ) + (local.set $$14 + (i32.load + (local.get $$m14) + ) + ) + (local.set $$m15 + (i32.add + (local.get $$mat) + (i32.const 60) + ) + ) + (local.set $$15 + (i32.load + (local.get $$m15) + ) + ) + (i32.store + (local.get $$agg$result) + (local.get $$0) + ) + (local.set $$buffer$sroa$5$0$$sroa_idx2 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$buffer$sroa$5$0$$sroa_idx2) + (local.get $$1) + ) + (local.set $$buffer$sroa$6$0$$sroa_idx4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (i32.store + (local.get $$buffer$sroa$6$0$$sroa_idx4) + (local.get $$2) + ) + (local.set $$buffer$sroa$7$0$$sroa_idx6 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (i32.store + (local.get $$buffer$sroa$7$0$$sroa_idx6) + (local.get $$3) + ) + (local.set $$buffer$sroa$8$0$$sroa_idx8 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (i32.store + (local.get $$buffer$sroa$8$0$$sroa_idx8) + (local.get $$4) + ) + (local.set $$buffer$sroa$9$0$$sroa_idx10 + (i32.add + (local.get $$agg$result) + (i32.const 20) + ) + ) + (i32.store + (local.get $$buffer$sroa$9$0$$sroa_idx10) + (local.get $$5) + ) + (local.set $$buffer$sroa$10$0$$sroa_idx12 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + ) + (i32.store + (local.get $$buffer$sroa$10$0$$sroa_idx12) + (local.get $$6) + ) + (local.set $$buffer$sroa$11$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 28) + ) + ) + (i32.store + (local.get $$buffer$sroa$11$0$$sroa_idx14) + (local.get $$7) + ) + (local.set $$buffer$sroa$12$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + ) + (i32.store + (local.get $$buffer$sroa$12$0$$sroa_idx16) + (local.get $$8) + ) + (local.set $$buffer$sroa$13$0$$sroa_idx18 + (i32.add + (local.get $$agg$result) + (i32.const 36) + ) + ) + (i32.store + (local.get $$buffer$sroa$13$0$$sroa_idx18) + (local.get $$9) + ) + (local.set $$buffer$sroa$14$0$$sroa_idx20 + (i32.add + (local.get $$agg$result) + (i32.const 40) + ) + ) + (i32.store + (local.get $$buffer$sroa$14$0$$sroa_idx20) + (local.get $$10) + ) + (local.set $$buffer$sroa$15$0$$sroa_idx22 + (i32.add + (local.get $$agg$result) + (i32.const 44) + ) + ) + (i32.store + (local.get $$buffer$sroa$15$0$$sroa_idx22) + (local.get $$11) + ) + (local.set $$buffer$sroa$16$0$$sroa_idx24 + (i32.add + (local.get $$agg$result) + (i32.const 48) + ) + ) + (i32.store + (local.get $$buffer$sroa$16$0$$sroa_idx24) + (local.get $$12) + ) + (local.set $$buffer$sroa$17$0$$sroa_idx26 + (i32.add + (local.get $$agg$result) + (i32.const 52) + ) + ) + (i32.store + (local.get $$buffer$sroa$17$0$$sroa_idx26) + (local.get $$13) + ) + (local.set $$buffer$sroa$18$0$$sroa_idx28 + (i32.add + (local.get $$agg$result) + (i32.const 56) + ) + ) + (i32.store + (local.get $$buffer$sroa$18$0$$sroa_idx28) + (local.get $$14) + ) + (local.set $$buffer$sroa$19$0$$sroa_idx30 + (i32.add + (local.get $$agg$result) + (i32.const 60) + ) + ) + (i32.store + (local.get $$buffer$sroa$19$0$$sroa_idx30) + (local.get $$15) + ) + (return) + ) + (func $_rlMatrixMode (; 362 ;) (param $$mode i32) + (local $$modelview$sink i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-case $switch-default + (i32.sub + (local.get $$mode) + (i32.const 5888) + ) + ) + ) + (block + (local.set $$modelview$sink + (i32.const 28932) + ) + (local.set $label + (i32.const 3) + ) + (br $switch) + ) + ) + (block + (local.set $$modelview$sink + (i32.const 28868) + ) + (local.set $label + (i32.const 3) + ) + (br $switch) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (i32.store + (i32.const 28996) + (local.get $$modelview$sink) + ) + ) + (i32.store + (i32.const 8000) + (local.get $$mode) + ) + (return) + ) + (func $_rlPushMatrix (; 363 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$arrayidx i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$inc i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29000) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 31) + ) + ) + (if + (local.get $$cmp) + (call $_TraceLog + (i32.const 5) + (i32.const 8811) + (local.get $$vararg_buffer) + ) + ) + (local.set $$1 + (i32.load + (i32.const 8000) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 5888) + ) + ) + (if + (local.get $$cmp1) + (block + (i32.store8 + (i32.const 29916) + (i32.const 1) + ) + (i32.store + (i32.const 28996) + (i32.const 29004) + ) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29000) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 19712) + (i32.shl + (local.get $$2) + (i32.const 6) + ) + ) + ) + (local.set $$3 + (i32.load + (i32.const 28996) + ) + ) + (i64.store align=4 + (local.get $$arrayidx) + (i64.load align=4 + (local.get $$3) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$3) + (i32.const 56) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29000) + (local.get $$inc) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_TraceLog (; 364 ;) (param $$logType i32) (param $$text i32) (param $$varargs i32) + (local $$args i32) + (local $$buffer i32) + (local $$cmp i32) + (local $$cmp32 i32) + (local $$endptr i32) + (local $$strlen i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$args + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$buffer + (local.get $sp_a) + ) + (local.set $$cmp + (i32.gt_s + (i32.const 3) + (local.get $$logType) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i32.store + (local.get $$args) + (local.get $$varargs) + ) + (i64.store + (local.get $$buffer) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 8) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 16) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 24) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 32) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 40) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 48) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 56) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 64) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 72) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 80) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 88) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 96) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 104) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 112) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$buffer) + (i32.const 120) + ) + (i64.const 0) + ) + (block $switch + (block $switch-default + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-default + (i32.sub + (local.get $$logType) + (i32.const 1) + ) + ) + ) + (block + (i64.store + (local.get $$buffer) + (i64.const 9071268410249812) + ) + (br $switch) + ) + ) + (block + (i64.store + (local.get $$buffer) + (i64.const 9071277302236484) + ) + (br $switch) + ) + ) + (block + (i32.store align=1 + (local.get $$buffer) + (i32.load align=1 + (i32.const 8833) + ) + ) + (i32.store16 align=1 + (i32.add + (local.get $$buffer) + (i32.const 4) + ) + (i32.load16_s align=1 + (i32.add + (i32.const 8833) + (i32.const 4) + ) + ) + ) + (i32.store8 + (i32.add + (local.get $$buffer) + (i32.const 6) + ) + (i32.load8_s + (i32.add + (i32.const 8833) + (i32.const 6) + ) + ) + ) + (br $switch) + ) + ) + (block + (i64.store align=1 + (local.get $$buffer) + (i64.load align=1 + (i32.const 8840) + ) + ) + (i32.store16 align=1 + (i32.add + (local.get $$buffer) + (i32.const 8) + ) + (i32.load16_s align=1 + (i32.add + (i32.const 8840) + (i32.const 8) + ) + ) + ) + (br $switch) + ) + ) + (block + (i64.store + (local.get $$buffer) + (i64.const 9071324447265349) + ) + (br $switch) + ) + ) + (block + (i64.store + (local.get $$buffer) + (i64.const 9071298442707270) + ) + (br $switch) + ) + ) + ) + (drop + (call $_strcat + (local.get $$buffer) + (local.get $$text) + ) + ) + (local.set $$strlen + (call $_strlen + (local.get $$buffer) + ) + ) + (local.set $$endptr + (i32.add + (local.get $$buffer) + (local.get $$strlen) + ) + ) + (i32.store16 align=1 + (local.get $$endptr) + (i32.const 10) + ) + (drop + (call $_vprintf + (local.get $$buffer) + (local.get $$args) + ) + ) + (local.set $$cmp32 + (i32.gt_s + (i32.const 5) + (local.get $$logType) + ) + ) + (if + (i32.eqz + (local.get $$cmp32) + ) + (call $_exit + (i32.const 1) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlPopMatrix (; 365 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$arrayidx i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp2 i32) + (local $$or$cond i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29000) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$sub + (i32.add + (local.get $$0) + (i32.const -1) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 19712) + (i32.shl + (local.get $$sub) + (i32.const 6) + ) + ) + ) + (local.set $$1 + (i32.load + (i32.const 28996) + ) + ) + (drop + (call $_memmove + (local.get $$1) + (local.get $$arrayidx) + (i32.const 64) + ) + ) + (i32.store + (i32.const 29000) + (local.get $$sub) + ) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29000) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (local.set $$3 + (i32.load + (i32.const 8000) + ) + ) + (local.set $$cmp2 + (i32.eq + (local.get $$3) + (i32.const 5888) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp1) + (local.get $$cmp2) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (return) + ) + (i32.store + (i32.const 28996) + (i32.const 28868) + ) + (i32.store8 + (i32.const 29916) + (i32.const 0) + ) + (return) + ) + (func $_rlLoadIdentity (; 366 ;) + (local $$0 i32) + (local $$tmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 28996) + ) + ) + (call $_MatrixIdentity + (local.get $$tmp) + ) + (i64.store align=4 + (local.get $$0) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlTranslatef (; 367 ;) (param $$x f32) (param $$y f32) (param $$z f32) + (local $$$byval_copy i32) + (local $$0 i32) + (local $$matTranslation i32) + (local $$matTranslation$byval_copy i32) + (local $$tmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $$$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 192) + ) + ) + (local.set $$matTranslation$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$matTranslation + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (call $_MatrixTranslate + (local.get $$matTranslation) + (local.get $$x) + (local.get $$y) + (local.get $$z) + ) + (local.set $$0 + (i32.load + (i32.const 28996) + ) + ) + (i64.store align=4 + (local.get $$matTranslation$byval_copy) + (i64.load align=4 + (local.get $$matTranslation) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matTranslation$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matTranslation) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$$byval_copy) + (i64.load align=4 + (local.get $$0) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$tmp) + (local.get $$matTranslation$byval_copy) + (local.get $$$byval_copy) + ) + (i64.store align=4 + (local.get $$0) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlRotatef (; 368 ;) (param $$angleDeg f32) (param $$x f32) (param $$y f32) (param $$z f32) + (local $$$byval_copy i32) + (local $$0 i32) + (local $$agg$tmp i32) + (local $$agg$tmp$byval_copy i32) + (local $$axis i32) + (local $$axis$byval_copy i32) + (local $$matRotation i32) + (local $$matRotation$byval_copy i32) + (local $$mul f32) + (local $$tmp4 i32) + (local $$y2 i32) + (local $$z3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 304) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 304) + ) + ) + (local.set $$$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 240) + ) + ) + (local.set $$matRotation$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 176) + ) + ) + (local.set $$agg$tmp$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 164) + ) + ) + (local.set $$axis$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 152) + ) + ) + (local.set $$matRotation + (i32.add + (local.get $sp_a) + (i32.const 88) + ) + ) + (local.set $$axis + (i32.add + (local.get $sp_a) + (i32.const 76) + ) + ) + (local.set $$agg$tmp + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp4 + (local.get $sp_a) + ) + (call $_MatrixIdentity + (local.get $$matRotation) + ) + (f32.store + (local.get $$axis) + (local.get $$x) + ) + (local.set $$y2 + (i32.add + (local.get $$axis) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y2) + (local.get $$y) + ) + (local.set $$z3 + (i32.add + (local.get $$axis) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z3) + (local.get $$z) + ) + (i64.store align=4 + (local.get $$axis$byval_copy) + (i64.load align=4 + (local.get $$axis) + ) + ) + (i32.store + (i32.add + (local.get $$axis$byval_copy) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $$axis) + (i32.const 8) + ) + ) + ) + (call $_Vector3Normalize + (local.get $$agg$tmp) + (local.get $$axis$byval_copy) + ) + (local.set $$mul + (f32.mul + (local.get $$angleDeg) + (f32.const 0.01745329238474369) + ) + ) + (i64.store align=4 + (local.get $$agg$tmp$byval_copy) + (i64.load align=4 + (local.get $$agg$tmp) + ) + ) + (i32.store + (i32.add + (local.get $$agg$tmp$byval_copy) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $$agg$tmp) + (i32.const 8) + ) + ) + ) + (call $_MatrixRotate + (local.get $$matRotation) + (local.get $$agg$tmp$byval_copy) + (local.get $$mul) + ) + (local.set $$0 + (i32.load + (i32.const 28996) + ) + ) + (i64.store align=4 + (local.get $$matRotation$byval_copy) + (i64.load align=4 + (local.get $$matRotation) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matRotation$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matRotation) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$$byval_copy) + (i64.load align=4 + (local.get $$0) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$tmp4) + (local.get $$matRotation$byval_copy) + (local.get $$$byval_copy) + ) + (i64.store align=4 + (local.get $$0) + (i64.load align=4 + (local.get $$tmp4) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp4) + (i32.const 56) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlMultMatrixf (; 369 ;) (param $$matf i32) + (local $$$byval_copy i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$arrayidx1 i32) + (local $$arrayidx10 i32) + (local $$arrayidx11 i32) + (local $$arrayidx12 i32) + (local $$arrayidx13 i32) + (local $$arrayidx14 i32) + (local $$arrayidx15 i32) + (local $$arrayidx2 i32) + (local $$arrayidx3 i32) + (local $$arrayidx4 i32) + (local $$arrayidx5 i32) + (local $$arrayidx6 i32) + (local $$arrayidx7 i32) + (local $$arrayidx8 i32) + (local $$arrayidx9 i32) + (local $$m1 i32) + (local $$m10 i32) + (local $$m11 i32) + (local $$m12 i32) + (local $$m13 i32) + (local $$m14 i32) + (local $$m15 i32) + (local $$m2 i32) + (local $$m3 i32) + (local $$m4 i32) + (local $$m5 i32) + (local $$m6 i32) + (local $$m7 i32) + (local $$m8 i32) + (local $$m9 i32) + (local $$mat i32) + (local $$mat$byval_copy i32) + (local $$tmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $$mat$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 192) + ) + ) + (local.set $$$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$mat + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$matf) + ) + ) + (i32.store + (local.get $$mat) + (local.get $$0) + ) + (local.set $$m4 + (i32.add + (local.get $$mat) + (i32.const 4) + ) + ) + (local.set $$arrayidx1 + (i32.add + (local.get $$matf) + (i32.const 16) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx1) + ) + ) + (i32.store + (local.get $$m4) + (local.get $$1) + ) + (local.set $$m8 + (i32.add + (local.get $$mat) + (i32.const 8) + ) + ) + (local.set $$arrayidx2 + (i32.add + (local.get $$matf) + (i32.const 32) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx2) + ) + ) + (i32.store + (local.get $$m8) + (local.get $$2) + ) + (local.set $$m12 + (i32.add + (local.get $$mat) + (i32.const 12) + ) + ) + (local.set $$arrayidx3 + (i32.add + (local.get $$matf) + (i32.const 48) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx3) + ) + ) + (i32.store + (local.get $$m12) + (local.get $$3) + ) + (local.set $$m1 + (i32.add + (local.get $$mat) + (i32.const 16) + ) + ) + (local.set $$arrayidx4 + (i32.add + (local.get $$matf) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx4) + ) + ) + (i32.store + (local.get $$m1) + (local.get $$4) + ) + (local.set $$m5 + (i32.add + (local.get $$mat) + (i32.const 20) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$matf) + (i32.const 20) + ) + ) + (local.set $$5 + (i32.load + (local.get $$arrayidx5) + ) + ) + (i32.store + (local.get $$m5) + (local.get $$5) + ) + (local.set $$m9 + (i32.add + (local.get $$mat) + (i32.const 24) + ) + ) + (local.set $$arrayidx6 + (i32.add + (local.get $$matf) + (i32.const 36) + ) + ) + (local.set $$6 + (i32.load + (local.get $$arrayidx6) + ) + ) + (i32.store + (local.get $$m9) + (local.get $$6) + ) + (local.set $$m13 + (i32.add + (local.get $$mat) + (i32.const 28) + ) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$matf) + (i32.const 52) + ) + ) + (local.set $$7 + (i32.load + (local.get $$arrayidx7) + ) + ) + (i32.store + (local.get $$m13) + (local.get $$7) + ) + (local.set $$m2 + (i32.add + (local.get $$mat) + (i32.const 32) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$matf) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.load + (local.get $$arrayidx8) + ) + ) + (i32.store + (local.get $$m2) + (local.get $$8) + ) + (local.set $$m6 + (i32.add + (local.get $$mat) + (i32.const 36) + ) + ) + (local.set $$arrayidx9 + (i32.add + (local.get $$matf) + (i32.const 24) + ) + ) + (local.set $$9 + (i32.load + (local.get $$arrayidx9) + ) + ) + (i32.store + (local.get $$m6) + (local.get $$9) + ) + (local.set $$m10 + (i32.add + (local.get $$mat) + (i32.const 40) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$matf) + (i32.const 40) + ) + ) + (local.set $$10 + (i32.load + (local.get $$arrayidx10) + ) + ) + (i32.store + (local.get $$m10) + (local.get $$10) + ) + (local.set $$m14 + (i32.add + (local.get $$mat) + (i32.const 44) + ) + ) + (local.set $$arrayidx11 + (i32.add + (local.get $$matf) + (i32.const 56) + ) + ) + (local.set $$11 + (i32.load + (local.get $$arrayidx11) + ) + ) + (i32.store + (local.get $$m14) + (local.get $$11) + ) + (local.set $$m3 + (i32.add + (local.get $$mat) + (i32.const 48) + ) + ) + (local.set $$arrayidx12 + (i32.add + (local.get $$matf) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$arrayidx12) + ) + ) + (i32.store + (local.get $$m3) + (local.get $$12) + ) + (local.set $$m7 + (i32.add + (local.get $$mat) + (i32.const 52) + ) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$matf) + (i32.const 28) + ) + ) + (local.set $$13 + (i32.load + (local.get $$arrayidx13) + ) + ) + (i32.store + (local.get $$m7) + (local.get $$13) + ) + (local.set $$m11 + (i32.add + (local.get $$mat) + (i32.const 56) + ) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$matf) + (i32.const 44) + ) + ) + (local.set $$14 + (i32.load + (local.get $$arrayidx14) + ) + ) + (i32.store + (local.get $$m11) + (local.get $$14) + ) + (local.set $$m15 + (i32.add + (local.get $$mat) + (i32.const 60) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$matf) + (i32.const 60) + ) + ) + (local.set $$15 + (i32.load + (local.get $$arrayidx15) + ) + ) + (i32.store + (local.get $$m15) + (local.get $$15) + ) + (local.set $$16 + (i32.load + (i32.const 28996) + ) + ) + (i64.store align=4 + (local.get $$$byval_copy) + (i64.load align=4 + (local.get $$16) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$16) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$mat$byval_copy) + (i64.load align=4 + (local.get $$mat) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$mat$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$mat) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$tmp) + (local.get $$$byval_copy) + (local.get $$mat$byval_copy) + ) + (i64.store align=4 + (local.get $$16) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$16) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlOrtho (; 370 ;) (param $$left f64) (param $$right f64) (param $$bottom f64) (param $$top f64) (param $$znear f64) (param $$zfar f64) + (local $$$byval_copy i32) + (local $$0 i32) + (local $$matOrtho i32) + (local $$matOrtho$byval_copy i32) + (local $$tmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $$matOrtho$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 192) + ) + ) + (local.set $$$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$matOrtho + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (call $_MatrixOrtho + (local.get $$matOrtho) + (local.get $$left) + (local.get $$right) + (local.get $$bottom) + (local.get $$top) + (local.get $$znear) + (local.get $$zfar) + ) + (local.set $$0 + (i32.load + (i32.const 28996) + ) + ) + (i64.store align=4 + (local.get $$$byval_copy) + (i64.load align=4 + (local.get $$0) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$matOrtho$byval_copy) + (i64.load align=4 + (local.get $$matOrtho) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matOrtho$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matOrtho) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$tmp) + (local.get $$$byval_copy) + (local.get $$matOrtho$byval_copy) + ) + (i64.store align=4 + (local.get $$0) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$0) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlViewport (; 371 ;) (param $$x i32) (param $$y i32) (param $$width i32) (param $$height i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_glViewport + (local.get $$x) + (local.get $$y) + (local.get $$width) + (local.get $$height) + ) + (return) + ) + (func $_rlBegin (; 372 ;) (param $$mode i32) + (local $$$pr i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add62 i32) + (local $$add67 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp14 i32) + (local $$cmp31 i32) + (local $$cmp4 i32) + (local $$cmp70 i32) + (local $$cond i32) + (local $$cond40 i32) + (local $$cond40$sink i32) + (local $$inc i32) + (local $$mode1 i32) + (local $$mode75 i32) + (local $$rem2 i32) + (local $$rem373 i32) + (local $$sub i32) + (local $$sub38 i32) + (local $$sub73 i32) + (local $$textureId i32) + (local $$vertexAlignment43 i32) + (local $$vertexAlignment51 i32) + (local $$vertexCount i32) + (local $$vertexCount78 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$sub + (i32.add + (local.get $$1) + (i32.const -1) + ) + ) + (local.set $$mode1 + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$mode1) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$2) + (local.get $$mode) + ) + ) + (if + (local.get $$cmp) + (return) + ) + (local.set $$vertexCount + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$vertexCount) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$cmp4) + (block + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (local.get $$2) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp14 + (i32.lt_s + (local.get $$3) + (i32.const 4) + ) + ) + (local.set $$rem2 + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp14) + (local.get $$3) + (local.get $$rem2) + ) + ) + (local.set $$cond40$sink + (local.get $$cond) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp31 + (i32.lt_s + (local.get $$3) + (i32.const 4) + ) + ) + (local.set $$rem373 + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$sub38 + (i32.sub + (i32.const 4) + (local.get $$rem373) + ) + ) + (local.set $$cond40 + (if (result i32) + (local.get $$cmp31) + (i32.const 1) + (local.get $$sub38) + ) + ) + (local.set $$cond40$sink + (local.get $$cond40) + ) + (br $switch) + ) + ) + (local.set $$cond40$sink + (i32.const 0) + ) + ) + (local.set $$vertexAlignment43 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vertexAlignment43) + (local.get $$cond40$sink) + ) + (local.set $$call + (call $_rlCheckBufferLimit + (local.get $$cond40$sink) + ) + ) + (if + (local.get $$call) + (block + (call $_rlglDraw) + (local.set $label + (i32.const 9) + ) + (br $do-once) + ) + (block + (local.set $$vertexAlignment51 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$4 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$add + (i32.add + (local.get $$4) + (local.get $$cond40$sink) + ) + ) + (i32.store + (i32.const 21760) + (local.get $$add) + ) + (local.set $$5 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$add62 + (i32.add + (local.get $$5) + (local.get $$cond40$sink) + ) + ) + (i32.store + (i32.const 21768) + (local.get $$add62) + ) + (local.set $$6 + (i32.load + (local.get $$vertexAlignment51) + ) + ) + (local.set $$7 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$add67 + (i32.add + (local.get $$7) + (local.get $$6) + ) + ) + (i32.store + (i32.const 21764) + (local.get $$add67) + ) + (local.set $$inc + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29072) + (local.get $$inc) + ) + (local.set $$8 + (local.get $$inc) + ) + (br $do-once) + ) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 9) + ) + (block + (local.set $$$pr + (i32.load + (i32.const 29072) + ) + ) + (local.set $$8 + (local.get $$$pr) + ) + ) + ) + (local.set $$cmp70 + (i32.gt_s + (local.get $$8) + (i32.const 255) + ) + ) + (if + (local.get $$cmp70) + (call $_rlglDraw) + ) + (local.set $$9 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$10 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$sub73 + (i32.add + (local.get $$10) + (i32.const -1) + ) + ) + (local.set $$mode75 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$sub73) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$mode75) + (local.get $$mode) + ) + (local.set $$vertexCount78 + (i32.add + (i32.add + (local.get $$9) + (i32.shl + (local.get $$sub73) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vertexCount78) + (i32.const 0) + ) + (local.set $$11 + (i32.load + (i32.const 29076) + ) + ) + (local.set $$textureId + (i32.add + (i32.add + (local.get $$9) + (i32.shl + (local.get $$sub73) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$textureId) + (local.get $$11) + ) + (return) + ) + (func $_rlCheckBufferLimit (; 373 ;) (param $$vCount i32) (result i32) + (local $$0 i32) + (local $$add i32) + (local $$cmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$add + (i32.add + (local.get $$0) + (local.get $$vCount) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$add) + (i32.const 8191) + ) + ) + (return + (local.get $$cmp) + ) + ) + (func $_rlglDraw (; 374 ;) + (local $$0 i32) + (local $$cmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (call $_UpdateBuffersDefault) + (call $_DrawBuffersDefault) + (return) + ) + (func $_UpdateBuffersDefault (; 375 ;) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$cmp i32) + (local $$mul i32) + (local $$mul13 i32) + (local $$mul20 i32) + (local $$tobool i32) + (local $$tobool22 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (local.set $$1 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$2 + (i32.load + (i32.const 29080) + ) + ) + (local.set $$3 + (i32.load + (i32.const 21788) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (local.get $$3) + (i32.add + (i32.and + (local.get $$2) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + ) + (local.set $$4 + (i32.load + (i32.const 21792) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$4) + ) + (local.set $$5 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$5) + (i32.const 12) + ) + ) + (local.set $$6 + (i32.load + (i32.const 21772) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (local.get $$mul) + (local.get $$6) + ) + (local.set $$7 + (i32.load + (i32.const 21796) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$7) + ) + (local.set $$8 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$mul13 + (i32.shl + (local.get $$8) + (i32.const 3) + ) + ) + (local.set $$9 + (i32.load + (i32.const 21776) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (local.get $$mul13) + (local.get $$9) + ) + (local.set $$10 + (i32.load + (i32.const 21800) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$10) + ) + (local.set $$11 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$mul20 + (i32.shl + (local.get $$11) + (i32.const 2) + ) + ) + (local.set $$12 + (i32.load + (i32.const 21780) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (local.get $$mul20) + (local.get $$12) + ) + (local.set $$13 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool22 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$13) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool22) + (return) + ) + (local.set $$14 + (i32.load + (i32.const 29080) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $$14) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + (return) + ) + (func $_DrawBuffersDefault (; 376 ;) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add54 i32) + (local $$arrayidx19 i32) + (local $$arrayidx20 i32) + (local $$arrayidx24 i32) + (local $$arrayidx25 i32) + (local $$arrayidx6 i32) + (local $$arrayidx7 i32) + (local $$arrayidx8 i32) + (local $$cmp i32) + (local $$cmp31 i32) + (local $$cmp3126 i32) + (local $$cmp4 i32) + (local $$div i32) + (local $$div48 i32) + (local $$exitcond i32) + (local $$eye$030 i32) + (local $$i$028 i32) + (local $$i69$025 i32) + (local $$inc i32) + (local $$inc63 i32) + (local $$inc81 i32) + (local $$matMVP i32) + (local $$matMVP$byval_copy i32) + (local $$matModelView i32) + (local $$matModelView$byval_copy i32) + (local $$matProjection i32) + (local $$matProjection$byval_copy i32) + (local $$mode i32) + (local $$mode75 i32) + (local $$modelview$byval_copy i32) + (local $$mul i32) + (local $$mul49 i32) + (local $$projection$byval_copy i32) + (local $$spec$store$select i32) + (local $$textureId i32) + (local $$textureId79 i32) + (local $$tmp i32) + (local $$tobool i32) + (local $$tobool55 i32) + (local $$tobool59 i32) + (local $$tobool9 i32) + (local $$vertexAlignment i32) + (local $$vertexCount i32) + (local $$vertexCount46 i32) + (local $$vertexCount52 i32) + (local $$vertexCount77 i32) + (local $$vertexOffset$027 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 576) + ) + ) + (local.set $$matMVP$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 512) + ) + ) + (local.set $$projection$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 448) + ) + ) + (local.set $$modelview$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 384) + ) + ) + (local.set $$matModelView$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 320) + ) + ) + (local.set $$matProjection$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 256) + ) + ) + (local.set $$matProjection + (i32.add + (local.get $sp_a) + (i32.const 192) + ) + ) + (local.set $$matModelView + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$matMVP + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (i64.store align=4 + (local.get $$matProjection) + (i64.load align=4 + (i32.const 28932) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$matModelView) + (i64.load align=4 + (i32.const 28868) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 56) + ) + ) + ) + (local.set $$tobool + (i32.ne + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$tobool) + (i32.const 2) + (i32.const 1) + ) + ) + (local.set $$eye$030 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (if + (local.get $$tobool) + (block + (i64.store align=4 + (local.get $$matProjection$byval_copy) + (i64.load align=4 + (local.get $$matProjection) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matProjection$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$matModelView$byval_copy) + (i64.load align=4 + (local.get $$matModelView) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 56) + ) + ) + ) + (call $_SetStereoView + (local.get $$eye$030) + (local.get $$matProjection$byval_copy) + (local.get $$matModelView$byval_copy) + ) + ) + ) + (local.set $$1 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$2 + (i32.load + (i32.const 28480) + ) + ) + (call $_glUseProgram + (local.get $$2) + ) + (i64.store align=4 + (local.get $$modelview$byval_copy) + (i64.load align=4 + (i32.const 28868) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$modelview$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 28868) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$projection$byval_copy) + (i64.load align=4 + (i32.const 28932) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$projection$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 28932) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$matMVP) + (local.get $$modelview$byval_copy) + (local.get $$projection$byval_copy) + ) + (local.set $$3 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx6 + (i32.add + (local.get $$3) + (i32.const 24) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx6) + ) + ) + (i64.store align=4 + (local.get $$matMVP$byval_copy) + (i64.load align=4 + (local.get $$matMVP) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matMVP$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matMVP) + (i32.const 56) + ) + ) + ) + (call $_MatrixToFloatV + (local.get $$tmp) + (local.get $$matMVP$byval_copy) + ) + (call $_glUniformMatrix4fv + (local.get $$4) + (i32.const 1) + (i32.const 0) + (local.get $$tmp) + ) + (local.set $$5 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$5) + (i32.const 44) + ) + ) + (local.set $$6 + (i32.load + (local.get $$arrayidx7) + ) + ) + (call $_glUniform4f + (local.get $$6) + (f64.const 1) + (f64.const 1) + (f64.const 1) + (f64.const 1) + ) + (local.set $$7 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$7) + (i32.const 56) + ) + ) + (local.set $$8 + (i32.load + (local.get $$arrayidx8) + ) + ) + (call $_glUniform1i + (local.get $$8) + (i32.const 0) + ) + (local.set $$9 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool9 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool9) + (block + (local.set $$12 + (i32.load + (i32.const 21792) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$12) + ) + (local.set $$13 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$14 + (i32.load + (local.get $$13) + ) + ) + (call $_glVertexAttribPointer + (local.get $$14) + (i32.const 3) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (local.set $$15 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$16 + (i32.load + (local.get $$15) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$16) + ) + (local.set $$17 + (i32.load + (i32.const 21796) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$17) + ) + (local.set $$18 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx19 + (i32.add + (local.get $$18) + (i32.const 4) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx19) + ) + ) + (call $_glVertexAttribPointer + (local.get $$19) + (i32.const 2) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (local.set $$20 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx20 + (i32.add + (local.get $$20) + (i32.const 4) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx20) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$21) + ) + (local.set $$22 + (i32.load + (i32.const 21800) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$22) + ) + (local.set $$23 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$23) + (i32.const 20) + ) + ) + (local.set $$24 + (i32.load + (local.get $$arrayidx24) + ) + ) + (call $_glVertexAttribPointer + (local.get $$24) + (i32.const 4) + (i32.const 5121) + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) + (local.set $$25 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx25 + (i32.add + (local.get $$25) + (i32.const 20) + ) + ) + (local.set $$26 + (i32.load + (local.get $$arrayidx25) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$26) + ) + (local.set $$27 + (i32.load + (i32.const 21804) + ) + ) + (call $_glBindBuffer + (i32.const 34963) + (local.get $$27) + ) + ) + (block + (local.set $$10 + (i32.load + (i32.const 29080) + ) + ) + (local.set $$11 + (i32.load + (i32.const 21788) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (local.get $$11) + (i32.add + (i32.and + (local.get $$10) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + ) + (call $_glActiveTexture + (i32.const 33984) + ) + (local.set $$28 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$cmp3126 + (i32.gt_s + (local.get $$28) + (i32.const 0) + ) + ) + (block $label$break$L12 + (if + (local.get $$cmp3126) + (block + (local.set $$i$028 + (i32.const 0) + ) + (local.set $$vertexOffset$027 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$30 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$textureId + (i32.add + (i32.add + (local.get $$30) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$31 + (i32.load + (local.get $$textureId) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (local.get $$31) + ) + (local.set $$32 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$mode + (i32.add + (local.get $$32) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + ) + (local.set $$33 + (i32.load + (local.get $$mode) + ) + ) + (block $switch + (block $switch-default + (block $switch-case2 + (block $switch-case + (br_table $switch-case2 $switch-default $switch-default $switch-case $switch-default + (i32.sub + (local.get $$33) + (i32.const 1) + ) + ) + ) + ) + (block + (local.set $$vertexCount + (i32.add + (i32.add + (local.get $$32) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$34 + (i32.load + (local.get $$vertexCount) + ) + ) + (call $_glDrawArrays + (local.get $$33) + (local.get $$vertexOffset$027) + (local.get $$34) + ) + (br $switch) + ) + ) + (block + (local.set $$vertexCount46 + (i32.add + (i32.add + (local.get $$32) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$35 + (i32.load + (local.get $$vertexCount46) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$35) + (i32.const 4) + ) + (i32.const -1) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$div) + (i32.const 6) + ) + ) + (local.set $$36 + (i32.shr_u + (local.get $$vertexOffset$027) + (i32.const 1) + ) + ) + (local.set $$div48 + (i32.and + (local.get $$36) + (i32.const 1073741823) + ) + ) + (local.set $$mul49 + (i32.mul + (local.get $$div48) + (i32.const 6) + ) + ) + (local.set $$37 + (local.get $$mul49) + ) + (call $_glDrawElements + (i32.const 4) + (local.get $$mul) + (i32.const 5123) + (local.get $$37) + ) + ) + ) + (local.set $$38 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$vertexCount52 + (i32.add + (i32.add + (local.get $$38) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$39 + (i32.load + (local.get $$vertexCount52) + ) + ) + (local.set $$vertexAlignment + (i32.add + (i32.add + (local.get $$38) + (i32.shl + (local.get $$i$028) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$40 + (i32.load + (local.get $$vertexAlignment) + ) + ) + (local.set $$add + (i32.add + (local.get $$39) + (local.get $$vertexOffset$027) + ) + ) + (local.set $$add54 + (i32.add + (local.get $$add) + (local.get $$40) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$028) + (i32.const 1) + ) + ) + (local.set $$41 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$cmp31 + (i32.lt_s + (local.get $$inc) + (local.get $$41) + ) + ) + (if + (local.get $$cmp31) + (block + (local.set $$i$028 + (local.get $$inc) + ) + (local.set $$vertexOffset$027 + (local.get $$add54) + ) + ) + (br $label$break$L12) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (local.set $$29 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool55 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$29) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool55) + (block + (call $_glBindBuffer + (i32.const 34962) + (i32.const 0) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.const 0) + ) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + ) + ) + (local.set $$42 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool59 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$42) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool59) + ) + (block + (local.set $$43 + (i32.load + (i32.const 29080) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $$43) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + ) + (call $_glUseProgram + (i32.const 0) + ) + (local.set $$inc63 + (i32.add + (local.get $$eye$030) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$inc63) + (local.get $$spec$store$select) + ) + ) + (if + (local.get $$cmp) + (local.set $$eye$030 + (local.get $$inc63) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (i32.store + (i32.const 21760) + (i32.const 0) + ) + (i32.store + (i32.const 21764) + (i32.const 0) + ) + (i32.store + (i32.const 21768) + (i32.const 0) + ) + (f32.store + (i32.const 8004) + (f32.const -1) + ) + (i64.store align=4 + (i32.const 28932) + (i64.load align=4 + (local.get $$matProjection) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (i32.const 28868) + (i64.load align=4 + (local.get $$matModelView) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 56) + ) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$i69$025 + (i32.const 0) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$mode75 + (i32.add + (local.get $$0) + (i32.shl + (local.get $$i69$025) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$mode75) + (i32.const 7) + ) + (local.set $$vertexCount77 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$i69$025) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vertexCount77) + (i32.const 0) + ) + (local.set $$44 + (i32.load + (i32.const 29076) + ) + ) + (local.set $$textureId79 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$i69$025) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$textureId79) + (local.get $$44) + ) + (local.set $$inc81 + (i32.add + (local.get $$i69$025) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc81) + (i32.const 256) + ) + ) + (if + (local.get $$exitcond) + (br $while-out3) + (local.set $$i69$025 + (local.get $$inc81) + ) + ) + (br $while-in4) + ) + ) + (i32.store + (i32.const 29072) + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_SetStereoView (; 377 ;) (param $$eye i32) (param $$matProjection i32) (param $$matModelView i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$arrayidx$byval_copy i32) + (local $$arrayidx2 i32) + (local $$div i32) + (local $$div1 i32) + (local $$eyeModelView i32) + (local $$eyeModelView$byval_copy i32) + (local $$eyeProjection i32) + (local $$eyeProjection$byval_copy i32) + (local $$matModelView$byval_copy i32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 384) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 384) + ) + ) + (local.set $$eyeProjection$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 320) + ) + ) + (local.set $$eyeModelView$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 256) + ) + ) + (local.set $$arrayidx$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 192) + ) + ) + (local.set $$matModelView$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$eyeProjection + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$eyeModelView + (local.get $sp_a) + ) + (i64.store align=4 + (local.get $$eyeProjection) + (i64.load align=4 + (local.get $$matProjection) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matProjection) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$eyeModelView) + (i64.load align=4 + (local.get $$matModelView) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 56) + ) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29084) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$0) + (local.get $$eye) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$mul) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div1 + (i32.and + (i32.div_s + (local.get $$0) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29088) + ) + ) + (call $_rlViewport + (local.get $$div) + (i32.const 0) + (local.get $$div1) + (local.get $$1) + ) + (local.set $$arrayidx + (i32.add + (i32.const 28624) + (i32.shl + (local.get $$eye) + (i32.const 6) + ) + ) + ) + (i64.store align=4 + (local.get $$matModelView$byval_copy) + (i64.load align=4 + (local.get $$matModelView) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$matModelView$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$matModelView) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$arrayidx$byval_copy) + (i64.load align=4 + (local.get $$arrayidx) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx) + (i32.const 56) + ) + ) + ) + (call $_MatrixMultiply + (local.get $$eyeModelView) + (local.get $$matModelView$byval_copy) + (local.get $$arrayidx$byval_copy) + ) + (local.set $$arrayidx2 + (i32.add + (i32.const 28496) + (i32.shl + (local.get $$eye) + (i32.const 6) + ) + ) + ) + (i64.store align=4 + (local.get $$eyeProjection) + (i64.load align=4 + (local.get $$arrayidx2) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx2) + (i32.const 56) + ) + ) + ) + (i64.store align=4 + (local.get $$eyeModelView$byval_copy) + (i64.load align=4 + (local.get $$eyeModelView) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeModelView$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeModelView) + (i32.const 56) + ) + ) + ) + (call $_SetMatrixModelview + (local.get $$eyeModelView$byval_copy) + ) + (i64.store align=4 + (local.get $$eyeProjection$byval_copy) + (i64.load align=4 + (local.get $$eyeProjection) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$eyeProjection$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$eyeProjection) + (i32.const 56) + ) + ) + ) + (call $_SetMatrixProjection + (local.get $$eyeProjection$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_SetMatrixModelview (; 378 ;) (param $$view i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (i64.store align=4 + (i32.const 28868) + (i64.load align=4 + (local.get $$view) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$view) + (i32.const 56) + ) + ) + ) + (return) + ) + (func $_SetMatrixProjection (; 379 ;) (param $$proj i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (i64.store align=4 + (i32.const 28932) + (i64.load align=4 + (local.get $$proj) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$proj) + (i32.const 56) + ) + ) + ) + (return) + ) + (func $_rlEnd (; 380 ;) + (local $$$pr i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 f32) + (local $$23 i32) + (local $$24 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add43 i32) + (local $$add57 i32) + (local $$add87 i32) + (local $$add96 f32) + (local $$arrayidx11 i32) + (local $$arrayidx17 i32) + (local $$arrayidx24 i32) + (local $$arrayidx30 i32) + (local $$arrayidx37 i32) + (local $$arrayidx44 i32) + (local $$arrayidx51 i32) + (local $$arrayidx58 i32) + (local $$arrayidx81 i32) + (local $$arrayidx88 i32) + (local $$cmp i32) + (local $$cmp103 i32) + (local $$cmp1039 i32) + (local $$cmp613 i32) + (local $$cmp65 i32) + (local $$cmp7411 i32) + (local $$cmp99 i32) + (local $$dec i32) + (local $$exitcond i32) + (local $$exitcond15 i32) + (local $$i$014 i32) + (local $$i101$010 i32) + (local $$i72$012 i32) + (local $$inc i32) + (local $$inc61 i32) + (local $$inc91 i32) + (local $$inc93 i32) + (local $$mul i32) + (local $$mul22 i32) + (local $$mul35 i32) + (local $$mul49 i32) + (local $$mul80 i32) + (local $$mul86 i32) + (local $$sub i32) + (local $$sub10 i32) + (local $$sub23 i32) + (local $$sub36 i32) + (local $$sub50 i32) + (local $$sub71 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$1 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (local.get $$1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (local.set $$sub + (i32.sub + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$cmp613 + (i32.gt_s + (local.get $$sub) + (i32.const 0) + ) + ) + (if + (local.get $$cmp613) + (block + (local.set $$i$014 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$2 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$3 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$3) + (i32.const 2) + ) + ) + (local.set $$sub10 + (i32.add + (local.get $$mul) + (i32.const -4) + ) + ) + (local.set $$arrayidx11 + (i32.add + (local.get $$2) + (local.get $$sub10) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx11) + ) + ) + (local.set $$arrayidx17 + (i32.add + (local.get $$2) + (local.get $$mul) + ) + ) + (i32.store8 + (local.get $$arrayidx17) + (local.get $$4) + ) + (local.set $$5 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$6 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul22 + (i32.shl + (local.get $$6) + (i32.const 2) + ) + ) + (local.set $$sub23 + (i32.add + (local.get $$mul22) + (i32.const -3) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$5) + (local.get $$sub23) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx24) + ) + ) + (local.set $$add + (i32.or + (local.get $$mul22) + (i32.const 1) + ) + ) + (local.set $$arrayidx30 + (i32.add + (local.get $$5) + (local.get $$add) + ) + ) + (i32.store8 + (local.get $$arrayidx30) + (local.get $$7) + ) + (local.set $$8 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$9 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul35 + (i32.shl + (local.get $$9) + (i32.const 2) + ) + ) + (local.set $$sub36 + (i32.add + (local.get $$mul35) + (i32.const -2) + ) + ) + (local.set $$arrayidx37 + (i32.add + (local.get $$8) + (local.get $$sub36) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx37) + ) + ) + (local.set $$add43 + (i32.or + (local.get $$mul35) + (i32.const 2) + ) + ) + (local.set $$arrayidx44 + (i32.add + (local.get $$8) + (local.get $$add43) + ) + ) + (i32.store8 + (local.get $$arrayidx44) + (local.get $$10) + ) + (local.set $$11 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$12 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul49 + (i32.shl + (local.get $$12) + (i32.const 2) + ) + ) + (local.set $$sub50 + (i32.add + (local.get $$mul49) + (i32.const -1) + ) + ) + (local.set $$arrayidx51 + (i32.add + (local.get $$11) + (local.get $$sub50) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx51) + ) + ) + (local.set $$add57 + (i32.or + (local.get $$mul49) + (i32.const 3) + ) + ) + (local.set $$arrayidx58 + (i32.add + (local.get $$11) + (local.get $$add57) + ) + ) + (i32.store8 + (local.get $$arrayidx58) + (local.get $$13) + ) + (local.set $$14 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$inc + (i32.add + (local.get $$14) + (i32.const 1) + ) + ) + (i32.store + (i32.const 21768) + (local.get $$inc) + ) + (local.set $$inc61 + (i32.add + (local.get $$i$014) + (i32.const 1) + ) + ) + (local.set $$exitcond15 + (i32.eq + (local.get $$inc61) + (local.get $$sub) + ) + ) + (if + (local.get $$exitcond15) + (br $while-out) + (local.set $$i$014 + (local.get $$inc61) + ) + ) + (br $while-in) + ) + ) + ) + ) + ) + ) + (local.set $$15 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$16 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$cmp65 + (i32.eq + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp65) + (local.set $$23 + (local.get $$15) + ) + (block + (local.set $$sub71 + (i32.sub + (local.get $$15) + (local.get $$16) + ) + ) + (local.set $$cmp7411 + (i32.gt_s + (local.get $$sub71) + (i32.const 0) + ) + ) + (if + (local.get $$cmp7411) + (block + (local.set $$i72$012 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$17 + (i32.load + (i32.const 21776) + ) + ) + (local.set $$18 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$mul80 + (i32.shl + (local.get $$18) + (i32.const 1) + ) + ) + (local.set $$arrayidx81 + (i32.add + (local.get $$17) + (i32.shl + (local.get $$mul80) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx81) + (f32.const 0) + ) + (local.set $$19 + (i32.load + (i32.const 21776) + ) + ) + (local.set $$20 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$mul86 + (i32.shl + (local.get $$20) + (i32.const 1) + ) + ) + (local.set $$add87 + (i32.or + (local.get $$mul86) + (i32.const 1) + ) + ) + (local.set $$arrayidx88 + (i32.add + (local.get $$19) + (i32.shl + (local.get $$add87) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx88) + (f32.const 0) + ) + (local.set $$21 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$inc91 + (i32.add + (local.get $$21) + (i32.const 1) + ) + ) + (i32.store + (i32.const 21764) + (local.get $$inc91) + ) + (local.set $$inc93 + (i32.add + (local.get $$i72$012) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc93) + (local.get $$sub71) + ) + ) + (if + (local.get $$exitcond) + (br $while-out0) + (local.set $$i72$012 + (local.get $$inc93) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$$pr + (i32.load + (i32.const 21760) + ) + ) + (local.set $$23 + (local.get $$$pr) + ) + ) + ) + (local.set $$22 + (f32.load + (i32.const 8004) + ) + ) + (local.set $$add96 + (f32.add + (local.get $$22) + (f32.const 4.999999873689376e-05) + ) + ) + (f32.store + (i32.const 8004) + (local.get $$add96) + ) + (local.set $$cmp99 + (i32.gt_s + (local.get $$23) + (i32.const 8187) + ) + ) + (if + (i32.eqz + (local.get $$cmp99) + ) + (return) + ) + (local.set $$24 + (i32.load + (i32.const 29000) + ) + ) + (local.set $$cmp1039 + (i32.gt_s + (local.get $$24) + (i32.const -1) + ) + ) + (if + (local.get $$cmp1039) + (block + (local.set $$i101$010 + (local.get $$24) + ) + (loop $while-in3 + (block $while-out2 + (call $_rlPopMatrix) + (local.set $$dec + (i32.add + (local.get $$i101$010) + (i32.const -1) + ) + ) + (local.set $$cmp103 + (i32.gt_s + (local.get $$i101$010) + (i32.const 0) + ) + ) + (if + (local.get $$cmp103) + (local.set $$i101$010 + (local.get $$dec) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + ) + ) + (call $_rlglDraw) + (return) + ) + (func $_rlVertex3f (; 381 ;) (param $$x f32) (param $$y f32) (param $$z f32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add23 i32) + (local $$arrayidx16 i32) + (local $$arrayidx24 i32) + (local $$arrayidx9 i32) + (local $$cmp i32) + (local $$inc i32) + (local $$inc28 i32) + (local $$mul i32) + (local $$mul15 i32) + (local $$mul22 i32) + (local $$sub i32) + (local $$tmp i32) + (local $$tobool i32) + (local $$transformMatrix$byval_copy i32) + (local $$vararg_buffer i32) + (local $$vec i32) + (local $$vec$byval_copy i32) + (local $$vertexCount i32) + (local $$y2 i32) + (local $$z3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $$transformMatrix$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vec$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 28) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$vec + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (f32.store + (local.get $$vec) + (local.get $$x) + ) + (local.set $$y2 + (i32.add + (local.get $$vec) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y2) + (local.get $$y) + ) + (local.set $$z3 + (i32.add + (local.get $$vec) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z3) + (local.get $$z) + ) + (local.set $$0 + (i32.load8_s + (i32.const 29916) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (i64.store align=4 + (local.get $$vec$byval_copy) + (i64.load align=4 + (local.get $$vec) + ) + ) + (i32.store + (i32.add + (local.get $$vec$byval_copy) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $$vec) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (local.get $$transformMatrix$byval_copy) + (i64.load align=4 + (i32.const 29004) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$transformMatrix$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 29004) + (i32.const 56) + ) + ) + ) + (call $_Vector3Transform + (local.get $$tmp) + (local.get $$vec$byval_copy) + (local.get $$transformMatrix$byval_copy) + ) + (i64.store align=4 + (local.get $$vec) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i32.store + (i32.add + (local.get $$vec) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + ) + ) + (local.set $$1 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$1) + (i32.const 8192) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$2 + (i32.load + (local.get $$vec) + ) + ) + (local.set $$3 + (i32.load + (i32.const 21772) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$1) + (i32.const 3) + ) + ) + (local.set $$arrayidx9 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx9) + (local.get $$2) + ) + (local.set $$4 + (i32.load + (local.get $$y2) + ) + ) + (local.set $$5 + (i32.load + (i32.const 21772) + ) + ) + (local.set $$6 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$mul15 + (i32.mul + (local.get $$6) + (i32.const 3) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul15) + (i32.const 1) + ) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx16) + (local.get $$4) + ) + (local.set $$7 + (i32.load + (local.get $$z3) + ) + ) + (local.set $$8 + (i32.load + (i32.const 21772) + ) + ) + (local.set $$9 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$mul22 + (i32.mul + (local.get $$9) + (i32.const 3) + ) + ) + (local.set $$add23 + (i32.add + (local.get $$mul22) + (i32.const 2) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$8) + (i32.shl + (local.get $$add23) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx24) + (local.get $$7) + ) + (local.set $$10 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$inc + (i32.add + (local.get $$10) + (i32.const 1) + ) + ) + (i32.store + (i32.const 21760) + (local.get $$inc) + ) + (local.set $$11 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$12 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$sub + (i32.add + (local.get $$12) + (i32.const -1) + ) + ) + (local.set $$vertexCount + (i32.add + (i32.add + (local.get $$11) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$13 + (i32.load + (local.get $$vertexCount) + ) + ) + (local.set $$inc28 + (i32.add + (local.get $$13) + (i32.const 1) + ) + ) + (i32.store + (local.get $$vertexCount) + (local.get $$inc28) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (block + (call $_TraceLog + (i32.const 5) + (i32.const 8850) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + (func $_rlVertex2f (; 382 ;) (param $$x f32) (param $$y f32) + (local $$0 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (i32.const 8004) + ) + ) + (call $_rlVertex3f + (local.get $$x) + (local.get $$y) + (local.get $$0) + ) + (return) + ) + (func $_rlTexCoord2f (; 383 ;) (param $$x f32) (param $$y f32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$add i32) + (local $$arrayidx2 i32) + (local $$arrayidx8 i32) + (local $$inc i32) + (local $$mul i32) + (local $$mul7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21776) + ) + ) + (local.set $$1 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$arrayidx2 + (i32.add + (local.get $$0) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx2) + (local.get $$x) + ) + (local.set $$2 + (i32.load + (i32.const 21776) + ) + ) + (local.set $$3 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$mul7 + (i32.shl + (local.get $$3) + (i32.const 1) + ) + ) + (local.set $$add + (i32.or + (local.get $$mul7) + (i32.const 1) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx8) + (local.get $$y) + ) + (local.set $$4 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$inc + (i32.add + (local.get $$4) + (i32.const 1) + ) + ) + (i32.store + (i32.const 21764) + (local.get $$inc) + ) + (return) + ) + (func $_rlNormal3f (; 384 ;) (param $$x f32) (param $$y f32) (param $$z f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return) + ) + (func $_rlColor4ub (; 385 ;) (param $$x i32) (param $$y i32) (param $$z i32) (param $$w i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$add i32) + (local $$add14 i32) + (local $$add21 i32) + (local $$arrayidx15 i32) + (local $$arrayidx2 i32) + (local $$arrayidx22 i32) + (local $$arrayidx8 i32) + (local $$inc i32) + (local $$mul i32) + (local $$mul13 i32) + (local $$mul20 i32) + (local $$mul7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$1 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$1) + (i32.const 2) + ) + ) + (local.set $$arrayidx2 + (i32.add + (local.get $$0) + (local.get $$mul) + ) + ) + (i32.store8 + (local.get $$arrayidx2) + (local.get $$x) + ) + (local.set $$2 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$3 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul7 + (i32.shl + (local.get $$3) + (i32.const 2) + ) + ) + (local.set $$add + (i32.or + (local.get $$mul7) + (i32.const 1) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$2) + (local.get $$add) + ) + ) + (i32.store8 + (local.get $$arrayidx8) + (local.get $$y) + ) + (local.set $$4 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$5 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul13 + (i32.shl + (local.get $$5) + (i32.const 2) + ) + ) + (local.set $$add14 + (i32.or + (local.get $$mul13) + (i32.const 2) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$4) + (local.get $$add14) + ) + ) + (i32.store8 + (local.get $$arrayidx15) + (local.get $$z) + ) + (local.set $$6 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$7 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$mul20 + (i32.shl + (local.get $$7) + (i32.const 2) + ) + ) + (local.set $$add21 + (i32.or + (local.get $$mul20) + (i32.const 3) + ) + ) + (local.set $$arrayidx22 + (i32.add + (local.get $$6) + (local.get $$add21) + ) + ) + (i32.store8 + (local.get $$arrayidx22) + (local.get $$w) + ) + (local.set $$8 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$inc + (i32.add + (local.get $$8) + (i32.const 1) + ) + ) + (i32.store + (i32.const 21768) + (local.get $$inc) + ) + (return) + ) + (func $_rlEnableTexture (; 386 ;) (param $$id i32) + (local $$$pr i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add60 i32) + (local $$add65 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp12 i32) + (local $$cmp29 i32) + (local $$cmp3 i32) + (local $$cmp68 i32) + (local $$cond i32) + (local $$cond38 i32) + (local $$cond38$sink i32) + (local $$inc i32) + (local $$mode i32) + (local $$rem2 i32) + (local $$rem353 i32) + (local $$sub i32) + (local $$sub36 i32) + (local $$sub71 i32) + (local $$textureId i32) + (local $$textureId73 i32) + (local $$vertexAlignment41 i32) + (local $$vertexAlignment49 i32) + (local $$vertexCount i32) + (local $$vertexCount76 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$sub + (i32.add + (local.get $$1) + (i32.const -1) + ) + ) + (local.set $$textureId + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$2 + (i32.load + (local.get $$textureId) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$2) + (local.get $$id) + ) + ) + (if + (local.get $$cmp) + (return) + ) + (local.set $$vertexCount + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$vertexCount) + ) + ) + (local.set $$cmp3 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$cmp3) + (block + (local.set $$mode + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + ) + (local.set $$4 + (i32.load + (local.get $$mode) + ) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (local.get $$4) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp12 + (i32.lt_s + (local.get $$3) + (i32.const 4) + ) + ) + (local.set $$rem2 + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp12) + (local.get $$3) + (local.get $$rem2) + ) + ) + (local.set $$cond38$sink + (local.get $$cond) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp29 + (i32.lt_s + (local.get $$3) + (i32.const 4) + ) + ) + (local.set $$rem353 + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$sub36 + (i32.sub + (i32.const 4) + (local.get $$rem353) + ) + ) + (local.set $$cond38 + (if (result i32) + (local.get $$cmp29) + (i32.const 1) + (local.get $$sub36) + ) + ) + (local.set $$cond38$sink + (local.get $$cond38) + ) + (br $switch) + ) + ) + (local.set $$cond38$sink + (i32.const 0) + ) + ) + (local.set $$vertexAlignment41 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vertexAlignment41) + (local.get $$cond38$sink) + ) + (local.set $$call + (call $_rlCheckBufferLimit + (local.get $$cond38$sink) + ) + ) + (if + (local.get $$call) + (block + (call $_rlglDraw) + (local.set $label + (i32.const 9) + ) + (br $do-once) + ) + (block + (local.set $$vertexAlignment49 + (i32.add + (i32.add + (local.get $$0) + (i32.shl + (local.get $$sub) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$5 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$add + (i32.add + (local.get $$5) + (local.get $$cond38$sink) + ) + ) + (i32.store + (i32.const 21760) + (local.get $$add) + ) + (local.set $$6 + (i32.load + (i32.const 21768) + ) + ) + (local.set $$add60 + (i32.add + (local.get $$6) + (local.get $$cond38$sink) + ) + ) + (i32.store + (i32.const 21768) + (local.get $$add60) + ) + (local.set $$7 + (i32.load + (local.get $$vertexAlignment49) + ) + ) + (local.set $$8 + (i32.load + (i32.const 21764) + ) + ) + (local.set $$add65 + (i32.add + (local.get $$8) + (local.get $$7) + ) + ) + (i32.store + (i32.const 21764) + (local.get $$add65) + ) + (local.set $$inc + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29072) + (local.get $$inc) + ) + (local.set $$9 + (local.get $$inc) + ) + (br $do-once) + ) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 9) + ) + (block + (local.set $$$pr + (i32.load + (i32.const 29072) + ) + ) + (local.set $$9 + (local.get $$$pr) + ) + ) + ) + (local.set $$cmp68 + (i32.gt_s + (local.get $$9) + (i32.const 255) + ) + ) + (if + (local.get $$cmp68) + (call $_rlglDraw) + ) + (local.set $$10 + (i32.load + (i32.const 29068) + ) + ) + (local.set $$11 + (i32.load + (i32.const 29072) + ) + ) + (local.set $$sub71 + (i32.add + (local.get $$11) + (i32.const -1) + ) + ) + (local.set $$textureId73 + (i32.add + (i32.add + (local.get $$10) + (i32.shl + (local.get $$sub71) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$textureId73) + (local.get $$id) + ) + (local.set $$vertexCount76 + (i32.add + (i32.add + (local.get $$10) + (i32.shl + (local.get $$sub71) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vertexCount76) + (i32.const 0) + ) + (return) + ) + (func $_rlDisableTexture (; 387 ;) + (local $$0 i32) + (local $$cmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 21760) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 8191) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (call $_rlglDraw) + (return) + ) + (func $_rlDeleteTextures (; 388 ;) (param $$id i32) + (local $$cmp i32) + (local $$id$addr i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$id$addr + (local.get $sp_a) + ) + (i32.store + (local.get $$id$addr) + (local.get $$id) + ) + (local.set $$cmp + (i32.eq + (local.get $$id) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_glDeleteTextures + (i32.const 1) + (local.get $$id$addr) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlClearColor (; 389 ;) (param $$r i32) (param $$g i32) (param $$b i32) (param $$a i32) + (local $$conv f32) + (local $$conv1 f32) + (local $$conv3 f32) + (local $$conv5 f32) + (local $$div f32) + (local $$div2 f32) + (local $$div4 f32) + (local $$div6 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv + (f32.convert_i32_s + (i32.and + (local.get $$r) + (i32.const 255) + ) + ) + ) + (local.set $$div + (f32.div + (local.get $$conv) + (f32.const 255) + ) + ) + (local.set $$conv1 + (f32.convert_i32_s + (i32.and + (local.get $$g) + (i32.const 255) + ) + ) + ) + (local.set $$div2 + (f32.div + (local.get $$conv1) + (f32.const 255) + ) + ) + (local.set $$conv3 + (f32.convert_i32_s + (i32.and + (local.get $$b) + (i32.const 255) + ) + ) + ) + (local.set $$div4 + (f32.div + (local.get $$conv3) + (f32.const 255) + ) + ) + (local.set $$conv5 + (f32.convert_i32_s + (i32.and + (local.get $$a) + (i32.const 255) + ) + ) + ) + (local.set $$div6 + (f32.div + (local.get $$conv5) + (f32.const 255) + ) + ) + (call $_glClearColor + (f64.promote_f32 + (local.get $$div) + ) + (f64.promote_f32 + (local.get $$div2) + ) + (f64.promote_f32 + (local.get $$div4) + ) + (f64.promote_f32 + (local.get $$div6) + ) + ) + (return) + ) + (func $_rlClearScreenBuffers (; 390 ;) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_glClear + (i32.const 16640) + ) + (return) + ) + (func $_rlglInit (; 391 ;) (param $$width i32) (param $$height i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 f32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i64) + (local $$16 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add13 i32) + (local $$arrayidx14 i32) + (local $$arrayidx15 i32) + (local $$arrayidx199 i32) + (local $$arrayidx23 i32) + (local $$arrayidx9 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call103 i32) + (local $$call109 i32) + (local $$call115 i32) + (local $$call121 i32) + (local $$call127 i32) + (local $$call133 i32) + (local $$call172 i32) + (local $$call179 i32) + (local $$call2 i32) + (local $$call24 i32) + (local $$call28 i32) + (local $$call29 i32) + (local $$call3 i32) + (local $$call30 i32) + (local $$call4 i32) + (local $$call42 i32) + (local $$call48 i32) + (local $$call5 i32) + (local $$call6 i32) + (local $$call7 i32) + (local $$call76 i32) + (local $$call81 i32) + (local $$call86 i32) + (local $$call92 i32) + (local $$call97 i32) + (local $$cmp10 i32) + (local $$cmp104 i32) + (local $$cmp110 i32) + (local $$cmp116 i32) + (local $$cmp122 i32) + (local $$cmp128 i32) + (local $$cmp134 i32) + (local $$cmp173 i32) + (local $$cmp1974 i32) + (local $$cmp25 i32) + (local $$cmp31 i32) + (local $$cmp33 i32) + (local $$cmp36 i32) + (local $$cmp43 i32) + (local $$cmp49 i32) + (local $$cmp76 i32) + (local $$cmp77 i32) + (local $$cmp82 i32) + (local $$cmp87 i32) + (local $$cmp93 i32) + (local $$cmp98 i32) + (local $$conv164 f64) + (local $$exitcond i32) + (local $$exitcond79 i32) + (local $$exitcond80 i32) + (local $$exitcond81 i32) + (local $$i$078 i32) + (local $$i17$075 i32) + (local $$i180$073 i32) + (local $$i193$072 i32) + (local $$inc i32) + (local $$inc139 i32) + (local $$inc16 i32) + (local $$inc191 i32) + (local $$inc202 i32) + (local $$mode i32) + (local $$numExt$077 i32) + (local $$numExt$1 i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$pixels i32) + (local $$textureId i32) + (local $$tmp i32) + (local $$tmp178 i32) + (local $$tmp200 i32) + (local $$tmp204 i32) + (local $$tmp205 i32) + (local $$tobool i32) + (local $$tobool143 i32) + (local $$tobool147 i32) + (local $$tobool150 i32) + (local $$tobool153 i32) + (local $$tobool156 i32) + (local $$tobool159 i32) + (local $$tobool162 i32) + (local $$tobool166 i32) + (local $$tobool169 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer10 i32) + (local $$vararg_buffer13 i32) + (local $$vararg_buffer16 i32) + (local $$vararg_buffer18 i32) + (local $$vararg_buffer20 i32) + (local $$vararg_buffer22 i32) + (local $$vararg_buffer24 i32) + (local $$vararg_buffer26 i32) + (local $$vararg_buffer28 i32) + (local $$vararg_buffer30 i32) + (local $$vararg_buffer32 i32) + (local $$vararg_buffer34 i32) + (local $$vararg_buffer37 i32) + (local $$vararg_buffer39 i32) + (local $$vararg_buffer4 i32) + (local $$vararg_buffer41 i32) + (local $$vararg_buffer44 i32) + (local $$vararg_buffer46 i32) + (local $$vararg_buffer7 i32) + (local $$vertexAlignment i32) + (local $$vertexCount i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 448) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 448) + ) + ) + (local.set $$vararg_buffer46 + (i32.add + (local.get $sp_a) + (i32.const 168) + ) + ) + (local.set $$vararg_buffer44 + (i32.add + (local.get $sp_a) + (i32.const 160) + ) + ) + (local.set $$vararg_buffer41 + (i32.add + (local.get $sp_a) + (i32.const 152) + ) + ) + (local.set $$vararg_buffer39 + (i32.add + (local.get $sp_a) + (i32.const 144) + ) + ) + (local.set $$vararg_buffer37 + (i32.add + (local.get $sp_a) + (i32.const 136) + ) + ) + (local.set $$vararg_buffer34 + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$vararg_buffer32 + (i32.add + (local.get $sp_a) + (i32.const 120) + ) + ) + (local.set $$vararg_buffer30 + (i32.add + (local.get $sp_a) + (i32.const 112) + ) + ) + (local.set $$vararg_buffer28 + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$vararg_buffer26 + (i32.add + (local.get $sp_a) + (i32.const 96) + ) + ) + (local.set $$vararg_buffer24 + (i32.add + (local.get $sp_a) + (i32.const 88) + ) + ) + (local.set $$vararg_buffer22 + (i32.add + (local.get $sp_a) + (i32.const 80) + ) + ) + (local.set $$vararg_buffer20 + (i32.add + (local.get $sp_a) + (i32.const 72) + ) + ) + (local.set $$vararg_buffer18 + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$vararg_buffer16 + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$vararg_buffer13 + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$vararg_buffer10 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vararg_buffer7 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$pixels + (i32.add + (local.get $sp_a) + (i32.const 432) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$tmp178 + (i32.add + (local.get $sp_a) + (i32.const 368) + ) + ) + (local.set $$tmp200 + (i32.add + (local.get $sp_a) + (i32.const 304) + ) + ) + (local.set $$tmp204 + (i32.add + (local.get $sp_a) + (i32.const 240) + ) + ) + (local.set $$tmp205 + (i32.add + (local.get $sp_a) + (i32.const 176) + ) + ) + (local.set $$call + (call $_glGetString + (i32.const 7936) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$call) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8878) + (local.get $$vararg_buffer) + ) + (local.set $$call1 + (call $_glGetString + (i32.const 7937) + ) + ) + (i32.store + (local.get $$vararg_buffer1) + (local.get $$call1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8896) + (local.get $$vararg_buffer1) + ) + (local.set $$call2 + (call $_glGetString + (i32.const 7938) + ) + ) + (i32.store + (local.get $$vararg_buffer4) + (local.get $$call2) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8914) + (local.get $$vararg_buffer4) + ) + (local.set $$call3 + (call $_glGetString + (i32.const 35724) + ) + ) + (i32.store + (local.get $$vararg_buffer7) + (local.get $$call3) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8932) + (local.get $$vararg_buffer7) + ) + (local.set $$call4 + (call $_malloc + (i32.const 2048) + ) + ) + (local.set $$call5 + (call $_glGetString + (i32.const 7939) + ) + ) + (local.set $$call6 + (call $_strlen + (local.get $$call5) + ) + ) + (local.set $$add + (i32.add + (local.get $$call6) + (i32.const 1) + ) + ) + (local.set $$call7 + (call $_calloc + (local.get $$add) + (i32.const 1) + ) + ) + (drop + (call $_strcpy + (local.get $$call7) + (local.get $$call5) + ) + ) + (i32.store + (local.get $$call4) + (local.get $$call7) + ) + (local.set $$cmp76 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (local.get $$cmp76) + (block + (local.set $$i$078 + (i32.const 0) + ) + (local.set $$numExt$077 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx9 + (i32.add + (local.get $$call7) + (local.get $$i$078) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx9) + ) + ) + (local.set $$cmp10 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 32) + ) + ) + (local.set $$inc + (i32.add + (local.get $$numExt$077) + (i32.const 1) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$arrayidx15 + (i32.add + (local.get $$call4) + (i32.shl + (local.get $$inc) + (i32.const 2) + ) + ) + ) + (local.set $$add13 + (i32.add + (local.get $$i$078) + (i32.const 1) + ) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$call7) + (local.get $$add13) + ) + ) + (i32.store8 + (local.get $$arrayidx9) + (i32.const 0) + ) + (i32.store + (local.get $$arrayidx15) + (local.get $$arrayidx14) + ) + (local.set $$numExt$1 + (local.get $$inc) + ) + ) + (local.set $$numExt$1 + (local.get $$numExt$077) + ) + ) + (local.set $$inc16 + (i32.add + (local.get $$i$078) + (i32.const 1) + ) + ) + (local.set $$exitcond81 + (i32.eq + (local.get $$inc16) + (local.get $$add) + ) + ) + (if + (local.get $$exitcond81) + (br $while-out) + (block + (local.set $$i$078 + (local.get $$inc16) + ) + (local.set $$numExt$077 + (local.get $$numExt$1) + ) + ) + ) + (br $while-in) + ) + ) + (i32.store + (local.get $$vararg_buffer13) + (local.get $$numExt$1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8950) + (local.get $$vararg_buffer13) + ) + (local.set $$cmp1974 + (i32.gt_s + (local.get $$numExt$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1974) + (block + (local.set $$i17$075 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx23 + (i32.add + (local.get $$call4) + (i32.shl + (local.get $$i17$075) + (i32.const 2) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx23) + ) + ) + (local.set $$call24 + (call $_strcmp + (local.get $$2) + (i32.const 8985) + ) + ) + (local.set $$cmp25 + (i32.eq + (local.get $$call24) + (i32.const 0) + ) + ) + (if + (local.get $$cmp25) + (block + (local.set $$call28 + (call $_eglGetProcAddress + (i32.const 19569) + ) + ) + (i32.store + (i32.const 29100) + (local.get $$call28) + ) + (local.set $$call29 + (call $_eglGetProcAddress + (i32.const 19524) + ) + ) + (i32.store + (i32.const 29080) + (local.get $$call29) + ) + (local.set $$call30 + (call $_eglGetProcAddress + (i32.const 19545) + ) + ) + (i32.store + (i32.const 29096) + (local.get $$call30) + ) + (local.set $$3 + (i32.load + (i32.const 29100) + ) + ) + (local.set $$cmp31 + (i32.ne + (local.get $$3) + (i32.const 0) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29080) + ) + ) + (local.set $$cmp33 + (i32.ne + (local.get $$4) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp31) + (local.get $$cmp33) + ) + ) + (local.set $$cmp36 + (i32.ne + (local.get $$call30) + (i32.const 0) + ) + ) + (local.set $$or$cond1 + (i32.and + (local.get $$cmp36) + (local.get $$or$cond) + ) + ) + (if + (local.get $$or$cond1) + (i32.store8 + (i32.const 29917) + (i32.const 1) + ) + ) + ) + ) + (local.set $$call42 + (call $_strcmp + (local.get $$2) + (i32.const 9012) + ) + ) + (local.set $$cmp43 + (i32.eq + (local.get $$call42) + (i32.const 0) + ) + ) + (if + (local.get $$cmp43) + (i32.store8 + (i32.const 29919) + (i32.const 1) + ) + ) + (local.set $$call48 + (call $_strcmp + (local.get $$2) + (i32.const 9032) + ) + ) + (local.set $$cmp49 + (i32.eq + (local.get $$call48) + (i32.const 0) + ) + ) + (if + (local.get $$cmp49) + (i32.store8 + (i32.const 29920) + (i32.const 1) + ) + ) + (local.set $$call76 + (call $_strcmp + (local.get $$2) + (i32.const 9104) + ) + ) + (local.set $$cmp77 + (i32.eq + (local.get $$call76) + (i32.const 0) + ) + ) + (if + (local.get $$cmp77) + (local.set $label + (i32.const 20) + ) + (block + (local.set $$call81 + (call $_strcmp + (local.get $$2) + (i32.const 9136) + ) + ) + (local.set $$cmp82 + (i32.eq + (local.get $$call81) + (i32.const 0) + ) + ) + (if + (local.get $$cmp82) + (local.set $label + (i32.const 20) + ) + (block + (local.set $$call86 + (call $_strcmp + (local.get $$2) + (i32.const 9169) + ) + ) + (local.set $$cmp87 + (i32.eq + (local.get $$call86) + (i32.const 0) + ) + ) + (if + (local.get $$cmp87) + (local.set $label + (i32.const 20) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 20) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store8 + (i32.const 29921) + (i32.const 1) + ) + ) + ) + (local.set $$call92 + (call $_strcmp + (local.get $$2) + (i32.const 9209) + ) + ) + (local.set $$cmp93 + (i32.eq + (local.get $$call92) + (i32.const 0) + ) + ) + (if + (local.get $$cmp93) + (local.set $label + (i32.const 23) + ) + (block + (local.set $$call97 + (call $_strcmp + (local.get $$2) + (i32.const 9245) + ) + ) + (local.set $$cmp98 + (i32.eq + (local.get $$call97) + (i32.const 0) + ) + ) + (if + (local.get $$cmp98) + (local.set $label + (i32.const 23) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 23) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store8 + (i32.const 29922) + (i32.const 1) + ) + ) + ) + (local.set $$call103 + (call $_strcmp + (local.get $$2) + (i32.const 9278) + ) + ) + (local.set $$cmp104 + (i32.eq + (local.get $$call103) + (i32.const 0) + ) + ) + (if + (local.get $$cmp104) + (i32.store8 + (i32.const 29923) + (i32.const 1) + ) + ) + (local.set $$call109 + (call $_strcmp + (local.get $$2) + (i32.const 9303) + ) + ) + (local.set $$cmp110 + (i32.eq + (local.get $$call109) + (i32.const 0) + ) + ) + (if + (local.get $$cmp110) + (i32.store8 + (i32.const 29924) + (i32.const 1) + ) + ) + (local.set $$call115 + (call $_strcmp + (local.get $$2) + (i32.const 9336) + ) + ) + (local.set $$cmp116 + (i32.eq + (local.get $$call115) + (i32.const 0) + ) + ) + (if + (local.get $$cmp116) + (i32.store8 + (i32.const 29925) + (i32.const 1) + ) + ) + (local.set $$call121 + (call $_strcmp + (local.get $$2) + (i32.const 9372) + ) + ) + (local.set $$cmp122 + (i32.eq + (local.get $$call121) + (i32.const 0) + ) + ) + (if + (local.get $$cmp122) + (block + (i32.store8 + (i32.const 29926) + (i32.const 1) + ) + (call $_glGetFloatv + (i32.const 34047) + (i32.const 29092) + ) + ) + ) + (local.set $$call127 + (call $_strcmp + (local.get $$2) + (i32.const 9406) + ) + ) + (local.set $$cmp128 + (i32.eq + (local.get $$call127) + (i32.const 0) + ) + ) + (if + (local.get $$cmp128) + (i32.store8 + (i32.const 29918) + (i32.const 1) + ) + ) + (local.set $$call133 + (call $_strcmp + (local.get $$2) + (i32.const 9434) + ) + ) + (local.set $$cmp134 + (i32.eq + (local.get $$call133) + (i32.const 0) + ) + ) + (if + (local.get $$cmp134) + (i32.store8 + (i32.const 29927) + (i32.const 1) + ) + ) + (local.set $$inc139 + (i32.add + (local.get $$i17$075) + (i32.const 1) + ) + ) + (local.set $$exitcond80 + (i32.eq + (local.get $$inc139) + (local.get $$numExt$1) + ) + ) + (if + (local.get $$exitcond80) + (br $while-out0) + (local.set $$i17$075 + (local.get $$inc139) + ) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (block + (i32.store + (local.get $$vararg_buffer10) + (i32.const 0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 8950) + (local.get $$vararg_buffer10) + ) + ) + ) + (call $_free + (local.get $$call4) + ) + (call $_free + (local.get $$call7) + ) + (local.set $$1 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (call $_TraceLog + (i32.const 4) + (i32.const 9529) + (local.get $$vararg_buffer18) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9454) + (local.get $$vararg_buffer16) + ) + ) + (local.set $$5 + (i32.load8_s + (i32.const 29919) + ) + ) + (local.set $$tobool143 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool143) + (call $_TraceLog + (i32.const 4) + (i32.const 9665) + (local.get $$vararg_buffer22) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9590) + (local.get $$vararg_buffer20) + ) + ) + (local.set $$6 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool147 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool147) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9757) + (local.get $$vararg_buffer24) + ) + ) + (local.set $$7 + (i32.load8_s + (i32.const 29922) + ) + ) + (local.set $$tobool150 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool150) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9803) + (local.get $$vararg_buffer26) + ) + ) + (local.set $$8 + (i32.load8_s + (i32.const 29923) + ) + ) + (local.set $$tobool153 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool153) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9850) + (local.get $$vararg_buffer28) + ) + ) + (local.set $$9 + (i32.load8_s + (i32.const 29924) + ) + ) + (local.set $$tobool156 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool156) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9901) + (local.get $$vararg_buffer30) + ) + ) + (local.set $$10 + (i32.load8_s + (i32.const 29925) + ) + ) + (local.set $$tobool159 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$10) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool159) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9948) + (local.get $$vararg_buffer32) + ) + ) + (local.set $$11 + (i32.load8_s + (i32.const 29926) + ) + ) + (local.set $$tobool162 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$11) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool162) + ) + (block + (local.set $$12 + (f32.load + (i32.const 29092) + ) + ) + (local.set $$conv164 + (f64.promote_f32 + (local.get $$12) + ) + ) + (f64.store + (local.get $$vararg_buffer34) + (local.get $$conv164) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9995) + (local.get $$vararg_buffer34) + ) + ) + ) + (local.set $$13 + (i32.load8_s + (i32.const 29918) + ) + ) + (local.set $$tobool166 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$13) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool166) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10061) + (local.get $$vararg_buffer37) + ) + ) + (local.set $$14 + (i32.load8_s + (i32.const 29927) + ) + ) + (local.set $$tobool169 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$14) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool169) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10114) + (local.get $$vararg_buffer39) + ) + ) + (i32.store + (local.get $$pixels) + (i32.const -1) + ) + (local.set $$call172 + (call $_rlLoadTexture + (local.get $$pixels) + (i32.const 1) + (i32.const 1) + (i32.const 7) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29076) + (local.get $$call172) + ) + (local.set $$cmp173 + (i32.eq + (local.get $$call172) + (i32.const 0) + ) + ) + (if + (local.get $$cmp173) + (call $_TraceLog + (i32.const 4) + (i32.const 10200) + (local.get $$vararg_buffer44) + ) + (block + (i32.store + (local.get $$vararg_buffer41) + (local.get $$call172) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10149) + (local.get $$vararg_buffer41) + ) + ) + ) + (call $_LoadShaderDefault + (local.get $$tmp) + ) + (local.set $$15 + (i64.load + (local.get $$tmp) + ) + ) + (i64.store + (i32.const 28784) + (local.get $$15) + ) + (i64.store + (i32.const 28480) + (local.get $$15) + ) + (call $_LoadBuffersDefault) + (call $_MatrixIdentity + (local.get $$tmp178) + ) + (i64.store align=4 + (i32.const 29004) + (i64.load align=4 + (local.get $$tmp178) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29004) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp178) + (i32.const 56) + ) + ) + ) + (local.set $$call179 + (call $_malloc + (i32.const 4096) + ) + ) + (i32.store + (i32.const 29068) + (local.get $$call179) + ) + (local.set $$16 + (i32.load + (i32.const 29076) + ) + ) + (local.set $$i180$073 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$mode + (i32.add + (local.get $$call179) + (i32.shl + (local.get $$i180$073) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$mode) + (i32.const 7) + ) + (local.set $$vertexCount + (i32.add + (i32.add + (local.get $$call179) + (i32.shl + (local.get $$i180$073) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vertexCount) + (i32.const 0) + ) + (local.set $$vertexAlignment + (i32.add + (i32.add + (local.get $$call179) + (i32.shl + (local.get $$i180$073) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vertexAlignment) + (i32.const 0) + ) + (local.set $$textureId + (i32.add + (i32.add + (local.get $$call179) + (i32.shl + (local.get $$i180$073) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$textureId) + (local.get $$16) + ) + (local.set $$inc191 + (i32.add + (local.get $$i180$073) + (i32.const 1) + ) + ) + (local.set $$exitcond79 + (i32.eq + (local.get $$inc191) + (i32.const 256) + ) + ) + (if + (local.get $$exitcond79) + (br $while-out2) + (local.set $$i180$073 + (local.get $$inc191) + ) + ) + (br $while-in3) + ) + ) + (i32.store + (i32.const 29072) + (i32.const 1) + ) + (local.set $$i193$072 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$arrayidx199 + (i32.add + (i32.const 19712) + (i32.shl + (local.get $$i193$072) + (i32.const 6) + ) + ) + ) + (call $_MatrixIdentity + (local.get $$tmp200) + ) + (i64.store align=4 + (local.get $$arrayidx199) + (i64.load align=4 + (local.get $$tmp200) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx199) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp200) + (i32.const 56) + ) + ) + ) + (local.set $$inc202 + (i32.add + (local.get $$i193$072) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc202) + (i32.const 32) + ) + ) + (if + (local.get $$exitcond) + (br $while-out4) + (local.set $$i193$072 + (local.get $$inc202) + ) + ) + (br $while-in5) + ) + ) + (call $_MatrixIdentity + (local.get $$tmp204) + ) + (i64.store align=4 + (i32.const 28932) + (i64.load align=4 + (local.get $$tmp204) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28932) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp204) + (i32.const 56) + ) + ) + ) + (call $_MatrixIdentity + (local.get $$tmp205) + ) + (i64.store align=4 + (i32.const 28868) + (i64.load align=4 + (local.get $$tmp205) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 28868) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp205) + (i32.const 56) + ) + ) + ) + (i32.store + (i32.const 28996) + (i32.const 28868) + ) + (call $_glDepthFunc + (i32.const 515) + ) + (call $_glDisable + (i32.const 2929) + ) + (call $_glBlendFunc + (i32.const 770) + (i32.const 771) + ) + (call $_glEnable + (i32.const 3042) + ) + (call $_glCullFace + (i32.const 1029) + ) + (call $_glFrontFace + (i32.const 2305) + ) + (call $_glEnable + (i32.const 2884) + ) + (call $_glClearColor + (f64.const 0) + (f64.const 0) + (f64.const 0) + (f64.const 1) + ) + (call $_glClearDepthf + (f64.const 1) + ) + (call $_glClear + (i32.const 16640) + ) + (i32.store + (i32.const 29084) + (local.get $$width) + ) + (i32.store + (i32.const 29088) + (local.get $$height) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10239) + (local.get $$vararg_buffer46) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlLoadTexture (; 392 ;) (param $$data i32) (param $$width i32) (param $$height i32) (param $$format i32) (param $$mipmapCount i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr37 i32) + (local $$call i32) + (local $$cmp3253 i32) + (local $$cmp33 i32) + (local $$cmp35 i32) + (local $$cmp41 i32) + (local $$cmp44 i32) + (local $$cmp51 i32) + (local $$cmp8 i32) + (local $$div i32) + (local $$div40 i32) + (local $$exitcond i32) + (local $$glFormat i32) + (local $$glInternalFormat i32) + (local $$glType i32) + (local $$i$057 i32) + (local $$id i32) + (local $$inc i32) + (local $$mipHeight$055 i32) + (local $$mipHeight$1 i32) + (local $$mipOffset$056 i32) + (local $$mipWidth$054 i32) + (local $$or$cond i32) + (local $$or$cond3 i32) + (local $$or$cond48 i32) + (local $$or$cond50 i32) + (local $$or$cond52 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $$tobool11 i32) + (local $$tobool18 i32) + (local $$tobool25 i32) + (local $$tobool47 i32) + (local $$tobool6 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer11 i32) + (local $$vararg_buffer18 i32) + (local $$vararg_buffer24 i32) + (local $$vararg_buffer3 i32) + (local $$vararg_buffer5 i32) + (local $$vararg_buffer7 i32) + (local $$vararg_buffer9 i32) + (local $$vararg_ptr14 i32) + (local $$vararg_ptr15 i32) + (local $$vararg_ptr16 i32) + (local $$vararg_ptr17 i32) + (local $$vararg_ptr21 i32) + (local $$vararg_ptr22 i32) + (local $$vararg_ptr23 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $$vararg_buffer24 + (i32.add + (local.get $sp_a) + (i32.const 88) + ) + ) + (local.set $$vararg_buffer18 + (i32.add + (local.get $sp_a) + (i32.const 72) + ) + ) + (local.set $$vararg_buffer11 + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$vararg_buffer9 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vararg_buffer7 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$vararg_buffer5 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer3 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$id + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$glInternalFormat + (i32.add + (local.get $sp_a) + (i32.const 100) + ) + ) + (local.set $$glFormat + (i32.add + (local.get $sp_a) + (i32.const 96) + ) + ) + (local.set $$glType + (i32.add + (local.get $sp_a) + (i32.const 92) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + (i32.store + (local.get $$id) + (i32.const 0) + ) + (local.set $$0 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$1 + (i32.add + (local.get $$format) + (i32.const -11) + ) + ) + (local.set $$2 + (i32.lt_u + (local.get $$1) + (i32.const 4) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$2) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11688) + (local.get $$vararg_buffer) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$3 + (i32.load8_s + (i32.const 29922) + ) + ) + (local.set $$tobool6 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp8 + (i32.eq + (local.get $$format) + (i32.const 15) + ) + ) + (local.set $$or$cond3 + (i32.and + (local.get $$cmp8) + (local.get $$tobool6) + ) + ) + (if + (local.get $$or$cond3) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11732) + (local.get $$vararg_buffer1) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$4 + (i32.load8_s + (i32.const 29923) + ) + ) + (local.set $$tobool11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$5 + (i32.or + (local.get $$format) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.eq + (local.get $$5) + (i32.const 17) + ) + ) + (local.set $$or$cond48 + (i32.and + (local.get $$6) + (local.get $$tobool11) + ) + ) + (if + (local.get $$or$cond48) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11777) + (local.get $$vararg_buffer3) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$7 + (i32.load8_s + (i32.const 29924) + ) + ) + (local.set $$tobool18 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$8 + (i32.eq + (local.get $$5) + (i32.const 19) + ) + ) + (local.set $$or$cond50 + (i32.and + (local.get $$8) + (local.get $$tobool18) + ) + ) + (if + (local.get $$or$cond50) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11822) + (local.get $$vararg_buffer5) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$9 + (i32.load8_s + (i32.const 29925) + ) + ) + (local.set $$tobool25 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$10 + (i32.eq + (local.get $$5) + (i32.const 21) + ) + ) + (local.set $$or$cond52 + (i32.and + (local.get $$10) + (local.get $$tobool25) + ) + ) + (if + (local.get $$or$cond52) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11867) + (local.get $$vararg_buffer7) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (call $_glPixelStorei + (i32.const 3317) + (i32.const 1) + ) + (call $_glGenTextures + (i32.const 1) + (local.get $$id) + ) + (local.set $$11 + (i32.load + (local.get $$id) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (local.get $$11) + ) + (i32.store + (local.get $$vararg_buffer9) + (local.get $$data) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 11912) + (local.get $$vararg_buffer9) + ) + (local.set $$cmp3253 + (i32.gt_s + (local.get $$mipmapCount) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3253) + (block + (local.set $$cmp35 + (i32.lt_s + (local.get $$format) + (i32.const 11) + ) + ) + (local.set $$i$057 + (i32.const 0) + ) + (local.set $$mipHeight$055 + (local.get $$height) + ) + (local.set $$mipOffset$056 + (i32.const 0) + ) + (local.set $$mipWidth$054 + (local.get $$width) + ) + (loop $while-in + (block $while-out + (local.set $$call + (call $_GetPixelDataSize + (local.get $$mipWidth$054) + (local.get $$mipHeight$055) + (local.get $$format) + ) + ) + (call $_rlGetGlTextureFormats + (local.get $$format) + (local.get $$glInternalFormat) + (local.get $$glFormat) + (local.get $$glType) + ) + (i32.store + (local.get $$vararg_buffer11) + (local.get $$i$057) + ) + (local.set $$vararg_ptr14 + (i32.add + (local.get $$vararg_buffer11) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr14) + (local.get $$mipWidth$054) + ) + (local.set $$vararg_ptr15 + (i32.add + (local.get $$vararg_buffer11) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr15) + (local.get $$mipHeight$055) + ) + (local.set $$vararg_ptr16 + (i32.add + (local.get $$vararg_buffer11) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr16) + (local.get $$call) + ) + (local.set $$vararg_ptr17 + (i32.add + (local.get $$vararg_buffer11) + (i32.const 16) + ) + ) + (i32.store + (local.get $$vararg_ptr17) + (local.get $$mipOffset$056) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 11956) + (local.get $$vararg_buffer11) + ) + (local.set $$13 + (i32.load + (local.get $$glInternalFormat) + ) + ) + (local.set $$cmp33 + (i32.eq + (local.get $$13) + (i32.const -1) + ) + ) + (block $do-once + (if + (i32.eqz + (local.get $$cmp33) + ) + (if + (local.get $$cmp35) + (block + (local.set $$14 + (i32.load + (local.get $$glFormat) + ) + ) + (local.set $$15 + (i32.load + (local.get $$glType) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$data) + (local.get $$mipOffset$056) + ) + ) + (call $_glTexImage2D + (i32.const 3553) + (local.get $$i$057) + (local.get $$13) + (local.get $$mipWidth$054) + (local.get $$mipHeight$055) + (i32.const 0) + (local.get $$14) + (local.get $$15) + (local.get $$add$ptr) + ) + (br $do-once) + ) + (block + (local.set $$add$ptr37 + (i32.add + (local.get $$data) + (local.get $$mipOffset$056) + ) + ) + (call $_glCompressedTexImage2D + (i32.const 3553) + (local.get $$i$057) + (local.get $$13) + (local.get $$mipWidth$054) + (local.get $$mipHeight$055) + (i32.const 0) + (local.get $$call) + (local.get $$add$ptr37) + ) + (br $do-once) + ) + ) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$mipWidth$054) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div40 + (i32.and + (i32.div_s + (local.get $$mipHeight$055) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$add + (i32.add + (local.get $$call) + (local.get $$mipOffset$056) + ) + ) + (local.set $$cmp41 + (i32.lt_s + (local.get $$mipWidth$054) + (i32.const 2) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp41) + (i32.const 1) + (local.get $$div) + ) + ) + (local.set $$cmp44 + (i32.lt_s + (local.get $$mipHeight$055) + (i32.const 2) + ) + ) + (local.set $$mipHeight$1 + (if (result i32) + (local.get $$cmp44) + (i32.const 1) + (local.get $$div40) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$057) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$mipmapCount) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$i$057 + (local.get $$inc) + ) + (local.set $$mipHeight$055 + (local.get $$mipHeight$1) + ) + (local.set $$mipOffset$056 + (local.get $$add) + ) + (local.set $$mipWidth$054 + (local.get $$spec$select) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$12 + (i32.load8_s + (i32.const 29919) + ) + ) + (local.set $$tobool47 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$12) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool47) + (block + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10242) + (i32.const 33071) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10243) + (i32.const 33071) + ) + ) + (block + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10242) + (i32.const 10497) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10243) + (i32.const 10497) + ) + ) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10240) + (i32.const 9728) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10241) + (i32.const 9728) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + (local.set $$16 + (i32.load + (local.get $$id) + ) + ) + (local.set $$cmp51 + (i32.eq + (local.get $$16) + (i32.const 0) + ) + ) + (if + (local.get $$cmp51) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12071) + (local.get $$vararg_buffer24) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (i32.store + (local.get $$vararg_buffer18) + (local.get $$16) + ) + (local.set $$vararg_ptr21 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr21) + (local.get $$width) + ) + (local.set $$vararg_ptr22 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr22) + (local.get $$height) + ) + (local.set $$vararg_ptr23 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr23) + (local.get $$mipmapCount) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12009) + (local.get $$vararg_buffer18) + ) + (local.set $$retval$0 + (i32.load + (local.get $$id) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_LoadShaderDefault (; 393 ;) (param $$agg$result i32) + (local $$0 i32) + (local $$arrayidx15 i32) + (local $$arrayidx19 i32) + (local $$arrayidx23 i32) + (local $$arrayidx27 i32) + (local $$arrayidx31 i32) + (local $$call i32) + (local $$call13 i32) + (local $$call17 i32) + (local $$call2 i32) + (local $$call21 i32) + (local $$call25 i32) + (local $$call29 i32) + (local $$call3 i32) + (local $$call4 i32) + (local $$call9 i32) + (local $$cmp6 i32) + (local $$shader$sroa$13$0$$sroa_idx14 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$call + (call $_calloc + (i32.const 32) + (i32.const 4) + ) + ) + (i64.store align=4 + (local.get $$call) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 8) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 16) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 24) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 32) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 40) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 48) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 56) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 64) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 72) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 80) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 88) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 96) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 104) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 112) + ) + (i64.const -1) + ) + (i64.store align=4 + (i32.add + (local.get $$call) + (i32.const 120) + ) + (i64.const -1) + ) + (local.set $$call2 + (call $_CompileShader + (i32.const 10379) + (i32.const 35633) + ) + ) + (i32.store + (i32.const 29104) + (local.get $$call2) + ) + (local.set $$call3 + (call $_CompileShader + (i32.const 10862) + (i32.const 35632) + ) + ) + (i32.store + (i32.const 29108) + (local.get $$call3) + ) + (local.set $$0 + (i32.load + (i32.const 29104) + ) + ) + (local.set $$call4 + (call $_LoadShaderProgram + (local.get $$0) + (local.get $$call3) + ) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$call4) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6) + (block + (i32.store + (local.get $$vararg_buffer1) + (local.get $$call4) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11417) + (local.get $$vararg_buffer1) + ) + (i32.store + (local.get $$agg$result) + (local.get $$call4) + ) + (local.set $$shader$sroa$13$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$shader$sroa$13$0$$sroa_idx14) + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$call4) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11303) + (local.get $$vararg_buffer) + ) + (local.set $$call9 + (call $_glGetAttribLocation + (local.get $$call4) + (i32.const 11351) + ) + ) + (i32.store + (local.get $$call) + (local.get $$call9) + ) + (local.set $$call13 + (call $_glGetAttribLocation + (local.get $$call4) + (i32.const 11366) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$call) + (i32.const 4) + ) + ) + (i32.store + (local.get $$arrayidx15) + (local.get $$call13) + ) + (local.set $$call17 + (call $_glGetAttribLocation + (local.get $$call4) + (i32.const 11381) + ) + ) + (local.set $$arrayidx19 + (i32.add + (local.get $$call) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx19) + (local.get $$call17) + ) + (local.set $$call21 + (call $_glGetUniformLocation + (local.get $$call4) + (i32.const 11393) + ) + ) + (local.set $$arrayidx23 + (i32.add + (local.get $$call) + (i32.const 24) + ) + ) + (i32.store + (local.get $$arrayidx23) + (local.get $$call21) + ) + (local.set $$call25 + (call $_glGetUniformLocation + (local.get $$call4) + (i32.const 11397) + ) + ) + (local.set $$arrayidx27 + (i32.add + (local.get $$call) + (i32.const 44) + ) + ) + (i32.store + (local.get $$arrayidx27) + (local.get $$call25) + ) + (local.set $$call29 + (call $_glGetUniformLocation + (local.get $$call4) + (i32.const 11408) + ) + ) + (local.set $$arrayidx31 + (i32.add + (local.get $$call) + (i32.const 56) + ) + ) + (i32.store + (local.get $$arrayidx31) + (local.get $$call29) + ) + (i32.store + (local.get $$agg$result) + (local.get $$call4) + ) + (local.set $$shader$sroa$13$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$shader$sroa$13$0$$sroa_idx14) + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + (func $_LoadBuffersDefault (; 394 ;) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add48 i32) + (local $$add51 i32) + (local $$add55 i32) + (local $$add61 i32) + (local $$add68 i32) + (local $$add71 i32) + (local $$add75 i32) + (local $$add79 i32) + (local $$arrayidx113 i32) + (local $$arrayidx114 i32) + (local $$arrayidx123 i32) + (local $$arrayidx124 i32) + (local $$arrayidx13 i32) + (local $$arrayidx21 i32) + (local $$arrayidx32 i32) + (local $$arrayidx43 i32) + (local $$arrayidx49 i32) + (local $$arrayidx56 i32) + (local $$arrayidx62 i32) + (local $$arrayidx69 i32) + (local $$arrayidx76 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call3 i32) + (local $$call5 i32) + (local $$conv i32) + (local $$conv45 i32) + (local $$conv52 i32) + (local $$conv72 i32) + (local $$exitcond i32) + (local $$exitcond66 i32) + (local $$exitcond67 i32) + (local $$exitcond68 i32) + (local $$inc i32) + (local $$inc23 i32) + (local $$inc34 i32) + (local $$inc77 i32) + (local $$j$060 i32) + (local $$j14$061 i32) + (local $$j25$062 i32) + (local $$j36$064 i32) + (local $$k$063 i32) + (local $$mul i32) + (local $$tobool i32) + (local $$tobool136 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$call + (call $_malloc + (i32.const 98304) + ) + ) + (i32.store + (i32.const 21772) + (local.get $$call) + ) + (local.set $$call1 + (call $_malloc + (i32.const 65536) + ) + ) + (i32.store + (i32.const 21776) + (local.get $$call1) + ) + (local.set $$call3 + (call $_malloc + (i32.const 32768) + ) + ) + (i32.store + (i32.const 21780) + (local.get $$call3) + ) + (local.set $$call5 + (call $_malloc + (i32.const 24576) + ) + ) + (i32.store + (i32.const 21784) + (local.get $$call5) + ) + (local.set $$j$060 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (i32.load + (i32.const 21772) + ) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$0) + (i32.shl + (local.get $$j$060) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx13) + (f32.const 0) + ) + (local.set $$inc + (i32.add + (local.get $$j$060) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (i32.const 24576) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$j$060 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + (local.set $$j14$061 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$1 + (i32.load + (i32.const 21776) + ) + ) + (local.set $$arrayidx21 + (i32.add + (local.get $$1) + (i32.shl + (local.get $$j14$061) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx21) + (f32.const 0) + ) + (local.set $$inc23 + (i32.add + (local.get $$j14$061) + (i32.const 1) + ) + ) + (local.set $$exitcond66 + (i32.eq + (local.get $$inc23) + (i32.const 16384) + ) + ) + (if + (local.get $$exitcond66) + (br $while-out0) + (local.set $$j14$061 + (local.get $$inc23) + ) + ) + (br $while-in1) + ) + ) + (local.set $$j25$062 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$2 + (i32.load + (i32.const 21780) + ) + ) + (local.set $$arrayidx32 + (i32.add + (local.get $$2) + (local.get $$j25$062) + ) + ) + (i32.store8 + (local.get $$arrayidx32) + (i32.const 0) + ) + (local.set $$inc34 + (i32.add + (local.get $$j25$062) + (i32.const 1) + ) + ) + (local.set $$exitcond67 + (i32.eq + (local.get $$inc34) + (i32.const 32768) + ) + ) + (if + (local.get $$exitcond67) + (br $while-out2) + (local.set $$j25$062 + (local.get $$inc34) + ) + ) + (br $while-in3) + ) + ) + (local.set $$j36$064 + (i32.const 0) + ) + (local.set $$k$063 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$mul + (i32.shl + (local.get $$k$063) + (i32.const 2) + ) + ) + (local.set $$conv + (i32.and + (local.get $$mul) + (i32.const 65535) + ) + ) + (local.set $$4 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$arrayidx43 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$j36$064) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx43) + (local.get $$conv) + ) + (local.set $$add + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$conv45 + (i32.and + (local.get $$add) + (i32.const 65535) + ) + ) + (local.set $$5 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$add48 + (i32.or + (local.get $$j36$064) + (i32.const 1) + ) + ) + (local.set $$arrayidx49 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add48) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx49) + (local.get $$conv45) + ) + (local.set $$add51 + (i32.or + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$conv52 + (i32.and + (local.get $$add51) + (i32.const 65535) + ) + ) + (local.set $$6 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$add55 + (i32.add + (local.get $$j36$064) + (i32.const 2) + ) + ) + (local.set $$arrayidx56 + (i32.add + (local.get $$6) + (i32.shl + (local.get $$add55) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx56) + (local.get $$conv52) + ) + (local.set $$7 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$add61 + (i32.add + (local.get $$j36$064) + (i32.const 3) + ) + ) + (local.set $$arrayidx62 + (i32.add + (local.get $$7) + (i32.shl + (local.get $$add61) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx62) + (local.get $$conv) + ) + (local.set $$8 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$add68 + (i32.add + (local.get $$j36$064) + (i32.const 4) + ) + ) + (local.set $$arrayidx69 + (i32.add + (local.get $$8) + (i32.shl + (local.get $$add68) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx69) + (local.get $$conv52) + ) + (local.set $$add71 + (i32.or + (local.get $$mul) + (i32.const 3) + ) + ) + (local.set $$conv72 + (i32.and + (local.get $$add71) + (i32.const 65535) + ) + ) + (local.set $$9 + (i32.load + (i32.const 21784) + ) + ) + (local.set $$add75 + (i32.add + (local.get $$j36$064) + (i32.const 5) + ) + ) + (local.set $$arrayidx76 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add75) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx76) + (local.get $$conv72) + ) + (local.set $$inc77 + (i32.add + (local.get $$k$063) + (i32.const 1) + ) + ) + (local.set $$add79 + (i32.add + (local.get $$j36$064) + (i32.const 6) + ) + ) + (local.set $$exitcond68 + (i32.eq + (local.get $$inc77) + (i32.const 2048) + ) + ) + (if + (local.get $$exitcond68) + (br $while-out4) + (block + (local.set $$j36$064 + (local.get $$add79) + ) + (local.set $$k$063 + (local.get $$inc77) + ) + ) + ) + (br $while-in5) + ) + ) + (i32.store + (i32.const 21760) + (i32.const 0) + ) + (i32.store + (i32.const 21764) + (i32.const 0) + ) + (i32.store + (i32.const 21768) + (i32.const 0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10286) + (local.get $$vararg_buffer) + ) + (local.set $$3 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$10 + (i32.load + (i32.const 29100) + ) + ) + (call_indirect (type $FUNCSIG$vii) + (i32.const 1) + (i32.const 21788) + (i32.add + (i32.and + (local.get $$10) + (i32.const 255) + ) + (i32.const 2841) + ) + ) + (local.set $$11 + (i32.load + (i32.const 29080) + ) + ) + (local.set $$12 + (i32.load + (i32.const 21788) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (local.get $$12) + (i32.add + (i32.and + (local.get $$11) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 21792) + ) + (local.set $$13 + (i32.load + (i32.const 21792) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$13) + ) + (local.set $$14 + (i32.load + (i32.const 21772) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 98304) + (local.get $$14) + (i32.const 35048) + ) + (local.set $$15 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$16 + (i32.load + (local.get $$15) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$16) + ) + (local.set $$17 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$18 + (i32.load + (local.get $$17) + ) + ) + (call $_glVertexAttribPointer + (local.get $$18) + (i32.const 3) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 21796) + ) + (local.set $$19 + (i32.load + (i32.const 21796) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$19) + ) + (local.set $$20 + (i32.load + (i32.const 21776) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 65536) + (local.get $$20) + (i32.const 35048) + ) + (local.set $$21 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx113 + (i32.add + (local.get $$21) + (i32.const 4) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx113) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$22) + ) + (local.set $$23 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx114 + (i32.add + (local.get $$23) + (i32.const 4) + ) + ) + (local.set $$24 + (i32.load + (local.get $$arrayidx114) + ) + ) + (call $_glVertexAttribPointer + (local.get $$24) + (i32.const 2) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 21800) + ) + (local.set $$25 + (i32.load + (i32.const 21800) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (local.get $$25) + ) + (local.set $$26 + (i32.load + (i32.const 21780) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 32768) + (local.get $$26) + (i32.const 35048) + ) + (local.set $$27 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx123 + (i32.add + (local.get $$27) + (i32.const 20) + ) + ) + (local.set $$28 + (i32.load + (local.get $$arrayidx123) + ) + ) + (call $_glEnableVertexAttribArray + (local.get $$28) + ) + (local.set $$29 + (i32.load + (i32.const 28484) + ) + ) + (local.set $$arrayidx124 + (i32.add + (local.get $$29) + (i32.const 20) + ) + ) + (local.set $$30 + (i32.load + (local.get $$arrayidx124) + ) + ) + (call $_glVertexAttribPointer + (local.get $$30) + (i32.const 4) + (i32.const 5121) + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 21804) + ) + (local.set $$31 + (i32.load + (i32.const 21804) + ) + ) + (call $_glBindBuffer + (i32.const 34963) + (local.get $$31) + ) + (local.set $$32 + (i32.load + (i32.const 21784) + ) + ) + (call $_glBufferData + (i32.const 34963) + (i32.const 24576) + (local.get $$32) + (i32.const 35044) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10334) + (local.get $$vararg_buffer1) + ) + (local.set $$33 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool136 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$33) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool136) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$34 + (i32.load + (i32.const 29080) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $$34) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_CompileShader (; 395 ;) (param $$shaderStr i32) (param $$type i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$call i32) + (local $$cmp i32) + (local $$length i32) + (local $$maxLength i32) + (local $$shaderStr$addr i32) + (local $$success i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer4 i32) + (local $$vla i32) + (local $$vla$alloca_mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$shaderStr$addr + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$success + (i32.add + (local.get $sp_a) + (i32.const 28) + ) + ) + (local.set $$maxLength + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$length + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (i32.store + (local.get $$shaderStr$addr) + (local.get $$shaderStr) + ) + (local.set $$call + (call $_glCreateShader + (local.get $$type) + ) + ) + (call $_glShaderSource + (local.get $$call) + (i32.const 1) + (local.get $$shaderStr$addr) + (i32.const 0) + ) + (i32.store + (local.get $$success) + (i32.const 0) + ) + (call $_glCompileShader + (local.get $$call) + ) + (call $_glGetShaderiv + (local.get $$call) + (i32.const 35713) + (local.get $$success) + ) + (local.set $$0 + (i32.load + (local.get $$success) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 1) + ) + ) + (if + (local.get $$cmp) + (block + (i32.store + (local.get $$vararg_buffer4) + (local.get $$call) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11646) + (local.get $$vararg_buffer4) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$call) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11605) + (local.get $$vararg_buffer) + ) + (i32.store + (local.get $$maxLength) + (i32.const 0) + ) + (call $_glGetShaderiv + (local.get $$call) + (i32.const 35716) + (local.get $$maxLength) + ) + (local.set $$1 + (i32.load + (local.get $$maxLength) + ) + ) + (local.set $$2 + (call $_llvm_stacksave) + ) + (local.set $$vla$alloca_mul + (local.get $$1) + ) + (local.set $$vla + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.and + (i32.add + (i32.mul + (i32.const 1) + (local.get $$vla$alloca_mul) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.and + (i32.add + (i32.mul + (i32.const 1) + (local.get $$vla$alloca_mul) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$maxLength) + ) + ) + (call $_glGetShaderInfoLog + (local.get $$call) + (local.get $$3) + (local.get $$length) + (local.get $$vla) + ) + (i32.store + (local.get $$vararg_buffer1) + (local.get $$vla) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11554) + (local.get $$vararg_buffer1) + ) + (call $_llvm_stackrestore + (local.get $$2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + ) + (func $_LoadShaderProgram (; 396 ;) (param $$vShaderId i32) (param $$fShaderId i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$call i32) + (local $$cmp i32) + (local $$length i32) + (local $$maxLength i32) + (local $$program$0 i32) + (local $$success i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer4 i32) + (local $$vla i32) + (local $$vla$alloca_mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$success + (i32.add + (local.get $sp_a) + (i32.const 28) + ) + ) + (local.set $$maxLength + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$length + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (i32.store + (local.get $$success) + (i32.const 0) + ) + (local.set $$call + (call $_glCreateProgram) + ) + (call $_glAttachShader + (local.get $$call) + (local.get $$vShaderId) + ) + (call $_glAttachShader + (local.get $$call) + (local.get $$fShaderId) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 0) + (i32.const 11351) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 1) + (i32.const 11366) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 2) + (i32.const 11465) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 3) + (i32.const 11381) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 4) + (i32.const 11478) + ) + (call $_glBindAttribLocation + (local.get $$call) + (i32.const 5) + (i32.const 11492) + ) + (call $_glLinkProgram + (local.get $$call) + ) + (call $_glGetProgramiv + (local.get $$call) + (i32.const 35714) + (local.get $$success) + ) + (local.set $$0 + (i32.load + (local.get $$success) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$call) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11508) + (local.get $$vararg_buffer) + ) + (i32.store + (local.get $$maxLength) + (i32.const 0) + ) + (call $_glGetProgramiv + (local.get $$call) + (i32.const 35716) + (local.get $$maxLength) + ) + (local.set $$1 + (i32.load + (local.get $$maxLength) + ) + ) + (local.set $$2 + (call $_llvm_stacksave) + ) + (local.set $$vla$alloca_mul + (local.get $$1) + ) + (local.set $$vla + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.and + (i32.add + (i32.mul + (i32.const 1) + (local.get $$vla$alloca_mul) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.and + (i32.add + (i32.mul + (i32.const 1) + (local.get $$vla$alloca_mul) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$maxLength) + ) + ) + (call $_glGetProgramInfoLog + (local.get $$call) + (local.get $$3) + (local.get $$length) + (local.get $$vla) + ) + (i32.store + (local.get $$vararg_buffer1) + (local.get $$vla) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11554) + (local.get $$vararg_buffer1) + ) + (call $_glDeleteProgram + (local.get $$call) + ) + (call $_llvm_stackrestore + (local.get $$2) + ) + (local.set $$program$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$program$0) + ) + ) + (block + (i32.store + (local.get $$vararg_buffer4) + (local.get $$call) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11557) + (local.get $$vararg_buffer4) + ) + (local.set $$program$0 + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$program$0) + ) + ) + ) + ) + (func $_GetPixelDataSize (; 397 ;) (param $$width i32) (param $$height i32) (param $$format i32) (result i32) + (local $$bpp$0 i32) + (local $$div i32) + (local $$mul i32) + (local $$mul10 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (block $switch + (block $switch-default + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (block $switch-case15 + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (block $switch-case10 + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case3 $switch-case2 $switch-case5 $switch-case1 $switch-case0 $switch-case4 $switch-case6 $switch-case7 $switch-case8 $switch-case14 $switch-case13 $switch-case18 $switch-case17 $switch-case12 $switch-case11 $switch-case16 $switch-case10 $switch-case9 $switch-case15 $switch-case19 $switch-default + (i32.sub + (local.get $$format) + (i32.const 1) + ) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 8) + ) + (br $switch) + ) + ) + ) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 16) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 32) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 24) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 32) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 96) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 128) + ) + (br $switch) + ) + ) + ) + ) + ) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 4) + ) + (br $switch) + ) + ) + ) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 8) + ) + (br $switch) + ) + ) + (block + (local.set $$bpp$0 + (i32.const 2) + ) + (br $switch) + ) + ) + (local.set $$bpp$0 + (i32.const 0) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$height) + (local.get $$width) + ) + ) + (local.set $$mul10 + (i32.mul + (local.get $$mul) + (local.get $$bpp$0) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$mul10) + (i32.const 8) + ) + (i32.const -1) + ) + ) + (return + (local.get $$div) + ) + ) + (func $_rlGetGlTextureFormats (; 398 ;) (param $$format i32) (param $$glInternalFormat i32) (param $$glFormat i32) (param $$glType i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$tobool i32) + (local $$tobool13 i32) + (local $$tobool17 i32) + (local $$tobool21 i32) + (local $$tobool25 i32) + (local $$tobool29 i32) + (local $$tobool33 i32) + (local $$tobool37 i32) + (local $$tobool41 i32) + (local $$tobool45 i32) + (local $$tobool49 i32) + (local $$tobool53 i32) + (local $$tobool57 i32) + (local $$tobool9 i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const -1) + ) + (i32.store + (local.get $$glFormat) + (i32.const -1) + ) + (i32.store + (local.get $$glType) + (i32.const -1) + ) + (block $switch + (block $switch-default + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (block $switch-case15 + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (block $switch-case10 + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-case5 $switch-case6 $switch-case7 $switch-case8 $switch-case9 $switch-case10 $switch-case11 $switch-case12 $switch-case13 $switch-case14 $switch-case15 $switch-case16 $switch-case17 $switch-case18 $switch-case19 $switch-default + (i32.sub + (local.get $$format) + (i32.const 1) + ) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6409) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6409) + ) + (i32.store + (local.get $$glType) + (i32.const 5121) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6410) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6410) + ) + (i32.store + (local.get $$glType) + (i32.const 5121) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6407) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6407) + ) + (i32.store + (local.get $$glType) + (i32.const 33635) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6407) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6407) + ) + (i32.store + (local.get $$glType) + (i32.const 5121) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glType) + (i32.const 32820) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glType) + (i32.const 32819) + ) + (br $switch) + ) + ) + (block + (i32.store + (local.get $$glInternalFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glType) + (i32.const 5121) + ) + (br $switch) + ) + ) + (block + (local.set $$0 + (i32.load8_s + (i32.const 29920) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 6409) + ) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6409) + ) + (i32.store + (local.get $$glType) + (i32.const 5126) + ) + (br $switch) + ) + ) + (block + (local.set $$1 + (i32.load8_s + (i32.const 29920) + ) + ) + (local.set $$tobool9 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool9) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 6407) + ) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6407) + ) + (i32.store + (local.get $$glType) + (i32.const 5126) + ) + (br $switch) + ) + ) + (block + (local.set $$2 + (i32.load8_s + (i32.const 29920) + ) + ) + (local.set $$tobool13 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool13) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 6408) + ) + ) + (i32.store + (local.get $$glFormat) + (i32.const 6408) + ) + (i32.store + (local.get $$glType) + (i32.const 5126) + ) + (br $switch) + ) + ) + (block + (local.set $$3 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool17 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool17) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 33776) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$4 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool21 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool21) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 33777) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$5 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool25 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool25) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 33778) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$6 + (i32.load8_s + (i32.const 29921) + ) + ) + (local.set $$tobool29 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool29) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 33779) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$7 + (i32.load8_s + (i32.const 29922) + ) + ) + (local.set $$tobool33 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool33) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 36196) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$8 + (i32.load8_s + (i32.const 29923) + ) + ) + (local.set $$tobool37 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool37) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 37492) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$9 + (i32.load8_s + (i32.const 29923) + ) + ) + (local.set $$tobool41 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool41) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 37496) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$10 + (i32.load8_s + (i32.const 29924) + ) + ) + (local.set $$tobool45 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$10) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool45) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 35840) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$11 + (i32.load8_s + (i32.const 29924) + ) + ) + (local.set $$tobool49 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$11) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool49) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 35842) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$12 + (i32.load8_s + (i32.const 29925) + ) + ) + (local.set $$tobool53 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$12) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool53) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 37808) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$13 + (i32.load8_s + (i32.const 29925) + ) + ) + (local.set $$tobool57 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$13) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool57) + ) + (i32.store + (local.get $$glInternalFormat) + (i32.const 37815) + ) + ) + (br $switch) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12100) + (local.get $$vararg_buffer) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_rlglClose (; 399 ;) + (local $$0 i32) + (local $$1 i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (call $_UnloadShaderDefault) + (call $_UnloadBuffersDefault) + (call $_glDeleteTextures + (i32.const 1) + (i32.const 29076) + ) + (local.set $$0 + (i32.load + (i32.const 29076) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12129) + (local.get $$vararg_buffer) + ) + (local.set $$1 + (i32.load + (i32.const 29068) + ) + ) + (call $_free + (local.get $$1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_UnloadShaderDefault (; 400 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_glUseProgram + (i32.const 0) + ) + (local.set $$0 + (i32.load + (i32.const 28784) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29104) + ) + ) + (call $_glDetachShader + (local.get $$0) + (local.get $$1) + ) + (local.set $$2 + (i32.load + (i32.const 28784) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29108) + ) + ) + (call $_glDetachShader + (local.get $$2) + (local.get $$3) + ) + (local.set $$4 + (i32.load + (i32.const 29104) + ) + ) + (call $_glDeleteShader + (local.get $$4) + ) + (local.set $$5 + (i32.load + (i32.const 29108) + ) + ) + (call $_glDeleteShader + (local.get $$5) + ) + (local.set $$6 + (i32.load + (i32.const 28784) + ) + ) + (call $_glDeleteProgram + (local.get $$6) + ) + (return) + ) + (func $_UnloadBuffersDefault (; 401 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$tobool i32) + (local $$tobool11 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$1 + (i32.load + (i32.const 29080) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $$1) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + ) + (call $_glDisableVertexAttribArray + (i32.const 0) + ) + (call $_glDisableVertexAttribArray + (i32.const 1) + ) + (call $_glDisableVertexAttribArray + (i32.const 2) + ) + (call $_glDisableVertexAttribArray + (i32.const 3) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.const 0) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.const 0) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 21792) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 21796) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 21800) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 21804) + ) + (local.set $$2 + (i32.load8_s + (i32.const 29917) + ) + ) + (local.set $$tobool11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool11) + ) + (block + (local.set $$3 + (i32.load + (i32.const 29096) + ) + ) + (call_indirect (type $FUNCSIG$vii) + (i32.const 1) + (i32.const 21788) + (i32.add + (i32.and + (local.get $$3) + (i32.const 255) + ) + (i32.const 2841) + ) + ) + ) + ) + (local.set $$4 + (i32.load + (i32.const 21772) + ) + ) + (call $_free + (local.get $$4) + ) + (local.set $$5 + (i32.load + (i32.const 21776) + ) + ) + (call $_free + (local.get $$5) + ) + (local.set $$6 + (i32.load + (i32.const 21780) + ) + ) + (call $_free + (local.get $$6) + ) + (local.set $$7 + (i32.load + (i32.const 21784) + ) + ) + (call $_free + (local.get $$7) + ) + (return) + ) + (func $_rlReadScreenPixels (; 402 ;) (param $$width i32) (param $$height i32) (result i32) + (local $$0 i32) + (local $$add i32) + (local $$add17 i32) + (local $$add19 i32) + (local $$arrayidx i32) + (local $$arrayidx18 i32) + (local $$call i32) + (local $$call5 i32) + (local $$cmp i32) + (local $$cmp20 i32) + (local $$cmp31 i32) + (local $$cmp8 i32) + (local $$cmp829 i32) + (local $$dec i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$mul11 i32) + (local $$mul12 i32) + (local $$mul15 i32) + (local $$mul16 i32) + (local $$mul7 i32) + (local $$rem i32) + (local $$spec$select i32) + (local $$sub i32) + (local $$sub14 i32) + (local $$x$030 i32) + (local $$y$032 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$mul1 + (i32.mul + (local.get $$mul) + (local.get $$height) + ) + ) + (local.set $$call + (call $_calloc + (local.get $$mul1) + (i32.const 1) + ) + ) + (call $_glReadPixels + (i32.const 0) + (i32.const 0) + (local.get $$width) + (local.get $$height) + (i32.const 6408) + (i32.const 5121) + (local.get $$call) + ) + (local.set $$call5 + (call $_malloc + (local.get $$mul1) + ) + ) + (local.set $$sub + (i32.add + (local.get $$height) + (i32.const -1) + ) + ) + (local.set $$cmp31 + (i32.gt_s + (local.get $$height) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp31) + ) + (block + (call $_free + (local.get $$call) + ) + (return + (local.get $$call5) + ) + ) + ) + (local.set $$mul7 + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$cmp829 + (i32.gt_s + (local.get $$width) + (i32.const 0) + ) + ) + (local.set $$mul11 + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$mul15 + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$y$032 + (local.get $$sub) + ) + (loop $while-in + (block $while-out + (if + (local.get $$cmp829) + (block + (local.set $$mul12 + (i32.mul + (local.get $$mul11) + (local.get $$y$032) + ) + ) + (local.set $$sub14 + (i32.sub + (local.get $$sub) + (local.get $$y$032) + ) + ) + (local.set $$mul16 + (i32.mul + (local.get $$mul15) + (local.get $$sub14) + ) + ) + (local.set $$x$030 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$add + (i32.add + (local.get $$x$030) + (local.get $$mul12) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$call) + (local.get $$add) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$add17 + (i32.add + (local.get $$x$030) + (local.get $$mul16) + ) + ) + (local.set $$arrayidx18 + (i32.add + (local.get $$call5) + (local.get $$add17) + ) + ) + (local.set $$add19 + (i32.add + (local.get $$x$030) + (i32.const 1) + ) + ) + (local.set $$rem + (i32.and + (local.get $$add19) + (i32.const 3) + ) + ) + (local.set $$cmp20 + (i32.eq + (local.get $$rem) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp20) + (i32.const -1) + (local.get $$0) + ) + ) + (i32.store8 + (local.get $$arrayidx18) + (local.get $$spec$select) + ) + (local.set $$cmp8 + (i32.lt_s + (local.get $$add19) + (local.get $$mul7) + ) + ) + (if + (local.get $$cmp8) + (local.set $$x$030 + (local.get $$add19) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$dec + (i32.add + (local.get $$y$032) + (i32.const -1) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$y$032) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$y$032 + (local.get $$dec) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (call $_free + (local.get $$call) + ) + (return + (local.get $$call5) + ) + ) + (func $_ProcessGestureEvent (; 403 ;) (param $$event i32) + (local $$$ i32) + (local $$$6 i32) + (local $$$sink i32) + (local $$$sink5 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i64) + (local $$13 i64) + (local $$14 i64) + (local $$15 i64) + (local $$16 i64) + (local $$17 i64) + (local $$18 i64) + (local $$2 i32) + (local $$3 i32) + (local $$4 i64) + (local $$5 i32) + (local $$6 i32) + (local $$7 i64) + (local $$8 i32) + (local $$9 i32) + (local $$arrayidx i32) + (local $$arrayidx$byval_copy i32) + (local $$arrayidx118 i32) + (local $$arrayidx12 i32) + (local $$arrayidx131 i32) + (local $$arrayidx16 i32) + (local $$arrayidx24 i32) + (local $$arrayidx33 i32) + (local $$arrayidx89 i32) + (local $$call127 f32) + (local $$call134 f32) + (local $$call138 f32) + (local $$call142 f32) + (local $$call26 f32) + (local $$call37 f32) + (local $$call8 f32) + (local $$call98 f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp135 i32) + (local $$cmp139 i32) + (local $$cmp144 i32) + (local $$cmp21 i32) + (local $$cmp29 i32) + (local $$cmp3 i32) + (local $$cmp34 i32) + (local $$cmp39 i32) + (local $$cmp4 i32) + (local $$cmp41 i32) + (local $$cmp45 i32) + (local $$cmp48 i32) + (local $$cmp52 i32) + (local $$cmp55 i32) + (local $$cmp59 i32) + (local $$cmp62 i32) + (local $$cmp9 i32) + (local $$cmp90 i32) + (local $$cmp99 i32) + (local $$div f32) + (local $$inc i32) + (local $$moveDownPosition$byval_copy i32) + (local $$moveDownPosition$byval_copy11 i32) + (local $$moveDownPosition$byval_copy5 i32) + (local $$moveDownPosition$byval_copy7 i32) + (local $$moveDownPosition$byval_copy9 i32) + (local $$moveDownPosition2$byval_copy i32) + (local $$moveDownPosition2$byval_copy10 i32) + (local $$moveDownPosition2$byval_copy12 i32) + (local $$moveDownPosition2$byval_copy8 i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$or$cond2 i32) + (local $$or$cond3 i32) + (local $$or$cond4 i32) + (local $$pointCount i32) + (local $$position115 i32) + (local $$position128 i32) + (local $$sub143 f32) + (local $$sub38 f32) + (local $$tobool i32) + (local $$touchDownPosition$byval_copy i32) + (local $$touchDownPosition$byval_copy1 i32) + (local $$touchDownPosition$byval_copy2 i32) + (local $$touchDownPosition$byval_copy4 i32) + (local $$touchDownPosition$byval_copy6 i32) + (local $$touchDownPosition2$byval_copy i32) + (local $$touchUpPosition$byval_copy i32) + (local $$touchUpPosition$byval_copy3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$moveDownPosition2$byval_copy12 + (i32.add + (local.get $sp_a) + (i32.const 136) + ) + ) + (local.set $$moveDownPosition$byval_copy11 + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$moveDownPosition2$byval_copy10 + (i32.add + (local.get $sp_a) + (i32.const 120) + ) + ) + (local.set $$moveDownPosition$byval_copy9 + (i32.add + (local.get $sp_a) + (i32.const 112) + ) + ) + (local.set $$moveDownPosition2$byval_copy8 + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$touchDownPosition2$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 96) + ) + ) + (local.set $$moveDownPosition$byval_copy7 + (i32.add + (local.get $sp_a) + (i32.const 88) + ) + ) + (local.set $$touchDownPosition$byval_copy6 + (i32.add + (local.get $sp_a) + (i32.const 80) + ) + ) + (local.set $$moveDownPosition2$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 72) + ) + ) + (local.set $$moveDownPosition$byval_copy5 + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$moveDownPosition$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$touchDownPosition$byval_copy4 + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$touchUpPosition$byval_copy3 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$touchDownPosition$byval_copy2 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$touchUpPosition$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$touchDownPosition$byval_copy1 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$arrayidx$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$touchDownPosition$byval_copy + (local.get $sp_a) + ) + (local.set $$pointCount + (i32.add + (local.get $$event) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pointCount) + ) + ) + (i32.store + (i32.const 29116) + (local.get $$0) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$1 + (i32.load + (local.get $$event) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (if + (local.get $$cmp1) + (block + (local.set $$position115 + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (local.set $$13 + (i64.load align=4 + (local.get $$position115) + ) + ) + (i64.store + (i32.const 28792) + (local.get $$13) + ) + (local.set $$arrayidx118 + (i32.add + (local.get $$event) + (i32.const 32) + ) + ) + (local.set $$14 + (i64.load align=4 + (local.get $$arrayidx118) + ) + ) + (i64.store + (i32.const 28824) + (local.get $$14) + ) + (i32.store + (i32.const 29112) + (i32.const 4) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-default $switch-case $switch-default + (i32.sub + (local.get $$1) + (i32.const 0) + ) + ) + ) + (block + (i64.store align=4 + (local.get $$moveDownPosition$byval_copy5) + (i64.load align=4 + (i32.const 28816) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition2$byval_copy) + (i64.load align=4 + (i32.const 28832) + ) + ) + (local.set $$call127 + (call $_Vector2Distance + (local.get $$moveDownPosition$byval_copy5) + (local.get $$moveDownPosition2$byval_copy) + ) + ) + (local.set $$15 + (i64.load + (i32.const 28816) + ) + ) + (i64.store + (i32.const 28792) + (local.get $$15) + ) + (local.set $$16 + (i64.load + (i32.const 28832) + ) + ) + (i64.store + (i32.const 28824) + (local.get $$16) + ) + (local.set $$position128 + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (local.set $$17 + (i64.load align=4 + (local.get $$position128) + ) + ) + (i64.store + (i32.const 28816) + (local.get $$17) + ) + (local.set $$arrayidx131 + (i32.add + (local.get $$event) + (i32.const 32) + ) + ) + (local.set $$18 + (i64.load align=4 + (local.get $$arrayidx131) + ) + ) + (i64.store + (i32.const 28832) + (local.get $$18) + ) + (i64.store align=4 + (local.get $$touchDownPosition$byval_copy6) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition$byval_copy7) + (i64.load align=4 + (i32.const 28816) + ) + ) + (local.set $$call134 + (call $_Vector2Distance + (local.get $$touchDownPosition$byval_copy6) + (local.get $$moveDownPosition$byval_copy7) + ) + ) + (local.set $$cmp135 + (i32.eqz + (f32.ge + (local.get $$call134) + (f32.const 0.004999999888241291) + ) + ) + ) + (if + (local.get $$cmp135) + (block + (i64.store align=4 + (local.get $$touchDownPosition2$byval_copy) + (i64.load align=4 + (i32.const 28824) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition2$byval_copy8) + (i64.load align=4 + (i32.const 28832) + ) + ) + (local.set $$call138 + (call $_Vector2Distance + (local.get $$touchDownPosition2$byval_copy) + (local.get $$moveDownPosition2$byval_copy8) + ) + ) + (local.set $$cmp139 + (i32.eqz + (f32.ge + (local.get $$call138) + (f32.const 0.004999999888241291) + ) + ) + ) + (if + (local.get $$cmp139) + (local.set $$$sink5 + (i32.const 4) + ) + (local.set $label + (i32.const 29) + ) + ) + ) + (local.set $label + (i32.const 29) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 29) + ) + (block + (i64.store align=4 + (local.get $$moveDownPosition$byval_copy9) + (i64.load align=4 + (i32.const 28816) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition2$byval_copy10) + (i64.load align=4 + (i32.const 28832) + ) + ) + (local.set $$call142 + (call $_Vector2Distance + (local.get $$moveDownPosition$byval_copy9) + (local.get $$moveDownPosition2$byval_copy10) + ) + ) + (local.set $$sub143 + (f32.sub + (local.get $$call142) + (local.get $$call127) + ) + ) + (local.set $$cmp144 + (f32.lt + (local.get $$sub143) + (f32.const 0) + ) + ) + (local.set $$$6 + (if (result i32) + (local.get $$cmp144) + (i32.const 256) + (i32.const 512) + ) + ) + (local.set $$$sink5 + (local.get $$$6) + ) + ) + ) + (i32.store + (i32.const 29112) + (local.get $$$sink5) + ) + (i64.store align=4 + (local.get $$moveDownPosition$byval_copy11) + (i64.load align=4 + (i32.const 28816) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition2$byval_copy12) + (i64.load align=4 + (i32.const 28832) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (i32.store + (i32.const 29116) + (i32.const 0) + ) + (i32.store + (i32.const 29112) + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$2 + (i32.load + (i32.const 29120) + ) + ) + (local.set $$inc + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29120) + (local.get $$inc) + ) + (local.set $$3 + (i32.load + (i32.const 29112) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$2) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp4) + (local.get $$cmp3) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$arrayidx + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (i64.store align=4 + (local.get $$touchDownPosition$byval_copy) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i64.store align=4 + (local.get $$arrayidx$byval_copy) + (i64.load align=4 + (local.get $$arrayidx) + ) + ) + (local.set $$call8 + (call $_Vector2Distance + (local.get $$touchDownPosition$byval_copy) + (local.get $$arrayidx$byval_copy) + ) + ) + (local.set $$cmp9 + (f32.lt + (local.get $$call8) + (f32.const 0.029999999329447746) + ) + ) + (if + (local.get $$cmp9) + (block + (i32.store + (i32.const 29112) + (i32.const 2) + ) + (i32.store + (i32.const 29120) + (i32.const 0) + ) + ) + (local.set $label + (i32.const 6) + ) + ) + ) + (local.set $label + (i32.const 6) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (block + (i32.store + (i32.const 29120) + (i32.const 1) + ) + (i32.store + (i32.const 29112) + (i32.const 1) + ) + ) + ) + (local.set $$arrayidx12 + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (local.set $$4 + (i64.load align=4 + (local.get $$arrayidx12) + ) + ) + (i64.store + (i32.const 28792) + (local.get $$4) + ) + (i64.store + (i32.const 28800) + (local.get $$4) + ) + (i64.store + (i32.const 28808) + (local.get $$4) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$event) + (i32.const 8) + ) + ) + (local.set $$5 + (i32.load + (local.get $$arrayidx16) + ) + ) + (i32.store + (i32.const 8008) + (local.get $$5) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block $switch1 + (block $switch-default4 + (block $switch-case3 + (block $switch-case2 + (br_table $switch-case2 $switch-default4 $switch-case3 $switch-default4 + (i32.sub + (local.get $$1) + (i32.const 0) + ) + ) + ) + (block + (local.set $$6 + (i32.load + (i32.const 29112) + ) + ) + (local.set $$cmp21 + (i32.eq + (local.get $$6) + (i32.const 8) + ) + ) + (if + (local.get $$cmp21) + (block + (local.set $$arrayidx24 + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (local.set $$7 + (i64.load align=4 + (local.get $$arrayidx24) + ) + ) + (i64.store + (i32.const 28808) + (local.get $$7) + ) + ) + ) + (i64.store align=4 + (local.get $$touchDownPosition$byval_copy1) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i64.store align=4 + (local.get $$touchUpPosition$byval_copy) + (i64.load align=4 + (i32.const 28808) + ) + ) + (local.set $$call26 + (call $_Vector2Distance + (local.get $$touchDownPosition$byval_copy1) + (local.get $$touchUpPosition$byval_copy) + ) + ) + (local.set $$div + (f32.div + (local.get $$call26) + (f32.const 0) + ) + ) + (i32.store8 + (i32.const 29928) + (i32.const 0) + ) + (local.set $$cmp29 + (f32.gt + (local.get $$div) + (f32.const 5.000000237487257e-04) + ) + ) + (if + (local.get $$cmp29) + (block + (local.set $$8 + (i32.load + (i32.const 8008) + ) + ) + (local.set $$arrayidx33 + (i32.add + (local.get $$event) + (i32.const 8) + ) + ) + (local.set $$9 + (i32.load + (local.get $$arrayidx33) + ) + ) + (local.set $$cmp34 + (i32.eq + (local.get $$8) + (local.get $$9) + ) + ) + (if + (local.get $$cmp34) + (block + (i64.store align=4 + (local.get $$touchDownPosition$byval_copy2) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i64.store align=4 + (local.get $$touchUpPosition$byval_copy3) + (i64.load align=4 + (i32.const 28808) + ) + ) + (local.set $$call37 + (call $_Vector2Angle + (local.get $$touchDownPosition$byval_copy2) + (local.get $$touchUpPosition$byval_copy3) + ) + ) + (local.set $$sub38 + (f32.sub + (f32.const 360) + (local.get $$call37) + ) + ) + (local.set $$cmp39 + (f32.lt + (local.get $$sub38) + (f32.const 30) + ) + ) + (local.set $$cmp41 + (f32.gt + (local.get $$sub38) + (f32.const 330) + ) + ) + (local.set $$or$cond1 + (i32.or + (local.get $$cmp39) + (local.get $$cmp41) + ) + ) + (if + (local.get $$or$cond1) + (local.set $$$sink + (i32.const 16) + ) + (block + (local.set $$cmp45 + (f32.gt + (local.get $$sub38) + (f32.const 30) + ) + ) + (local.set $$cmp48 + (f32.lt + (local.get $$sub38) + (f32.const 120) + ) + ) + (local.set $$or$cond2 + (i32.and + (local.get $$cmp45) + (local.get $$cmp48) + ) + ) + (if + (local.get $$or$cond2) + (local.set $$$sink + (i32.const 64) + ) + (block + (local.set $$cmp52 + (f32.gt + (local.get $$sub38) + (f32.const 120) + ) + ) + (local.set $$cmp55 + (f32.lt + (local.get $$sub38) + (f32.const 210) + ) + ) + (local.set $$or$cond3 + (i32.and + (local.get $$cmp52) + (local.get $$cmp55) + ) + ) + (if + (local.get $$or$cond3) + (local.set $$$sink + (i32.const 32) + ) + (block + (local.set $$cmp59 + (f32.gt + (local.get $$sub38) + (f32.const 210) + ) + ) + (local.set $$cmp62 + (f32.lt + (local.get $$sub38) + (f32.const 300) + ) + ) + (local.set $$or$cond4 + (i32.and + (local.get $$cmp59) + (local.get $$cmp62) + ) + ) + (local.set $$$ + (if (result i32) + (local.get $$or$cond4) + (i32.const 128) + (i32.const 0) + ) + ) + (local.set $$$sink + (local.get $$$) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$$sink + (i32.const 0) + ) + ) + ) + (local.set $$$sink + (i32.const 0) + ) + ) + (i32.store + (i32.const 29112) + (local.get $$$sink) + ) + (f32.store + (i32.const 28800) + (f32.const 0) + ) + (f32.store + (i32.const 28804) + (f32.const 0) + ) + (i32.store + (i32.const 29116) + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$10 + (i32.load + (i32.const 29112) + ) + ) + (local.set $$11 + (i32.load8_s + (i32.const 29928) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$11) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (i32.store8 + (i32.const 29928) + (i32.const 1) + ) + ) + (local.set $$arrayidx89 + (i32.add + (local.get $$event) + (i32.const 24) + ) + ) + (local.set $$12 + (i64.load align=4 + (local.get $$arrayidx89) + ) + ) + (i64.store + (i32.const 28816) + (local.get $$12) + ) + (local.set $$cmp90 + (i32.eq + (local.get $$10) + (i32.const 4) + ) + ) + (if + (local.get $$cmp90) + (block + (i64.store align=4 + (local.get $$touchDownPosition$byval_copy4) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i64.store align=4 + (local.get $$moveDownPosition$byval_copy) + (i64.load align=4 + (i32.const 28816) + ) + ) + (local.set $$call98 + (call $_Vector2Distance + (local.get $$touchDownPosition$byval_copy4) + (local.get $$moveDownPosition$byval_copy) + ) + ) + (local.set $$cmp99 + (i32.eqz + (f32.ge + (local.get $$call98) + (f32.const 0.014999999664723873) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp99) + ) + (i32.store + (i32.const 29112) + (i32.const 8) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + (func $_UpdateGestures (; 404 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$cmp2 i32) + (local $$or$cond1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29112) + ) + ) + (local.set $$1 + (i32.add + (local.get $$0) + (i32.const -1) + ) + ) + (local.set $$2 + (i32.lt_u + (local.get $$1) + (i32.const 2) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29116) + ) + ) + (local.set $$cmp2 + (i32.lt_s + (local.get $$3) + (i32.const 2) + ) + ) + (local.set $$or$cond1 + (i32.and + (local.get $$2) + (local.get $$cmp2) + ) + ) + (if + (local.get $$or$cond1) + (i32.store + (i32.const 29112) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29112) + ) + ) + (local.set $$5 + (i32.add + (local.get $$4) + (i32.const -16) + ) + ) + (local.set $$6 + (i32.shr_u + (local.get $$5) + (i32.const 4) + ) + ) + (local.set $$7 + (i32.shl + (local.get $$5) + (i32.const 28) + ) + ) + (local.set $$8 + (i32.or + (local.get $$6) + (local.get $$7) + ) + ) + (block $switch + (block $switch-default + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-default $switch-case1 $switch-default $switch-default $switch-default $switch-case2 $switch-default + (i32.sub + (local.get $$8) + (i32.const 0) + ) + ) + ) + ) + ) + ) + (br $switch) + ) + (return) + ) + (i32.store + (i32.const 29112) + (i32.const 0) + ) + (return) + ) + (func $_GetMousePosition (; 405 ;) (param $$agg$result i32) + (local $$0 f32) + (local $$1 f32) + (local $$add f32) + (local $$add1 f32) + (local $$mul f32) + (local $$mul2 f32) + (local $$position$sroa$5$0$$sroa_idx3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.load + (i32.const 29128) + ) + ) + (local.set $$add + (f32.add + (local.get $$0) + (f32.const 0) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$add) + (f32.const 1) + ) + ) + (local.set $$1 + (f32.load + (i32.const 29132) + ) + ) + (local.set $$add1 + (f32.add + (local.get $$1) + (f32.const 0) + ) + ) + (local.set $$mul2 + (f32.mul + (local.get $$add1) + (f32.const 1) + ) + ) + (f32.store + (local.get $$agg$result) + (local.get $$mul) + ) + (local.set $$position$sroa$5$0$$sroa_idx3 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (f32.store + (local.get $$position$sroa$5$0$$sroa_idx3) + (local.get $$mul2) + ) + (return) + ) + (func $_GifBegin (; 406 ;) (param $$filename i32) (param $$width i32) (param $$height i32) (param $$delay i32) (param $$bitDepth i32) (param $$dither i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$and10 i32) + (local $$and5 i32) + (local $$and7 i32) + (local $$call i32) + (local $$call2 i32) + (local $$cmp i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$retval$0 i32) + (local $$shr i32) + (local $$shr9 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_fopen + (local.get $$filename) + (i32.const 16066) + ) + ) + (i32.store + (i32.const 29136) + (local.get $$call) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$mul1 + (i32.mul + (local.get $$mul) + (local.get $$height) + ) + ) + (local.set $$call2 + (call $_malloc + (local.get $$mul1) + ) + ) + (i32.store + (i32.const 28864) + (local.get $$call2) + ) + (drop + (call $_fwrite + (i32.const 12194) + (i32.const 6) + (i32.const 1) + (local.get $$call) + ) + ) + (local.set $$and + (i32.and + (local.get $$width) + (i32.const 255) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (local.get $$and) + (local.get $$0) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$width) + (i32.const 8) + ) + ) + (local.set $$and5 + (i32.and + (local.get $$shr) + (i32.const 255) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (local.get $$and5) + (local.get $$1) + ) + ) + (local.set $$and7 + (i32.and + (local.get $$height) + (i32.const 255) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (local.get $$and7) + (local.get $$2) + ) + ) + (local.set $$shr9 + (i32.shr_u + (local.get $$height) + (i32.const 8) + ) + ) + (local.set $$and10 + (i32.and + (local.get $$shr9) + (i32.const 255) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (local.get $$and10) + (local.get $$3) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 240) + (local.get $$4) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$5) + ) + ) + (local.set $$6 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$6) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$7) + ) + ) + (local.set $$8 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$8) + ) + ) + (local.set $$9 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$9) + ) + ) + (local.set $$10 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$10) + ) + ) + (local.set $$11 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$11) + ) + ) + (local.set $$12 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$12) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$delay) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$13 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 33) + (local.get $$13) + ) + ) + (local.set $$14 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 255) + (local.get $$14) + ) + ) + (local.set $$15 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 11) + (local.get $$15) + ) + ) + (local.set $$16 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fwrite + (i32.const 12201) + (i32.const 11) + (i32.const 1) + (local.get $$16) + ) + ) + (local.set $$17 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 3) + (local.get $$17) + ) + ) + (local.set $$18 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 1) + (local.get $$18) + ) + ) + (local.set $$19 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$19) + ) + ) + (local.set $$20 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$20) + ) + ) + (local.set $$21 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$21) + ) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_GifWriteFrame (; 407 ;) (param $$image i32) (param $$width i32) (param $$height i32) (param $$delay i32) (param $$bitDepth i32) (param $$dither i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$cond i32) + (local $$pal i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1296) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1296) + ) + ) + (local.set $$pal + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29136) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$1 + (i32.load + (i32.const 28864) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$dither) + (i32.const 0) + (local.get $$1) + ) + ) + (call $_GifMakePalette + (local.get $$cond) + (local.get $$image) + (local.get $$width) + (local.get $$height) + (local.get $$bitDepth) + (local.get $$dither) + (local.get $$pal) + ) + (local.set $$2 + (i32.load + (i32.const 28864) + ) + ) + (if + (local.get $$dither) + (call $_GifDitherImage + (local.get $$1) + (local.get $$image) + (local.get $$2) + (local.get $$width) + (local.get $$height) + (local.get $$pal) + ) + (call $_GifThresholdImage + (local.get $$1) + (local.get $$image) + (local.get $$2) + (local.get $$width) + (local.get $$height) + (local.get $$pal) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29136) + ) + ) + (local.set $$4 + (i32.load + (i32.const 28864) + ) + ) + (call $_GifWriteLzwImage + (local.get $$3) + (local.get $$4) + (local.get $$width) + (local.get $$height) + (local.get $$delay) + (local.get $$pal) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_GifMakePalette (; 408 ;) (param $$lastFrame i32) (param $$nextFrame i32) (param $$width i32) (param $$height i32) (param $$bitDepth i32) (param $$buildForDither i32) (param $$pPal i32) + (local $$arrayidx i32) + (local $$arrayidx11 i32) + (local $$arrayidx12 i32) + (local $$arrayidx13 i32) + (local $$arrayidx14 i32) + (local $$call i32) + (local $$call5 i32) + (local $$div i32) + (local $$div6 i32) + (local $$mul i32) + (local $$mul2 i32) + (local $$numPixels$0 i32) + (local $$shl i32) + (local $$shl8 i32) + (local $$sub i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (i32.store + (local.get $$pPal) + (local.get $$bitDepth) + ) + (local.set $$mul + (i32.mul + (local.get $$height) + (local.get $$width) + ) + ) + (local.set $$mul2 + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul2) + ) + ) + (drop + (call $_memcpy + (local.get $$call) + (local.get $$nextFrame) + (local.get $$mul2) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$lastFrame) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $$numPixels$0 + (local.get $$mul) + ) + (block + (local.set $$call5 + (call $_GifPickChangedPixels + (local.get $$lastFrame) + (local.get $$call) + (local.get $$mul) + ) + ) + (local.set $$numPixels$0 + (local.get $$call5) + ) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$bitDepth) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$shl) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div6 + (i32.and + (i32.div_s + (local.get $$shl) + (i32.const 4) + ) + (i32.const -1) + ) + ) + (call $_GifSplitPalette + (local.get $$call) + (local.get $$numPixels$0) + (i32.const 1) + (local.get $$shl) + (local.get $$div) + (local.get $$div6) + (i32.const 1) + (local.get $$buildForDither) + (local.get $$pPal) + ) + (call $_free + (local.get $$call) + ) + (local.set $$sub + (i32.add + (local.get $$bitDepth) + (i32.const -1) + ) + ) + (local.set $$shl8 + (i32.shl + (i32.const 1) + (local.get $$sub) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 1027) + ) + (local.get $$shl8) + ) + ) + (i32.store8 + (local.get $$arrayidx) + (i32.const 0) + ) + (local.set $$arrayidx11 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 772) + ) + (local.get $$shl8) + ) + ) + (i32.store8 + (local.get $$arrayidx11) + (i32.const 0) + ) + (local.set $$arrayidx12 + (i32.add + (local.get $$pPal) + (i32.const 516) + ) + ) + (i32.store8 + (local.get $$arrayidx12) + (i32.const 0) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$pPal) + (i32.const 260) + ) + ) + (i32.store8 + (local.get $$arrayidx13) + (i32.const 0) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$pPal) + (i32.const 4) + ) + ) + (i32.store8 + (local.get $$arrayidx14) + (i32.const 0) + ) + (return) + ) + (func $_GifDitherImage (; 409 ;) (param $$lastFrame i32) (param $$nextFrame i32) (param $$outFrame i32) (param $$width i32) (param $$height i32) (param $$pPal i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr148 i32) + (local $$add$ptr202 i32) + (local $$add$ptr21 i32) + (local $$add$ptr256 i32) + (local $$add$ptr94 i32) + (local $$add110 i32) + (local $$add126 i32) + (local $$add142 i32) + (local $$add164 i32) + (local $$add180 i32) + (local $$add196 i32) + (local $$add218 i32) + (local $$add23 i32) + (local $$add234 i32) + (local $$add25 i32) + (local $$add250 i32) + (local $$add270 i32) + (local $$add28 i32) + (local $$add284 i32) + (local $$add298 i32) + (local $$add78 i32) + (local $$add80 i32) + (local $$add81 i32) + (local $$add89 i32) + (local $$arrayidx i32) + (local $$arrayidx111 i32) + (local $$arrayidx127 i32) + (local $$arrayidx165 i32) + (local $$arrayidx181 i32) + (local $$arrayidx219 i32) + (local $$arrayidx235 i32) + (local $$arrayidx24 i32) + (local $$arrayidx27 i32) + (local $$arrayidx271 i32) + (local $$arrayidx285 i32) + (local $$arrayidx319 i32) + (local $$arrayidx321 i32) + (local $$arrayidx36 i32) + (local $$arrayidx41 i32) + (local $$arrayidx48 i32) + (local $$arrayidx5 i32) + (local $$arrayidx50 i32) + (local $$arrayidx54 i32) + (local $$arrayidx59 i32) + (local $$arrayidx75 i32) + (local $$bestDiff i32) + (local $$bestInd i32) + (local $$call i32) + (local $$cmp115 i32) + (local $$cmp12156 i32) + (local $$cmp131 i32) + (local $$cmp144 i32) + (local $$cmp153 i32) + (local $$cmp161 i32) + (local $$cmp169 i32) + (local $$cmp185 i32) + (local $$cmp198 i32) + (local $$cmp207 i32) + (local $$cmp223 i32) + (local $$cmp239 i32) + (local $$cmp252 i32) + (local $$cmp260 i32) + (local $$cmp274 i32) + (local $$cmp288 i32) + (local $$cmp315154 i32) + (local $$cmp33 i32) + (local $$cmp38 i32) + (local $$cmp43 i32) + (local $$cmp7159 i32) + (local $$cmp90 i32) + (local $$cmp99 i32) + (local $$cond124 i32) + (local $$cond178 i32) + (local $$cond232 i32) + (local $$cond282 i32) + (local $$conv i32) + (local $$conv32 i32) + (local $$conv320 i32) + (local $$conv37 i32) + (local $$conv42 i32) + (local $$conv51 i32) + (local $$conv55 i32) + (local $$conv60 i32) + (local $$div i32) + (local $$div114 i32) + (local $$div130 i32) + (local $$div152 i32) + (local $$div168 i32) + (local $$div184 i32) + (local $$div206 i32) + (local $$div222 i32) + (local $$div238 i32) + (local $$div259 i32) + (local $$div26 i32) + (local $$div273 i32) + (local $$div287 i32) + (local $$div29 i32) + (local $$div98 i32) + (local $$exitcond i32) + (local $$exitcond163 i32) + (local $$exitcond164 i32) + (local $$exitcond165 i32) + (local $$ii$0162 i32) + (local $$ii312$0155 i32) + (local $$inc i32) + (local $$inc305 i32) + (local $$inc309 i32) + (local $$inc323 i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$mul113 i32) + (local $$mul129 i32) + (local $$mul147 i32) + (local $$mul151 i32) + (local $$mul16 i32) + (local $$mul167 i32) + (local $$mul17 i32) + (local $$mul183 i32) + (local $$mul2 i32) + (local $$mul201 i32) + (local $$mul205 i32) + (local $$mul221 i32) + (local $$mul237 i32) + (local $$mul255 i32) + (local $$mul4 i32) + (local $$mul52 i32) + (local $$mul56 i32) + (local $$mul61 i32) + (local $$mul93 i32) + (local $$mul97 i32) + (local $$spec$select i32) + (local $$sub i32) + (local $$sub112 i32) + (local $$sub128 i32) + (local $$sub128$div130 i32) + (local $$sub150 i32) + (local $$sub150$div152 i32) + (local $$sub166 i32) + (local $$sub182 i32) + (local $$sub182$div184 i32) + (local $$sub204 i32) + (local $$sub204$div206 i32) + (local $$sub220 i32) + (local $$sub236 i32) + (local $$sub236$div238 i32) + (local $$sub258 i32) + (local $$sub258$div259 i32) + (local $$sub272 i32) + (local $$sub286 i32) + (local $$sub286$div287 i32) + (local $$sub57 i32) + (local $$sub62 i32) + (local $$sub82 i32) + (local $$sub96 i32) + (local $$sub96$div98 i32) + (local $$tobool i32) + (local $$xx$0157 i32) + (local $$yy$0160 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$bestDiff + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$bestInd + (local.get $sp_a) + ) + (local.set $$mul + (i32.mul + (local.get $$height) + (local.get $$width) + ) + ) + (local.set $$mul1 + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$mul2 + (i32.shl + (local.get $$mul) + (i32.const 4) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul2) + ) + ) + (local.set $$cmp161 + (i32.gt_s + (local.get $$mul1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp161) + (block + (local.set $$ii$0162 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$nextFrame) + (local.get $$ii$0162) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$mul4 + (i32.shl + (local.get $$conv) + (i32.const 8) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$ii$0162) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx5) + (local.get $$mul4) + ) + (local.set $$inc + (i32.add + (local.get $$ii$0162) + (i32.const 1) + ) + ) + (local.set $$exitcond165 + (i32.eq + (local.get $$inc) + (local.get $$mul1) + ) + ) + (if + (local.get $$exitcond165) + (br $while-out) + (local.set $$ii$0162 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$cmp7159 + (i32.eq + (local.get $$height) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp7159) + ) + (block + (local.set $$cmp12156 + (i32.eq + (local.get $$width) + (i32.const 0) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$lastFrame) + (i32.const 0) + ) + ) + (local.set $$yy$0160 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (if + (i32.eqz + (local.get $$cmp12156) + ) + (block + (local.set $$mul16 + (i32.mul + (local.get $$yy$0160) + (local.get $$width) + ) + ) + (local.set $$xx$0157 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$add + (i32.add + (local.get $$xx$0157) + (local.get $$mul16) + ) + ) + (local.set $$mul17 + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul17) + (i32.const 2) + ) + ) + ) + (local.set $$add$ptr21 + (i32.add + (local.get $$lastFrame) + (local.get $$mul17) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool) + (local.get $$add$ptr21) + (i32.const 0) + ) + ) + (local.set $$1 + (i32.load + (local.get $$add$ptr) + ) + ) + (local.set $$add23 + (i32.add + (local.get $$1) + (i32.const 127) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$add23) + (i32.const 256) + ) + (i32.const -1) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$add$ptr) + (i32.const 4) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx24) + ) + ) + (local.set $$add25 + (i32.add + (local.get $$2) + (i32.const 127) + ) + ) + (local.set $$div26 + (i32.and + (i32.div_s + (local.get $$add25) + (i32.const 256) + ) + (i32.const -1) + ) + ) + (local.set $$arrayidx27 + (i32.add + (local.get $$add$ptr) + (i32.const 8) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx27) + ) + ) + (local.set $$add28 + (i32.add + (local.get $$3) + (i32.const 127) + ) + ) + (local.set $$div29 + (i32.and + (i32.div_s + (local.get $$add28) + (i32.const 256) + ) + (i32.const -1) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$4 + (i32.load8_s + (local.get $$spec$select) + ) + ) + (local.set $$conv32 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$cmp33 + (i32.eq + (local.get $$div) + (local.get $$conv32) + ) + ) + (if + (local.get $$cmp33) + (block + (local.set $$arrayidx36 + (i32.add + (local.get $$spec$select) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx36) + ) + ) + (local.set $$conv37 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$cmp38 + (i32.eq + (local.get $$div26) + (local.get $$conv37) + ) + ) + (if + (local.get $$cmp38) + (block + (local.set $$arrayidx41 + (i32.add + (local.get $$spec$select) + (i32.const 2) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx41) + ) + ) + (local.set $$conv42 + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + (local.set $$cmp43 + (i32.eq + (local.get $$div29) + (local.get $$conv42) + ) + ) + (if + (local.get $$cmp43) + (block + (i32.store + (local.get $$add$ptr) + (local.get $$div) + ) + (i32.store + (local.get $$arrayidx24) + (local.get $$div26) + ) + (i32.store + (local.get $$arrayidx27) + (local.get $$div29) + ) + (local.set $$arrayidx48 + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (i32.store + (local.get $$arrayidx48) + (i32.const 0) + ) + ) + (local.set $label + (i32.const 16) + ) + ) + ) + (local.set $label + (i32.const 16) + ) + ) + ) + (local.set $label + (i32.const 16) + ) + ) + ) + (local.set $label + (i32.const 16) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 16) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store + (local.get $$bestDiff) + (i32.const 1000000) + ) + (i32.store + (local.get $$bestInd) + (i32.const 0) + ) + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$div) + (local.get $$div26) + (local.get $$div29) + (local.get $$bestInd) + (local.get $$bestDiff) + (i32.const 1) + ) + (local.set $$7 + (i32.load + (local.get $$bestInd) + ) + ) + (local.set $$arrayidx50 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 4) + ) + (local.get $$7) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx50) + ) + ) + (local.set $$conv51 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$mul52 + (i32.shl + (local.get $$conv51) + (i32.const 8) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$1) + (local.get $$mul52) + ) + ) + (local.set $$arrayidx54 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 260) + ) + (local.get $$7) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx54) + ) + ) + (local.set $$conv55 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$mul56 + (i32.shl + (local.get $$conv55) + (i32.const 8) + ) + ) + (local.set $$sub57 + (i32.sub + (local.get $$2) + (local.get $$mul56) + ) + ) + (local.set $$arrayidx59 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 516) + ) + (local.get $$7) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx59) + ) + ) + (local.set $$conv60 + (i32.and + (local.get $$10) + (i32.const 255) + ) + ) + (local.set $$mul61 + (i32.shl + (local.get $$conv60) + (i32.const 8) + ) + ) + (local.set $$sub62 + (i32.sub + (local.get $$3) + (local.get $$mul61) + ) + ) + (i32.store + (local.get $$add$ptr) + (local.get $$conv51) + ) + (i32.store + (local.get $$arrayidx24) + (local.get $$conv55) + ) + (i32.store + (local.get $$arrayidx27) + (local.get $$conv60) + ) + (local.set $$arrayidx75 + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (i32.store + (local.get $$arrayidx75) + (local.get $$7) + ) + (local.set $$add78 + (i32.add + (local.get $$add) + (i32.const 1) + ) + ) + (local.set $$add80 + (i32.add + (local.get $$xx$0157) + (local.get $$mul16) + ) + ) + (local.set $$add81 + (i32.add + (local.get $$add80) + (local.get $$width) + ) + ) + (local.set $$sub82 + (i32.add + (local.get $$add81) + (i32.const -1) + ) + ) + (local.set $$add89 + (i32.add + (local.get $$add81) + (i32.const 1) + ) + ) + (local.set $$cmp90 + (i32.lt_s + (local.get $$add78) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp90) + (block + (local.set $$mul93 + (i32.shl + (local.get $$add78) + (i32.const 2) + ) + ) + (local.set $$add$ptr94 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul93) + (i32.const 2) + ) + ) + ) + (local.set $$11 + (i32.load + (local.get $$add$ptr94) + ) + ) + (local.set $$sub96 + (i32.sub + (i32.const 0) + (local.get $$11) + ) + ) + (local.set $$mul97 + (i32.mul + (local.get $$sub) + (i32.const 7) + ) + ) + (local.set $$div98 + (i32.and + (i32.div_s + (local.get $$mul97) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp99 + (i32.lt_s + (local.get $$div98) + (local.get $$sub96) + ) + ) + (local.set $$sub96$div98 + (if (result i32) + (local.get $$cmp99) + (local.get $$sub96) + (local.get $$div98) + ) + ) + (local.set $$add110 + (i32.add + (local.get $$sub96$div98) + (local.get $$11) + ) + ) + (i32.store + (local.get $$add$ptr94) + (local.get $$add110) + ) + (local.set $$arrayidx111 + (i32.add + (local.get $$add$ptr94) + (i32.const 4) + ) + ) + (local.set $$12 + (i32.load + (local.get $$arrayidx111) + ) + ) + (local.set $$sub112 + (i32.sub + (i32.const 0) + (local.get $$12) + ) + ) + (local.set $$mul113 + (i32.mul + (local.get $$sub57) + (i32.const 7) + ) + ) + (local.set $$div114 + (i32.and + (i32.div_s + (local.get $$mul113) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp115 + (i32.lt_s + (local.get $$div114) + (local.get $$sub112) + ) + ) + (local.set $$cond124 + (if (result i32) + (local.get $$cmp115) + (local.get $$sub112) + (local.get $$div114) + ) + ) + (local.set $$add126 + (i32.add + (local.get $$cond124) + (local.get $$12) + ) + ) + (i32.store + (local.get $$arrayidx111) + (local.get $$add126) + ) + (local.set $$arrayidx127 + (i32.add + (local.get $$add$ptr94) + (i32.const 8) + ) + ) + (local.set $$13 + (i32.load + (local.get $$arrayidx127) + ) + ) + (local.set $$sub128 + (i32.sub + (i32.const 0) + (local.get $$13) + ) + ) + (local.set $$mul129 + (i32.mul + (local.get $$sub62) + (i32.const 7) + ) + ) + (local.set $$div130 + (i32.and + (i32.div_s + (local.get $$mul129) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp131 + (i32.lt_s + (local.get $$div130) + (local.get $$sub128) + ) + ) + (local.set $$sub128$div130 + (if (result i32) + (local.get $$cmp131) + (local.get $$sub128) + (local.get $$div130) + ) + ) + (local.set $$add142 + (i32.add + (local.get $$sub128$div130) + (local.get $$13) + ) + ) + (i32.store + (local.get $$arrayidx127) + (local.get $$add142) + ) + ) + ) + (local.set $$cmp144 + (i32.lt_s + (local.get $$sub82) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp144) + (block + (local.set $$mul147 + (i32.shl + (local.get $$sub82) + (i32.const 2) + ) + ) + (local.set $$add$ptr148 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul147) + (i32.const 2) + ) + ) + ) + (local.set $$14 + (i32.load + (local.get $$add$ptr148) + ) + ) + (local.set $$sub150 + (i32.sub + (i32.const 0) + (local.get $$14) + ) + ) + (local.set $$mul151 + (i32.mul + (local.get $$sub) + (i32.const 3) + ) + ) + (local.set $$div152 + (i32.and + (i32.div_s + (local.get $$mul151) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp153 + (i32.lt_s + (local.get $$div152) + (local.get $$sub150) + ) + ) + (local.set $$sub150$div152 + (if (result i32) + (local.get $$cmp153) + (local.get $$sub150) + (local.get $$div152) + ) + ) + (local.set $$add164 + (i32.add + (local.get $$sub150$div152) + (local.get $$14) + ) + ) + (i32.store + (local.get $$add$ptr148) + (local.get $$add164) + ) + (local.set $$arrayidx165 + (i32.add + (local.get $$add$ptr148) + (i32.const 4) + ) + ) + (local.set $$15 + (i32.load + (local.get $$arrayidx165) + ) + ) + (local.set $$sub166 + (i32.sub + (i32.const 0) + (local.get $$15) + ) + ) + (local.set $$mul167 + (i32.mul + (local.get $$sub57) + (i32.const 3) + ) + ) + (local.set $$div168 + (i32.and + (i32.div_s + (local.get $$mul167) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp169 + (i32.lt_s + (local.get $$div168) + (local.get $$sub166) + ) + ) + (local.set $$cond178 + (if (result i32) + (local.get $$cmp169) + (local.get $$sub166) + (local.get $$div168) + ) + ) + (local.set $$add180 + (i32.add + (local.get $$cond178) + (local.get $$15) + ) + ) + (i32.store + (local.get $$arrayidx165) + (local.get $$add180) + ) + (local.set $$arrayidx181 + (i32.add + (local.get $$add$ptr148) + (i32.const 8) + ) + ) + (local.set $$16 + (i32.load + (local.get $$arrayidx181) + ) + ) + (local.set $$sub182 + (i32.sub + (i32.const 0) + (local.get $$16) + ) + ) + (local.set $$mul183 + (i32.mul + (local.get $$sub62) + (i32.const 3) + ) + ) + (local.set $$div184 + (i32.and + (i32.div_s + (local.get $$mul183) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp185 + (i32.lt_s + (local.get $$div184) + (local.get $$sub182) + ) + ) + (local.set $$sub182$div184 + (if (result i32) + (local.get $$cmp185) + (local.get $$sub182) + (local.get $$div184) + ) + ) + (local.set $$add196 + (i32.add + (local.get $$sub182$div184) + (local.get $$16) + ) + ) + (i32.store + (local.get $$arrayidx181) + (local.get $$add196) + ) + ) + ) + (local.set $$cmp198 + (i32.lt_s + (local.get $$add81) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp198) + (block + (local.set $$mul201 + (i32.shl + (local.get $$add81) + (i32.const 2) + ) + ) + (local.set $$add$ptr202 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul201) + (i32.const 2) + ) + ) + ) + (local.set $$17 + (i32.load + (local.get $$add$ptr202) + ) + ) + (local.set $$sub204 + (i32.sub + (i32.const 0) + (local.get $$17) + ) + ) + (local.set $$mul205 + (i32.mul + (local.get $$sub) + (i32.const 5) + ) + ) + (local.set $$div206 + (i32.and + (i32.div_s + (local.get $$mul205) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp207 + (i32.lt_s + (local.get $$div206) + (local.get $$sub204) + ) + ) + (local.set $$sub204$div206 + (if (result i32) + (local.get $$cmp207) + (local.get $$sub204) + (local.get $$div206) + ) + ) + (local.set $$add218 + (i32.add + (local.get $$sub204$div206) + (local.get $$17) + ) + ) + (i32.store + (local.get $$add$ptr202) + (local.get $$add218) + ) + (local.set $$arrayidx219 + (i32.add + (local.get $$add$ptr202) + (i32.const 4) + ) + ) + (local.set $$18 + (i32.load + (local.get $$arrayidx219) + ) + ) + (local.set $$sub220 + (i32.sub + (i32.const 0) + (local.get $$18) + ) + ) + (local.set $$mul221 + (i32.mul + (local.get $$sub57) + (i32.const 5) + ) + ) + (local.set $$div222 + (i32.and + (i32.div_s + (local.get $$mul221) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp223 + (i32.lt_s + (local.get $$div222) + (local.get $$sub220) + ) + ) + (local.set $$cond232 + (if (result i32) + (local.get $$cmp223) + (local.get $$sub220) + (local.get $$div222) + ) + ) + (local.set $$add234 + (i32.add + (local.get $$cond232) + (local.get $$18) + ) + ) + (i32.store + (local.get $$arrayidx219) + (local.get $$add234) + ) + (local.set $$arrayidx235 + (i32.add + (local.get $$add$ptr202) + (i32.const 8) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx235) + ) + ) + (local.set $$sub236 + (i32.sub + (i32.const 0) + (local.get $$19) + ) + ) + (local.set $$mul237 + (i32.mul + (local.get $$sub62) + (i32.const 5) + ) + ) + (local.set $$div238 + (i32.and + (i32.div_s + (local.get $$mul237) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp239 + (i32.lt_s + (local.get $$div238) + (local.get $$sub236) + ) + ) + (local.set $$sub236$div238 + (if (result i32) + (local.get $$cmp239) + (local.get $$sub236) + (local.get $$div238) + ) + ) + (local.set $$add250 + (i32.add + (local.get $$sub236$div238) + (local.get $$19) + ) + ) + (i32.store + (local.get $$arrayidx235) + (local.get $$add250) + ) + ) + ) + (local.set $$cmp252 + (i32.lt_s + (local.get $$add89) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp252) + (block + (local.set $$mul255 + (i32.shl + (local.get $$add89) + (i32.const 2) + ) + ) + (local.set $$add$ptr256 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul255) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (i32.load + (local.get $$add$ptr256) + ) + ) + (local.set $$sub258 + (i32.sub + (i32.const 0) + (local.get $$20) + ) + ) + (local.set $$div259 + (i32.and + (i32.div_s + (local.get $$sub) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp260 + (i32.lt_s + (local.get $$div259) + (local.get $$sub258) + ) + ) + (local.set $$sub258$div259 + (if (result i32) + (local.get $$cmp260) + (local.get $$sub258) + (local.get $$div259) + ) + ) + (local.set $$add270 + (i32.add + (local.get $$sub258$div259) + (local.get $$20) + ) + ) + (i32.store + (local.get $$add$ptr256) + (local.get $$add270) + ) + (local.set $$arrayidx271 + (i32.add + (local.get $$add$ptr256) + (i32.const 4) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx271) + ) + ) + (local.set $$sub272 + (i32.sub + (i32.const 0) + (local.get $$21) + ) + ) + (local.set $$div273 + (i32.and + (i32.div_s + (local.get $$sub57) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp274 + (i32.lt_s + (local.get $$div273) + (local.get $$sub272) + ) + ) + (local.set $$cond282 + (if (result i32) + (local.get $$cmp274) + (local.get $$sub272) + (local.get $$div273) + ) + ) + (local.set $$add284 + (i32.add + (local.get $$cond282) + (local.get $$21) + ) + ) + (i32.store + (local.get $$arrayidx271) + (local.get $$add284) + ) + (local.set $$arrayidx285 + (i32.add + (local.get $$add$ptr256) + (i32.const 8) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx285) + ) + ) + (local.set $$sub286 + (i32.sub + (i32.const 0) + (local.get $$22) + ) + ) + (local.set $$div287 + (i32.and + (i32.div_s + (local.get $$sub62) + (i32.const 16) + ) + (i32.const -1) + ) + ) + (local.set $$cmp288 + (i32.lt_s + (local.get $$div287) + (local.get $$sub286) + ) + ) + (local.set $$sub286$div287 + (if (result i32) + (local.get $$cmp288) + (local.get $$sub286) + (local.get $$div287) + ) + ) + (local.set $$add298 + (i32.add + (local.get $$sub286$div287) + (local.get $$22) + ) + ) + (i32.store + (local.get $$arrayidx285) + (local.get $$add298) + ) + ) + ) + ) + ) + (local.set $$inc305 + (i32.add + (local.get $$xx$0157) + (i32.const 1) + ) + ) + (local.set $$exitcond163 + (i32.eq + (local.get $$inc305) + (local.get $$width) + ) + ) + (if + (local.get $$exitcond163) + (br $while-out2) + (local.set $$xx$0157 + (local.get $$inc305) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (local.set $$inc309 + (i32.add + (local.get $$yy$0160) + (i32.const 1) + ) + ) + (local.set $$exitcond164 + (i32.eq + (local.get $$inc309) + (local.get $$height) + ) + ) + (if + (local.get $$exitcond164) + (br $while-out0) + (local.set $$yy$0160 + (local.get $$inc309) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$cmp315154 + (i32.gt_s + (local.get $$mul1) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp315154) + ) + (block + (call $_free + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$ii312$0155 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$arrayidx319 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$ii312$0155) + (i32.const 2) + ) + ) + ) + (local.set $$23 + (i32.load + (local.get $$arrayidx319) + ) + ) + (local.set $$conv320 + (i32.and + (local.get $$23) + (i32.const 255) + ) + ) + (local.set $$arrayidx321 + (i32.add + (local.get $$outFrame) + (local.get $$ii312$0155) + ) + ) + (i32.store8 + (local.get $$arrayidx321) + (local.get $$conv320) + ) + (local.set $$inc323 + (i32.add + (local.get $$ii312$0155) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc323) + (local.get $$mul1) + ) + ) + (if + (local.get $$exitcond) + (br $while-out4) + (local.set $$ii312$0155 + (local.get $$inc323) + ) + ) + (br $while-in5) + ) + ) + (call $_free + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GifThresholdImage (; 410 ;) (param $$lastFrame i32) (param $$nextFrame i32) (param $$outFrame i32) (param $$width i32) (param $$height i32) (param $$pPal i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add$ptr i32) + (local $$add$ptr43 i32) + (local $$add$ptr44 i32) + (local $$arrayidx13 i32) + (local $$arrayidx15 i32) + (local $$arrayidx22 i32) + (local $$arrayidx24 i32) + (local $$arrayidx25 i32) + (local $$arrayidx28 i32) + (local $$arrayidx30 i32) + (local $$arrayidx32 i32) + (local $$arrayidx34 i32) + (local $$arrayidx35 i32) + (local $$arrayidx36 i32) + (local $$arrayidx37 i32) + (local $$arrayidx39 i32) + (local $$arrayidx6 i32) + (local $$arrayidx8 i32) + (local $$bestDiff i32) + (local $$bestInd i32) + (local $$cmp10 i32) + (local $$cmp17 i32) + (local $$cmp29 i32) + (local $$cmp3 i32) + (local $$conv27 i32) + (local $$conv29 i32) + (local $$conv31 i32) + (local $$conv38 i32) + (local $$exitcond i32) + (local $$ii$035 i32) + (local $$inc i32) + (local $$lastFrame$addr$034 i32) + (local $$mul i32) + (local $$nextFrame$addr$032 i32) + (local $$outFrame$addr$030 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$bestDiff + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$bestInd + (local.get $sp_a) + ) + (local.set $$mul + (i32.mul + (local.get $$height) + (local.get $$width) + ) + ) + (local.set $$cmp29 + (i32.eq + (local.get $$mul) + (i32.const 0) + ) + ) + (if + (local.get $$cmp29) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$ii$035 + (i32.const 0) + ) + (local.set $$lastFrame$addr$034 + (local.get $$lastFrame) + ) + (local.set $$nextFrame$addr$032 + (local.get $$nextFrame) + ) + (local.set $$outFrame$addr$030 + (local.get $$outFrame) + ) + (loop $while-in + (block $while-out + (local.set $$tobool + (i32.ne + (local.get $$lastFrame$addr$034) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$0 + (i32.load8_s + (local.get $$lastFrame$addr$034) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$nextFrame$addr$032) + ) + ) + (local.set $$cmp3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp3) + (block + (local.set $$arrayidx6 + (i32.add + (local.get $$lastFrame$addr$034) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx6) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$nextFrame$addr$032) + (i32.const 1) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx8) + ) + ) + (local.set $$cmp10 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$arrayidx13 + (i32.add + (local.get $$lastFrame$addr$034) + (i32.const 2) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx13) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$nextFrame$addr$032) + (i32.const 2) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx15) + ) + ) + (local.set $$cmp17 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp17) + (block + (i32.store8 + (local.get $$outFrame$addr$030) + (local.get $$0) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx6) + ) + ) + (local.set $$arrayidx22 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx22) + (local.get $$6) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx13) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx24) + (local.get $$7) + ) + (local.set $$arrayidx25 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx25) + (i32.const 0) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + ) + (local.set $label + (i32.const 9) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 9) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store + (local.get $$bestDiff) + (i32.const 1000000) + ) + (i32.store + (local.get $$bestInd) + (i32.const 1) + ) + (local.set $$8 + (i32.load8_s + (local.get $$nextFrame$addr$032) + ) + ) + (local.set $$conv27 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$arrayidx28 + (i32.add + (local.get $$nextFrame$addr$032) + (i32.const 1) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx28) + ) + ) + (local.set $$conv29 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$arrayidx30 + (i32.add + (local.get $$nextFrame$addr$032) + (i32.const 2) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx30) + ) + ) + (local.set $$conv31 + (i32.and + (local.get $$10) + (i32.const 255) + ) + ) + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$conv27) + (local.get $$conv29) + (local.get $$conv31) + (local.get $$bestInd) + (local.get $$bestDiff) + (i32.const 1) + ) + (local.set $$11 + (i32.load + (local.get $$bestInd) + ) + ) + (local.set $$arrayidx32 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 4) + ) + (local.get $$11) + ) + ) + (local.set $$12 + (i32.load8_s + (local.get $$arrayidx32) + ) + ) + (i32.store8 + (local.get $$outFrame$addr$030) + (local.get $$12) + ) + (local.set $$arrayidx34 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 260) + ) + (local.get $$11) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx34) + ) + ) + (local.set $$arrayidx35 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx35) + (local.get $$13) + ) + (local.set $$14 + (i32.load + (local.get $$bestInd) + ) + ) + (local.set $$arrayidx36 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 516) + ) + (local.get $$14) + ) + ) + (local.set $$15 + (i32.load8_s + (local.get $$arrayidx36) + ) + ) + (local.set $$arrayidx37 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx37) + (local.get $$15) + ) + (local.set $$16 + (i32.load + (local.get $$bestInd) + ) + ) + (local.set $$conv38 + (i32.and + (local.get $$16) + (i32.const 255) + ) + ) + (local.set $$arrayidx39 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx39) + (local.get $$conv38) + ) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$lastFrame$addr$034) + (i32.const 4) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool) + (local.get $$add$ptr) + (i32.const 0) + ) + ) + (local.set $$add$ptr43 + (i32.add + (local.get $$outFrame$addr$030) + (i32.const 4) + ) + ) + (local.set $$add$ptr44 + (i32.add + (local.get $$nextFrame$addr$032) + (i32.const 4) + ) + ) + (local.set $$inc + (i32.add + (local.get $$ii$035) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$ii$035 + (local.get $$inc) + ) + (local.set $$lastFrame$addr$034 + (local.get $$spec$select) + ) + (local.set $$nextFrame$addr$032 + (local.get $$add$ptr44) + ) + (local.set $$outFrame$addr$030 + (local.get $$add$ptr43) + ) + ) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GifWriteLzwImage (; 411 ;) (param $$f i32) (param $$image i32) (param $$width i32) (param $$height i32) (param $$delay i32) (param $$pPal i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$add35 i32) + (local $$add36 i32) + (local $$add41 i32) + (local $$add43 i32) + (local $$and i32) + (local $$and20 i32) + (local $$and23 i32) + (local $$and25 i32) + (local $$and28 i32) + (local $$and5 i32) + (local $$arrayidx i32) + (local $$arrayidx46 i32) + (local $$byte i32) + (local $$call34 i32) + (local $$chunkIndex i32) + (local $$cmp382 i32) + (local $$cmp44 i32) + (local $$cmp60 i32) + (local $$cmp64 i32) + (local $$cmp9 i32) + (local $$codeSize$0$lcssa i32) + (local $$codeSize$010 i32) + (local $$codeSize$1$lcssa i32) + (local $$codeSize$13 i32) + (local $$codeSize$4 i32) + (local $$conv i32) + (local $$conv52 i32) + (local $$conv54 i32) + (local $$curCode$0$lcssa i32) + (local $$curCode$013 i32) + (local $$curCode$1$lcssa i32) + (local $$curCode$16 i32) + (local $$curCode$2 i32) + (local $$exitcond i32) + (local $$exitcond16 i32) + (local $$inc i32) + (local $$inc63 i32) + (local $$inc73 i32) + (local $$inc75 i32) + (local $$maxCode$011 i32) + (local $$maxCode$1$lcssa i32) + (local $$maxCode$14 i32) + (local $$maxCode$3 i32) + (local $$mul i32) + (local $$mul42 i32) + (local $$shl i32) + (local $$shl59 i32) + (local $$shr i32) + (local $$shr22 i32) + (local $$shr27 i32) + (local $$spec$select i32) + (local $$stat i32) + (local $$sub i32) + (local $$tobool i32) + (local $$tobool80 i32) + (local $$tobool801 i32) + (local $$tobool82 i32) + (local $$xx$05 i32) + (local $$yy$012 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 272) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 272) + ) + ) + (local.set $$stat + (local.get $sp_a) + ) + (drop + (call $_fputc + (i32.const 33) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 249) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 4) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 5) + (local.get $$f) + ) + ) + (local.set $$and + (i32.and + (local.get $$delay) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and) + (local.get $$f) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$delay) + (i32.const 8) + ) + ) + (local.set $$and5 + (i32.and + (local.get $$shr) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and5) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 44) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (local.set $$and20 + (i32.and + (local.get $$width) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and20) + (local.get $$f) + ) + ) + (local.set $$shr22 + (i32.shr_u + (local.get $$width) + (i32.const 8) + ) + ) + (local.set $$and23 + (i32.and + (local.get $$shr22) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and23) + (local.get $$f) + ) + ) + (local.set $$and25 + (i32.and + (local.get $$height) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and25) + (local.get $$f) + ) + ) + (local.set $$shr27 + (i32.shr_u + (local.get $$height) + (i32.const 8) + ) + ) + (local.set $$and28 + (i32.and + (local.get $$shr27) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$and28) + (local.get $$f) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pPal) + ) + ) + (local.set $$sub + (i32.add + (local.get $$0) + (i32.const 127) + ) + ) + (drop + (call $_fputc + (local.get $$sub) + (local.get $$f) + ) + ) + (call $_GifWritePalette + (local.get $$pPal) + (local.get $$f) + ) + (local.set $$1 + (i32.load + (local.get $$pPal) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$1) + ) + ) + (drop + (call $_fputc + (local.get $$1) + (local.get $$f) + ) + ) + (local.set $$call34 + (call $_malloc + (i32.const 2097152) + ) + ) + (drop + (call $_memset + (local.get $$call34) + (i32.const 0) + (i32.const 2097152) + ) + ) + (local.set $$add35 + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$add36 + (i32.add + (local.get $$shl) + (i32.const 1) + ) + ) + (local.set $$byte + (i32.add + (local.get $$stat) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$byte) + (i32.const 0) + ) + (i32.store8 + (local.get $$stat) + (i32.const 0) + ) + (local.set $$chunkIndex + (i32.add + (local.get $$stat) + (i32.const 4) + ) + ) + (i32.store + (local.get $$chunkIndex) + (i32.const 0) + ) + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$shl) + (local.get $$add35) + ) + (local.set $$cmp9 + (i32.eq + (local.get $$height) + (i32.const 0) + ) + ) + (if + (local.get $$cmp9) + (block + (local.set $$codeSize$0$lcssa + (local.get $$add35) + ) + (local.set $$curCode$0$lcssa + (i32.const -1) + ) + ) + (block + (local.set $$cmp382 + (i32.eq + (local.get $$width) + (i32.const 0) + ) + ) + (local.set $$codeSize$010 + (local.get $$add35) + ) + (local.set $$curCode$013 + (i32.const -1) + ) + (local.set $$maxCode$011 + (local.get $$add36) + ) + (local.set $$yy$012 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (if + (local.get $$cmp382) + (block + (local.set $$codeSize$1$lcssa + (local.get $$codeSize$010) + ) + (local.set $$curCode$1$lcssa + (local.get $$curCode$013) + ) + (local.set $$maxCode$1$lcssa + (local.get $$maxCode$011) + ) + ) + (block + (local.set $$mul + (i32.mul + (local.get $$yy$012) + (local.get $$width) + ) + ) + (local.set $$codeSize$13 + (local.get $$codeSize$010) + ) + (local.set $$curCode$16 + (local.get $$curCode$013) + ) + (local.set $$maxCode$14 + (local.get $$maxCode$011) + ) + (local.set $$xx$05 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$add41 + (i32.add + (local.get $$xx$05) + (local.get $$mul) + ) + ) + (local.set $$mul42 + (i32.shl + (local.get $$add41) + (i32.const 2) + ) + ) + (local.set $$add43 + (i32.or + (local.get $$mul42) + (i32.const 3) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$image) + (local.get $$add43) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$cmp44 + (i32.lt_s + (local.get $$curCode$16) + (i32.const 0) + ) + ) + (local.set $$conv + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (block $do-once + (if + (local.get $$cmp44) + (block + (local.set $$codeSize$4 + (local.get $$codeSize$13) + ) + (local.set $$curCode$2 + (local.get $$conv) + ) + (local.set $$maxCode$3 + (local.get $$maxCode$14) + ) + ) + (block + (local.set $$arrayidx46 + (i32.add + (i32.add + (local.get $$call34) + (i32.shl + (local.get $$curCode$16) + (i32.const 9) + ) + ) + (i32.shl + (local.get $$conv) + (i32.const 1) + ) + ) + ) + (local.set $$4 + (i32.load16_s + (local.get $$arrayidx46) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 16) + ) + (i32.const 16) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$conv52 + (i32.and + (local.get $$4) + (i32.const 65535) + ) + ) + (local.set $$codeSize$4 + (local.get $$codeSize$13) + ) + (local.set $$curCode$2 + (local.get $$conv52) + ) + (local.set $$maxCode$3 + (local.get $$maxCode$14) + ) + (br $do-once) + ) + ) + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$curCode$16) + (local.get $$codeSize$13) + ) + (local.set $$inc + (i32.add + (local.get $$maxCode$14) + (i32.const 1) + ) + ) + (local.set $$conv54 + (i32.and + (local.get $$inc) + (i32.const 65535) + ) + ) + (i32.store16 + (local.get $$arrayidx46) + (local.get $$conv54) + ) + (local.set $$shl59 + (i32.shl + (i32.const 1) + (local.get $$codeSize$13) + ) + ) + (local.set $$cmp60 + (i32.ge_u + (local.get $$inc) + (local.get $$shl59) + ) + ) + (local.set $$inc63 + (i32.and + (local.get $$cmp60) + (i32.const 1) + ) + ) + (local.set $$spec$select + (i32.add + (local.get $$codeSize$13) + (local.get $$inc63) + ) + ) + (local.set $$cmp64 + (i32.eq + (local.get $$inc) + (i32.const 4095) + ) + ) + (if + (local.get $$cmp64) + (block + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$shl) + (local.get $$spec$select) + ) + (drop + (call $_memset + (local.get $$call34) + (i32.const 0) + (i32.const 2097152) + ) + ) + (local.set $$codeSize$4 + (local.get $$add35) + ) + (local.set $$curCode$2 + (local.get $$conv) + ) + (local.set $$maxCode$3 + (local.get $$add36) + ) + ) + (block + (local.set $$codeSize$4 + (local.get $$spec$select) + ) + (local.set $$curCode$2 + (local.get $$conv) + ) + (local.set $$maxCode$3 + (local.get $$inc) + ) + ) + ) + ) + ) + ) + (local.set $$inc73 + (i32.add + (local.get $$xx$05) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc73) + (local.get $$width) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$codeSize$1$lcssa + (local.get $$codeSize$4) + ) + (local.set $$curCode$1$lcssa + (local.get $$curCode$2) + ) + (local.set $$maxCode$1$lcssa + (local.get $$maxCode$3) + ) + (br $while-out0) + ) + (block + (local.set $$codeSize$13 + (local.get $$codeSize$4) + ) + (local.set $$curCode$16 + (local.get $$curCode$2) + ) + (local.set $$maxCode$14 + (local.get $$maxCode$3) + ) + (local.set $$xx$05 + (local.get $$inc73) + ) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$inc75 + (i32.add + (local.get $$yy$012) + (i32.const 1) + ) + ) + (local.set $$exitcond16 + (i32.eq + (local.get $$inc75) + (local.get $$height) + ) + ) + (if + (local.get $$exitcond16) + (block + (local.set $$codeSize$0$lcssa + (local.get $$codeSize$1$lcssa) + ) + (local.set $$curCode$0$lcssa + (local.get $$curCode$1$lcssa) + ) + (br $while-out) + ) + (block + (local.set $$codeSize$010 + (local.get $$codeSize$1$lcssa) + ) + (local.set $$curCode$013 + (local.get $$curCode$1$lcssa) + ) + (local.set $$maxCode$011 + (local.get $$maxCode$1$lcssa) + ) + (local.set $$yy$012 + (local.get $$inc75) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$curCode$0$lcssa) + (local.get $$codeSize$0$lcssa) + ) + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$shl) + (local.get $$codeSize$0$lcssa) + ) + (call $_GifWriteCode + (local.get $$f) + (local.get $$stat) + (local.get $$add36) + (local.get $$add35) + ) + (local.set $$2 + (i32.load8_s + (local.get $$stat) + ) + ) + (local.set $$tobool801 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool801) + ) + (loop $while-in3 + (block $while-out2 + (call $_GifWriteBit + (local.get $$stat) + (i32.const 0) + ) + (local.set $$5 + (i32.load8_s + (local.get $$stat) + ) + ) + (local.set $$tobool80 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool80) + (br $while-out2) + ) + (br $while-in3) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$chunkIndex) + ) + ) + (local.set $$tobool82 + (i32.eq + (local.get $$6) + (i32.const 0) + ) + ) + (if + (local.get $$tobool82) + (block + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (call $_free + (local.get $$call34) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_GifWriteChunk + (local.get $$f) + (local.get $$stat) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (call $_free + (local.get $$call34) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GifWritePalette (; 412 ;) (param $$pPal i32) (param $$f i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$arrayidx i32) + (local $$arrayidx5 i32) + (local $$arrayidx8 i32) + (local $$cmp i32) + (local $$cmp18 i32) + (local $$conv i32) + (local $$conv6 i32) + (local $$conv9 i32) + (local $$ii$019 i32) + (local $$inc i32) + (local $$shl i32) + (local $$shl17 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (i32.const 0) + (local.get $$f) + ) + ) + (local.set $$0 + (i32.load + (local.get $$pPal) + ) + ) + (local.set $$shl17 + (i32.shl + (i32.const 1) + (local.get $$0) + ) + ) + (local.set $$cmp18 + (i32.gt_s + (local.get $$shl17) + (i32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp18) + ) + (return) + ) + (local.set $$ii$019 + (i32.const 1) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 4) + ) + (local.get $$ii$019) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$arrayidx5 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 260) + ) + (local.get $$ii$019) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx5) + ) + ) + (local.set $$conv6 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$arrayidx8 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 516) + ) + (local.get $$ii$019) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx8) + ) + ) + (local.set $$conv9 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (drop + (call $_fputc + (local.get $$conv) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (local.get $$conv6) + (local.get $$f) + ) + ) + (drop + (call $_fputc + (local.get $$conv9) + (local.get $$f) + ) + ) + (local.set $$inc + (i32.add + (local.get $$ii$019) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.load + (local.get $$pPal) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$4) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$shl) + ) + ) + (if + (local.get $$cmp) + (local.set $$ii$019 + (local.get $$inc) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_GifWriteCode (; 413 ;) (param $$f i32) (param $$stat i32) (param $$code i32) (param $$length i32) + (local $$0 i32) + (local $$chunkIndex i32) + (local $$cmp1 i32) + (local $$cmp6 i32) + (local $$code$addr$07 i32) + (local $$exitcond i32) + (local $$ii$08 i32) + (local $$inc i32) + (local $$shr i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$length) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6) + (return) + ) + (local.set $$chunkIndex + (i32.add + (local.get $$stat) + (i32.const 4) + ) + ) + (local.set $$code$addr$07 + (local.get $$code) + ) + (local.set $$ii$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (call $_GifWriteBit + (local.get $$stat) + (local.get $$code$addr$07) + ) + (local.set $$shr + (i32.shr_u + (local.get $$code$addr$07) + (i32.const 1) + ) + ) + (local.set $$0 + (i32.load + (local.get $$chunkIndex) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$0) + (i32.const 255) + ) + ) + (if + (local.get $$cmp1) + (call $_GifWriteChunk + (local.get $$f) + (local.get $$stat) + ) + ) + (local.set $$inc + (i32.add + (local.get $$ii$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$length) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$code$addr$07 + (local.get $$shr) + ) + (local.set $$ii$08 + (local.get $$inc) + ) + ) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_GifWriteBit (; 414 ;) (param $$stat i32) (param $$bit i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$and i32) + (local $$arrayidx i32) + (local $$byte i32) + (local $$chunkIndex i32) + (local $$cmp i32) + (local $$conv i32) + (local $$conv1 i32) + (local $$conv2 i32) + (local $$inc i32) + (local $$inc8 i32) + (local $$or i32) + (local $$shl i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$and + (i32.and + (local.get $$bit) + (i32.const 1) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$stat) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$and) + (local.get $$conv) + ) + ) + (local.set $$byte + (i32.add + (local.get $$stat) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$byte) + ) + ) + (local.set $$conv1 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl) + (local.get $$conv1) + ) + ) + (local.set $$conv2 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$byte) + (local.get $$conv2) + ) + (local.set $$inc + (i32.shr_s + (i32.shl + (i32.add + (local.get $$0) + (i32.const 1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (i32.store8 + (local.get $$stat) + (local.get $$inc) + ) + (local.set $$cmp + (i32.gt_s + (i32.and + (local.get $$inc) + (i32.const 255) + ) + (i32.const 7) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (local.set $$chunkIndex + (i32.add + (local.get $$stat) + (i32.const 4) + ) + ) + (local.set $$2 + (i32.load + (local.get $$chunkIndex) + ) + ) + (local.set $$inc8 + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (local.get $$chunkIndex) + (local.get $$inc8) + ) + (local.set $$arrayidx + (i32.add + (i32.add + (local.get $$stat) + (i32.const 8) + ) + (local.get $$2) + ) + ) + (i32.store8 + (local.get $$arrayidx) + (local.get $$conv2) + ) + (i32.store8 + (local.get $$stat) + (i32.const 0) + ) + (i32.store8 + (local.get $$byte) + (i32.const 0) + ) + (return) + ) + (func $_GifWriteChunk (; 415 ;) (param $$f i32) (param $$stat i32) + (local $$0 i32) + (local $$1 i32) + (local $$arraydecay i32) + (local $$byte i32) + (local $$chunkIndex i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$chunkIndex + (i32.add + (local.get $$stat) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$chunkIndex) + ) + ) + (drop + (call $_fputc + (local.get $$0) + (local.get $$f) + ) + ) + (local.set $$arraydecay + (i32.add + (local.get $$stat) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$chunkIndex) + ) + ) + (drop + (call $_fwrite + (local.get $$arraydecay) + (i32.const 1) + (local.get $$1) + (local.get $$f) + ) + ) + (i32.store8 + (local.get $$stat) + (i32.const 0) + ) + (local.set $$byte + (i32.add + (local.get $$stat) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$byte) + (i32.const 0) + ) + (i32.store + (local.get $$chunkIndex) + (i32.const 0) + ) + (return) + ) + (func $_GifGetClosestPaletteColor (; 416 ;) (param $$pPal i32) (param $$r i32) (param $$g i32) (param $$b i32) (param $$bestInd i32) (param $$bestDiff i32) (param $$treeRoot i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add33 i32) + (local $$add54 i32) + (local $$add57 i32) + (local $$arrayidx i32) + (local $$arrayidx13 i32) + (local $$arrayidx40 i32) + (local $$arrayidx41 i32) + (local $$arrayidx42 i32) + (local $$arrayidx43 i32) + (local $$arrayidx44 i32) + (local $$arrayidx9 i32) + (local $$cmp i32) + (local $$cmp16 i32) + (local $$cmp19 i32) + (local $$cmp26 i32) + (local $$cmp34 i32) + (local $$cmp4 i32) + (local $$cmp46 i32) + (local $$cmp50 i32) + (local $$cmp59 i32) + (local $$comps i32) + (local $$cond i32) + (local $$cond25 i32) + (local $$cond32 i32) + (local $$conv i32) + (local $$conv10 i32) + (local $$conv14 i32) + (local $$conv45 i32) + (local $$idxprom i32) + (local $$mul i32) + (local $$shl i32) + (local $$sub11 i32) + (local $$sub15 i32) + (local $$sub18 i32) + (local $$sub22 i32) + (local $$sub29 i32) + (local $$sub3 i32) + (local $$sub49 i32) + (local $$sub58 i32) + (local $$sub7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$comps + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$pPal) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$0) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$shl) + (local.get $$treeRoot) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (local.set $$sub3 + (i32.sub + (local.get $$treeRoot) + (local.get $$shl) + ) + ) + (local.set $$cmp4 + (i32.eq + (local.get $$sub3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 4) + ) + (local.get $$sub3) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$sub7 + (i32.sub + (local.get $$r) + (local.get $$conv) + ) + ) + (local.set $$arrayidx9 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 260) + ) + (local.get $$sub3) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx9) + ) + ) + (local.set $$conv10 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$sub11 + (i32.sub + (local.get $$g) + (local.get $$conv10) + ) + ) + (local.set $$arrayidx13 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 516) + ) + (local.get $$sub3) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx13) + ) + ) + (local.set $$conv14 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$sub15 + (i32.sub + (local.get $$b) + (local.get $$conv14) + ) + ) + (local.set $$cmp16 + (i32.lt_s + (local.get $$sub7) + (i32.const 0) + ) + ) + (local.set $$sub18 + (i32.sub + (i32.const 0) + (local.get $$sub7) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp16) + (local.get $$sub18) + (local.get $$sub7) + ) + ) + (local.set $$cmp19 + (i32.lt_s + (local.get $$sub11) + (i32.const 0) + ) + ) + (local.set $$sub22 + (i32.sub + (i32.const 0) + (local.get $$sub11) + ) + ) + (local.set $$cond25 + (if (result i32) + (local.get $$cmp19) + (local.get $$sub22) + (local.get $$sub11) + ) + ) + (local.set $$add + (i32.add + (local.get $$cond25) + (local.get $$cond) + ) + ) + (local.set $$cmp26 + (i32.lt_s + (local.get $$sub15) + (i32.const 0) + ) + ) + (local.set $$sub29 + (i32.sub + (i32.const 0) + (local.get $$sub15) + ) + ) + (local.set $$cond32 + (if (result i32) + (local.get $$cmp26) + (local.get $$sub29) + (local.get $$sub15) + ) + ) + (local.set $$add33 + (i32.add + (local.get $$add) + (local.get $$cond32) + ) + ) + (local.set $$4 + (i32.load + (local.get $$bestDiff) + ) + ) + (local.set $$cmp34 + (i32.lt_s + (local.get $$add33) + (local.get $$4) + ) + ) + (if + (i32.eqz + (local.get $$cmp34) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i32.store + (local.get $$bestInd) + (local.get $$sub3) + ) + (i32.store + (local.get $$bestDiff) + (local.get $$add33) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i32.store + (local.get $$comps) + (local.get $$r) + ) + (local.set $$arrayidx40 + (i32.add + (local.get $$comps) + (i32.const 4) + ) + ) + (i32.store + (local.get $$arrayidx40) + (local.get $$g) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$comps) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arrayidx41) + (local.get $$b) + ) + (local.set $$arrayidx42 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 772) + ) + (local.get $$treeRoot) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx42) + ) + ) + (local.set $$idxprom + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$arrayidx43 + (i32.add + (local.get $$comps) + (i32.shl + (local.get $$idxprom) + (i32.const 2) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$arrayidx43) + ) + ) + (local.set $$arrayidx44 + (i32.add + (i32.add + (local.get $$pPal) + (i32.const 1027) + ) + (local.get $$treeRoot) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx44) + ) + ) + (local.set $$conv45 + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + (local.set $$cmp46 + (i32.lt_s + (local.get $$6) + (local.get $$conv45) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$treeRoot) + (i32.const 1) + ) + ) + (if + (local.get $$cmp46) + (block + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$r) + (local.get $$g) + (local.get $$b) + (local.get $$bestInd) + (local.get $$bestDiff) + (local.get $$mul) + ) + (local.set $$8 + (i32.load + (local.get $$bestDiff) + ) + ) + (local.set $$sub49 + (i32.sub + (local.get $$conv45) + (local.get $$6) + ) + ) + (local.set $$cmp50 + (i32.gt_s + (local.get $$8) + (local.get $$sub49) + ) + ) + (if + (local.get $$cmp50) + (block + (local.set $$add54 + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$r) + (local.get $$g) + (local.get $$b) + (local.get $$bestInd) + (local.get $$bestDiff) + (local.get $$add54) + ) + ) + ) + ) + (block + (local.set $$add57 + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$r) + (local.get $$g) + (local.get $$b) + (local.get $$bestInd) + (local.get $$bestDiff) + (local.get $$add57) + ) + (local.set $$9 + (i32.load + (local.get $$bestDiff) + ) + ) + (local.set $$sub58 + (i32.sub + (local.get $$6) + (local.get $$conv45) + ) + ) + (local.set $$cmp59 + (i32.gt_s + (local.get $$9) + (local.get $$sub58) + ) + ) + (if + (local.get $$cmp59) + (call $_GifGetClosestPaletteColor + (local.get $$pPal) + (local.get $$r) + (local.get $$g) + (local.get $$b) + (local.get $$bestInd) + (local.get $$bestDiff) + (local.get $$mul) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GifPickChangedPixels (; 417 ;) (param $$lastFrame i32) (param $$frame i32) (param $$numPixels i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add$ptr i32) + (local $$add$ptr24 i32) + (local $$add$ptr25 i32) + (local $$arrayidx12 i32) + (local $$arrayidx14 i32) + (local $$arrayidx20 i32) + (local $$arrayidx21 i32) + (local $$arrayidx22 i32) + (local $$arrayidx23 i32) + (local $$arrayidx5 i32) + (local $$arrayidx7 i32) + (local $$cmp16 i32) + (local $$cmp19 i32) + (local $$cmp3 i32) + (local $$cmp9 i32) + (local $$exitcond i32) + (local $$frame$addr$020 i32) + (local $$ii$024 i32) + (local $$inc i32) + (local $$inc26 i32) + (local $$lastFrame$addr$021 i32) + (local $$numChanged$0$lcssa i32) + (local $$numChanged$022 i32) + (local $$numChanged$1 i32) + (local $$writeIter$023 i32) + (local $$writeIter$1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp19 + (i32.gt_s + (local.get $$numPixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp19) + ) + (block + (local.set $$numChanged$0$lcssa + (i32.const 0) + ) + (return + (local.get $$numChanged$0$lcssa) + ) + ) + ) + (local.set $$frame$addr$020 + (local.get $$frame) + ) + (local.set $$ii$024 + (i32.const 0) + ) + (local.set $$lastFrame$addr$021 + (local.get $$lastFrame) + ) + (local.set $$numChanged$022 + (i32.const 0) + ) + (local.set $$writeIter$023 + (local.get $$frame) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (i32.load8_s + (local.get $$lastFrame$addr$021) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$frame$addr$020) + ) + ) + (local.set $$cmp3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp3) + (block + (local.set $$arrayidx5 + (i32.add + (local.get $$lastFrame$addr$021) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx5) + ) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$frame$addr$020) + (i32.const 1) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx7) + ) + ) + (local.set $$cmp9 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp9) + (block + (local.set $$arrayidx12 + (i32.add + (local.get $$lastFrame$addr$021) + (i32.const 2) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx12) + ) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$frame$addr$020) + (i32.const 2) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx14) + ) + ) + (local.set $$cmp16 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp16) + (block + (local.set $$numChanged$1 + (local.get $$numChanged$022) + ) + (local.set $$writeIter$1 + (local.get $$writeIter$023) + ) + ) + (local.set $label + (i32.const 7) + ) + ) + ) + (local.set $label + (i32.const 7) + ) + ) + ) + (local.set $label + (i32.const 7) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 7) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store8 + (local.get $$writeIter$023) + (local.get $$1) + ) + (local.set $$arrayidx20 + (i32.add + (local.get $$frame$addr$020) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx20) + ) + ) + (local.set $$arrayidx21 + (i32.add + (local.get $$writeIter$023) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx21) + (local.get $$6) + ) + (local.set $$arrayidx22 + (i32.add + (local.get $$frame$addr$020) + (i32.const 2) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx22) + ) + ) + (local.set $$arrayidx23 + (i32.add + (local.get $$writeIter$023) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx23) + (local.get $$7) + ) + (local.set $$inc + (i32.add + (local.get $$numChanged$022) + (i32.const 1) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$writeIter$023) + (i32.const 4) + ) + ) + (local.set $$numChanged$1 + (local.get $$inc) + ) + (local.set $$writeIter$1 + (local.get $$add$ptr) + ) + ) + ) + (local.set $$add$ptr24 + (i32.add + (local.get $$lastFrame$addr$021) + (i32.const 4) + ) + ) + (local.set $$add$ptr25 + (i32.add + (local.get $$frame$addr$020) + (i32.const 4) + ) + ) + (local.set $$inc26 + (i32.add + (local.get $$ii$024) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc26) + (local.get $$numPixels) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$numChanged$0$lcssa + (local.get $$numChanged$1) + ) + (br $while-out) + ) + (block + (local.set $$frame$addr$020 + (local.get $$add$ptr25) + ) + (local.set $$ii$024 + (local.get $$inc26) + ) + (local.set $$lastFrame$addr$021 + (local.get $$add$ptr24) + ) + (local.set $$numChanged$022 + (local.get $$numChanged$1) + ) + (local.set $$writeIter$023 + (local.get $$writeIter$1) + ) + ) + ) + (br $while-in) + ) + ) + (return + (local.get $$numChanged$0$lcssa) + ) + ) + (func $_GifSplitPalette (; 418 ;) (param $$image i32) (param $$numPixels i32) (param $$firstElt i32) (param $$lastElt i32) (param $$splitElt i32) (param $$splitDist i32) (param $$treeNode i32) (param $$buildForDither i32) (param $$pal i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add134 i64) + (local $$add136 i32) + (local $$add139 i64) + (local $$add141 i32) + (local $$add144 i64) + (local $$add149 i64) + (local $$add152 i64) + (local $$add155 i64) + (local $$add16 i32) + (local $$add185 i32) + (local $$add190 i32) + (local $$add241 i32) + (local $$add249 i32) + (local $$add252 i32) + (local $$add30 i32) + (local $$add80 i32) + (local $$add94 i32) + (local $$arrayidx i32) + (local $$arrayidx112 i32) + (local $$arrayidx115 i32) + (local $$arrayidx118 i32) + (local $$arrayidx132 i32) + (local $$arrayidx137 i32) + (local $$arrayidx142 i32) + (local $$arrayidx164 i32) + (local $$arrayidx167 i32) + (local $$arrayidx17 i32) + (local $$arrayidx170 i32) + (local $$arrayidx181 i32) + (local $$arrayidx186 i32) + (local $$arrayidx191 i32) + (local $$arrayidx239 i32) + (local $$arrayidx242 i32) + (local $$arrayidx243 i32) + (local $$arrayidx31 i32) + (local $$arrayidx45 i32) + (local $$arrayidx48 i32) + (local $$arrayidx51 i32) + (local $$arrayidx67 i32) + (local $$arrayidx81 i32) + (local $$arrayidx95 i32) + (local $$b$0$conv32 i32) + (local $$b$0$lcssa i32) + (local $$b$0181 i32) + (local $$b123$0$lcssa i64) + (local $$b123$0197 i64) + (local $$b58$0$conv96 i32) + (local $$b58$0$lcssa i32) + (local $$b58$0188 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp1217 i32) + (local $$cmp126194 i32) + (local $$cmp174202 i32) + (local $$cmp19 i32) + (local $$cmp193 i32) + (local $$cmp197 i32) + (local $$cmp2 i32) + (local $$cmp201 i32) + (local $$cmp205 i32) + (local $$cmp209 i32) + (local $$cmp213 i32) + (local $$cmp216 i32) + (local $$cmp223 i32) + (local $$cmp227 i32) + (local $$cmp229 i32) + (local $$cmp33 i32) + (local $$cmp5 i32) + (local $$cmp53 i32) + (local $$cmp61186 i32) + (local $$cmp69 i32) + (local $$cmp7179 i32) + (local $$cmp83 i32) + (local $$cmp9 i32) + (local $$cmp97 i32) + (local $$cond28 i32) + (local $$cond92 i32) + (local $$conv i32) + (local $$conv133 i64) + (local $$conv138 i64) + (local $$conv143 i64) + (local $$conv148 i64) + (local $$conv156 i64) + (local $$conv162 i32) + (local $$conv165 i32) + (local $$conv168 i32) + (local $$conv18 i32) + (local $$conv182 i32) + (local $$conv187 i32) + (local $$conv192 i32) + (local $$conv238 i32) + (local $$conv32 i32) + (local $$conv68 i32) + (local $$conv82 i32) + (local $$conv96 i32) + (local $$div i32) + (local $$div157 i64) + (local $$div159 i64) + (local $$div161 i64) + (local $$div236 i32) + (local $$div245 i32) + (local $$exitcond i32) + (local $$exitcond228 i32) + (local $$exitcond229 i32) + (local $$exitcond230 i32) + (local $$firstElt$tr221 i32) + (local $$firstElt$tr221$phi i32) + (local $$g$0$lcssa i32) + (local $$g$0182 i32) + (local $$g122$0$lcssa i64) + (local $$g122$0196 i64) + (local $$g57$0$lcssa i32) + (local $$g57$0189 i32) + (local $$ii$0180 i32) + (local $$ii124$0198 i32) + (local $$ii172$0209 i32) + (local $$ii59$0187 i32) + (local $$image$tr219 i32) + (local $$inc i32) + (local $$inc108 i32) + (local $$inc146 i32) + (local $$inc218 i32) + (local $$maxB$0$lcssa i32) + (local $$maxB$0208 i32) + (local $$maxG$0$lcssa i32) + (local $$maxG$0206 i32) + (local $$maxR$0$lcssa i32) + (local $$maxR$0204 i32) + (local $$minB$0$lcssa i32) + (local $$minB$0207 i32) + (local $$minB$1 i32) + (local $$minG$0$lcssa i32) + (local $$minG$0205 i32) + (local $$minG$1 i32) + (local $$minR$0$lcssa i32) + (local $$minR$0203 i32) + (local $$minR$1 i32) + (local $$mul i32) + (local $$mul130 i32) + (local $$mul179 i32) + (local $$mul234 i32) + (local $$mul240 i32) + (local $$mul246 i32) + (local $$mul65 i32) + (local $$numPixels$tr220 i32) + (local $$or$cond i32) + (local $$or$cond175 i32) + (local $$or$cond218 i32) + (local $$phitmp i32) + (local $$phitmp231 i32) + (local $$phitmp232 i32) + (local $$phitmp233 i32) + (local $$phitmp234 i32) + (local $$phitmp235 i32) + (local $$r$0$conv i32) + (local $$r$0$lcssa i32) + (local $$r$0183 i32) + (local $$r121$0$lcssa i64) + (local $$r121$0195 i64) + (local $$r56$0$conv68 i32) + (local $$r56$0$lcssa i32) + (local $$r56$0190 i32) + (local $$shl i32) + (local $$spec$select i32) + (local $$spec$select173 i32) + (local $$spec$select174 i32) + (local $$spec$store$select i32) + (local $$splitCom$0 i32) + (local $$splitDist$tr223 i32) + (local $$splitElt$tr222 i32) + (local $$sub i32) + (local $$sub220 i32) + (local $$sub221 i32) + (local $$sub222 i32) + (local $$sub233 i32) + (local $$sub235 i32) + (local $$sub237 i32) + (local $$sub244 i32) + (local $$treeNode$tr224 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp216 + (i32.le_s + (local.get $$lastElt) + (local.get $$firstElt) + ) + ) + (local.set $$cmp1217 + (i32.eq + (local.get $$numPixels) + (i32.const 0) + ) + ) + (local.set $$or$cond218 + (i32.or + (local.get $$cmp1217) + (local.get $$cmp216) + ) + ) + (if + (local.get $$or$cond218) + (return) + ) + (local.set $$firstElt$tr221 + (local.get $$firstElt) + ) + (local.set $$image$tr219 + (local.get $$image) + ) + (local.set $$numPixels$tr220 + (local.get $$numPixels) + ) + (local.set $$splitDist$tr223 + (local.get $$splitDist) + ) + (local.set $$splitElt$tr222 + (local.get $$splitElt) + ) + (local.set $$treeNode$tr224 + (local.get $$treeNode) + ) + (loop $while-in + (block $while-out + (local.set $$add + (i32.add + (local.get $$firstElt$tr221) + (i32.const 1) + ) + ) + (local.set $$cmp2 + (i32.eq + (local.get $$add) + (local.get $$lastElt) + ) + ) + (if + (local.get $$cmp2) + (br $while-out) + ) + (local.set $$cmp174202 + (i32.gt_s + (local.get $$numPixels$tr220) + (i32.const 0) + ) + ) + (if + (local.get $$cmp174202) + (block + (local.set $$ii172$0209 + (i32.const 0) + ) + (local.set $$maxB$0208 + (i32.const 0) + ) + (local.set $$maxG$0206 + (i32.const 0) + ) + (local.set $$maxR$0204 + (i32.const 0) + ) + (local.set $$minB$0207 + (i32.const 255) + ) + (local.set $$minG$0205 + (i32.const 255) + ) + (local.set $$minR$0203 + (i32.const 255) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$mul179 + (i32.shl + (local.get $$ii172$0209) + (i32.const 2) + ) + ) + (local.set $$arrayidx181 + (i32.add + (local.get $$image$tr219) + (local.get $$mul179) + ) + ) + (local.set $$11 + (i32.load8_s + (local.get $$arrayidx181) + ) + ) + (local.set $$conv182 + (i32.and + (local.get $$11) + (i32.const 255) + ) + ) + (local.set $$add185 + (i32.or + (local.get $$mul179) + (i32.const 1) + ) + ) + (local.set $$arrayidx186 + (i32.add + (local.get $$image$tr219) + (local.get $$add185) + ) + ) + (local.set $$12 + (i32.load8_s + (local.get $$arrayidx186) + ) + ) + (local.set $$conv187 + (i32.and + (local.get $$12) + (i32.const 255) + ) + ) + (local.set $$add190 + (i32.or + (local.get $$mul179) + (i32.const 2) + ) + ) + (local.set $$arrayidx191 + (i32.add + (local.get $$image$tr219) + (local.get $$add190) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx191) + ) + ) + (local.set $$conv192 + (i32.and + (local.get $$13) + (i32.const 255) + ) + ) + (local.set $$cmp193 + (i32.lt_s + (local.get $$maxR$0204) + (local.get $$conv182) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp193) + (local.get $$conv182) + (local.get $$maxR$0204) + ) + ) + (local.set $$cmp197 + (i32.gt_s + (local.get $$minR$0203) + (local.get $$conv182) + ) + ) + (local.set $$minR$1 + (if (result i32) + (local.get $$cmp197) + (local.get $$conv182) + (local.get $$minR$0203) + ) + ) + (local.set $$cmp201 + (i32.lt_s + (local.get $$maxG$0206) + (local.get $$conv187) + ) + ) + (local.set $$spec$select173 + (if (result i32) + (local.get $$cmp201) + (local.get $$conv187) + (local.get $$maxG$0206) + ) + ) + (local.set $$cmp205 + (i32.gt_s + (local.get $$minG$0205) + (local.get $$conv187) + ) + ) + (local.set $$minG$1 + (if (result i32) + (local.get $$cmp205) + (local.get $$conv187) + (local.get $$minG$0205) + ) + ) + (local.set $$cmp209 + (i32.lt_s + (local.get $$maxB$0208) + (local.get $$conv192) + ) + ) + (local.set $$spec$select174 + (if (result i32) + (local.get $$cmp209) + (local.get $$conv192) + (local.get $$maxB$0208) + ) + ) + (local.set $$cmp213 + (i32.gt_s + (local.get $$minB$0207) + (local.get $$conv192) + ) + ) + (local.set $$minB$1 + (if (result i32) + (local.get $$cmp213) + (local.get $$conv192) + (local.get $$minB$0207) + ) + ) + (local.set $$inc218 + (i32.add + (local.get $$ii172$0209) + (i32.const 1) + ) + ) + (local.set $$exitcond230 + (i32.eq + (local.get $$inc218) + (local.get $$numPixels$tr220) + ) + ) + (if + (local.get $$exitcond230) + (block + (local.set $$maxB$0$lcssa + (local.get $$spec$select174) + ) + (local.set $$maxG$0$lcssa + (local.get $$spec$select173) + ) + (local.set $$maxR$0$lcssa + (local.get $$spec$select) + ) + (local.set $$minB$0$lcssa + (local.get $$minB$1) + ) + (local.set $$minG$0$lcssa + (local.get $$minG$1) + ) + (local.set $$minR$0$lcssa + (local.get $$minR$1) + ) + (br $while-out0) + ) + (block + (local.set $$ii172$0209 + (local.get $$inc218) + ) + (local.set $$maxB$0208 + (local.get $$spec$select174) + ) + (local.set $$maxG$0206 + (local.get $$spec$select173) + ) + (local.set $$maxR$0204 + (local.get $$spec$select) + ) + (local.set $$minB$0207 + (local.get $$minB$1) + ) + (local.set $$minG$0205 + (local.get $$minG$1) + ) + (local.set $$minR$0203 + (local.get $$minR$1) + ) + ) + ) + (br $while-in1) + ) + ) + ) + (block + (local.set $$maxB$0$lcssa + (i32.const 0) + ) + (local.set $$maxG$0$lcssa + (i32.const 0) + ) + (local.set $$maxR$0$lcssa + (i32.const 0) + ) + (local.set $$minB$0$lcssa + (i32.const 255) + ) + (local.set $$minG$0$lcssa + (i32.const 255) + ) + (local.set $$minR$0$lcssa + (i32.const 255) + ) + ) + ) + (local.set $$sub220 + (i32.sub + (local.get $$maxR$0$lcssa) + (local.get $$minR$0$lcssa) + ) + ) + (local.set $$sub221 + (i32.sub + (local.get $$maxG$0$lcssa) + (local.get $$minG$0$lcssa) + ) + ) + (local.set $$sub222 + (i32.sub + (local.get $$maxB$0$lcssa) + (local.get $$minB$0$lcssa) + ) + ) + (local.set $$cmp223 + (i32.gt_s + (local.get $$sub222) + (local.get $$sub221) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$cmp223) + (i32.const 2) + (i32.const 1) + ) + ) + (local.set $$cmp227 + (i32.gt_s + (local.get $$sub220) + (local.get $$sub222) + ) + ) + (local.set $$cmp229 + (i32.gt_s + (local.get $$sub220) + (local.get $$sub221) + ) + ) + (local.set $$or$cond175 + (i32.and + (local.get $$cmp229) + (local.get $$cmp227) + ) + ) + (local.set $$splitCom$0 + (if (result i32) + (local.get $$or$cond175) + (i32.const 0) + (local.get $$spec$store$select) + ) + ) + (local.set $$sub233 + (i32.sub + (local.get $$splitElt$tr222) + (local.get $$firstElt$tr221) + ) + ) + (local.set $$mul234 + (i32.mul + (local.get $$sub233) + (local.get $$numPixels$tr220) + ) + ) + (local.set $$sub235 + (i32.sub + (local.get $$lastElt) + (local.get $$firstElt$tr221) + ) + ) + (local.set $$div236 + (i32.and + (i32.div_s + (local.get $$mul234) + (local.get $$sub235) + ) + (i32.const -1) + ) + ) + (local.set $$sub237 + (i32.sub + (local.get $$numPixels$tr220) + (local.get $$div236) + ) + ) + (call $_GifPartitionByMedian + (local.get $$image$tr219) + (i32.const 0) + (local.get $$numPixels$tr220) + (local.get $$splitCom$0) + (local.get $$div236) + ) + (local.set $$conv238 + (i32.and + (local.get $$splitCom$0) + (i32.const 255) + ) + ) + (local.set $$arrayidx239 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 772) + ) + (local.get $$treeNode$tr224) + ) + ) + (i32.store8 + (local.get $$arrayidx239) + (local.get $$conv238) + ) + (local.set $$mul240 + (i32.shl + (local.get $$div236) + (i32.const 2) + ) + ) + (local.set $$add241 + (i32.or + (local.get $$mul240) + (local.get $$splitCom$0) + ) + ) + (local.set $$arrayidx242 + (i32.add + (local.get $$image$tr219) + (local.get $$add241) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx242) + ) + ) + (local.set $$arrayidx243 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 1027) + ) + (local.get $$treeNode$tr224) + ) + ) + (i32.store8 + (local.get $$arrayidx243) + (local.get $$10) + ) + (local.set $$sub244 + (i32.sub + (local.get $$splitElt$tr222) + (local.get $$splitDist$tr223) + ) + ) + (local.set $$div245 + (i32.and + (i32.div_s + (local.get $$splitDist$tr223) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$mul246 + (i32.shl + (local.get $$treeNode$tr224) + (i32.const 1) + ) + ) + (call $_GifSplitPalette + (local.get $$image$tr219) + (local.get $$div236) + (local.get $$firstElt$tr221) + (local.get $$splitElt$tr222) + (local.get $$sub244) + (local.get $$div245) + (local.get $$mul246) + (local.get $$buildForDither) + (local.get $$pal) + ) + (local.set $$add$ptr + (i32.add + (local.get $$image$tr219) + (local.get $$mul240) + ) + ) + (local.set $$add249 + (i32.add + (local.get $$splitDist$tr223) + (local.get $$splitElt$tr222) + ) + ) + (local.set $$add252 + (i32.or + (local.get $$mul246) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.ge_s + (local.get $$splitElt$tr222) + (local.get $$lastElt) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$sub237) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $label + (i32.const 25) + ) + (br $while-out) + ) + (block + (local.set $$firstElt$tr221$phi + (local.get $$splitElt$tr222) + ) + (local.set $$image$tr219 + (local.get $$add$ptr) + ) + (local.set $$numPixels$tr220 + (local.get $$sub237) + ) + (local.set $$splitDist$tr223 + (local.get $$div245) + ) + (local.set $$splitElt$tr222 + (local.get $$add249) + ) + (local.set $$treeNode$tr224 + (local.get $$add252) + ) + (local.set $$firstElt$tr221 + (local.get $$firstElt$tr221$phi) + ) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 25) + ) + (return) + ) + (if + (local.get $$buildForDither) + (block + (local.set $$cmp5 + (i32.eq + (local.get $$firstElt$tr221) + (i32.const 1) + ) + ) + (if + (local.get $$cmp5) + (block + (local.set $$cmp7179 + (i32.gt_s + (local.get $$numPixels$tr220) + (i32.const 0) + ) + ) + (if + (local.get $$cmp7179) + (block + (local.set $$b$0181 + (i32.const 255) + ) + (local.set $$g$0182 + (i32.const 255) + ) + (local.set $$ii$0180 + (i32.const 0) + ) + (local.set $$r$0183 + (i32.const 255) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$mul + (i32.shl + (local.get $$ii$0180) + (i32.const 2) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$image$tr219) + (local.get $$mul) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$cmp9 + (i32.lt_u + (local.get $$r$0183) + (local.get $$conv) + ) + ) + (local.set $$r$0$conv + (if (result i32) + (local.get $$cmp9) + (local.get $$r$0183) + (local.get $$conv) + ) + ) + (local.set $$add16 + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx17 + (i32.add + (local.get $$image$tr219) + (local.get $$add16) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx17) + ) + ) + (local.set $$conv18 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$cmp19 + (i32.lt_u + (local.get $$g$0182) + (local.get $$conv18) + ) + ) + (local.set $$cond28 + (if (result i32) + (local.get $$cmp19) + (local.get $$g$0182) + (local.get $$conv18) + ) + ) + (local.set $$add30 + (i32.or + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$arrayidx31 + (i32.add + (local.get $$image$tr219) + (local.get $$add30) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx31) + ) + ) + (local.set $$conv32 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$cmp33 + (i32.lt_u + (local.get $$b$0181) + (local.get $$conv32) + ) + ) + (local.set $$b$0$conv32 + (if (result i32) + (local.get $$cmp33) + (local.get $$b$0181) + (local.get $$conv32) + ) + ) + (local.set $$inc + (i32.add + (local.get $$ii$0180) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$numPixels$tr220) + ) + ) + (if + (local.get $$exitcond) + (br $while-out2) + (block + (local.set $$b$0181 + (local.get $$b$0$conv32) + ) + (local.set $$g$0182 + (local.get $$cond28) + ) + (local.set $$ii$0180 + (local.get $$inc) + ) + (local.set $$r$0183 + (local.get $$r$0$conv) + ) + ) + ) + (br $while-in3) + ) + ) + (local.set $$phitmp233 + (i32.and + (local.get $$r$0$conv) + (i32.const 255) + ) + ) + (local.set $$phitmp234 + (i32.and + (local.get $$cond28) + (i32.const 255) + ) + ) + (local.set $$phitmp235 + (i32.and + (local.get $$b$0$conv32) + (i32.const 255) + ) + ) + (local.set $$b$0$lcssa + (local.get $$phitmp235) + ) + (local.set $$g$0$lcssa + (local.get $$phitmp234) + ) + (local.set $$r$0$lcssa + (local.get $$phitmp233) + ) + ) + (block + (local.set $$b$0$lcssa + (i32.const -1) + ) + (local.set $$g$0$lcssa + (i32.const -1) + ) + (local.set $$r$0$lcssa + (i32.const -1) + ) + ) + ) + (local.set $$arrayidx45 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 4) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx45) + (local.get $$r$0$lcssa) + ) + (local.set $$arrayidx48 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 260) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx48) + (local.get $$g$0$lcssa) + ) + (local.set $$arrayidx51 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 516) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx51) + (local.get $$b$0$lcssa) + ) + (return) + ) + ) + (local.set $$3 + (i32.load + (local.get $$pal) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$3) + ) + ) + (local.set $$sub + (i32.add + (local.get $$shl) + (i32.const -1) + ) + ) + (local.set $$cmp53 + (i32.eq + (local.get $$sub) + (local.get $$firstElt$tr221) + ) + ) + (if + (local.get $$cmp53) + (block + (local.set $$cmp61186 + (i32.gt_s + (local.get $$numPixels$tr220) + (i32.const 0) + ) + ) + (if + (local.get $$cmp61186) + (block + (local.set $$b58$0188 + (i32.const 0) + ) + (local.set $$g57$0189 + (i32.const 0) + ) + (local.set $$ii59$0187 + (i32.const 0) + ) + (local.set $$r56$0190 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$mul65 + (i32.shl + (local.get $$ii59$0187) + (i32.const 2) + ) + ) + (local.set $$arrayidx67 + (i32.add + (local.get $$image$tr219) + (local.get $$mul65) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx67) + ) + ) + (local.set $$conv68 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$cmp69 + (i32.gt_u + (local.get $$r56$0190) + (local.get $$conv68) + ) + ) + (local.set $$r56$0$conv68 + (if (result i32) + (local.get $$cmp69) + (local.get $$r56$0190) + (local.get $$conv68) + ) + ) + (local.set $$add80 + (i32.or + (local.get $$mul65) + (i32.const 1) + ) + ) + (local.set $$arrayidx81 + (i32.add + (local.get $$image$tr219) + (local.get $$add80) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx81) + ) + ) + (local.set $$conv82 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$cmp83 + (i32.gt_u + (local.get $$g57$0189) + (local.get $$conv82) + ) + ) + (local.set $$cond92 + (if (result i32) + (local.get $$cmp83) + (local.get $$g57$0189) + (local.get $$conv82) + ) + ) + (local.set $$add94 + (i32.or + (local.get $$mul65) + (i32.const 2) + ) + ) + (local.set $$arrayidx95 + (i32.add + (local.get $$image$tr219) + (local.get $$add94) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx95) + ) + ) + (local.set $$conv96 + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + (local.set $$cmp97 + (i32.gt_u + (local.get $$b58$0188) + (local.get $$conv96) + ) + ) + (local.set $$b58$0$conv96 + (if (result i32) + (local.get $$cmp97) + (local.get $$b58$0188) + (local.get $$conv96) + ) + ) + (local.set $$inc108 + (i32.add + (local.get $$ii59$0187) + (i32.const 1) + ) + ) + (local.set $$exitcond228 + (i32.eq + (local.get $$inc108) + (local.get $$numPixels$tr220) + ) + ) + (if + (local.get $$exitcond228) + (br $while-out4) + (block + (local.set $$b58$0188 + (local.get $$b58$0$conv96) + ) + (local.set $$g57$0189 + (local.get $$cond92) + ) + (local.set $$ii59$0187 + (local.get $$inc108) + ) + (local.set $$r56$0190 + (local.get $$r56$0$conv68) + ) + ) + ) + (br $while-in5) + ) + ) + (local.set $$phitmp + (i32.and + (local.get $$r56$0$conv68) + (i32.const 255) + ) + ) + (local.set $$phitmp231 + (i32.and + (local.get $$cond92) + (i32.const 255) + ) + ) + (local.set $$phitmp232 + (i32.and + (local.get $$b58$0$conv96) + (i32.const 255) + ) + ) + (local.set $$b58$0$lcssa + (local.get $$phitmp232) + ) + (local.set $$g57$0$lcssa + (local.get $$phitmp231) + ) + (local.set $$r56$0$lcssa + (local.get $$phitmp) + ) + ) + (block + (local.set $$b58$0$lcssa + (i32.const 0) + ) + (local.set $$g57$0$lcssa + (i32.const 0) + ) + (local.set $$r56$0$lcssa + (i32.const 0) + ) + ) + ) + (local.set $$arrayidx112 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 4) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx112) + (local.get $$r56$0$lcssa) + ) + (local.set $$arrayidx115 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 260) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx115) + (local.get $$g57$0$lcssa) + ) + (local.set $$arrayidx118 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 516) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx118) + (local.get $$b58$0$lcssa) + ) + (return) + ) + ) + ) + ) + (local.set $$cmp126194 + (i32.gt_s + (local.get $$numPixels$tr220) + (i32.const 0) + ) + ) + (if + (local.get $$cmp126194) + (block + (local.set $$b123$0197 + (i64.const 0) + ) + (local.set $$g122$0196 + (i64.const 0) + ) + (local.set $$ii124$0198 + (i32.const 0) + ) + (local.set $$r121$0195 + (i64.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$mul130 + (i32.shl + (local.get $$ii124$0198) + (i32.const 2) + ) + ) + (local.set $$arrayidx132 + (i32.add + (local.get $$image$tr219) + (local.get $$mul130) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx132) + ) + ) + (local.set $$conv133 + (i64.extend_i32_u + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + ) + (local.set $$add134 + (i64.add + (local.get $$r121$0195) + (local.get $$conv133) + ) + ) + (local.set $$add136 + (i32.or + (local.get $$mul130) + (i32.const 1) + ) + ) + (local.set $$arrayidx137 + (i32.add + (local.get $$image$tr219) + (local.get $$add136) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx137) + ) + ) + (local.set $$conv138 + (i64.extend_i32_u + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + ) + (local.set $$add139 + (i64.add + (local.get $$g122$0196) + (local.get $$conv138) + ) + ) + (local.set $$add141 + (i32.or + (local.get $$mul130) + (i32.const 2) + ) + ) + (local.set $$arrayidx142 + (i32.add + (local.get $$image$tr219) + (local.get $$add141) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx142) + ) + ) + (local.set $$conv143 + (i64.extend_i32_u + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + ) + (local.set $$add144 + (i64.add + (local.get $$b123$0197) + (local.get $$conv143) + ) + ) + (local.set $$inc146 + (i32.add + (local.get $$ii124$0198) + (i32.const 1) + ) + ) + (local.set $$exitcond229 + (i32.eq + (local.get $$inc146) + (local.get $$numPixels$tr220) + ) + ) + (if + (local.get $$exitcond229) + (block + (local.set $$b123$0$lcssa + (local.get $$add144) + ) + (local.set $$g122$0$lcssa + (local.get $$add139) + ) + (local.set $$r121$0$lcssa + (local.get $$add134) + ) + (br $while-out6) + ) + (block + (local.set $$b123$0197 + (local.get $$add144) + ) + (local.set $$g122$0196 + (local.get $$add139) + ) + (local.set $$ii124$0198 + (local.get $$inc146) + ) + (local.set $$r121$0195 + (local.get $$add134) + ) + ) + ) + (br $while-in7) + ) + ) + ) + (block + (local.set $$b123$0$lcssa + (i64.const 0) + ) + (local.set $$g122$0$lcssa + (i64.const 0) + ) + (local.set $$r121$0$lcssa + (i64.const 0) + ) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$numPixels$tr220) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$conv148 + (i64.extend_i32_s + (local.get $$div) + ) + ) + (local.set $$add149 + (i64.add + (local.get $$r121$0$lcssa) + (local.get $$conv148) + ) + ) + (local.set $$add152 + (i64.add + (local.get $$g122$0$lcssa) + (local.get $$conv148) + ) + ) + (local.set $$add155 + (i64.add + (local.get $$b123$0$lcssa) + (local.get $$conv148) + ) + ) + (local.set $$conv156 + (i64.extend_i32_s + (local.get $$numPixels$tr220) + ) + ) + (local.set $$div157 + (i64.div_u + (local.get $$add149) + (local.get $$conv156) + ) + ) + (local.set $$div159 + (i64.div_u + (local.get $$add152) + (local.get $$conv156) + ) + ) + (local.set $$div161 + (i64.div_u + (local.get $$add155) + (local.get $$conv156) + ) + ) + (local.set $$conv162 + (i32.and + (i32.wrap_i64 + (local.get $$div157) + ) + (i32.const 255) + ) + ) + (local.set $$arrayidx164 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 4) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx164) + (local.get $$conv162) + ) + (local.set $$conv165 + (i32.and + (i32.wrap_i64 + (local.get $$div159) + ) + (i32.const 255) + ) + ) + (local.set $$arrayidx167 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 260) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx167) + (local.get $$conv165) + ) + (local.set $$conv168 + (i32.and + (i32.wrap_i64 + (local.get $$div161) + ) + (i32.const 255) + ) + ) + (local.set $$arrayidx170 + (i32.add + (i32.add + (local.get $$pal) + (i32.const 516) + ) + (local.get $$firstElt$tr221) + ) + ) + (i32.store8 + (local.get $$arrayidx170) + (local.get $$conv168) + ) + (return) + ) + (func $_GifPartitionByMedian (; 419 ;) (param $$image i32) (param $$left i32) (param $$right i32) (param $$com i32) (param $$neededCenter i32) + (local $$add i32) + (local $$add6 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp2 i32) + (local $$cmp20 i32) + (local $$cmp4 i32) + (local $$div i32) + (local $$left$tr21 i32) + (local $$or$cond i32) + (local $$sub i32) + (local $$sub1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (i32.add + (local.get $$right) + (i32.const -1) + ) + ) + (local.set $$cmp20 + (i32.gt_s + (local.get $$sub) + (local.get $$left) + ) + ) + (if + (i32.eqz + (local.get $$cmp20) + ) + (return) + ) + (local.set $$left$tr21 + (local.get $$left) + ) + (loop $while-in + (block $while-out + (local.set $$sub1 + (i32.sub + (local.get $$right) + (local.get $$left$tr21) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$sub1) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$add + (i32.add + (local.get $$div) + (local.get $$left$tr21) + ) + ) + (local.set $$call + (call $_GifPartition + (local.get $$image) + (local.get $$left$tr21) + (local.get $$right) + (local.get $$com) + (local.get $$add) + ) + ) + (local.set $$cmp2 + (i32.gt_s + (local.get $$call) + (local.get $$neededCenter) + ) + ) + (if + (local.get $$cmp2) + (call $_GifPartitionByMedian + (local.get $$image) + (local.get $$left$tr21) + (local.get $$call) + (local.get $$com) + (local.get $$neededCenter) + ) + ) + (local.set $$cmp4 + (i32.lt_s + (local.get $$call) + (local.get $$neededCenter) + ) + ) + (local.set $$add6 + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$sub) + (local.get $$add6) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp4) + (local.get $$cmp) + ) + ) + (if + (local.get $$or$cond) + (local.set $$left$tr21 + (local.get $$add6) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_GifPartition (; 420 ;) (param $$image i32) (param $$left i32) (param $$right i32) (param $$elt i32) (param $$pivotIndex i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$add i32) + (local $$add4 i32) + (local $$arrayidx i32) + (local $$arrayidx5 i32) + (local $$cmp30 i32) + (local $$cmp7 i32) + (local $$cmp9 i32) + (local $$exitcond i32) + (local $$ii$032 i32) + (local $$inc i32) + (local $$inc13 i32) + (local $$inc17 i32) + (local $$lnot i32) + (local $$mul i32) + (local $$mul3 i32) + (local $$split$0$off031 i32) + (local $$split$1$off0 i32) + (local $$storeIndex$0$lcssa i32) + (local $$storeIndex$033 i32) + (local $$storeIndex$1 i32) + (local $$storeIndex$2 i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.shl + (local.get $$pivotIndex) + (i32.const 2) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$elt) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$image) + (local.get $$add) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$sub + (i32.add + (local.get $$right) + (i32.const -1) + ) + ) + (call $_GifSwapPixels + (local.get $$image) + (local.get $$pivotIndex) + (local.get $$sub) + ) + (local.set $$cmp30 + (i32.gt_s + (local.get $$sub) + (local.get $$left) + ) + ) + (if + (i32.eqz + (local.get $$cmp30) + ) + (block + (local.set $$storeIndex$0$lcssa + (local.get $$left) + ) + (call $_GifSwapPixels + (local.get $$image) + (local.get $$storeIndex$0$lcssa) + (local.get $$sub) + ) + (return + (local.get $$storeIndex$0$lcssa) + ) + ) + ) + (local.set $$ii$032 + (local.get $$left) + ) + (local.set $$split$0$off031 + (i32.const 0) + ) + (local.set $$storeIndex$033 + (local.get $$left) + ) + (loop $while-in + (block $while-out + (local.set $$mul3 + (i32.shl + (local.get $$ii$032) + (i32.const 2) + ) + ) + (local.set $$add4 + (i32.add + (local.get $$mul3) + (local.get $$elt) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$image) + (local.get $$add4) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx5) + ) + ) + (local.set $$cmp7 + (i32.lt_s + (i32.and + (local.get $$1) + (i32.const 255) + ) + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + ) + (if + (local.get $$cmp7) + (block + (call $_GifSwapPixels + (local.get $$image) + (local.get $$ii$032) + (local.get $$storeIndex$033) + ) + (local.set $$inc + (i32.add + (local.get $$storeIndex$033) + (i32.const 1) + ) + ) + (local.set $$split$1$off0 + (local.get $$split$0$off031) + ) + (local.set $$storeIndex$2 + (local.get $$inc) + ) + ) + (block + (local.set $$cmp9 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp9) + (block + (if + (local.get $$split$0$off031) + (block + (local.set $$inc13 + (i32.add + (local.get $$storeIndex$033) + (i32.const 1) + ) + ) + (call $_GifSwapPixels + (local.get $$image) + (local.get $$ii$032) + (local.get $$storeIndex$033) + ) + (local.set $$storeIndex$1 + (local.get $$inc13) + ) + ) + (local.set $$storeIndex$1 + (local.get $$storeIndex$033) + ) + ) + (local.set $$lnot + (i32.xor + (local.get $$split$0$off031) + (i32.const 1) + ) + ) + (local.set $$split$1$off0 + (local.get $$lnot) + ) + (local.set $$storeIndex$2 + (local.get $$storeIndex$1) + ) + ) + (block + (local.set $$split$1$off0 + (local.get $$split$0$off031) + ) + (local.set $$storeIndex$2 + (local.get $$storeIndex$033) + ) + ) + ) + ) + ) + (local.set $$inc17 + (i32.add + (local.get $$ii$032) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc17) + (local.get $$sub) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$storeIndex$0$lcssa + (local.get $$storeIndex$2) + ) + (br $while-out) + ) + (block + (local.set $$ii$032 + (local.get $$inc17) + ) + (local.set $$split$0$off031 + (local.get $$split$1$off0) + ) + (local.set $$storeIndex$033 + (local.get $$storeIndex$2) + ) + ) + ) + (br $while-in) + ) + ) + (call $_GifSwapPixels + (local.get $$image) + (local.get $$storeIndex$0$lcssa) + (local.get $$sub) + ) + (return + (local.get $$storeIndex$0$lcssa) + ) + ) + (func $_GifSwapPixels (; 421 ;) (param $$image i32) (param $$pixA i32) (param $$pixB i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$add i32) + (local $$add12 i32) + (local $$add15 i32) + (local $$add4 i32) + (local $$add40 i32) + (local $$add7 i32) + (local $$arrayidx i32) + (local $$arrayidx10 i32) + (local $$arrayidx13 i32) + (local $$arrayidx16 i32) + (local $$arrayidx2 i32) + (local $$arrayidx41 i32) + (local $$arrayidx5 i32) + (local $$arrayidx8 i32) + (local $$mul i32) + (local $$mul9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.shl + (local.get $$pixA) + (i32.const 2) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$image) + (local.get $$mul) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$add + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx2 + (i32.add + (local.get $$image) + (local.get $$add) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx2) + ) + ) + (local.set $$add4 + (i32.or + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$image) + (local.get $$add4) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx5) + ) + ) + (local.set $$add7 + (i32.or + (local.get $$mul) + (i32.const 3) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$image) + (local.get $$add7) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx8) + ) + ) + (local.set $$mul9 + (i32.shl + (local.get $$pixB) + (i32.const 2) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$image) + (local.get $$mul9) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx10) + ) + ) + (local.set $$add12 + (i32.or + (local.get $$mul9) + (i32.const 1) + ) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$image) + (local.get $$add12) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx13) + ) + ) + (local.set $$add15 + (i32.or + (local.get $$mul9) + (i32.const 2) + ) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$image) + (local.get $$add15) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx16) + ) + ) + (i32.store8 + (local.get $$arrayidx) + (local.get $$4) + ) + (i32.store8 + (local.get $$arrayidx2) + (local.get $$5) + ) + (i32.store8 + (local.get $$arrayidx5) + (local.get $$6) + ) + (i32.store8 + (local.get $$arrayidx10) + (local.get $$0) + ) + (i32.store8 + (local.get $$arrayidx13) + (local.get $$1) + ) + (i32.store8 + (local.get $$arrayidx16) + (local.get $$2) + ) + (local.set $$add40 + (i32.or + (local.get $$mul9) + (i32.const 3) + ) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$image) + (local.get $$add40) + ) + ) + (i32.store8 + (local.get $$arrayidx41) + (local.get $$3) + ) + (return) + ) + (func $_GifEnd (; 422 ;) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29136) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (drop + (call $_fputc + (i32.const 59) + (local.get $$0) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29136) + ) + ) + (drop + (call $_fclose + (local.get $$1) + ) + ) + (local.set $$2 + (i32.load + (i32.const 28864) + ) + ) + (call $_free + (local.get $$2) + ) + (i32.store + (i32.const 29136) + (i32.const 0) + ) + (i32.store + (i32.const 28864) + (i32.const 0) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_InitWindow (; 423 ;) (param $$width i32) (param $$height i32) (param $$title i32) + (local $$0 i32) + (local $$1 i32) + (local $$call i32) + (local $$conv f32) + (local $$conv10 f32) + (local $$div f32) + (local $$div11 f32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (i32.store + (local.get $$vararg_buffer) + (i32.const 12236) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12213) + (local.get $$vararg_buffer) + ) + (i32.store + (i32.const 29140) + (local.get $$title) + ) + (local.set $$call + (call $_InitGraphicsDevice + (local.get $$width) + (local.get $$height) + ) + ) + (if + (i32.eqz + (local.get $$call) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_InitTimer) + (call $_LoadFontDefault) + (drop + (call $_emscripten_set_fullscreenchange_callback_on_thread + (i32.const 0) + (i32.const 0) + (i32.const 1) + (i32.const 15) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_keypress_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 16) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_click_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 17) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchstart_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 18) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchend_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 18) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchmove_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 18) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchcancel_callback_on_thread + (i32.const 12246) + (i32.const 0) + (i32.const 1) + (i32.const 18) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_gamepadconnected_callback_on_thread + (i32.const 0) + (i32.const 1) + (i32.const 19) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_gamepaddisconnected_callback_on_thread + (i32.const 0) + (i32.const 1) + (i32.const 19) + (i32.const 2) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$0) + ) + ) + (local.set $$div + (f32.mul + (local.get $$conv) + (f32.const 0.5) + ) + ) + (f32.store + (i32.const 29128) + (local.get $$div) + ) + (local.set $$1 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$conv10 + (f32.convert_i32_s + (local.get $$1) + ) + ) + (local.set $$div11 + (f32.mul + (local.get $$conv10) + (f32.const 0.5) + ) + ) + (f32.store + (i32.const 29132) + (local.get $$div11) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_InitGraphicsDevice (; 424 ;) (param $$width i32) (param $$height i32) (result i32) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$$pr i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$a i32) + (local $$and i32) + (local $$and10 i32) + (local $$and15 i32) + (local $$and20 i32) + (local $$and5 i32) + (local $$and86 i32) + (local $$b i32) + (local $$call1 i32) + (local $$call49 i32) + (local $$call50 i32) + (local $$call65 i32) + (local $$call66 i32) + (local $$call68 i32) + (local $$cmp51 i32) + (local $$cmp5115 i32) + (local $$cmp53 i32) + (local $$cmp57 i32) + (local $$count i32) + (local $$g i32) + (local $$height56 i32) + (local $$i$016 i32) + (local $$inc i32) + (local $$retval$0 i32) + (local $$tmp i32) + (local $$tobool i32) + (local $$tobool11 i32) + (local $$tobool16 i32) + (local $$tobool2 i32) + (local $$tobool21 i32) + (local $$tobool37 i32) + (local $$tobool6 i32) + (local $$tobool69 i32) + (local $$tobool73 i32) + (local $$tobool87 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer12 i32) + (local $$vararg_buffer16 i32) + (local $$vararg_buffer20 i32) + (local $$vararg_buffer22 i32) + (local $$vararg_buffer4 i32) + (local $$vararg_buffer6 i32) + (local $$vararg_buffer8 i32) + (local $$vararg_ptr11 i32) + (local $$vararg_ptr15 i32) + (local $$vararg_ptr19 i32) + (local $$vararg_ptr3 i32) + (local $$width52 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 140) + ) + ) + (local.set $$vararg_buffer22 + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$vararg_buffer20 + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$vararg_buffer16 + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$vararg_buffer12 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vararg_buffer8 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$vararg_buffer6 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 72) + ) + ) + (local.set $$count + (i32.add + (local.get $sp_a) + (i32.const 68) + ) + ) + (local.set $$$compoundliteral + (i32.add + (local.get $sp_a) + (i32.const 136) + ) + ) + (i32.store + (i32.const 29144) + (local.get $$width) + ) + (i32.store + (i32.const 29148) + (local.get $$height) + ) + (call $_MatrixIdentity + (local.get $$tmp) + ) + (i64.store align=4 + (i32.const 29188) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (drop + (call $_glfwSetErrorCallback + (i32.const 20) + ) + ) + (local.set $$call1 + (call $_glfwInit) + ) + (local.set $$tobool + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 15608) + (local.get $$vararg_buffer) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29144) + ) + ) + (i32.store + (i32.const 29252) + (local.get $$0) + ) + (local.set $$1 + (i32.load + (i32.const 29148) + ) + ) + (i32.store + (i32.const 29256) + (local.get $$1) + ) + (call $_glfwDefaultWindowHints) + (local.set $$and + (i32.and + (i32.const 0) + (i32.const 128) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (call $_glfwWindowHint + (i32.const 131076) + (i32.const 1) + ) + (call $_glfwWindowHint + (i32.const 131076) + (i32.const 0) + ) + ) + (local.set $$and5 + (i32.and + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$and5) + (i32.const 0) + ) + ) + (if + (local.get $$tobool6) + (call $_glfwWindowHint + (i32.const 131075) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 131075) + (i32.const 1) + ) + ) + (local.set $$and10 + (i32.and + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$tobool11 + (i32.eq + (local.get $$and10) + (i32.const 0) + ) + ) + (if + (local.get $$tobool11) + (call $_glfwWindowHint + (i32.const 131077) + (i32.const 1) + ) + (call $_glfwWindowHint + (i32.const 131077) + (i32.const 0) + ) + ) + (local.set $$and15 + (i32.and + (i32.const 0) + (i32.const 16) + ) + ) + (local.set $$tobool16 + (i32.eq + (local.get $$and15) + (i32.const 0) + ) + ) + (if + (local.get $$tobool16) + (call $_glfwWindowHint + (i32.const 131082) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 131082) + (i32.const 1) + ) + ) + (local.set $$and20 + (i32.and + (i32.const 0) + (i32.const 32) + ) + ) + (local.set $$tobool21 + (i32.eq + (local.get $$and20) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool21) + ) + (call $_glfwWindowHint + (i32.const 135181) + (i32.const 4) + ) + ) + (call $_glfwWindowHint + (i32.const 139266) + (i32.const 2) + ) + (call $_glfwWindowHint + (i32.const 139267) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 139265) + (i32.const 196610) + ) + (call $_glfwWindowHint + (i32.const 139275) + (i32.const 221185) + ) + (local.set $$tobool37 + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool37) + (block + (local.set $$13 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$14 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$15 + (i32.load + (i32.const 29140) + ) + ) + (local.set $$call68 + (call $_glfwCreateWindow + (local.get $$13) + (local.get $$14) + (local.get $$15) + (i32.const 0) + (i32.const 0) + ) + ) + (i32.store + (i32.const 29124) + (local.get $$call68) + ) + (local.set $$tobool69 + (i32.eq + (local.get $$call68) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool69) + ) + (block + (local.set $$16 + (i32.load + (i32.const 29144) + ) + ) + (i32.store + (i32.const 29260) + (local.get $$16) + ) + (local.set $$17 + (i32.load + (i32.const 29148) + ) + ) + (i32.store + (i32.const 29264) + (local.get $$17) + ) + (local.set $$$pr + (i32.load + (i32.const 29124) + ) + ) + (local.set $$18 + (local.get $$$pr) + ) + (local.set $label + (i32.const 27) + ) + ) + ) + ) + (block + (i32.store + (local.get $$count) + (i32.const 0) + ) + (local.set $$call49 + (call $_glfwGetPrimaryMonitor) + ) + (local.set $$call50 + (call $_glfwGetVideoModes + (local.get $$call49) + (local.get $$count) + ) + ) + (local.set $$2 + (i32.load + (local.get $$count) + ) + ) + (local.set $$cmp5115 + (i32.gt_s + (local.get $$2) + (i32.const 0) + ) + ) + (block $label$break$L28 + (if + (local.get $$cmp5115) + (block + (local.set $$3 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$4 + (i32.load + (local.get $$count) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$i$016 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$width52 + (i32.add + (local.get $$call50) + (i32.mul + (local.get $$i$016) + (i32.const 24) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$width52) + ) + ) + (local.set $$cmp53 + (i32.lt_s + (local.get $$6) + (local.get $$3) + ) + ) + (if + (i32.eqz + (local.get $$cmp53) + ) + (block + (local.set $$height56 + (i32.add + (i32.add + (local.get $$call50) + (i32.mul + (local.get $$i$016) + (i32.const 24) + ) + ) + (i32.const 4) + ) + ) + (local.set $$7 + (i32.load + (local.get $$height56) + ) + ) + (local.set $$cmp57 + (i32.lt_s + (local.get $$7) + (local.get $$5) + ) + ) + (if + (i32.eqz + (local.get $$cmp57) + ) + (br $while-out) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$016) + (i32.const 1) + ) + ) + (local.set $$cmp51 + (i32.lt_s + (local.get $$inc) + (local.get $$4) + ) + ) + (if + (local.get $$cmp51) + (local.set $$i$016 + (local.get $$inc) + ) + (br $label$break$L28) + ) + (br $while-in) + ) + ) + (i32.store + (i32.const 29252) + (local.get $$6) + ) + (i32.store + (i32.const 29256) + (local.get $$7) + ) + ) + ) + ) + (local.set $$8 + (i32.load + (i32.const 29252) + ) + ) + (local.set $$9 + (i32.load + (i32.const 29256) + ) + ) + (i32.store + (local.get $$vararg_buffer1) + (local.get $$8) + ) + (local.set $$vararg_ptr3 + (i32.add + (local.get $$vararg_buffer1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr3) + (local.get $$9) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 15634) + (local.get $$vararg_buffer1) + ) + (call $_SetupFramebuffer) + (local.set $$10 + (i32.load + (i32.const 29252) + ) + ) + (local.set $$11 + (i32.load + (i32.const 29256) + ) + ) + (local.set $$12 + (i32.load + (i32.const 29140) + ) + ) + (local.set $$call65 + (call $_glfwGetPrimaryMonitor) + ) + (local.set $$call66 + (call $_glfwCreateWindow + (local.get $$10) + (local.get $$11) + (local.get $$12) + (local.get $$call65) + (i32.const 0) + ) + ) + (i32.store + (i32.const 29124) + (local.get $$call66) + ) + (local.set $$18 + (local.get $$call66) + ) + (local.set $label + (i32.const 27) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 27) + ) + (block + (local.set $$tobool73 + (i32.eq + (local.get $$18) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool73) + ) + (block + (call $_TraceLog + (i32.const 3) + (i32.const 15705) + (local.get $$vararg_buffer6) + ) + (local.set $$19 + (i32.load + (i32.const 29260) + ) + ) + (local.set $$20 + (i32.load + (i32.const 29264) + ) + ) + (i32.store + (local.get $$vararg_buffer8) + (local.get $$19) + ) + (local.set $$vararg_ptr11 + (i32.add + (local.get $$vararg_buffer8) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr11) + (local.get $$20) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15745) + (local.get $$vararg_buffer8) + ) + (local.set $$21 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$22 + (i32.load + (i32.const 29148) + ) + ) + (i32.store + (local.get $$vararg_buffer12) + (local.get $$21) + ) + (local.set $$vararg_ptr15 + (i32.add + (local.get $$vararg_buffer12) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr15) + (local.get $$22) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15766) + (local.get $$vararg_buffer12) + ) + (local.set $$23 + (i32.load + (i32.const 29268) + ) + ) + (local.set $$24 + (i32.load + (i32.const 29272) + ) + ) + (i32.store + (local.get $$vararg_buffer16) + (local.get $$23) + ) + (local.set $$vararg_ptr19 + (i32.add + (local.get $$vararg_buffer16) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr19) + (local.get $$24) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15787) + (local.get $$vararg_buffer16) + ) + (local.set $$25 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetWindowSizeCallback + (local.get $$25) + (i32.const 21) + ) + ) + (local.set $$26 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetCursorEnterCallback + (local.get $$26) + (i32.const 22) + ) + ) + (local.set $$27 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetKeyCallback + (local.get $$27) + (i32.const 23) + ) + ) + (local.set $$28 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetMouseButtonCallback + (local.get $$28) + (i32.const 24) + ) + ) + (local.set $$29 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetCursorPosCallback + (local.get $$29) + (i32.const 25) + ) + ) + (local.set $$30 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetCharCallback + (local.get $$30) + (i32.const 26) + ) + ) + (local.set $$31 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetScrollCallback + (local.get $$31) + (i32.const 27) + ) + ) + (local.set $$32 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetWindowIconifyCallback + (local.get $$32) + (i32.const 28) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 15812) + (local.get $$vararg_buffer20) + ) + (local.set $$33 + (i32.load + (i32.const 29124) + ) + ) + (drop + (call $_glfwSetDropCallback + (local.get $$33) + (i32.const 29) + ) + ) + (local.set $$34 + (i32.load + (i32.const 29124) + ) + ) + (call $_glfwMakeContextCurrent + (local.get $$34) + ) + (local.set $$and86 + (i32.and + (i32.const 0) + (i32.const 64) + ) + ) + (local.set $$tobool87 + (i32.eq + (local.get $$and86) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool87) + ) + (block + (call $_glfwSwapInterval + (i32.const 1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15835) + (local.get $$vararg_buffer22) + ) + ) + ) + (local.set $$35 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$36 + (i32.load + (i32.const 29148) + ) + ) + (call $_rlglInit + (local.get $$35) + (local.get $$36) + ) + (local.set $$37 + (i32.load + (i32.const 29260) + ) + ) + (local.set $$38 + (i32.load + (i32.const 29264) + ) + ) + (call $_SetupViewport + (local.get $$37) + (local.get $$38) + ) + (i32.store8 + (local.get $$$compoundliteral) + (i32.const -11) + ) + (local.set $$g + (i32.add + (local.get $$$compoundliteral) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g) + (i32.const -11) + ) + (local.set $$b + (i32.add + (local.get $$$compoundliteral) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b) + (i32.const -11) + ) + (local.set $$a + (i32.add + (local.get $$$compoundliteral) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral) + ) + ) + (call $_ClearBackground + (local.get $$$compoundliteral$byval_copy) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (call $_glfwTerminate) + (call $_TraceLog + (i32.const 4) + (i32.const 15672) + (local.get $$vararg_buffer4) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_InitTimer (; 425 ;) + (local $$call i32) + (local $$call1 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_time + (i32.const 0) + ) + ) + (call $_srand + (local.get $$call) + ) + (local.set $$call1 + (call $_GetTime) + ) + (f64.store + (i32.const 28840) + (local.get $$call1) + ) + (return) + ) + (func $_LoadFontDefault (; 426 ;) + (local $$$compoundliteral15$sroa$0$0$$sroa_idx i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 f32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$3 i32) + (local $$4 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add27 i32) + (local $$add38 i32) + (local $$add43 i32) + (local $$add54 f32) + (local $$add56 i32) + (local $$add63 i32) + (local $$add69 i32) + (local $$advanceX i32) + (local $$and i32) + (local $$arrayidx13 i32) + (local $$arrayidx46 i32) + (local $$arrayidx78 i32) + (local $$arrayidx78$byval_copy i32) + (local $$call i32) + (local $$call30 i32) + (local $$call32 i32) + (local $$cmp10 i32) + (local $$cmp23 i32) + (local $$cmp35 i32) + (local $$cmp3564 i32) + (local $$cmp57 i32) + (local $$cmp6 i32) + (local $$conv f32) + (local $$conv44 f32) + (local $$conv47 f32) + (local $$conv55 i32) + (local $$conv70 f32) + (local $$conv85 i32) + (local $$counter$070 i32) + (local $$currentLine$065 i32) + (local $$currentLine$1 i32) + (local $$currentPosX$066 i32) + (local $$currentPosX$1 i32) + (local $$dec i32) + (local $$height i32) + (local $$height84 i32) + (local $$i3$069 i32) + (local $$i33$067 i32) + (local $$imFont i32) + (local $$imFont$byval_copy i32) + (local $$imFont$byval_copy1 i32) + (local $$imFont$byval_copy2 i32) + (local $$image i32) + (local $$inc22 i32) + (local $$inc60 i32) + (local $$inc81 i32) + (local $$j$068 i32) + (local $$mul29 i32) + (local $$mul31 i32) + (local $$mul42 i32) + (local $$mul68 i32) + (local $$offsetX i32) + (local $$offsetY i32) + (local $$shl i32) + (local $$spec$store$select i32) + (local $$tmp i32) + (local $$tmp79 i32) + (local $$tobool i32) + (local $$value i32) + (local $$vararg_buffer i32) + (local $$width i32) + (local $$width52 i32) + (local $$x i32) + (local $$x66 i32) + (local $$y i32) + (local $$y72 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$arrayidx78$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$imFont$byval_copy2 + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$imFont$byval_copy1 + (i32.add + (local.get $sp_a) + (i32.const 84) + ) + ) + (local.set $$imFont$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$imFont + (i32.add + (local.get $sp_a) + (i32.const 44) + ) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$tmp79 + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (i32.store + (i32.const 29156) + (i32.const 224) + ) + (local.set $$call + (call $_malloc + (i32.const 65536) + ) + ) + (drop + (call $_memset + (local.get $$call) + (i32.const 0) + (i32.const 65536) + ) + ) + (local.set $$counter$070 + (i32.const 0) + ) + (local.set $$i3$069 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx13 + (i32.add + (i32.const 1056) + (i32.shl + (local.get $$counter$070) + (i32.const 2) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx13) + ) + ) + (local.set $$j$068 + (i32.const 31) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$j$068) + ) + ) + (local.set $$and + (i32.and + (local.get $$2) + (local.get $$shl) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$add + (i32.add + (local.get $$j$068) + (local.get $$i3$069) + ) + ) + (local.set $$$compoundliteral15$sroa$0$0$$sroa_idx + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + ) + (i32.store align=1 + (local.get $$$compoundliteral15$sroa$0$0$$sroa_idx) + (i32.const -1) + ) + ) + ) + (local.set $$dec + (i32.add + (local.get $$j$068) + (i32.const -1) + ) + ) + (local.set $$cmp10 + (i32.eq + (local.get $$j$068) + (i32.const 0) + ) + ) + (if + (local.get $$cmp10) + (br $while-out0) + (local.set $$j$068 + (local.get $$dec) + ) + ) + (br $while-in1) + ) + ) + (local.set $$inc22 + (i32.add + (local.get $$counter$070) + (i32.const 1) + ) + ) + (local.set $$cmp23 + (i32.gt_s + (local.get $$counter$070) + (i32.const 511) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$cmp23) + (i32.const 0) + (local.get $$inc22) + ) + ) + (local.set $$add27 + (i32.add + (local.get $$i3$069) + (i32.const 32) + ) + ) + (local.set $$cmp6 + (i32.lt_u + (local.get $$add27) + (i32.const 16384) + ) + ) + (if + (local.get $$cmp6) + (block + (local.set $$counter$070 + (local.get $$spec$store$select) + ) + (local.set $$i3$069 + (local.get $$add27) + ) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (call $_LoadImageEx + (local.get $$imFont) + (local.get $$call) + (i32.const 128) + (i32.const 128) + ) + (call $_ImageFormat + (local.get $$imFont) + (i32.const 2) + ) + (call $_free + (local.get $$call) + ) + (i64.store align=4 + (local.get $$imFont$byval_copy) + (i64.load align=4 + (local.get $$imFont) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$imFont$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$imFont) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$imFont$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$imFont) + (i32.const 16) + ) + ) + ) + (call $_LoadTextureFromImage + (local.get $$tmp) + (local.get $$imFont$byval_copy) + ) + (i64.store align=4 + (i32.const 29160) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29160) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (i32.const 29160) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29156) + ) + ) + (local.set $$mul29 + (i32.mul + (local.get $$0) + (i32.const 36) + ) + ) + (local.set $$call30 + (call $_malloc + (local.get $$mul29) + ) + ) + (i32.store + (i32.const 29184) + (local.get $$call30) + ) + (local.set $$mul31 + (i32.shl + (local.get $$0) + (i32.const 4) + ) + ) + (local.set $$call32 + (call $_malloc + (local.get $$mul31) + ) + ) + (i32.store + (i32.const 29180) + (local.get $$call32) + ) + (local.set $$1 + (i32.load + (i32.const 29156) + ) + ) + (local.set $$cmp3564 + (i32.gt_s + (local.get $$1) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp3564) + ) + (block + (i64.store align=4 + (local.get $$imFont$byval_copy1) + (i64.load align=4 + (local.get $$imFont) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$imFont$byval_copy1) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$imFont) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$imFont$byval_copy1) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$imFont) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$imFont$byval_copy1) + ) + (local.set $$3 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$height84 + (i32.add + (local.get $$3) + (i32.const 12) + ) + ) + (local.set $$4 + (f32.load + (local.get $$height84) + ) + ) + (local.set $$conv85 + (i32.trunc_f32_s + (local.get $$4) + ) + ) + (i32.store + (i32.const 29152) + (local.get $$conv85) + ) + (local.set $$5 + (i32.load + (i32.const 29160) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$5) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12397) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$currentLine$065 + (i32.const 0) + ) + (local.set $$currentPosX$066 + (i32.const 1) + ) + (local.set $$i33$067 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$add38 + (i32.add + (local.get $$i33$067) + (i32.const 32) + ) + ) + (local.set $$6 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$value + (i32.add + (local.get $$6) + (i32.mul + (local.get $$i33$067) + (i32.const 36) + ) + ) + ) + (i32.store + (local.get $$value) + (local.get $$add38) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$currentPosX$066) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$x + (i32.add + (local.get $$7) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x) + (local.get $$conv) + ) + (local.set $$mul42 + (i32.mul + (local.get $$currentLine$065) + (i32.const 11) + ) + ) + (local.set $$add43 + (i32.add + (local.get $$mul42) + (i32.const 1) + ) + ) + (local.set $$conv44 + (f32.convert_i32_s + (local.get $$add43) + ) + ) + (local.set $$8 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$y + (i32.add + (i32.add + (local.get $$8) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y) + (local.get $$conv44) + ) + (local.set $$arrayidx46 + (i32.add + (i32.const 3104) + (i32.shl + (local.get $$i33$067) + (i32.const 2) + ) + ) + ) + (local.set $$9 + (i32.load + (local.get $$arrayidx46) + ) + ) + (local.set $$conv47 + (f32.convert_i32_s + (local.get $$9) + ) + ) + (local.set $$10 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$width + (i32.add + (i32.add + (local.get $$10) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$width) + (local.get $$conv47) + ) + (local.set $$11 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$height + (i32.add + (i32.add + (local.get $$11) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$height) + (f32.const 10) + ) + (local.set $$12 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$width52 + (i32.add + (i32.add + (local.get $$12) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$13 + (f32.load + (local.get $$width52) + ) + ) + (local.set $$add54 + (f32.add + (local.get $$13) + (f32.const 1) + ) + ) + (local.set $$conv55 + (i32.trunc_f32_s + (local.get $$add54) + ) + ) + (local.set $$add56 + (i32.add + (local.get $$currentPosX$066) + (local.get $$conv55) + ) + ) + (local.set $$14 + (i32.load + (i32.const 29164) + ) + ) + (local.set $$cmp57 + (i32.lt_s + (local.get $$add56) + (local.get $$14) + ) + ) + (local.set $$inc60 + (i32.add + (local.get $$currentLine$065) + (i32.const 1) + ) + ) + (if + (local.get $$cmp57) + (block + (local.set $$currentLine$1 + (local.get $$currentLine$065) + ) + (local.set $$currentPosX$1 + (local.get $$add56) + ) + ) + (block + (local.set $$mul68 + (i32.mul + (local.get $$inc60) + (i32.const 11) + ) + ) + (local.set $$add69 + (i32.add + (local.get $$mul68) + (i32.const 1) + ) + ) + (local.set $$conv70 + (f32.convert_i32_s + (local.get $$add69) + ) + ) + (local.set $$x66 + (i32.add + (local.get $$12) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + ) + (local.set $$add63 + (i32.add + (local.get $$9) + (i32.const 2) + ) + ) + (f32.store + (local.get $$x66) + (f32.const 1) + ) + (local.set $$15 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$y72 + (i32.add + (i32.add + (local.get $$15) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y72) + (local.get $$conv70) + ) + (local.set $$currentLine$1 + (local.get $$inc60) + ) + (local.set $$currentPosX$1 + (local.get $$add63) + ) + ) + ) + (local.set $$16 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$offsetX + (i32.add + (i32.add + (local.get $$16) + (i32.mul + (local.get $$i33$067) + (i32.const 36) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$offsetX) + (i32.const 0) + ) + (local.set $$17 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$offsetY + (i32.add + (i32.add + (local.get $$17) + (i32.mul + (local.get $$i33$067) + (i32.const 36) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$offsetY) + (i32.const 0) + ) + (local.set $$18 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$advanceX + (i32.add + (i32.add + (local.get $$18) + (i32.mul + (local.get $$i33$067) + (i32.const 36) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$advanceX) + (i32.const 0) + ) + (local.set $$19 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$image + (i32.add + (i32.add + (local.get $$19) + (i32.mul + (local.get $$i33$067) + (i32.const 36) + ) + ) + (i32.const 16) + ) + ) + (local.set $$20 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$arrayidx78 + (i32.add + (local.get $$20) + (i32.shl + (local.get $$i33$067) + (i32.const 4) + ) + ) + ) + (i64.store align=4 + (local.get $$imFont$byval_copy2) + (i64.load align=4 + (local.get $$imFont) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$imFont$byval_copy2) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$imFont) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$imFont$byval_copy2) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$imFont) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (local.get $$arrayidx78$byval_copy) + (i64.load align=4 + (local.get $$arrayidx78) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx78$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx78) + (i32.const 8) + ) + ) + ) + (call $_ImageFromImage + (local.get $$tmp79) + (local.get $$imFont$byval_copy2) + (local.get $$arrayidx78$byval_copy) + ) + (i64.store align=4 + (local.get $$image) + (i64.load align=4 + (local.get $$tmp79) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp79) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$tmp79) + (i32.const 16) + ) + ) + ) + (local.set $$inc81 + (i32.add + (local.get $$i33$067) + (i32.const 1) + ) + ) + (local.set $$21 + (i32.load + (i32.const 29156) + ) + ) + (local.set $$cmp35 + (i32.lt_s + (local.get $$inc81) + (local.get $$21) + ) + ) + (if + (local.get $$cmp35) + (block + (local.set $$currentLine$065 + (local.get $$currentLine$1) + ) + (local.set $$currentPosX$066 + (local.get $$currentPosX$1) + ) + (local.set $$i33$067 + (local.get $$inc81) + ) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + (i64.store align=4 + (local.get $$imFont$byval_copy1) + (i64.load align=4 + (local.get $$imFont) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$imFont$byval_copy1) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$imFont) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$imFont$byval_copy1) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$imFont) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$imFont$byval_copy1) + ) + (local.set $$3 + (i32.load + (i32.const 29180) + ) + ) + (local.set $$height84 + (i32.add + (local.get $$3) + (i32.const 12) + ) + ) + (local.set $$4 + (f32.load + (local.get $$height84) + ) + ) + (local.set $$conv85 + (i32.trunc_f32_s + (local.get $$4) + ) + ) + (i32.store + (i32.const 29152) + (local.get $$conv85) + ) + (local.set $$5 + (i32.load + (i32.const 29160) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$5) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12397) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_EmscriptenFullscreenChangeCallback (; 427 ;) (param $$eventType i32) (param $$e i32) (param $$userData i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$elementHeight i32) + (local $$elementWidth i32) + (local $$screenHeight i32) + (local $$screenWidth i32) + (local $$tobool i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer4 i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr3 i32) + (local $$vararg_ptr7 i32) + (local $$vararg_ptr8 i32) + (local $$vararg_ptr9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$e) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$elementWidth + (i32.add + (local.get $$e) + (i32.const 264) + ) + ) + (local.set $$1 + (i32.load + (local.get $$elementWidth) + ) + ) + (local.set $$elementHeight + (i32.add + (local.get $$e) + (i32.const 268) + ) + ) + (local.set $$2 + (i32.load + (local.get $$elementHeight) + ) + ) + (local.set $$screenWidth + (i32.add + (local.get $$e) + (i32.const 272) + ) + ) + (local.set $$3 + (i32.load + (local.get $$screenWidth) + ) + ) + (local.set $$screenHeight + (i32.add + (local.get $$e) + (i32.const 276) + ) + ) + (local.set $$4 + (i32.load + (local.get $$screenHeight) + ) + ) + (if + (local.get $$tobool) + (block + (i32.store + (local.get $$vararg_buffer4) + (local.get $$1) + ) + (local.set $$vararg_ptr7 + (i32.add + (local.get $$vararg_buffer4) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr7) + (local.get $$2) + ) + (local.set $$vararg_ptr8 + (i32.add + (local.get $$vararg_buffer4) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr8) + (local.get $$3) + ) + (local.set $$vararg_ptr9 + (i32.add + (local.get $$vararg_buffer4) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr9) + (local.get $$4) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12330) + (local.get $$vararg_buffer4) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (i32.const 0) + ) + ) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$1) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$2) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (local.get $$3) + ) + (local.set $$vararg_ptr3 + (i32.add + (local.get $$vararg_buffer) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr3) + (local.get $$4) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12261) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (i32.const 0) + ) + ) + ) + ) + (func $_EmscriptenKeyboardCallback (; 428 ;) (param $$eventType i32) (param $$keyEvent i32) (param $$userData i32) (result i32) + (local $$arraydecay i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$eventType) + (i32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return + (i32.const 0) + ) + ) + (local.set $$arraydecay + (i32.add + (local.get $$keyEvent) + (i32.const 32) + ) + ) + (local.set $$call + (call $_strcmp + (local.get $$arraydecay) + (i32.const 12254) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp1) + ) + (return + (i32.const 0) + ) + ) + (drop + (call $_emscripten_exit_pointerlock) + ) + (return + (i32.const 0) + ) + ) + (func $_EmscriptenMouseCallback (; 429 ;) (param $$eventType i32) (param $$mouseEvent i32) (param $$userData i32) (result i32) + (local $$0 i32) + (local $$cmp i32) + (local $$or$cond i32) + (local $$plce i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 272) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 272) + ) + ) + (local.set $$plce + (local.get $sp_a) + ) + (local.set $$cmp + (i32.ne + (local.get $$eventType) + (i32.const 4) + ) + ) + (local.set $$tobool + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (i32.const 0) + ) + ) + ) + (drop + (call $_emscripten_get_pointerlock_status + (local.get $$plce) + ) + ) + (local.set $$0 + (i32.load + (local.get $$plce) + ) + ) + (local.set $$tobool1 + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1) + (drop + (call $_emscripten_request_pointerlock + (i32.const 0) + (i32.const 1) + ) + ) + (block + (drop + (call $_emscripten_exit_pointerlock) + ) + (drop + (call $_emscripten_get_pointerlock_status + (local.get $$plce) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (i32.const 0) + ) + ) + (func $_EmscriptenTouchCallback (; 430 ;) (param $$eventType i32) (param $$touchEvent i32) (param $$userData i32) (result i32) + (local $$$compoundliteral$sroa$0$0$$sroa_idx i32) + (local $$$compoundliteral$sroa$2$0$$sroa_idx2 i32) + (local $$$compoundliteral24$sroa$0$0$$sroa_idx i32) + (local $$$compoundliteral24$sroa$2$0$$sroa_idx1 i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 f32) + (local $$8 f32) + (local $$arrayidx10 i32) + (local $$arrayidx15 i32) + (local $$arrayidx38 i32) + (local $$call i32) + (local $$call43 i32) + (local $$conv f32) + (local $$conv21 f32) + (local $$conv29 f32) + (local $$conv34 f32) + (local $$conv39 f32) + (local $$conv44 f32) + (local $$div f32) + (local $$div48 f32) + (local $$div54 f32) + (local $$div60 f32) + (local $$gestureEvent i32) + (local $$gestureEvent$byval_copy i32) + (local $$identifier i32) + (local $$identifier13 i32) + (local $$pointCount i32) + (local $$position35 i32) + (local $$targetX i32) + (local $$targetX28 i32) + (local $$targetY i32) + (local $$targetY33 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $$gestureEvent$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$gestureEvent + (local.get $sp_a) + ) + (block $switch + (block $switch-default + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-default + (i32.sub + (local.get $$eventType) + (i32.const 22) + ) + ) + ) + (block + (local.set $$$sink + (i32.const 1) + ) + (local.set $label + (i32.const 4) + ) + (br $switch) + ) + ) + (block + (local.set $$$sink + (i32.const 0) + ) + (local.set $label + (i32.const 4) + ) + (br $switch) + ) + ) + (block + (local.set $$$sink + (i32.const 2) + ) + (local.set $label + (i32.const 4) + ) + (br $switch) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 4) + ) + (i32.store + (local.get $$gestureEvent) + (local.get $$$sink) + ) + ) + (local.set $$0 + (i32.load + (local.get $$touchEvent) + ) + ) + (local.set $$pointCount + (i32.add + (local.get $$gestureEvent) + (i32.const 4) + ) + ) + (i32.store + (local.get $$pointCount) + (local.get $$0) + ) + (local.set $$identifier + (i32.add + (local.get $$touchEvent) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$identifier) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arrayidx10) + (local.get $$1) + ) + (local.set $$identifier13 + (i32.add + (local.get $$touchEvent) + (i32.const 72) + ) + ) + (local.set $$2 + (i32.load + (local.get $$identifier13) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$gestureEvent) + (i32.const 12) + ) + ) + (i32.store + (local.get $$arrayidx15) + (local.get $$2) + ) + (local.set $$targetX + (i32.add + (local.get $$touchEvent) + (i32.const 56) + ) + ) + (local.set $$3 + (i32.load + (local.get $$targetX) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$3) + ) + ) + (local.set $$targetY + (i32.add + (local.get $$touchEvent) + (i32.const 60) + ) + ) + (local.set $$4 + (i32.load + (local.get $$targetY) + ) + ) + (local.set $$conv21 + (f32.convert_i32_s + (local.get $$4) + ) + ) + (local.set $$$compoundliteral$sroa$0$0$$sroa_idx + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$0$0$$sroa_idx) + (local.get $$conv) + ) + (local.set $$$compoundliteral$sroa$2$0$$sroa_idx2 + (i32.add + (local.get $$gestureEvent) + (i32.const 28) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$2$0$$sroa_idx2) + (local.get $$conv21) + ) + (local.set $$targetX28 + (i32.add + (local.get $$touchEvent) + (i32.const 108) + ) + ) + (local.set $$5 + (i32.load + (local.get $$targetX28) + ) + ) + (local.set $$conv29 + (f32.convert_i32_s + (local.get $$5) + ) + ) + (local.set $$targetY33 + (i32.add + (local.get $$touchEvent) + (i32.const 112) + ) + ) + (local.set $$6 + (i32.load + (local.get $$targetY33) + ) + ) + (local.set $$conv34 + (f32.convert_i32_s + (local.get $$6) + ) + ) + (local.set $$$compoundliteral24$sroa$0$0$$sroa_idx + (i32.add + (local.get $$gestureEvent) + (i32.const 32) + ) + ) + (f32.store + (local.get $$$compoundliteral24$sroa$0$0$$sroa_idx) + (local.get $$conv29) + ) + (local.set $$$compoundliteral24$sroa$2$0$$sroa_idx1 + (i32.add + (local.get $$gestureEvent) + (i32.const 36) + ) + ) + (f32.store + (local.get $$$compoundliteral24$sroa$2$0$$sroa_idx1) + (local.get $$conv34) + ) + (local.set $$position35 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + (local.set $$arrayidx38 + (i32.add + (local.get $$gestureEvent) + (i32.const 32) + ) + ) + (local.set $$call + (call $_GetScreenWidth) + ) + (local.set $$conv39 + (f32.convert_i32_s + (local.get $$call) + ) + ) + (local.set $$7 + (f32.load + (local.get $$position35) + ) + ) + (local.set $$div + (f32.div + (local.get $$7) + (local.get $$conv39) + ) + ) + (f32.store + (local.get $$position35) + (local.get $$div) + ) + (local.set $$call43 + (call $_GetScreenHeight) + ) + (local.set $$conv44 + (f32.convert_i32_s + (local.get $$call43) + ) + ) + (local.set $$div48 + (f32.div + (local.get $$conv21) + (local.get $$conv44) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$2$0$$sroa_idx2) + (local.get $$div48) + ) + (local.set $$8 + (f32.load + (local.get $$arrayidx38) + ) + ) + (local.set $$div54 + (f32.div + (local.get $$8) + (local.get $$conv39) + ) + ) + (f32.store + (local.get $$arrayidx38) + (local.get $$div54) + ) + (local.set $$div60 + (f32.div + (local.get $$conv34) + (local.get $$conv44) + ) + ) + (f32.store + (local.get $$$compoundliteral24$sroa$2$0$$sroa_idx1) + (local.get $$div60) + ) + (i64.store align=4 + (local.get $$gestureEvent$byval_copy) + (i64.load align=4 + (local.get $$gestureEvent) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 48) + ) + ) + ) + (call $_ProcessGestureEvent + (local.get $$gestureEvent$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (i32.const 1) + ) + ) + (func $_EmscriptenGamepadCallback (; 431 ;) (param $$eventType i32) (param $$gamepadEvent i32) (param $$userData i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$cmp i32) + (local $$connected i32) + (local $$index i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$connected + (i32.add + (local.get $$gamepadEvent) + (i32.const 1296) + ) + ) + (local.set $$0 + (i32.load + (local.get $$connected) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$index + (i32.add + (local.get $$gamepadEvent) + (i32.const 1300) + ) + ) + (local.set $$1 + (i32.load + (local.get $$index) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$1) + (i32.const 4) + ) + ) + (if + (local.get $$cmp) + (return + (i32.const 0) + ) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_GetScreenWidth (; 432 ;) (result i32) + (local $$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29144) + ) + ) + (return + (local.get $$0) + ) + ) + (func $_GetScreenHeight (; 433 ;) (result i32) + (local $$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29148) + ) + ) + (return + (local.get $$0) + ) + ) + (func $_LoadImageEx (; 434 ;) (param $$agg$result i32) (param $$pixels i32) (param $$width i32) (param $$height i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$a i32) + (local $$add i32) + (local $$add19 i32) + (local $$add23 i32) + (local $$add25 i32) + (local $$arrayidx13 i32) + (local $$arrayidx16 i32) + (local $$arrayidx20 i32) + (local $$arrayidx24 i32) + (local $$b i32) + (local $$call i32) + (local $$cmp29 i32) + (local $$exitcond i32) + (local $$g i32) + (local $$i$031 i32) + (local $$image$sroa$12$0$$sroa_idx19 i32) + (local $$image$sroa$15$0$$sroa_idx22 i32) + (local $$image$sroa$16$0$$sroa_idx24 i32) + (local $$image$sroa$9$0$$sroa_idx16 i32) + (local $$inc i32) + (local $$k$030 i32) + (local $$mul i32) + (local $$mul5 i32) + (local $$r i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.shl + (local.get $$width) + (i32.const 2) + ) + ) + (local.set $$mul5 + (i32.mul + (local.get $$mul) + (local.get $$height) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul5) + ) + ) + (local.set $$cmp29 + (i32.gt_s + (local.get $$mul5) + (i32.const 0) + ) + ) + (if + (local.get $$cmp29) + (block + (local.set $$0 + (i32.add + (local.get $$mul5) + (i32.const -1) + ) + ) + (local.set $$1 + (i32.shr_u + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$i$031 + (i32.const 0) + ) + (local.set $$k$030 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$r + (i32.add + (local.get $$pixels) + (i32.shl + (local.get $$k$030) + (i32.const 2) + ) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$r) + ) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$call) + (local.get $$i$031) + ) + ) + (i32.store8 + (local.get $$arrayidx13) + (local.get $$2) + ) + (local.set $$g + (i32.add + (i32.add + (local.get $$pixels) + (i32.shl + (local.get $$k$030) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$g) + ) + ) + (local.set $$add + (i32.or + (local.get $$i$031) + (i32.const 1) + ) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$call) + (local.get $$add) + ) + ) + (i32.store8 + (local.get $$arrayidx16) + (local.get $$3) + ) + (local.set $$b + (i32.add + (i32.add + (local.get $$pixels) + (i32.shl + (local.get $$k$030) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$b) + ) + ) + (local.set $$add19 + (i32.or + (local.get $$i$031) + (i32.const 2) + ) + ) + (local.set $$arrayidx20 + (i32.add + (local.get $$call) + (local.get $$add19) + ) + ) + (i32.store8 + (local.get $$arrayidx20) + (local.get $$4) + ) + (local.set $$a + (i32.add + (i32.add + (local.get $$pixels) + (i32.shl + (local.get $$k$030) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$a) + ) + ) + (local.set $$add23 + (i32.or + (local.get $$i$031) + (i32.const 3) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$call) + (local.get $$add23) + ) + ) + (i32.store8 + (local.get $$arrayidx24) + (local.get $$5) + ) + (local.set $$inc + (i32.add + (local.get $$k$030) + (i32.const 1) + ) + ) + (local.set $$add25 + (i32.add + (local.get $$i$031) + (i32.const 4) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$k$030) + (local.get $$1) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$i$031 + (local.get $$add25) + ) + (local.set $$k$030 + (local.get $$inc) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (i32.store + (local.get $$agg$result) + (local.get $$call) + ) + (local.set $$image$sroa$9$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$image$sroa$9$0$$sroa_idx16) + (local.get $$width) + ) + (local.set $$image$sroa$12$0$$sroa_idx19 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (i32.store + (local.get $$image$sroa$12$0$$sroa_idx19) + (local.get $$height) + ) + (local.set $$image$sroa$15$0$$sroa_idx22 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (i32.store + (local.get $$image$sroa$15$0$$sroa_idx22) + (i32.const 1) + ) + (local.set $$image$sroa$16$0$$sroa_idx24 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (i32.store + (local.get $$image$sroa$16$0$$sroa_idx24) + (i32.const 7) + ) + (return) + ) + (func $_ImageFormat (; 435 ;) (param $$image i32) (param $$newFormat i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$100 i32) + (local $$101 i32) + (local $$102 i32) + (local $$103 i32) + (local $$104 i32) + (local $$105 i32) + (local $$106 i32) + (local $$107 i32) + (local $$108 i32) + (local $$109 i32) + (local $$11 i32) + (local $$110 i32) + (local $$111 i32) + (local $$112 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 i32) + (local $$19 f32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 i32) + (local $$30 f32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 f32) + (local $$37 i32) + (local $$38 f32) + (local $$39 i32) + (local $$4 i32) + (local $$40 f32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 f32) + (local $$47 f32) + (local $$48 f32) + (local $$49 f32) + (local $$5 i32) + (local $$50 f32) + (local $$51 f32) + (local $$52 f32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$58 f32) + (local $$59 f32) + (local $$6 i32) + (local $$60 f32) + (local $$61 f32) + (local $$62 f32) + (local $$63 f32) + (local $$64 f32) + (local $$65 f32) + (local $$66 i32) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 f32) + (local $$70 i32) + (local $$71 f32) + (local $$72 i32) + (local $$73 f32) + (local $$74 i32) + (local $$75 f32) + (local $$76 i32) + (local $$77 f32) + (local $$78 i32) + (local $$79 i32) + (local $$8 f32) + (local $$80 i32) + (local $$81 i32) + (local $$82 i32) + (local $$83 f32) + (local $$84 f32) + (local $$85 f32) + (local $$86 i32) + (local $$87 i32) + (local $$88 i32) + (local $$89 i32) + (local $$9 f32) + (local $$90 i32) + (local $$91 i32) + (local $$92 i32) + (local $$93 i32) + (local $$94 i32) + (local $$95 i32) + (local $$96 i32) + (local $$97 i32) + (local $$98 i32) + (local $$99 i32) + (local $$add f32) + (local $$add152 i32) + (local $$add159 i32) + (local $$add162 i32) + (local $$add30 f32) + (local $$add314 i32) + (local $$add321 i32) + (local $$add328 i32) + (local $$add331 i32) + (local $$add356 f32) + (local $$add360 f32) + (local $$add392 i32) + (local $$add397 i32) + (local $$add400 i32) + (local $$add429 i32) + (local $$add434 i32) + (local $$add439 i32) + (local $$add442 i32) + (local $$add58 f32) + (local $$add62 f32) + (local $$add71 i32) + (local $$add74 i32) + (local $$arrayidx118 i32) + (local $$arrayidx146 i32) + (local $$arrayidx153 i32) + (local $$arrayidx160 i32) + (local $$arrayidx220 i32) + (local $$arrayidx280 i32) + (local $$arrayidx308 i32) + (local $$arrayidx315 i32) + (local $$arrayidx322 i32) + (local $$arrayidx329 i32) + (local $$arrayidx33 i32) + (local $$arrayidx362 i32) + (local $$arrayidx385 i32) + (local $$arrayidx388 i32) + (local $$arrayidx393 i32) + (local $$arrayidx398 i32) + (local $$arrayidx422 i32) + (local $$arrayidx425 i32) + (local $$arrayidx430 i32) + (local $$arrayidx435 i32) + (local $$arrayidx440 i32) + (local $$arrayidx66 i32) + (local $$arrayidx72 i32) + (local $$call i32) + (local $$call128 i32) + (local $$call170 i32) + (local $$call19 i32) + (local $$call229 i32) + (local $$call290 i32) + (local $$call339 i32) + (local $$call372 i32) + (local $$call40 i32) + (local $$call409 i32) + (local $$call82 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp10 i32) + (local $$cmp137 i32) + (local $$cmp137228 i32) + (local $$cmp180 i32) + (local $$cmp180232 i32) + (local $$cmp201 i32) + (local $$cmp24 i32) + (local $$cmp240 i32) + (local $$cmp240235 i32) + (local $$cmp24216 i32) + (local $$cmp299 i32) + (local $$cmp299239 i32) + (local $$cmp3 i32) + (local $$cmp346 i32) + (local $$cmp346243 i32) + (local $$cmp381 i32) + (local $$cmp381247 i32) + (local $$cmp4 i32) + (local $$cmp418 i32) + (local $$cmp418252 i32) + (local $$cmp445 i32) + (local $$cmp450 i32) + (local $$cmp48 i32) + (local $$cmp48220 i32) + (local $$cmp5 i32) + (local $$cmp8 i32) + (local $$cmp89 i32) + (local $$cmp89224 i32) + (local $$conv i32) + (local $$conv102 i32) + (local $$conv107 i32) + (local $$conv109 i32) + (local $$conv111 i32) + (local $$conv114 i32) + (local $$conv116 i32) + (local $$conv144 i32) + (local $$conv150 i32) + (local $$conv157 i32) + (local $$conv188 i32) + (local $$conv193 i32) + (local $$conv198 i32) + (local $$conv205 i32) + (local $$conv208 i32) + (local $$conv212 i32) + (local $$conv216 i32) + (local $$conv218 i32) + (local $$conv248 i32) + (local $$conv253 i32) + (local $$conv258 i32) + (local $$conv263 i32) + (local $$conv265 i32) + (local $$conv268 i32) + (local $$conv272 i32) + (local $$conv276 i32) + (local $$conv278 i32) + (local $$conv306 i32) + (local $$conv312 i32) + (local $$conv319 i32) + (local $$conv326 i32) + (local $$conv64 i32) + (local $$conv69 i32) + (local $$conv97 i32) + (local $$format i32) + (local $$height i32) + (local $$i$0217 i32) + (local $$i130$0229 i32) + (local $$i175$0233 i32) + (local $$i235$0236 i32) + (local $$i292$0240 i32) + (local $$i341$0244 i32) + (local $$i374$0248 i32) + (local $$i411$0253 i32) + (local $$i42$0222 i32) + (local $$i84$0225 i32) + (local $$image$byval_copy i32) + (local $$inc i32) + (local $$inc120 i32) + (local $$inc163 i32) + (local $$inc222 i32) + (local $$inc282 i32) + (local $$inc332 i32) + (local $$inc364 i32) + (local $$inc401 i32) + (local $$inc443 i32) + (local $$inc75 i32) + (local $$k$0221 i32) + (local $$k131$0230 i32) + (local $$k293$0241 i32) + (local $$k375$0249 i32) + (local $$k412$0254 i32) + (local $$mipmaps i32) + (local $$mul i32) + (local $$mul100 f32) + (local $$mul105 f32) + (local $$mul125 i32) + (local $$mul126 i32) + (local $$mul135 i32) + (local $$mul135226 i32) + (local $$mul136 i32) + (local $$mul136227 i32) + (local $$mul143 f32) + (local $$mul149 f32) + (local $$mul156 f32) + (local $$mul168 i32) + (local $$mul169 i32) + (local $$mul179 i32) + (local $$mul179231 i32) + (local $$mul186 f32) + (local $$mul191 f32) + (local $$mul196 f32) + (local $$mul227 i32) + (local $$mul228 i32) + (local $$mul23 i32) + (local $$mul23215 i32) + (local $$mul239 i32) + (local $$mul239234 i32) + (local $$mul246 f32) + (local $$mul25 f32) + (local $$mul251 f32) + (local $$mul256 f32) + (local $$mul261 f32) + (local $$mul27 f32) + (local $$mul287 i32) + (local $$mul288 i32) + (local $$mul29 f32) + (local $$mul297 i32) + (local $$mul297237 i32) + (local $$mul298 i32) + (local $$mul298238 i32) + (local $$mul305 f32) + (local $$mul31 f32) + (local $$mul311 f32) + (local $$mul318 f32) + (local $$mul325 f32) + (local $$mul337 i32) + (local $$mul338 i32) + (local $$mul345 i32) + (local $$mul345242 i32) + (local $$mul352 f32) + (local $$mul355 f32) + (local $$mul359 f32) + (local $$mul369 i32) + (local $$mul37 i32) + (local $$mul371 i32) + (local $$mul379 i32) + (local $$mul379245 i32) + (local $$mul38 i32) + (local $$mul380 i32) + (local $$mul380246 i32) + (local $$mul406 i32) + (local $$mul408 i32) + (local $$mul416 i32) + (local $$mul416250 i32) + (local $$mul417 i32) + (local $$mul417251 i32) + (local $$mul46 i32) + (local $$mul46218 i32) + (local $$mul47 i32) + (local $$mul47219 i32) + (local $$mul54 f32) + (local $$mul57 f32) + (local $$mul61 f32) + (local $$mul63 f32) + (local $$mul68 f32) + (local $$mul80 i32) + (local $$mul81 i32) + (local $$mul88 i32) + (local $$mul88223 i32) + (local $$mul95 f32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$or115 i32) + (local $$or210 i32) + (local $$or214 i32) + (local $$or217 i32) + (local $$or270 i32) + (local $$or274 i32) + (local $$or277 i32) + (local $$shl i32) + (local $$shl112 i32) + (local $$shl206 i32) + (local $$shl209 i32) + (local $$shl213 i32) + (local $$shl266 i32) + (local $$shl269 i32) + (local $$shl273 i32) + (local $$vararg_buffer i32) + (local $$w i32) + (local $$w200 i32) + (local $$w260 i32) + (local $$w324 i32) + (local $$w437 i32) + (local $$width i32) + (local $$x i32) + (local $$x142 i32) + (local $$x185 i32) + (local $$x245 i32) + (local $$x304 i32) + (local $$x351 i32) + (local $$x53 i32) + (local $$x94 i32) + (local $$y i32) + (local $$y148 i32) + (local $$y190 i32) + (local $$y250 i32) + (local $$y310 i32) + (local $$y354 i32) + (local $$y390 i32) + (local $$y427 i32) + (local $$y56 i32) + (local $$y99 i32) + (local $$z i32) + (local $$z104 i32) + (local $$z155 i32) + (local $$z195 i32) + (local $$z255 i32) + (local $$z317 i32) + (local $$z358 i32) + (local $$z395 i32) + (local $$z432 i32) + (local $$z60 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height) + ) + ) + (local.set $$cmp3 + (i32.ne + (local.get $$2) + (i32.const 0) + ) + ) + (local.set $$cmp4 + (i32.ne + (local.get $$newFormat) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp4) + (local.get $$cmp3) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$3 + (i32.load + (local.get $$format) + ) + ) + (local.set $$cmp5 + (i32.eq + (local.get $$3) + (local.get $$newFormat) + ) + ) + (if + (local.get $$cmp5) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp8 + (i32.lt_s + (local.get $$3) + (i32.const 11) + ) + ) + (local.set $$cmp10 + (i32.lt_s + (local.get $$newFormat) + (i32.const 11) + ) + ) + (local.set $$or$cond1 + (i32.and + (local.get $$cmp10) + (local.get $$cmp8) + ) + ) + (if + (i32.eqz + (local.get $$or$cond1) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12649) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (local.set $$call + (call $_GetImageDataNormalized + (local.get $$image$byval_copy) + ) + ) + (local.set $$4 + (i32.load + (local.get $$image) + ) + ) + (call $_free + (local.get $$4) + ) + (i32.store + (local.get $$image) + (i32.const 0) + ) + (i32.store + (local.get $$format) + (local.get $$newFormat) + ) + (block $switch + (block $switch-default + (block $switch-case26 + (block $switch-case23 + (block $switch-case20 + (block $switch-case17 + (block $switch-case14 + (block $switch-case11 + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-case11 $switch-case14 $switch-case17 $switch-case20 $switch-case23 $switch-case26 $switch-default + (i32.sub + (local.get $$newFormat) + (i32.const 1) + ) + ) + ) + (block + (local.set $$5 + (i32.load + (local.get $$width) + ) + ) + (local.set $$6 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$6) + (local.get $$5) + ) + ) + (local.set $$call19 + (call $_malloc + (local.get $$mul) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call19) + ) + (local.set $$mul23215 + (i32.mul + (local.get $$6) + (local.get $$5) + ) + ) + (local.set $$cmp24216 + (i32.gt_s + (local.get $$mul23215) + (i32.const 0) + ) + ) + (if + (local.get $$cmp24216) + (block + (local.set $$i$0217 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$x + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0217) + (i32.const 4) + ) + ) + ) + (local.set $$7 + (f32.load + (local.get $$x) + ) + ) + (local.set $$mul25 + (f32.mul + (local.get $$7) + (f32.const 0.29899999499320984) + ) + ) + (local.set $$y + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0217) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$8 + (f32.load + (local.get $$y) + ) + ) + (local.set $$mul27 + (f32.mul + (local.get $$8) + (f32.const 0.5870000123977661) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul25) + (local.get $$mul27) + ) + ) + (local.set $$z + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0217) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$9 + (f32.load + (local.get $$z) + ) + ) + (local.set $$mul29 + (f32.mul + (local.get $$9) + (f32.const 0.11400000005960464) + ) + ) + (local.set $$add30 + (f32.add + (local.get $$add) + (local.get $$mul29) + ) + ) + (local.set $$mul31 + (f32.mul + (local.get $$add30) + (f32.const 255) + ) + ) + (local.set $$conv + (i32.and + (i32.trunc_f32_s + (local.get $$mul31) + ) + (i32.const 255) + ) + ) + (local.set $$10 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx33 + (i32.add + (local.get $$10) + (local.get $$i$0217) + ) + ) + (i32.store8 + (local.get $$arrayidx33) + (local.get $$conv) + ) + (local.set $$inc + (i32.add + (local.get $$i$0217) + (i32.const 1) + ) + ) + (local.set $$11 + (i32.load + (local.get $$width) + ) + ) + (local.set $$12 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul23 + (i32.mul + (local.get $$12) + (local.get $$11) + ) + ) + (local.set $$cmp24 + (i32.lt_s + (local.get $$inc) + (local.get $$mul23) + ) + ) + (if + (local.get $$cmp24) + (local.set $$i$0217 + (local.get $$inc) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$13 + (i32.load + (local.get $$width) + ) + ) + (local.set $$14 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul37 + (i32.shl + (local.get $$13) + (i32.const 1) + ) + ) + (local.set $$mul38 + (i32.mul + (local.get $$mul37) + (local.get $$14) + ) + ) + (local.set $$call40 + (call $_malloc + (local.get $$mul38) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call40) + ) + (local.set $$mul46218 + (i32.shl + (local.get $$13) + (i32.const 1) + ) + ) + (local.set $$mul47219 + (i32.mul + (local.get $$mul46218) + (local.get $$14) + ) + ) + (local.set $$cmp48220 + (i32.gt_s + (local.get $$mul47219) + (i32.const 0) + ) + ) + (if + (local.get $$cmp48220) + (block + (local.set $$i42$0222 + (i32.const 0) + ) + (local.set $$k$0221 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$x53 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k$0221) + (i32.const 4) + ) + ) + ) + (local.set $$15 + (f32.load + (local.get $$x53) + ) + ) + (local.set $$mul54 + (f32.mul + (local.get $$15) + (f32.const 0.29899999499320984) + ) + ) + (local.set $$y56 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k$0221) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$16 + (f32.load + (local.get $$y56) + ) + ) + (local.set $$mul57 + (f32.mul + (local.get $$16) + (f32.const 0.5870000123977661) + ) + ) + (local.set $$add58 + (f32.add + (local.get $$mul54) + (local.get $$mul57) + ) + ) + (local.set $$z60 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k$0221) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$17 + (f32.load + (local.get $$z60) + ) + ) + (local.set $$mul61 + (f32.mul + (local.get $$17) + (f32.const 0.11400000005960464) + ) + ) + (local.set $$add62 + (f32.add + (local.get $$add58) + (local.get $$mul61) + ) + ) + (local.set $$mul63 + (f32.mul + (local.get $$add62) + (f32.const 255) + ) + ) + (local.set $$conv64 + (i32.and + (i32.trunc_f32_s + (local.get $$mul63) + ) + (i32.const 255) + ) + ) + (local.set $$18 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx66 + (i32.add + (local.get $$18) + (local.get $$i42$0222) + ) + ) + (i32.store8 + (local.get $$arrayidx66) + (local.get $$conv64) + ) + (local.set $$w + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k$0221) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$19 + (f32.load + (local.get $$w) + ) + ) + (local.set $$mul68 + (f32.mul + (local.get $$19) + (f32.const 255) + ) + ) + (local.set $$conv69 + (i32.and + (i32.trunc_f32_s + (local.get $$mul68) + ) + (i32.const 255) + ) + ) + (local.set $$20 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add71 + (i32.or + (local.get $$i42$0222) + (i32.const 1) + ) + ) + (local.set $$arrayidx72 + (i32.add + (local.get $$20) + (local.get $$add71) + ) + ) + (i32.store8 + (local.get $$arrayidx72) + (local.get $$conv69) + ) + (local.set $$add74 + (i32.add + (local.get $$i42$0222) + (i32.const 2) + ) + ) + (local.set $$inc75 + (i32.add + (local.get $$k$0221) + (i32.const 1) + ) + ) + (local.set $$21 + (i32.load + (local.get $$width) + ) + ) + (local.set $$22 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul46 + (i32.shl + (local.get $$21) + (i32.const 1) + ) + ) + (local.set $$mul47 + (i32.mul + (local.get $$mul46) + (local.get $$22) + ) + ) + (local.set $$cmp48 + (i32.lt_s + (local.get $$add74) + (local.get $$mul47) + ) + ) + (if + (local.get $$cmp48) + (block + (local.set $$i42$0222 + (local.get $$add74) + ) + (local.set $$k$0221 + (local.get $$inc75) + ) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$23 + (i32.load + (local.get $$width) + ) + ) + (local.set $$24 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul80 + (i32.shl + (local.get $$23) + (i32.const 1) + ) + ) + (local.set $$mul81 + (i32.mul + (local.get $$mul80) + (local.get $$24) + ) + ) + (local.set $$call82 + (call $_malloc + (local.get $$mul81) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call82) + ) + (local.set $$mul88223 + (i32.mul + (local.get $$24) + (local.get $$23) + ) + ) + (local.set $$cmp89224 + (i32.gt_s + (local.get $$mul88223) + (i32.const 0) + ) + ) + (if + (local.get $$cmp89224) + (block + (local.set $$i84$0225 + (i32.const 0) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$x94 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i84$0225) + (i32.const 4) + ) + ) + ) + (local.set $$25 + (f32.load + (local.get $$x94) + ) + ) + (local.set $$mul95 + (f32.mul + (local.get $$25) + (f32.const 31) + ) + ) + (local.set $$26 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul95) + ) + ) + ) + ) + (local.set $$conv97 + (i32.and + (i32.trunc_f32_s + (local.get $$26) + ) + (i32.const 255) + ) + ) + (local.set $$y99 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i84$0225) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$27 + (f32.load + (local.get $$y99) + ) + ) + (local.set $$mul100 + (f32.mul + (local.get $$27) + (f32.const 63) + ) + ) + (local.set $$28 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul100) + ) + ) + ) + ) + (local.set $$conv102 + (i32.and + (i32.trunc_f32_s + (local.get $$28) + ) + (i32.const 255) + ) + ) + (local.set $$z104 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i84$0225) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$29 + (f32.load + (local.get $$z104) + ) + ) + (local.set $$mul105 + (f32.mul + (local.get $$29) + (f32.const 31) + ) + ) + (local.set $$30 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul105) + ) + ) + ) + ) + (local.set $$conv107 + (i32.and + (i32.trunc_f32_s + (local.get $$30) + ) + (i32.const 255) + ) + ) + (local.set $$conv109 + (i32.and + (local.get $$conv97) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv109) + (i32.const 11) + ) + ) + (local.set $$conv111 + (i32.and + (local.get $$conv102) + (i32.const 255) + ) + ) + (local.set $$shl112 + (i32.shl + (local.get $$conv111) + (i32.const 5) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl112) + (local.get $$shl) + ) + ) + (local.set $$conv114 + (i32.and + (local.get $$conv107) + (i32.const 255) + ) + ) + (local.set $$or115 + (i32.or + (local.get $$or) + (local.get $$conv114) + ) + ) + (local.set $$conv116 + (i32.and + (local.get $$or115) + (i32.const 65535) + ) + ) + (local.set $$31 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx118 + (i32.add + (local.get $$31) + (i32.shl + (local.get $$i84$0225) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx118) + (local.get $$conv116) + ) + (local.set $$inc120 + (i32.add + (local.get $$i84$0225) + (i32.const 1) + ) + ) + (local.set $$32 + (i32.load + (local.get $$width) + ) + ) + (local.set $$33 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul88 + (i32.mul + (local.get $$33) + (local.get $$32) + ) + ) + (local.set $$cmp89 + (i32.lt_s + (local.get $$inc120) + (local.get $$mul88) + ) + ) + (if + (local.get $$cmp89) + (local.set $$i84$0225 + (local.get $$inc120) + ) + (br $while-out3) + ) + (br $while-in4) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$34 + (i32.load + (local.get $$width) + ) + ) + (local.set $$35 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul125 + (i32.mul + (local.get $$34) + (i32.const 3) + ) + ) + (local.set $$mul126 + (i32.mul + (local.get $$mul125) + (local.get $$35) + ) + ) + (local.set $$call128 + (call $_malloc + (local.get $$mul126) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call128) + ) + (local.set $$mul135226 + (i32.mul + (local.get $$34) + (i32.const 3) + ) + ) + (local.set $$mul136227 + (i32.mul + (local.get $$mul135226) + (local.get $$35) + ) + ) + (local.set $$cmp137228 + (i32.gt_s + (local.get $$mul136227) + (i32.const 0) + ) + ) + (if + (local.get $$cmp137228) + (block + (local.set $$i130$0229 + (i32.const 0) + ) + (local.set $$k131$0230 + (i32.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$x142 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k131$0230) + (i32.const 4) + ) + ) + ) + (local.set $$36 + (f32.load + (local.get $$x142) + ) + ) + (local.set $$mul143 + (f32.mul + (local.get $$36) + (f32.const 255) + ) + ) + (local.set $$conv144 + (i32.and + (i32.trunc_f32_s + (local.get $$mul143) + ) + (i32.const 255) + ) + ) + (local.set $$37 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx146 + (i32.add + (local.get $$37) + (local.get $$i130$0229) + ) + ) + (i32.store8 + (local.get $$arrayidx146) + (local.get $$conv144) + ) + (local.set $$y148 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k131$0230) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$38 + (f32.load + (local.get $$y148) + ) + ) + (local.set $$mul149 + (f32.mul + (local.get $$38) + (f32.const 255) + ) + ) + (local.set $$conv150 + (i32.and + (i32.trunc_f32_s + (local.get $$mul149) + ) + (i32.const 255) + ) + ) + (local.set $$39 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add152 + (i32.add + (local.get $$i130$0229) + (i32.const 1) + ) + ) + (local.set $$arrayidx153 + (i32.add + (local.get $$39) + (local.get $$add152) + ) + ) + (i32.store8 + (local.get $$arrayidx153) + (local.get $$conv150) + ) + (local.set $$z155 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k131$0230) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$40 + (f32.load + (local.get $$z155) + ) + ) + (local.set $$mul156 + (f32.mul + (local.get $$40) + (f32.const 255) + ) + ) + (local.set $$conv157 + (i32.and + (i32.trunc_f32_s + (local.get $$mul156) + ) + (i32.const 255) + ) + ) + (local.set $$41 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add159 + (i32.add + (local.get $$i130$0229) + (i32.const 2) + ) + ) + (local.set $$arrayidx160 + (i32.add + (local.get $$41) + (local.get $$add159) + ) + ) + (i32.store8 + (local.get $$arrayidx160) + (local.get $$conv157) + ) + (local.set $$add162 + (i32.add + (local.get $$i130$0229) + (i32.const 3) + ) + ) + (local.set $$inc163 + (i32.add + (local.get $$k131$0230) + (i32.const 1) + ) + ) + (local.set $$42 + (i32.load + (local.get $$width) + ) + ) + (local.set $$43 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul135 + (i32.mul + (local.get $$42) + (i32.const 3) + ) + ) + (local.set $$mul136 + (i32.mul + (local.get $$mul135) + (local.get $$43) + ) + ) + (local.set $$cmp137 + (i32.lt_s + (local.get $$add162) + (local.get $$mul136) + ) + ) + (if + (local.get $$cmp137) + (block + (local.set $$i130$0229 + (local.get $$add162) + ) + (local.set $$k131$0230 + (local.get $$inc163) + ) + ) + (br $while-out6) + ) + (br $while-in7) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$44 + (i32.load + (local.get $$width) + ) + ) + (local.set $$45 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul168 + (i32.shl + (local.get $$44) + (i32.const 1) + ) + ) + (local.set $$mul169 + (i32.mul + (local.get $$mul168) + (local.get $$45) + ) + ) + (local.set $$call170 + (call $_malloc + (local.get $$mul169) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call170) + ) + (local.set $$mul179231 + (i32.mul + (local.get $$45) + (local.get $$44) + ) + ) + (local.set $$cmp180232 + (i32.gt_s + (local.get $$mul179231) + (i32.const 0) + ) + ) + (if + (local.get $$cmp180232) + (block + (local.set $$i175$0233 + (i32.const 0) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$x185 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i175$0233) + (i32.const 4) + ) + ) + ) + (local.set $$46 + (f32.load + (local.get $$x185) + ) + ) + (local.set $$mul186 + (f32.mul + (local.get $$46) + (f32.const 31) + ) + ) + (local.set $$47 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul186) + ) + ) + ) + ) + (local.set $$conv188 + (i32.and + (i32.trunc_f32_s + (local.get $$47) + ) + (i32.const 255) + ) + ) + (local.set $$y190 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i175$0233) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$48 + (f32.load + (local.get $$y190) + ) + ) + (local.set $$mul191 + (f32.mul + (local.get $$48) + (f32.const 31) + ) + ) + (local.set $$49 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul191) + ) + ) + ) + ) + (local.set $$conv193 + (i32.and + (i32.trunc_f32_s + (local.get $$49) + ) + (i32.const 255) + ) + ) + (local.set $$z195 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i175$0233) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$50 + (f32.load + (local.get $$z195) + ) + ) + (local.set $$mul196 + (f32.mul + (local.get $$50) + (f32.const 31) + ) + ) + (local.set $$51 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul196) + ) + ) + ) + ) + (local.set $$conv198 + (i32.and + (i32.trunc_f32_s + (local.get $$51) + ) + (i32.const 255) + ) + ) + (local.set $$w200 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i175$0233) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$52 + (f32.load + (local.get $$w200) + ) + ) + (local.set $$cmp201 + (f32.gt + (local.get $$52) + (f32.const 0.19607843458652496) + ) + ) + (local.set $$conv205 + (i32.and + (local.get $$conv188) + (i32.const 255) + ) + ) + (local.set $$shl206 + (i32.shl + (local.get $$conv205) + (i32.const 11) + ) + ) + (local.set $$conv208 + (i32.and + (local.get $$conv193) + (i32.const 255) + ) + ) + (local.set $$shl209 + (i32.shl + (local.get $$conv208) + (i32.const 6) + ) + ) + (local.set $$conv212 + (i32.and + (local.get $$conv198) + (i32.const 255) + ) + ) + (local.set $$shl213 + (i32.shl + (local.get $$conv212) + (i32.const 1) + ) + ) + (local.set $$conv216 + (i32.and + (local.get $$cmp201) + (i32.const 1) + ) + ) + (local.set $$or210 + (i32.or + (local.get $$shl206) + (local.get $$conv216) + ) + ) + (local.set $$or214 + (i32.or + (local.get $$or210) + (local.get $$shl209) + ) + ) + (local.set $$or217 + (i32.or + (local.get $$or214) + (local.get $$shl213) + ) + ) + (local.set $$conv218 + (i32.and + (local.get $$or217) + (i32.const 65535) + ) + ) + (local.set $$53 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx220 + (i32.add + (local.get $$53) + (i32.shl + (local.get $$i175$0233) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx220) + (local.get $$conv218) + ) + (local.set $$inc222 + (i32.add + (local.get $$i175$0233) + (i32.const 1) + ) + ) + (local.set $$54 + (i32.load + (local.get $$width) + ) + ) + (local.set $$55 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul179 + (i32.mul + (local.get $$55) + (local.get $$54) + ) + ) + (local.set $$cmp180 + (i32.lt_s + (local.get $$inc222) + (local.get $$mul179) + ) + ) + (if + (local.get $$cmp180) + (local.set $$i175$0233 + (local.get $$inc222) + ) + (br $while-out9) + ) + (br $while-in10) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$56 + (i32.load + (local.get $$width) + ) + ) + (local.set $$57 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul227 + (i32.shl + (local.get $$56) + (i32.const 1) + ) + ) + (local.set $$mul228 + (i32.mul + (local.get $$mul227) + (local.get $$57) + ) + ) + (local.set $$call229 + (call $_malloc + (local.get $$mul228) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call229) + ) + (local.set $$mul239234 + (i32.mul + (local.get $$57) + (local.get $$56) + ) + ) + (local.set $$cmp240235 + (i32.gt_s + (local.get $$mul239234) + (i32.const 0) + ) + ) + (if + (local.get $$cmp240235) + (block + (local.set $$i235$0236 + (i32.const 0) + ) + (loop $while-in13 + (block $while-out12 + (local.set $$x245 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i235$0236) + (i32.const 4) + ) + ) + ) + (local.set $$58 + (f32.load + (local.get $$x245) + ) + ) + (local.set $$mul246 + (f32.mul + (local.get $$58) + (f32.const 15) + ) + ) + (local.set $$59 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul246) + ) + ) + ) + ) + (local.set $$conv248 + (i32.and + (i32.trunc_f32_s + (local.get $$59) + ) + (i32.const 255) + ) + ) + (local.set $$y250 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i235$0236) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$60 + (f32.load + (local.get $$y250) + ) + ) + (local.set $$mul251 + (f32.mul + (local.get $$60) + (f32.const 15) + ) + ) + (local.set $$61 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul251) + ) + ) + ) + ) + (local.set $$conv253 + (i32.and + (i32.trunc_f32_s + (local.get $$61) + ) + (i32.const 255) + ) + ) + (local.set $$z255 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i235$0236) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$62 + (f32.load + (local.get $$z255) + ) + ) + (local.set $$mul256 + (f32.mul + (local.get $$62) + (f32.const 15) + ) + ) + (local.set $$63 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul256) + ) + ) + ) + ) + (local.set $$conv258 + (i32.and + (i32.trunc_f32_s + (local.get $$63) + ) + (i32.const 255) + ) + ) + (local.set $$w260 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i235$0236) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$64 + (f32.load + (local.get $$w260) + ) + ) + (local.set $$mul261 + (f32.mul + (local.get $$64) + (f32.const 15) + ) + ) + (local.set $$65 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul261) + ) + ) + ) + ) + (local.set $$conv263 + (i32.and + (i32.trunc_f32_s + (local.get $$65) + ) + (i32.const 255) + ) + ) + (local.set $$conv265 + (i32.and + (local.get $$conv248) + (i32.const 255) + ) + ) + (local.set $$shl266 + (i32.shl + (local.get $$conv265) + (i32.const 12) + ) + ) + (local.set $$conv268 + (i32.and + (local.get $$conv253) + (i32.const 255) + ) + ) + (local.set $$shl269 + (i32.shl + (local.get $$conv268) + (i32.const 8) + ) + ) + (local.set $$or270 + (i32.or + (local.get $$shl269) + (local.get $$shl266) + ) + ) + (local.set $$conv272 + (i32.and + (local.get $$conv258) + (i32.const 255) + ) + ) + (local.set $$shl273 + (i32.shl + (local.get $$conv272) + (i32.const 4) + ) + ) + (local.set $$or274 + (i32.or + (local.get $$or270) + (local.get $$shl273) + ) + ) + (local.set $$conv276 + (i32.and + (local.get $$conv263) + (i32.const 255) + ) + ) + (local.set $$or277 + (i32.or + (local.get $$or274) + (local.get $$conv276) + ) + ) + (local.set $$conv278 + (i32.and + (local.get $$or277) + (i32.const 65535) + ) + ) + (local.set $$66 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx280 + (i32.add + (local.get $$66) + (i32.shl + (local.get $$i235$0236) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx280) + (local.get $$conv278) + ) + (local.set $$inc282 + (i32.add + (local.get $$i235$0236) + (i32.const 1) + ) + ) + (local.set $$67 + (i32.load + (local.get $$width) + ) + ) + (local.set $$68 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul239 + (i32.mul + (local.get $$68) + (local.get $$67) + ) + ) + (local.set $$cmp240 + (i32.lt_s + (local.get $$inc282) + (local.get $$mul239) + ) + ) + (if + (local.get $$cmp240) + (local.set $$i235$0236 + (local.get $$inc282) + ) + (br $while-out12) + ) + (br $while-in13) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$69 + (i32.load + (local.get $$width) + ) + ) + (local.set $$70 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul287 + (i32.shl + (local.get $$69) + (i32.const 2) + ) + ) + (local.set $$mul288 + (i32.mul + (local.get $$mul287) + (local.get $$70) + ) + ) + (local.set $$call290 + (call $_malloc + (local.get $$mul288) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call290) + ) + (local.set $$mul297237 + (i32.shl + (local.get $$69) + (i32.const 2) + ) + ) + (local.set $$mul298238 + (i32.mul + (local.get $$mul297237) + (local.get $$70) + ) + ) + (local.set $$cmp299239 + (i32.gt_s + (local.get $$mul298238) + (i32.const 0) + ) + ) + (if + (local.get $$cmp299239) + (block + (local.set $$i292$0240 + (i32.const 0) + ) + (local.set $$k293$0241 + (i32.const 0) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$x304 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k293$0241) + (i32.const 4) + ) + ) + ) + (local.set $$71 + (f32.load + (local.get $$x304) + ) + ) + (local.set $$mul305 + (f32.mul + (local.get $$71) + (f32.const 255) + ) + ) + (local.set $$conv306 + (i32.and + (i32.trunc_f32_s + (local.get $$mul305) + ) + (i32.const 255) + ) + ) + (local.set $$72 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx308 + (i32.add + (local.get $$72) + (local.get $$i292$0240) + ) + ) + (i32.store8 + (local.get $$arrayidx308) + (local.get $$conv306) + ) + (local.set $$y310 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k293$0241) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$73 + (f32.load + (local.get $$y310) + ) + ) + (local.set $$mul311 + (f32.mul + (local.get $$73) + (f32.const 255) + ) + ) + (local.set $$conv312 + (i32.and + (i32.trunc_f32_s + (local.get $$mul311) + ) + (i32.const 255) + ) + ) + (local.set $$74 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add314 + (i32.or + (local.get $$i292$0240) + (i32.const 1) + ) + ) + (local.set $$arrayidx315 + (i32.add + (local.get $$74) + (local.get $$add314) + ) + ) + (i32.store8 + (local.get $$arrayidx315) + (local.get $$conv312) + ) + (local.set $$z317 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k293$0241) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$75 + (f32.load + (local.get $$z317) + ) + ) + (local.set $$mul318 + (f32.mul + (local.get $$75) + (f32.const 255) + ) + ) + (local.set $$conv319 + (i32.and + (i32.trunc_f32_s + (local.get $$mul318) + ) + (i32.const 255) + ) + ) + (local.set $$76 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add321 + (i32.or + (local.get $$i292$0240) + (i32.const 2) + ) + ) + (local.set $$arrayidx322 + (i32.add + (local.get $$76) + (local.get $$add321) + ) + ) + (i32.store8 + (local.get $$arrayidx322) + (local.get $$conv319) + ) + (local.set $$w324 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k293$0241) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$77 + (f32.load + (local.get $$w324) + ) + ) + (local.set $$mul325 + (f32.mul + (local.get $$77) + (f32.const 255) + ) + ) + (local.set $$conv326 + (i32.and + (i32.trunc_f32_s + (local.get $$mul325) + ) + (i32.const 255) + ) + ) + (local.set $$78 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add328 + (i32.or + (local.get $$i292$0240) + (i32.const 3) + ) + ) + (local.set $$arrayidx329 + (i32.add + (local.get $$78) + (local.get $$add328) + ) + ) + (i32.store8 + (local.get $$arrayidx329) + (local.get $$conv326) + ) + (local.set $$add331 + (i32.add + (local.get $$i292$0240) + (i32.const 4) + ) + ) + (local.set $$inc332 + (i32.add + (local.get $$k293$0241) + (i32.const 1) + ) + ) + (local.set $$79 + (i32.load + (local.get $$width) + ) + ) + (local.set $$80 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul297 + (i32.shl + (local.get $$79) + (i32.const 2) + ) + ) + (local.set $$mul298 + (i32.mul + (local.get $$mul297) + (local.get $$80) + ) + ) + (local.set $$cmp299 + (i32.lt_s + (local.get $$add331) + (local.get $$mul298) + ) + ) + (if + (local.get $$cmp299) + (block + (local.set $$i292$0240 + (local.get $$add331) + ) + (local.set $$k293$0241 + (local.get $$inc332) + ) + ) + (br $while-out15) + ) + (br $while-in16) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$81 + (i32.load + (local.get $$width) + ) + ) + (local.set $$82 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul337 + (i32.shl + (local.get $$81) + (i32.const 2) + ) + ) + (local.set $$mul338 + (i32.mul + (local.get $$mul337) + (local.get $$82) + ) + ) + (local.set $$call339 + (call $_malloc + (local.get $$mul338) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call339) + ) + (local.set $$mul345242 + (i32.mul + (local.get $$82) + (local.get $$81) + ) + ) + (local.set $$cmp346243 + (i32.gt_s + (local.get $$mul345242) + (i32.const 0) + ) + ) + (if + (local.get $$cmp346243) + (block + (local.set $$i341$0244 + (i32.const 0) + ) + (loop $while-in19 + (block $while-out18 + (local.set $$x351 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i341$0244) + (i32.const 4) + ) + ) + ) + (local.set $$83 + (f32.load + (local.get $$x351) + ) + ) + (local.set $$mul352 + (f32.mul + (local.get $$83) + (f32.const 0.29899999499320984) + ) + ) + (local.set $$y354 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i341$0244) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$84 + (f32.load + (local.get $$y354) + ) + ) + (local.set $$mul355 + (f32.mul + (local.get $$84) + (f32.const 0.5870000123977661) + ) + ) + (local.set $$add356 + (f32.add + (local.get $$mul352) + (local.get $$mul355) + ) + ) + (local.set $$z358 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i341$0244) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$85 + (f32.load + (local.get $$z358) + ) + ) + (local.set $$mul359 + (f32.mul + (local.get $$85) + (f32.const 0.11400000005960464) + ) + ) + (local.set $$add360 + (f32.add + (local.get $$add356) + (local.get $$mul359) + ) + ) + (local.set $$86 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx362 + (i32.add + (local.get $$86) + (i32.shl + (local.get $$i341$0244) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx362) + (local.get $$add360) + ) + (local.set $$inc364 + (i32.add + (local.get $$i341$0244) + (i32.const 1) + ) + ) + (local.set $$87 + (i32.load + (local.get $$width) + ) + ) + (local.set $$88 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul345 + (i32.mul + (local.get $$88) + (local.get $$87) + ) + ) + (local.set $$cmp346 + (i32.lt_s + (local.get $$inc364) + (local.get $$mul345) + ) + ) + (if + (local.get $$cmp346) + (local.set $$i341$0244 + (local.get $$inc364) + ) + (br $while-out18) + ) + (br $while-in19) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$89 + (i32.load + (local.get $$width) + ) + ) + (local.set $$90 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul369 + (i32.mul + (local.get $$89) + (i32.const 12) + ) + ) + (local.set $$mul371 + (i32.mul + (local.get $$mul369) + (local.get $$90) + ) + ) + (local.set $$call372 + (call $_malloc + (local.get $$mul371) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call372) + ) + (local.set $$mul379245 + (i32.mul + (local.get $$89) + (i32.const 3) + ) + ) + (local.set $$mul380246 + (i32.mul + (local.get $$mul379245) + (local.get $$90) + ) + ) + (local.set $$cmp381247 + (i32.gt_s + (local.get $$mul380246) + (i32.const 0) + ) + ) + (if + (local.get $$cmp381247) + (block + (local.set $$i374$0248 + (i32.const 0) + ) + (local.set $$k375$0249 + (i32.const 0) + ) + (loop $while-in22 + (block $while-out21 + (local.set $$arrayidx385 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k375$0249) + (i32.const 4) + ) + ) + ) + (local.set $$91 + (i32.load + (local.get $$arrayidx385) + ) + ) + (local.set $$92 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx388 + (i32.add + (local.get $$92) + (i32.shl + (local.get $$i374$0248) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx388) + (local.get $$91) + ) + (local.set $$y390 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k375$0249) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$93 + (i32.load + (local.get $$y390) + ) + ) + (local.set $$94 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add392 + (i32.add + (local.get $$i374$0248) + (i32.const 1) + ) + ) + (local.set $$arrayidx393 + (i32.add + (local.get $$94) + (i32.shl + (local.get $$add392) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx393) + (local.get $$93) + ) + (local.set $$z395 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k375$0249) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$95 + (i32.load + (local.get $$z395) + ) + ) + (local.set $$96 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add397 + (i32.add + (local.get $$i374$0248) + (i32.const 2) + ) + ) + (local.set $$arrayidx398 + (i32.add + (local.get $$96) + (i32.shl + (local.get $$add397) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx398) + (local.get $$95) + ) + (local.set $$add400 + (i32.add + (local.get $$i374$0248) + (i32.const 3) + ) + ) + (local.set $$inc401 + (i32.add + (local.get $$k375$0249) + (i32.const 1) + ) + ) + (local.set $$97 + (i32.load + (local.get $$width) + ) + ) + (local.set $$98 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul379 + (i32.mul + (local.get $$97) + (i32.const 3) + ) + ) + (local.set $$mul380 + (i32.mul + (local.get $$mul379) + (local.get $$98) + ) + ) + (local.set $$cmp381 + (i32.lt_s + (local.get $$add400) + (local.get $$mul380) + ) + ) + (if + (local.get $$cmp381) + (block + (local.set $$i374$0248 + (local.get $$add400) + ) + (local.set $$k375$0249 + (local.get $$inc401) + ) + ) + (br $while-out21) + ) + (br $while-in22) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$99 + (i32.load + (local.get $$width) + ) + ) + (local.set $$100 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul406 + (i32.shl + (local.get $$99) + (i32.const 4) + ) + ) + (local.set $$mul408 + (i32.mul + (local.get $$mul406) + (local.get $$100) + ) + ) + (local.set $$call409 + (call $_malloc + (local.get $$mul408) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call409) + ) + (local.set $$mul416250 + (i32.shl + (local.get $$99) + (i32.const 2) + ) + ) + (local.set $$mul417251 + (i32.mul + (local.get $$mul416250) + (local.get $$100) + ) + ) + (local.set $$cmp418252 + (i32.gt_s + (local.get $$mul417251) + (i32.const 0) + ) + ) + (if + (local.get $$cmp418252) + (block + (local.set $$i411$0253 + (i32.const 0) + ) + (local.set $$k412$0254 + (i32.const 0) + ) + (loop $while-in25 + (block $while-out24 + (local.set $$arrayidx422 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k412$0254) + (i32.const 4) + ) + ) + ) + (local.set $$101 + (i32.load + (local.get $$arrayidx422) + ) + ) + (local.set $$102 + (i32.load + (local.get $$image) + ) + ) + (local.set $$arrayidx425 + (i32.add + (local.get $$102) + (i32.shl + (local.get $$i411$0253) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx425) + (local.get $$101) + ) + (local.set $$y427 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k412$0254) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (local.set $$103 + (i32.load + (local.get $$y427) + ) + ) + (local.set $$104 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add429 + (i32.or + (local.get $$i411$0253) + (i32.const 1) + ) + ) + (local.set $$arrayidx430 + (i32.add + (local.get $$104) + (i32.shl + (local.get $$add429) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx430) + (local.get $$103) + ) + (local.set $$z432 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k412$0254) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$105 + (i32.load + (local.get $$z432) + ) + ) + (local.set $$106 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add434 + (i32.or + (local.get $$i411$0253) + (i32.const 2) + ) + ) + (local.set $$arrayidx435 + (i32.add + (local.get $$106) + (i32.shl + (local.get $$add434) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx435) + (local.get $$105) + ) + (local.set $$w437 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k412$0254) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$107 + (i32.load + (local.get $$w437) + ) + ) + (local.set $$108 + (i32.load + (local.get $$image) + ) + ) + (local.set $$add439 + (i32.or + (local.get $$i411$0253) + (i32.const 3) + ) + ) + (local.set $$arrayidx440 + (i32.add + (local.get $$108) + (i32.shl + (local.get $$add439) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx440) + (local.get $$107) + ) + (local.set $$add442 + (i32.add + (local.get $$i411$0253) + (i32.const 4) + ) + ) + (local.set $$inc443 + (i32.add + (local.get $$k412$0254) + (i32.const 1) + ) + ) + (local.set $$109 + (i32.load + (local.get $$width) + ) + ) + (local.set $$110 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul416 + (i32.shl + (local.get $$109) + (i32.const 2) + ) + ) + (local.set $$mul417 + (i32.mul + (local.get $$mul416) + (local.get $$110) + ) + ) + (local.set $$cmp418 + (i32.lt_s + (local.get $$add442) + (local.get $$mul417) + ) + ) + (if + (local.get $$cmp418) + (block + (local.set $$i411$0253 + (local.get $$add442) + ) + (local.set $$k412$0254 + (local.get $$inc443) + ) + ) + (br $while-out24) + ) + (br $while-in25) + ) + ) + ) + ) + (br $switch) + ) + ) + ) + (call $_free + (local.get $$call) + ) + (local.set $$mipmaps + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (local.set $$111 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$cmp445 + (i32.gt_s + (local.get $$111) + (i32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$cmp445) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i32.store + (local.get $$mipmaps) + (i32.const 1) + ) + (local.set $$112 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp450 + (i32.eq + (local.get $$112) + (i32.const 0) + ) + ) + (if + (local.get $$cmp450) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_ImageMipmaps + (local.get $$image) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_LoadTextureFromImage (; 436 ;) (param $$agg$result i32) (param $$image i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp3 i32) + (local $$format i32) + (local $$format13 i32) + (local $$height i32) + (local $$height9 i32) + (local $$mipmaps i32) + (local $$mipmaps11 i32) + (local $$texture$sroa$0$0 i32) + (local $$texture$sroa$5$0$$sroa_idx2 i32) + (local $$texture$sroa$6$0$$sroa_idx4 i32) + (local $$texture$sroa$7$0$$sroa_idx6 i32) + (local $$texture$sroa$8$0$$sroa_idx8 i32) + (local $$vararg_buffer i32) + (local $$width i32) + (local $$width7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $label + (i32.const 5) + ) + (block + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (local.set $label + (i32.const 5) + ) + (block + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3) + (local.set $label + (i32.const 5) + ) + (block + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$3 + (i32.load + (local.get $$format) + ) + ) + (local.set $$mipmaps + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (local.set $$4 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$call + (call $_rlLoadTexture + (local.get $$0) + (local.get $$1) + (local.get $$2) + (local.get $$3) + (local.get $$4) + ) + ) + (local.set $$texture$sroa$0$0 + (local.get $$call) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12610) + (local.get $$vararg_buffer) + ) + (local.set $$texture$sroa$0$0 + (i32.const 0) + ) + ) + ) + (local.set $$width7 + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$width7) + ) + ) + (local.set $$height9 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$6 + (i32.load + (local.get $$height9) + ) + ) + (local.set $$mipmaps11 + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (local.set $$7 + (i32.load + (local.get $$mipmaps11) + ) + ) + (local.set $$format13 + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$8 + (i32.load + (local.get $$format13) + ) + ) + (i32.store + (local.get $$agg$result) + (local.get $$texture$sroa$0$0) + ) + (local.set $$texture$sroa$5$0$$sroa_idx2 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$texture$sroa$5$0$$sroa_idx2) + (local.get $$5) + ) + (local.set $$texture$sroa$6$0$$sroa_idx4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (i32.store + (local.get $$texture$sroa$6$0$$sroa_idx4) + (local.get $$6) + ) + (local.set $$texture$sroa$7$0$$sroa_idx6 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (i32.store + (local.get $$texture$sroa$7$0$$sroa_idx6) + (local.get $$7) + ) + (local.set $$texture$sroa$8$0$$sroa_idx8 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (i32.store + (local.get $$texture$sroa$8$0$$sroa_idx8) + (local.get $$8) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_UnloadImage (; 437 ;) (param $$image i32) + (local $$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (call $_free + (local.get $$0) + ) + (return) + ) + (func $_ImageFromImage (; 438 ;) (param $$agg$result i32) (param $$image i32) (param $$rec i32) + (local $$image$byval_copy i32) + (local $$rec$byval_copy i32) + (local $$result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$rec$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (local.set $$result + (local.get $sp_a) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_ImageCopy + (local.get $$result) + (local.get $$image$byval_copy) + ) + (i64.store align=4 + (local.get $$rec$byval_copy) + (i64.load align=4 + (local.get $$rec) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$rec$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$rec) + (i32.const 8) + ) + ) + ) + (call $_ImageCrop + (local.get $$result) + (local.get $$rec$byval_copy) + ) + (i64.store align=4 + (local.get $$agg$result) + (i64.load align=4 + (local.get $$result) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$result) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$result) + (i32.const 16) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_ImageCopy (; 439 ;) (param $$agg$result i32) (param $$image i32) + (local $$$lcssa i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$add i32) + (local $$call i32) + (local $$call8 i32) + (local $$cmp i32) + (local $$cmp10 i32) + (local $$cmp22 i32) + (local $$cmp4 i32) + (local $$cmp5 i32) + (local $$div i32) + (local $$div3 i32) + (local $$format i32) + (local $$format20 i32) + (local $$height$024 i32) + (local $$height$1 i32) + (local $$height2 i32) + (local $$i$026 i32) + (local $$inc i32) + (local $$mipmaps i32) + (local $$newImage$sroa$10$0 i32) + (local $$newImage$sroa$10$0$$sroa_idx20 i32) + (local $$newImage$sroa$7$0 i32) + (local $$newImage$sroa$7$0$$sroa_idx14 i32) + (local $$newImage$sroa$8$0 i32) + (local $$newImage$sroa$8$0$$sroa_idx16 i32) + (local $$newImage$sroa$9$0 i32) + (local $$newImage$sroa$9$0$$sroa_idx18 i32) + (local $$size$0$lcssa i32) + (local $$size$025 i32) + (local $$spec$select i32) + (local $$width$023 i32) + (local $$width1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$width1 + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$width1) + ) + ) + (local.set $$height2 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$height2) + ) + ) + (local.set $$mipmaps + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (local.set $$2 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$cmp22 + (i32.gt_s + (local.get $$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp22) + (block + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$3 + (i32.load + (local.get $$format) + ) + ) + (local.set $$4 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$height$024 + (local.get $$1) + ) + (local.set $$i$026 + (i32.const 0) + ) + (local.set $$size$025 + (i32.const 0) + ) + (local.set $$width$023 + (local.get $$0) + ) + (loop $while-in + (block $while-out + (local.set $$call + (call $_GetPixelDataSize + (local.get $$width$023) + (local.get $$height$024) + (local.get $$3) + ) + ) + (local.set $$add + (i32.add + (local.get $$call) + (local.get $$size$025) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$width$023) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div3 + (i32.and + (i32.div_s + (local.get $$height$024) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp4 + (i32.lt_s + (local.get $$width$023) + (i32.const 2) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp4) + (i32.const 1) + (local.get $$div) + ) + ) + (local.set $$cmp5 + (i32.lt_s + (local.get $$height$024) + (i32.const 2) + ) + ) + (local.set $$height$1 + (if (result i32) + (local.get $$cmp5) + (i32.const 1) + (local.get $$div3) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$026) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$4) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$height$024 + (local.get $$height$1) + ) + (local.set $$i$026 + (local.get $$inc) + ) + (local.set $$size$025 + (local.get $$add) + ) + (local.set $$width$023 + (local.get $$spec$select) + ) + ) + (block + (local.set $$$lcssa + (local.get $$4) + ) + (local.set $$size$0$lcssa + (local.get $$add) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + (block + (local.set $$$lcssa + (local.get $$2) + ) + (local.set $$size$0$lcssa + (i32.const 0) + ) + ) + ) + (local.set $$call8 + (call $_malloc + (local.get $$size$0$lcssa) + ) + ) + (local.set $$cmp10 + (i32.eq + (local.get $$call8) + (i32.const 0) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$newImage$sroa$10$0 + (i32.const 0) + ) + (local.set $$newImage$sroa$7$0 + (i32.const 0) + ) + (local.set $$newImage$sroa$8$0 + (i32.const 0) + ) + (local.set $$newImage$sroa$9$0 + (i32.const 0) + ) + ) + (block + (local.set $$5 + (i32.load + (local.get $$image) + ) + ) + (drop + (call $_memcpy + (local.get $$call8) + (local.get $$5) + (local.get $$size$0$lcssa) + ) + ) + (local.set $$format20 + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$6 + (i32.load + (local.get $$format20) + ) + ) + (local.set $$newImage$sroa$10$0 + (local.get $$6) + ) + (local.set $$newImage$sroa$7$0 + (local.get $$0) + ) + (local.set $$newImage$sroa$8$0 + (local.get $$1) + ) + (local.set $$newImage$sroa$9$0 + (local.get $$$lcssa) + ) + ) + ) + (i32.store + (local.get $$agg$result) + (local.get $$call8) + ) + (local.set $$newImage$sroa$7$0$$sroa_idx14 + (i32.add + (local.get $$agg$result) + (i32.const 4) + ) + ) + (i32.store + (local.get $$newImage$sroa$7$0$$sroa_idx14) + (local.get $$newImage$sroa$7$0) + ) + (local.set $$newImage$sroa$8$0$$sroa_idx16 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + ) + (i32.store + (local.get $$newImage$sroa$8$0$$sroa_idx16) + (local.get $$newImage$sroa$8$0) + ) + (local.set $$newImage$sroa$9$0$$sroa_idx18 + (i32.add + (local.get $$agg$result) + (i32.const 12) + ) + ) + (i32.store + (local.get $$newImage$sroa$9$0$$sroa_idx18) + (local.get $$newImage$sroa$9$0) + ) + (local.set $$newImage$sroa$10$0$$sroa_idx20 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + ) + (i32.store + (local.get $$newImage$sroa$10$0$$sroa_idx20) + (local.get $$newImage$sroa$10$0) + ) + (return) + ) + (func $_ImageCrop (; 440 ;) (param $$image i32) (param $$crop i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 f32) + (local $$11 f32) + (local $$12 f32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$3 f32) + (local $$4 f32) + (local $$5 f32) + (local $$6 f32) + (local $$7 f32) + (local $$8 f32) + (local $$9 f32) + (local $$add f32) + (local $$add14 f32) + (local $$add19 f32) + (local $$add31 f32) + (local $$add64 f32) + (local $$add73 f32) + (local $$call i32) + (local $$call59 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp10 i32) + (local $$cmp21 i32) + (local $$cmp3 i32) + (local $$cmp34 i32) + (local $$cmp4 i32) + (local $$cmp46 i32) + (local $$cmp51 i32) + (local $$cmp6631 i32) + (local $$cmp7529 i32) + (local $$conv f32) + (local $$conv33 f32) + (local $$conv55 i32) + (local $$conv57 i32) + (local $$conv61 i32) + (local $$conv65 i32) + (local $$conv69 i32) + (local $$conv74 i32) + (local $$exitcond i32) + (local $$format96 i32) + (local $$height i32) + (local $$height13 i32) + (local $$height30 i32) + (local $$image$byval_copy i32) + (local $$image$byval_copy1 i32) + (local $$inc94 i32) + (local $$indvar i32) + (local $$indvar$next i32) + (local $$j$032 i32) + (local $$mul i32) + (local $$mul58 i32) + (local $$mul90 i32) + (local $$or$cond i32) + (local $$scevgep i32) + (local $$scevgep3334 i32) + (local $$sub f32) + (local $$sub40 f32) + (local $$tmp i32) + (local $$vararg_buffer i32) + (local $$width i32) + (local $$width18 i32) + (local $$width7 i32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$image$byval_copy1 + (i32.add + (local.get $sp_a) + (i32.const 44) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$3 + (f32.load + (local.get $$crop) + ) + ) + (local.set $$cmp4 + (f32.lt + (local.get $$3) + (f32.const 0) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$width7 + (i32.add + (local.get $$crop) + (i32.const 8) + ) + ) + (local.set $$4 + (f32.load + (local.get $$width7) + ) + ) + (local.set $$add + (f32.add + (local.get $$3) + (local.get $$4) + ) + ) + (f32.store + (local.get $$width7) + (local.get $$add) + ) + (f32.store + (local.get $$crop) + (f32.const 0) + ) + ) + ) + (local.set $$y + (i32.add + (local.get $$crop) + (i32.const 4) + ) + ) + (local.set $$5 + (f32.load + (local.get $$y) + ) + ) + (local.set $$cmp10 + (f32.lt + (local.get $$5) + (f32.const 0) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$height13 + (i32.add + (local.get $$crop) + (i32.const 12) + ) + ) + (local.set $$6 + (f32.load + (local.get $$height13) + ) + ) + (local.set $$add14 + (f32.add + (local.get $$5) + (local.get $$6) + ) + ) + (f32.store + (local.get $$height13) + (local.get $$add14) + ) + (f32.store + (local.get $$y) + (f32.const 0) + ) + ) + ) + (local.set $$7 + (f32.load + (local.get $$crop) + ) + ) + (local.set $$width18 + (i32.add + (local.get $$crop) + (i32.const 8) + ) + ) + (local.set $$8 + (f32.load + (local.get $$width18) + ) + ) + (local.set $$add19 + (f32.add + (local.get $$7) + (local.get $$8) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$1) + ) + ) + (local.set $$cmp21 + (f32.gt + (local.get $$add19) + (local.get $$conv) + ) + ) + (if + (local.get $$cmp21) + (block + (local.set $$sub + (f32.sub + (local.get $$conv) + (local.get $$7) + ) + ) + (f32.store + (local.get $$width18) + (local.get $$sub) + ) + ) + ) + (local.set $$9 + (f32.load + (local.get $$y) + ) + ) + (local.set $$height30 + (i32.add + (local.get $$crop) + (i32.const 12) + ) + ) + (local.set $$10 + (f32.load + (local.get $$height30) + ) + ) + (local.set $$add31 + (f32.add + (local.get $$9) + (local.get $$10) + ) + ) + (local.set $$conv33 + (f32.convert_i32_s + (local.get $$2) + ) + ) + (local.set $$cmp34 + (f32.gt + (local.get $$add31) + (local.get $$conv33) + ) + ) + (if + (local.get $$cmp34) + (block + (local.set $$sub40 + (f32.sub + (local.get $$conv33) + (local.get $$9) + ) + ) + (f32.store + (local.get $$height30) + (local.get $$sub40) + ) + ) + ) + (local.set $$cmp46 + (f32.lt + (local.get $$7) + (local.get $$conv) + ) + ) + (local.set $$cmp51 + (f32.lt + (local.get $$9) + (local.get $$conv33) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp46) + (local.get $$cmp51) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12442) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (local.set $$call + (call $_GetImageData + (local.get $$image$byval_copy) + ) + ) + (local.set $$11 + (f32.load + (local.get $$width18) + ) + ) + (local.set $$conv55 + (i32.trunc_f32_s + (local.get $$11) + ) + ) + (local.set $$12 + (f32.load + (local.get $$height30) + ) + ) + (local.set $$conv57 + (i32.trunc_f32_s + (local.get $$12) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$conv55) + (i32.const 2) + ) + ) + (local.set $$mul58 + (i32.mul + (local.get $$mul) + (local.get $$conv57) + ) + ) + (local.set $$call59 + (call $_malloc + (local.get $$mul58) + ) + ) + (local.set $$conv61 + (i32.trunc_f32_s + (local.get $$9) + ) + ) + (local.set $$add64 + (f32.add + (local.get $$9) + (local.get $$12) + ) + ) + (local.set $$conv65 + (i32.trunc_f32_s + (local.get $$add64) + ) + ) + (local.set $$cmp6631 + (i32.gt_s + (local.get $$conv65) + (local.get $$conv61) + ) + ) + (if + (local.get $$cmp6631) + (block + (local.set $$conv69 + (i32.trunc_f32_s + (local.get $$7) + ) + ) + (local.set $$add73 + (f32.add + (local.get $$7) + (local.get $$11) + ) + ) + (local.set $$conv74 + (i32.trunc_f32_s + (local.get $$add73) + ) + ) + (local.set $$cmp7529 + (i32.gt_s + (local.get $$conv74) + (local.get $$conv69) + ) + ) + (local.set $$13 + (i32.shl + (local.get $$conv55) + (i32.const 2) + ) + ) + (local.set $$14 + (i32.sub + (local.get $$conv74) + (local.get $$conv69) + ) + ) + (local.set $$15 + (i32.shl + (local.get $$14) + (i32.const 2) + ) + ) + (local.set $$16 + (i32.sub + (local.get $$conv65) + (local.get $$conv61) + ) + ) + (local.set $$indvar + (i32.const 0) + ) + (local.set $$j$032 + (local.get $$conv61) + ) + (loop $while-in + (block $while-out + (if + (local.get $$cmp7529) + (block + (local.set $$18 + (i32.mul + (local.get $$13) + (local.get $$indvar) + ) + ) + (local.set $$scevgep + (i32.add + (local.get $$call59) + (local.get $$18) + ) + ) + (local.set $$19 + (i32.load + (local.get $$width) + ) + ) + (local.set $$mul90 + (i32.mul + (local.get $$19) + (local.get $$j$032) + ) + ) + (local.set $$20 + (i32.add + (local.get $$mul90) + (local.get $$conv69) + ) + ) + (local.set $$scevgep3334 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$20) + (i32.const 2) + ) + ) + ) + (drop + (call $_memcpy + (local.get $$scevgep) + (local.get $$scevgep3334) + (local.get $$15) + ) + ) + ) + ) + (local.set $$inc94 + (i32.add + (local.get $$j$032) + (i32.const 1) + ) + ) + (local.set $$indvar$next + (i32.add + (local.get $$indvar) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$indvar$next) + (local.get $$16) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$indvar + (local.get $$indvar$next) + ) + (local.set $$j$032 + (local.get $$inc94) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (call $_free + (local.get $$call) + ) + (local.set $$format96 + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$17 + (i32.load + (local.get $$format96) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy1) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy1) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy1) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$image$byval_copy1) + ) + (call $_LoadImageEx + (local.get $$tmp) + (local.get $$call59) + (local.get $$conv55) + (local.get $$conv57) + ) + (i64.store align=4 + (local.get $$image) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (call $_free + (local.get $$call59) + ) + (call $_ImageFormat + (local.get $$image) + (local.get $$17) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GetImageData (; 441 ;) (param $$image i32) (result i32) + (local $$$off i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 f32) + (local $$32 f32) + (local $$33 f32) + (local $$34 f32) + (local $$35 f32) + (local $$36 f32) + (local $$37 f32) + (local $$38 f32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$a i32) + (local $$a102 i32) + (local $$a137 i32) + (local $$a157 i32) + (local $$a175 i32) + (local $$a189 i32) + (local $$a212 i32) + (local $$a238 i32) + (local $$a42 i32) + (local $$a73 i32) + (local $$add i32) + (local $$add144 i32) + (local $$add149 i32) + (local $$add154 i32) + (local $$add158 i32) + (local $$add165 i32) + (local $$add170 i32) + (local $$add176 i32) + (local $$add198 i32) + (local $$add205 i32) + (local $$add213 i32) + (local $$add239 i32) + (local $$add43 i32) + (local $$and116 i32) + (local $$and124 i32) + (local $$and132 i32) + (local $$and53 i32) + (local $$and61 i32) + (local $$and69 i32) + (local $$and87 i32) + (local $$and95 i32) + (local $$arrayidx i32) + (local $$arrayidx106 i32) + (local $$arrayidx140 i32) + (local $$arrayidx145 i32) + (local $$arrayidx150 i32) + (local $$arrayidx155 i32) + (local $$arrayidx161 i32) + (local $$arrayidx166 i32) + (local $$arrayidx171 i32) + (local $$arrayidx179 i32) + (local $$arrayidx192 i32) + (local $$arrayidx199 i32) + (local $$arrayidx206 i32) + (local $$arrayidx216 i32) + (local $$arrayidx28 i32) + (local $$arrayidx40 i32) + (local $$arrayidx46 i32) + (local $$arrayidx77 i32) + (local $$b i32) + (local $$b100 i32) + (local $$b130 i32) + (local $$b152 i32) + (local $$b173 i32) + (local $$b187 i32) + (local $$b210 i32) + (local $$b232 i32) + (local $$b38 i32) + (local $$b67 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp16127 i32) + (local $$cmp2 i32) + (local $$conv i32) + (local $$conv107 i32) + (local $$conv110 f32) + (local $$conv112 i32) + (local $$conv118 f32) + (local $$conv120 i32) + (local $$conv126 f32) + (local $$conv128 i32) + (local $$conv133 f32) + (local $$conv135 i32) + (local $$conv181 i32) + (local $$conv194 i32) + (local $$conv201 i32) + (local $$conv208 i32) + (local $$conv218 i32) + (local $$conv224 i32) + (local $$conv230 i32) + (local $$conv236 i32) + (local $$conv47 f32) + (local $$conv49 i32) + (local $$conv55 f32) + (local $$conv57 i32) + (local $$conv63 f32) + (local $$conv65 i32) + (local $$conv71 i32) + (local $$conv78 i32) + (local $$conv81 f32) + (local $$conv83 i32) + (local $$conv89 f32) + (local $$conv91 i32) + (local $$conv96 f32) + (local $$conv98 i32) + (local $$exitcond i32) + (local $$format i32) + (local $$g i32) + (local $$g122 i32) + (local $$g147 i32) + (local $$g168 i32) + (local $$g185 i32) + (local $$g203 i32) + (local $$g226 i32) + (local $$g34 i32) + (local $$g59 i32) + (local $$g93 i32) + (local $$height i32) + (local $$i$0129 i32) + (local $$inc i32) + (local $$k$0128 i32) + (local $$k$1 i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$mul111 f32) + (local $$mul119 f32) + (local $$mul127 f32) + (local $$mul134 f32) + (local $$mul180 f32) + (local $$mul193 f32) + (local $$mul200 f32) + (local $$mul207 f32) + (local $$mul217 f32) + (local $$mul223 f32) + (local $$mul229 f32) + (local $$mul235 f32) + (local $$mul48 f32) + (local $$mul56 f32) + (local $$mul64 f32) + (local $$mul82 f32) + (local $$mul90 f32) + (local $$mul97 f32) + (local $$r i32) + (local $$r114 i32) + (local $$r142 i32) + (local $$r163 i32) + (local $$r183 i32) + (local $$r196 i32) + (local $$r220 i32) + (local $$r30 i32) + (local $$r51 i32) + (local $$r85 i32) + (local $$switch i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$width i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$width) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$mul1 + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul1) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$2 + (i32.load + (local.get $$format) + ) + ) + (local.set $$cmp2 + (i32.gt_s + (local.get $$2) + (i32.const 10) + ) + ) + (if + (local.get $$cmp2) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12497) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + (local.set $$$off + (i32.add + (local.get $$2) + (i32.const -8) + ) + ) + (local.set $$switch + (i32.lt_u + (local.get $$$off) + (i32.const 3) + ) + ) + (if + (local.get $$switch) + (call $_TraceLog + (i32.const 4) + (i32.const 12561) + (local.get $$vararg_buffer1) + ) + ) + (local.set $$cmp16127 + (i32.gt_s + (local.get $$mul) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp16127) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$image) + ) + ) + (local.set $$4 + (i32.load + (local.get $$image) + ) + ) + (local.set $$i$0129 + (i32.const 0) + ) + (local.set $$k$0128 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case2 $switch-case5 $switch-case1 $switch-case3 $switch-case4 $switch-case6 $switch-case7 $switch-case8 $switch-default + (i32.sub + (local.get $$2) + (i32.const 1) + ) + ) + ) + (block + (local.set $$arrayidx + (i32.add + (local.get $$3) + (local.get $$i$0129) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$r + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r) + (local.get $$5) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$g + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g) + (local.get $$6) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$b + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b) + (local.get $$7) + ) + (local.set $$a + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a) + (i32.const -1) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx28 + (i32.add + (local.get $$3) + (local.get $$k$0128) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx28) + ) + ) + (local.set $$r30 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r30) + (local.get $$8) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx28) + ) + ) + (local.set $$g34 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g34) + (local.get $$9) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx28) + ) + ) + (local.set $$b38 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b38) + (local.get $$10) + ) + (local.set $$add + (i32.add + (local.get $$k$0128) + (i32.const 1) + ) + ) + (local.set $$arrayidx40 + (i32.add + (local.get $$3) + (local.get $$add) + ) + ) + (local.set $$11 + (i32.load8_s + (local.get $$arrayidx40) + ) + ) + (local.set $$a42 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a42) + (local.get $$11) + ) + (local.set $$add43 + (i32.add + (local.get $$k$0128) + (i32.const 2) + ) + ) + (local.set $$k$1 + (local.get $$add43) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx46 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0129) + (i32.const 1) + ) + ) + ) + (local.set $$12 + (i32.load16_s + (local.get $$arrayidx46) + ) + ) + (local.set $$conv + (i32.and + (local.get $$12) + (i32.const 65535) + ) + ) + (local.set $$13 + (i32.shr_u + (local.get $$conv) + (i32.const 11) + ) + ) + (local.set $$conv47 + (f32.convert_i32_s + (local.get $$13) + ) + ) + (local.set $$mul48 + (f32.mul + (local.get $$conv47) + (f32.const 8) + ) + ) + (local.set $$conv49 + (i32.and + (i32.trunc_f32_s + (local.get $$mul48) + ) + (i32.const 255) + ) + ) + (local.set $$r51 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r51) + (local.get $$conv49) + ) + (local.set $$and53 + (i32.shr_u + (local.get $$conv) + (i32.const 6) + ) + ) + (local.set $$14 + (i32.and + (local.get $$and53) + (i32.const 31) + ) + ) + (local.set $$conv55 + (f32.convert_i32_s + (local.get $$14) + ) + ) + (local.set $$mul56 + (f32.mul + (local.get $$conv55) + (f32.const 8) + ) + ) + (local.set $$conv57 + (i32.and + (i32.trunc_f32_s + (local.get $$mul56) + ) + (i32.const 255) + ) + ) + (local.set $$g59 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g59) + (local.get $$conv57) + ) + (local.set $$and61 + (i32.shr_u + (local.get $$conv) + (i32.const 1) + ) + ) + (local.set $$15 + (i32.and + (local.get $$and61) + (i32.const 31) + ) + ) + (local.set $$conv63 + (f32.convert_i32_s + (local.get $$15) + ) + ) + (local.set $$mul64 + (f32.mul + (local.get $$conv63) + (f32.const 8) + ) + ) + (local.set $$conv65 + (i32.and + (i32.trunc_f32_s + (local.get $$mul64) + ) + (i32.const 255) + ) + ) + (local.set $$b67 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b67) + (local.get $$conv65) + ) + (local.set $$and69 + (i32.and + (local.get $$conv) + (i32.const 1) + ) + ) + (local.set $$16 + (i32.sub + (i32.const 0) + (local.get $$and69) + ) + ) + (local.set $$conv71 + (i32.and + (local.get $$16) + (i32.const 255) + ) + ) + (local.set $$a73 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a73) + (local.get $$conv71) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx77 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0129) + (i32.const 1) + ) + ) + ) + (local.set $$17 + (i32.load16_s + (local.get $$arrayidx77) + ) + ) + (local.set $$conv78 + (i32.and + (local.get $$17) + (i32.const 65535) + ) + ) + (local.set $$18 + (i32.shr_u + (local.get $$conv78) + (i32.const 11) + ) + ) + (local.set $$conv81 + (f32.convert_i32_s + (local.get $$18) + ) + ) + (local.set $$mul82 + (f32.mul + (local.get $$conv81) + (f32.const 8) + ) + ) + (local.set $$conv83 + (i32.and + (i32.trunc_f32_s + (local.get $$mul82) + ) + (i32.const 255) + ) + ) + (local.set $$r85 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r85) + (local.get $$conv83) + ) + (local.set $$and87 + (i32.shr_u + (local.get $$conv78) + (i32.const 5) + ) + ) + (local.set $$19 + (i32.and + (local.get $$and87) + (i32.const 63) + ) + ) + (local.set $$conv89 + (f32.convert_i32_s + (local.get $$19) + ) + ) + (local.set $$mul90 + (f32.mul + (local.get $$conv89) + (f32.const 4) + ) + ) + (local.set $$conv91 + (i32.and + (i32.trunc_f32_s + (local.get $$mul90) + ) + (i32.const 255) + ) + ) + (local.set $$g93 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g93) + (local.get $$conv91) + ) + (local.set $$and95 + (i32.and + (local.get $$conv78) + (i32.const 31) + ) + ) + (local.set $$conv96 + (f32.convert_i32_s + (local.get $$and95) + ) + ) + (local.set $$mul97 + (f32.mul + (local.get $$conv96) + (f32.const 8) + ) + ) + (local.set $$conv98 + (i32.and + (i32.trunc_f32_s + (local.get $$mul97) + ) + (i32.const 255) + ) + ) + (local.set $$b100 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b100) + (local.get $$conv98) + ) + (local.set $$a102 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a102) + (i32.const -1) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx106 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0129) + (i32.const 1) + ) + ) + ) + (local.set $$20 + (i32.load16_s + (local.get $$arrayidx106) + ) + ) + (local.set $$conv107 + (i32.and + (local.get $$20) + (i32.const 65535) + ) + ) + (local.set $$21 + (i32.shr_u + (local.get $$conv107) + (i32.const 12) + ) + ) + (local.set $$conv110 + (f32.convert_i32_s + (local.get $$21) + ) + ) + (local.set $$mul111 + (f32.mul + (local.get $$conv110) + (f32.const 17) + ) + ) + (local.set $$conv112 + (i32.and + (i32.trunc_f32_s + (local.get $$mul111) + ) + (i32.const 255) + ) + ) + (local.set $$r114 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r114) + (local.get $$conv112) + ) + (local.set $$and116 + (i32.shr_u + (local.get $$conv107) + (i32.const 8) + ) + ) + (local.set $$22 + (i32.and + (local.get $$and116) + (i32.const 15) + ) + ) + (local.set $$conv118 + (f32.convert_i32_s + (local.get $$22) + ) + ) + (local.set $$mul119 + (f32.mul + (local.get $$conv118) + (f32.const 17) + ) + ) + (local.set $$conv120 + (i32.and + (i32.trunc_f32_s + (local.get $$mul119) + ) + (i32.const 255) + ) + ) + (local.set $$g122 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g122) + (local.get $$conv120) + ) + (local.set $$and124 + (i32.shr_u + (local.get $$conv107) + (i32.const 4) + ) + ) + (local.set $$23 + (i32.and + (local.get $$and124) + (i32.const 15) + ) + ) + (local.set $$conv126 + (f32.convert_i32_s + (local.get $$23) + ) + ) + (local.set $$mul127 + (f32.mul + (local.get $$conv126) + (f32.const 17) + ) + ) + (local.set $$conv128 + (i32.and + (i32.trunc_f32_s + (local.get $$mul127) + ) + (i32.const 255) + ) + ) + (local.set $$b130 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b130) + (local.get $$conv128) + ) + (local.set $$and132 + (i32.and + (local.get $$conv107) + (i32.const 15) + ) + ) + (local.set $$conv133 + (f32.convert_i32_s + (local.get $$and132) + ) + ) + (local.set $$mul134 + (f32.mul + (local.get $$conv133) + (f32.const 17) + ) + ) + (local.set $$conv135 + (i32.and + (i32.trunc_f32_s + (local.get $$mul134) + ) + (i32.const 255) + ) + ) + (local.set $$a137 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a137) + (local.get $$conv135) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx140 + (i32.add + (local.get $$3) + (local.get $$k$0128) + ) + ) + (local.set $$24 + (i32.load8_s + (local.get $$arrayidx140) + ) + ) + (local.set $$r142 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r142) + (local.get $$24) + ) + (local.set $$add144 + (i32.add + (local.get $$k$0128) + (i32.const 1) + ) + ) + (local.set $$arrayidx145 + (i32.add + (local.get $$3) + (local.get $$add144) + ) + ) + (local.set $$25 + (i32.load8_s + (local.get $$arrayidx145) + ) + ) + (local.set $$g147 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g147) + (local.get $$25) + ) + (local.set $$add149 + (i32.add + (local.get $$k$0128) + (i32.const 2) + ) + ) + (local.set $$arrayidx150 + (i32.add + (local.get $$3) + (local.get $$add149) + ) + ) + (local.set $$26 + (i32.load8_s + (local.get $$arrayidx150) + ) + ) + (local.set $$b152 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b152) + (local.get $$26) + ) + (local.set $$add154 + (i32.add + (local.get $$k$0128) + (i32.const 3) + ) + ) + (local.set $$arrayidx155 + (i32.add + (local.get $$3) + (local.get $$add154) + ) + ) + (local.set $$27 + (i32.load8_s + (local.get $$arrayidx155) + ) + ) + (local.set $$a157 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a157) + (local.get $$27) + ) + (local.set $$add158 + (i32.add + (local.get $$k$0128) + (i32.const 4) + ) + ) + (local.set $$k$1 + (local.get $$add158) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx161 + (i32.add + (local.get $$3) + (local.get $$k$0128) + ) + ) + (local.set $$28 + (i32.load8_s + (local.get $$arrayidx161) + ) + ) + (local.set $$r163 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r163) + (local.get $$28) + ) + (local.set $$add165 + (i32.add + (local.get $$k$0128) + (i32.const 1) + ) + ) + (local.set $$arrayidx166 + (i32.add + (local.get $$3) + (local.get $$add165) + ) + ) + (local.set $$29 + (i32.load8_s + (local.get $$arrayidx166) + ) + ) + (local.set $$g168 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g168) + (local.get $$29) + ) + (local.set $$add170 + (i32.add + (local.get $$k$0128) + (i32.const 2) + ) + ) + (local.set $$arrayidx171 + (i32.add + (local.get $$3) + (local.get $$add170) + ) + ) + (local.set $$30 + (i32.load8_s + (local.get $$arrayidx171) + ) + ) + (local.set $$b173 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b173) + (local.get $$30) + ) + (local.set $$a175 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a175) + (i32.const -1) + ) + (local.set $$add176 + (i32.add + (local.get $$k$0128) + (i32.const 3) + ) + ) + (local.set $$k$1 + (local.get $$add176) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx179 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$k$0128) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (f32.load + (local.get $$arrayidx179) + ) + ) + (local.set $$mul180 + (f32.mul + (local.get $$31) + (f32.const 255) + ) + ) + (local.set $$conv181 + (i32.and + (i32.trunc_f32_s + (local.get $$mul180) + ) + (i32.const 255) + ) + ) + (local.set $$r183 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r183) + (local.get $$conv181) + ) + (local.set $$g185 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g185) + (i32.const 0) + ) + (local.set $$b187 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b187) + (i32.const 0) + ) + (local.set $$a189 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a189) + (i32.const -1) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx192 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$k$0128) + (i32.const 2) + ) + ) + ) + (local.set $$32 + (f32.load + (local.get $$arrayidx192) + ) + ) + (local.set $$mul193 + (f32.mul + (local.get $$32) + (f32.const 255) + ) + ) + (local.set $$conv194 + (i32.and + (i32.trunc_f32_s + (local.get $$mul193) + ) + (i32.const 255) + ) + ) + (local.set $$r196 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r196) + (local.get $$conv194) + ) + (local.set $$add198 + (i32.add + (local.get $$k$0128) + (i32.const 1) + ) + ) + (local.set $$arrayidx199 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add198) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (f32.load + (local.get $$arrayidx199) + ) + ) + (local.set $$mul200 + (f32.mul + (local.get $$33) + (f32.const 255) + ) + ) + (local.set $$conv201 + (i32.and + (i32.trunc_f32_s + (local.get $$mul200) + ) + (i32.const 255) + ) + ) + (local.set $$g203 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g203) + (local.get $$conv201) + ) + (local.set $$add205 + (i32.add + (local.get $$k$0128) + (i32.const 2) + ) + ) + (local.set $$arrayidx206 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add205) + (i32.const 2) + ) + ) + ) + (local.set $$34 + (f32.load + (local.get $$arrayidx206) + ) + ) + (local.set $$mul207 + (f32.mul + (local.get $$34) + (f32.const 255) + ) + ) + (local.set $$conv208 + (i32.and + (i32.trunc_f32_s + (local.get $$mul207) + ) + (i32.const 255) + ) + ) + (local.set $$b210 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b210) + (local.get $$conv208) + ) + (local.set $$a212 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a212) + (i32.const -1) + ) + (local.set $$add213 + (i32.add + (local.get $$k$0128) + (i32.const 3) + ) + ) + (local.set $$k$1 + (local.get $$add213) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx216 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$k$0128) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (f32.load + (local.get $$arrayidx216) + ) + ) + (local.set $$mul217 + (f32.mul + (local.get $$35) + (f32.const 255) + ) + ) + (local.set $$conv218 + (i32.and + (i32.trunc_f32_s + (local.get $$mul217) + ) + (i32.const 255) + ) + ) + (local.set $$r220 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + ) + (i32.store8 + (local.get $$r220) + (local.get $$conv218) + ) + (local.set $$36 + (f32.load + (local.get $$arrayidx216) + ) + ) + (local.set $$mul223 + (f32.mul + (local.get $$36) + (f32.const 255) + ) + ) + (local.set $$conv224 + (i32.and + (i32.trunc_f32_s + (local.get $$mul223) + ) + (i32.const 255) + ) + ) + (local.set $$g226 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g226) + (local.get $$conv224) + ) + (local.set $$37 + (f32.load + (local.get $$arrayidx216) + ) + ) + (local.set $$mul229 + (f32.mul + (local.get $$37) + (f32.const 255) + ) + ) + (local.set $$conv230 + (i32.and + (i32.trunc_f32_s + (local.get $$mul229) + ) + (i32.const 255) + ) + ) + (local.set $$b232 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b232) + (local.get $$conv230) + ) + (local.set $$38 + (f32.load + (local.get $$arrayidx216) + ) + ) + (local.set $$mul235 + (f32.mul + (local.get $$38) + (f32.const 255) + ) + ) + (local.set $$conv236 + (i32.and + (i32.trunc_f32_s + (local.get $$mul235) + ) + (i32.const 255) + ) + ) + (local.set $$a238 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0129) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a238) + (local.get $$conv236) + ) + (local.set $$add239 + (i32.add + (local.get $$k$0128) + (i32.const 4) + ) + ) + (local.set $$k$1 + (local.get $$add239) + ) + (br $switch) + ) + ) + (local.set $$k$1 + (local.get $$k$0128) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$0129) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$i$0129 + (local.get $$inc) + ) + (local.set $$k$0128 + (local.get $$k$1) + ) + ) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + (func $_GetImageDataNormalized (; 442 ;) (param $$image i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add138 i32) + (local $$add145 i32) + (local $$add152 i32) + (local $$add158 i32) + (local $$add167 i32) + (local $$add174 i32) + (local $$add182 i32) + (local $$add200 i32) + (local $$add205 i32) + (local $$add211 i32) + (local $$add218 i32) + (local $$add223 i32) + (local $$add228 i32) + (local $$add232 i32) + (local $$add44 i32) + (local $$and111 i32) + (local $$and118 i32) + (local $$and125 i32) + (local $$and54 i32) + (local $$and61 i32) + (local $$and68 i32) + (local $$and85 i32) + (local $$and92 i32) + (local $$arrayidx i32) + (local $$arrayidx102 i32) + (local $$arrayidx132 i32) + (local $$arrayidx139 i32) + (local $$arrayidx146 i32) + (local $$arrayidx153 i32) + (local $$arrayidx161 i32) + (local $$arrayidx168 i32) + (local $$arrayidx175 i32) + (local $$arrayidx185 i32) + (local $$arrayidx186 i32) + (local $$arrayidx196 i32) + (local $$arrayidx197 i32) + (local $$arrayidx201 i32) + (local $$arrayidx206 i32) + (local $$arrayidx21 i32) + (local $$arrayidx214 i32) + (local $$arrayidx215 i32) + (local $$arrayidx219 i32) + (local $$arrayidx224 i32) + (local $$arrayidx229 i32) + (local $$arrayidx39 i32) + (local $$arrayidx47 i32) + (local $$arrayidx76 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp5125 i32) + (local $$cmp69 i32) + (local $$cond f32) + (local $$conv f32) + (local $$conv10 f32) + (local $$conv103 i32) + (local $$conv106 f32) + (local $$conv113 f32) + (local $$conv120 f32) + (local $$conv126 f32) + (local $$conv133 f32) + (local $$conv140 f32) + (local $$conv147 f32) + (local $$conv15 f32) + (local $$conv154 f32) + (local $$conv162 f32) + (local $$conv169 f32) + (local $$conv176 f32) + (local $$conv22 f32) + (local $$conv28 f32) + (local $$conv34 f32) + (local $$conv40 f32) + (local $$conv48 i32) + (local $$conv49 f32) + (local $$conv56 f32) + (local $$conv63 f32) + (local $$conv77 i32) + (local $$conv80 f32) + (local $$conv87 f32) + (local $$conv93 f32) + (local $$div f32) + (local $$div11 f32) + (local $$div134 f32) + (local $$div141 f32) + (local $$div148 f32) + (local $$div155 f32) + (local $$div16 f32) + (local $$div163 f32) + (local $$div170 f32) + (local $$div177 f32) + (local $$div23 f32) + (local $$div29 f32) + (local $$div35 f32) + (local $$div41 f32) + (local $$exitcond i32) + (local $$format i32) + (local $$height i32) + (local $$i$0127 i32) + (local $$inc i32) + (local $$k$0126 i32) + (local $$k$1 i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$mul107 f32) + (local $$mul114 f32) + (local $$mul121 f32) + (local $$mul127 f32) + (local $$mul50 f32) + (local $$mul57 f32) + (local $$mul64 f32) + (local $$mul81 f32) + (local $$mul88 f32) + (local $$mul94 f32) + (local $$vararg_buffer i32) + (local $$w i32) + (local $$w129 i32) + (local $$w157 i32) + (local $$w181 i32) + (local $$w193 i32) + (local $$w210 i32) + (local $$w231 i32) + (local $$w43 i32) + (local $$w72 i32) + (local $$w98 i32) + (local $$width i32) + (local $$x i32) + (local $$x109 i32) + (local $$x136 i32) + (local $$x165 i32) + (local $$x25 i32) + (local $$x52 i32) + (local $$x83 i32) + (local $$y i32) + (local $$y116 i32) + (local $$y143 i32) + (local $$y172 i32) + (local $$y189 i32) + (local $$y203 i32) + (local $$y221 i32) + (local $$y31 i32) + (local $$y59 i32) + (local $$y90 i32) + (local $$z i32) + (local $$z123 i32) + (local $$z150 i32) + (local $$z179 i32) + (local $$z191 i32) + (local $$z208 i32) + (local $$z226 i32) + (local $$z37 i32) + (local $$z66 i32) + (local $$z96 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$width) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$mul1 + (i32.shl + (local.get $$mul) + (i32.const 4) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul1) + ) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$2 + (i32.load + (local.get $$format) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$2) + (i32.const 10) + ) + ) + (if + (local.get $$cmp) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12497) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + (local.set $$cmp5125 + (i32.gt_s + (local.get $$mul) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp5125) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$image) + ) + ) + (local.set $$4 + (i32.load + (local.get $$image) + ) + ) + (local.set $$i$0127 + (i32.const 0) + ) + (local.set $$k$0126 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case2 $switch-case5 $switch-case1 $switch-case3 $switch-case4 $switch-case6 $switch-case7 $switch-case8 $switch-default + (i32.sub + (local.get $$2) + (i32.const 1) + ) + ) + ) + (block + (local.set $$arrayidx + (i32.add + (local.get $$3) + (local.get $$i$0127) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + ) + (local.set $$div + (f32.div + (local.get $$conv) + (f32.const 255) + ) + ) + (local.set $$x + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x) + (local.get $$div) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv10 + (f32.convert_i32_s + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + ) + (local.set $$div11 + (f32.div + (local.get $$conv10) + (f32.const 255) + ) + ) + (local.set $$y + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y) + (local.get $$div11) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv15 + (f32.convert_i32_s + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + ) + (local.set $$div16 + (f32.div + (local.get $$conv15) + (f32.const 255) + ) + ) + (local.set $$z + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z) + (local.get $$div16) + ) + (local.set $$w + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w) + (f32.const 1) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx21 + (i32.add + (local.get $$3) + (local.get $$k$0126) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx21) + ) + ) + (local.set $$conv22 + (f32.convert_i32_s + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + ) + (local.set $$div23 + (f32.div + (local.get $$conv22) + (f32.const 255) + ) + ) + (local.set $$x25 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x25) + (local.get $$div23) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx21) + ) + ) + (local.set $$conv28 + (f32.convert_i32_s + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + ) + (local.set $$div29 + (f32.div + (local.get $$conv28) + (f32.const 255) + ) + ) + (local.set $$y31 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y31) + (local.get $$div29) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx21) + ) + ) + (local.set $$conv34 + (f32.convert_i32_s + (i32.and + (local.get $$10) + (i32.const 255) + ) + ) + ) + (local.set $$div35 + (f32.div + (local.get $$conv34) + (f32.const 255) + ) + ) + (local.set $$z37 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z37) + (local.get $$div35) + ) + (local.set $$add + (i32.add + (local.get $$k$0126) + (i32.const 1) + ) + ) + (local.set $$arrayidx39 + (i32.add + (local.get $$3) + (local.get $$add) + ) + ) + (local.set $$11 + (i32.load8_s + (local.get $$arrayidx39) + ) + ) + (local.set $$conv40 + (f32.convert_i32_s + (i32.and + (local.get $$11) + (i32.const 255) + ) + ) + ) + (local.set $$div41 + (f32.div + (local.get $$conv40) + (f32.const 255) + ) + ) + (local.set $$w43 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w43) + (local.get $$div41) + ) + (local.set $$add44 + (i32.add + (local.get $$k$0126) + (i32.const 2) + ) + ) + (local.set $$k$1 + (local.get $$add44) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx47 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0127) + (i32.const 1) + ) + ) + ) + (local.set $$12 + (i32.load16_s + (local.get $$arrayidx47) + ) + ) + (local.set $$conv48 + (i32.and + (local.get $$12) + (i32.const 65535) + ) + ) + (local.set $$13 + (i32.shr_u + (local.get $$conv48) + (i32.const 11) + ) + ) + (local.set $$conv49 + (f32.convert_i32_s + (local.get $$13) + ) + ) + (local.set $$mul50 + (f32.mul + (local.get $$conv49) + (f32.const 0.032258063554763794) + ) + ) + (local.set $$x52 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x52) + (local.get $$mul50) + ) + (local.set $$and54 + (i32.shr_u + (local.get $$conv48) + (i32.const 6) + ) + ) + (local.set $$14 + (i32.and + (local.get $$and54) + (i32.const 31) + ) + ) + (local.set $$conv56 + (f32.convert_i32_s + (local.get $$14) + ) + ) + (local.set $$mul57 + (f32.mul + (local.get $$conv56) + (f32.const 0.032258063554763794) + ) + ) + (local.set $$y59 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y59) + (local.get $$mul57) + ) + (local.set $$and61 + (i32.shr_u + (local.get $$conv48) + (i32.const 1) + ) + ) + (local.set $$15 + (i32.and + (local.get $$and61) + (i32.const 31) + ) + ) + (local.set $$conv63 + (f32.convert_i32_s + (local.get $$15) + ) + ) + (local.set $$mul64 + (f32.mul + (local.get $$conv63) + (f32.const 0.032258063554763794) + ) + ) + (local.set $$z66 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z66) + (local.get $$mul64) + ) + (local.set $$and68 + (i32.and + (local.get $$conv48) + (i32.const 1) + ) + ) + (local.set $$cmp69 + (i32.eq + (local.get $$and68) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result f32) + (local.get $$cmp69) + (f32.const 0) + (f32.const 1) + ) + ) + (local.set $$w72 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w72) + (local.get $$cond) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx76 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0127) + (i32.const 1) + ) + ) + ) + (local.set $$16 + (i32.load16_s + (local.get $$arrayidx76) + ) + ) + (local.set $$conv77 + (i32.and + (local.get $$16) + (i32.const 65535) + ) + ) + (local.set $$17 + (i32.shr_u + (local.get $$conv77) + (i32.const 11) + ) + ) + (local.set $$conv80 + (f32.convert_i32_s + (local.get $$17) + ) + ) + (local.set $$mul81 + (f32.mul + (local.get $$conv80) + (f32.const 0.032258063554763794) + ) + ) + (local.set $$x83 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x83) + (local.get $$mul81) + ) + (local.set $$and85 + (i32.shr_u + (local.get $$conv77) + (i32.const 5) + ) + ) + (local.set $$18 + (i32.and + (local.get $$and85) + (i32.const 63) + ) + ) + (local.set $$conv87 + (f32.convert_i32_s + (local.get $$18) + ) + ) + (local.set $$mul88 + (f32.mul + (local.get $$conv87) + (f32.const 0.01587301678955555) + ) + ) + (local.set $$y90 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y90) + (local.get $$mul88) + ) + (local.set $$and92 + (i32.and + (local.get $$conv77) + (i32.const 31) + ) + ) + (local.set $$conv93 + (f32.convert_i32_s + (local.get $$and92) + ) + ) + (local.set $$mul94 + (f32.mul + (local.get $$conv93) + (f32.const 0.032258063554763794) + ) + ) + (local.set $$z96 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z96) + (local.get $$mul94) + ) + (local.set $$w98 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w98) + (f32.const 1) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx102 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$0127) + (i32.const 1) + ) + ) + ) + (local.set $$19 + (i32.load16_s + (local.get $$arrayidx102) + ) + ) + (local.set $$conv103 + (i32.and + (local.get $$19) + (i32.const 65535) + ) + ) + (local.set $$20 + (i32.shr_u + (local.get $$conv103) + (i32.const 12) + ) + ) + (local.set $$conv106 + (f32.convert_i32_s + (local.get $$20) + ) + ) + (local.set $$mul107 + (f32.mul + (local.get $$conv106) + (f32.const 0.06666667014360428) + ) + ) + (local.set $$x109 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x109) + (local.get $$mul107) + ) + (local.set $$and111 + (i32.shr_u + (local.get $$conv103) + (i32.const 8) + ) + ) + (local.set $$21 + (i32.and + (local.get $$and111) + (i32.const 15) + ) + ) + (local.set $$conv113 + (f32.convert_i32_s + (local.get $$21) + ) + ) + (local.set $$mul114 + (f32.mul + (local.get $$conv113) + (f32.const 0.06666667014360428) + ) + ) + (local.set $$y116 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y116) + (local.get $$mul114) + ) + (local.set $$and118 + (i32.shr_u + (local.get $$conv103) + (i32.const 4) + ) + ) + (local.set $$22 + (i32.and + (local.get $$and118) + (i32.const 15) + ) + ) + (local.set $$conv120 + (f32.convert_i32_s + (local.get $$22) + ) + ) + (local.set $$mul121 + (f32.mul + (local.get $$conv120) + (f32.const 0.06666667014360428) + ) + ) + (local.set $$z123 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z123) + (local.get $$mul121) + ) + (local.set $$and125 + (i32.and + (local.get $$conv103) + (i32.const 15) + ) + ) + (local.set $$conv126 + (f32.convert_i32_s + (local.get $$and125) + ) + ) + (local.set $$mul127 + (f32.mul + (local.get $$conv126) + (f32.const 0.06666667014360428) + ) + ) + (local.set $$w129 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w129) + (local.get $$mul127) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx132 + (i32.add + (local.get $$3) + (local.get $$k$0126) + ) + ) + (local.set $$23 + (i32.load8_s + (local.get $$arrayidx132) + ) + ) + (local.set $$conv133 + (f32.convert_i32_s + (i32.and + (local.get $$23) + (i32.const 255) + ) + ) + ) + (local.set $$div134 + (f32.div + (local.get $$conv133) + (f32.const 255) + ) + ) + (local.set $$x136 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x136) + (local.get $$div134) + ) + (local.set $$add138 + (i32.add + (local.get $$k$0126) + (i32.const 1) + ) + ) + (local.set $$arrayidx139 + (i32.add + (local.get $$3) + (local.get $$add138) + ) + ) + (local.set $$24 + (i32.load8_s + (local.get $$arrayidx139) + ) + ) + (local.set $$conv140 + (f32.convert_i32_s + (i32.and + (local.get $$24) + (i32.const 255) + ) + ) + ) + (local.set $$div141 + (f32.div + (local.get $$conv140) + (f32.const 255) + ) + ) + (local.set $$y143 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y143) + (local.get $$div141) + ) + (local.set $$add145 + (i32.add + (local.get $$k$0126) + (i32.const 2) + ) + ) + (local.set $$arrayidx146 + (i32.add + (local.get $$3) + (local.get $$add145) + ) + ) + (local.set $$25 + (i32.load8_s + (local.get $$arrayidx146) + ) + ) + (local.set $$conv147 + (f32.convert_i32_s + (i32.and + (local.get $$25) + (i32.const 255) + ) + ) + ) + (local.set $$div148 + (f32.div + (local.get $$conv147) + (f32.const 255) + ) + ) + (local.set $$z150 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z150) + (local.get $$div148) + ) + (local.set $$add152 + (i32.add + (local.get $$k$0126) + (i32.const 3) + ) + ) + (local.set $$arrayidx153 + (i32.add + (local.get $$3) + (local.get $$add152) + ) + ) + (local.set $$26 + (i32.load8_s + (local.get $$arrayidx153) + ) + ) + (local.set $$conv154 + (f32.convert_i32_s + (i32.and + (local.get $$26) + (i32.const 255) + ) + ) + ) + (local.set $$div155 + (f32.div + (local.get $$conv154) + (f32.const 255) + ) + ) + (local.set $$w157 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w157) + (local.get $$div155) + ) + (local.set $$add158 + (i32.add + (local.get $$k$0126) + (i32.const 4) + ) + ) + (local.set $$k$1 + (local.get $$add158) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx161 + (i32.add + (local.get $$3) + (local.get $$k$0126) + ) + ) + (local.set $$27 + (i32.load8_s + (local.get $$arrayidx161) + ) + ) + (local.set $$conv162 + (f32.convert_i32_s + (i32.and + (local.get $$27) + (i32.const 255) + ) + ) + ) + (local.set $$div163 + (f32.div + (local.get $$conv162) + (f32.const 255) + ) + ) + (local.set $$x165 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$x165) + (local.get $$div163) + ) + (local.set $$add167 + (i32.add + (local.get $$k$0126) + (i32.const 1) + ) + ) + (local.set $$arrayidx168 + (i32.add + (local.get $$3) + (local.get $$add167) + ) + ) + (local.set $$28 + (i32.load8_s + (local.get $$arrayidx168) + ) + ) + (local.set $$conv169 + (f32.convert_i32_s + (i32.and + (local.get $$28) + (i32.const 255) + ) + ) + ) + (local.set $$div170 + (f32.div + (local.get $$conv169) + (f32.const 255) + ) + ) + (local.set $$y172 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y172) + (local.get $$div170) + ) + (local.set $$add174 + (i32.add + (local.get $$k$0126) + (i32.const 2) + ) + ) + (local.set $$arrayidx175 + (i32.add + (local.get $$3) + (local.get $$add174) + ) + ) + (local.set $$29 + (i32.load8_s + (local.get $$arrayidx175) + ) + ) + (local.set $$conv176 + (f32.convert_i32_s + (i32.and + (local.get $$29) + (i32.const 255) + ) + ) + ) + (local.set $$div177 + (f32.div + (local.get $$conv176) + (f32.const 255) + ) + ) + (local.set $$z179 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z179) + (local.get $$div177) + ) + (local.set $$w181 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w181) + (f32.const 1) + ) + (local.set $$add182 + (i32.add + (local.get $$k$0126) + (i32.const 3) + ) + ) + (local.set $$k$1 + (local.get $$add182) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx185 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$k$0126) + (i32.const 2) + ) + ) + ) + (local.set $$30 + (i32.load + (local.get $$arrayidx185) + ) + ) + (local.set $$arrayidx186 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$arrayidx186) + (local.get $$30) + ) + (local.set $$y189 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y189) + (f32.const 0) + ) + (local.set $$z191 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (f32.store + (local.get $$z191) + (f32.const 0) + ) + (local.set $$w193 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w193) + (f32.const 1) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx196 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$k$0126) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (i32.load + (local.get $$arrayidx196) + ) + ) + (local.set $$arrayidx197 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$arrayidx197) + (local.get $$31) + ) + (local.set $$add200 + (i32.add + (local.get $$k$0126) + (i32.const 1) + ) + ) + (local.set $$arrayidx201 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add200) + (i32.const 2) + ) + ) + ) + (local.set $$32 + (i32.load + (local.get $$arrayidx201) + ) + ) + (local.set $$y203 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$y203) + (local.get $$32) + ) + (local.set $$add205 + (i32.add + (local.get $$k$0126) + (i32.const 2) + ) + ) + (local.set $$arrayidx206 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add205) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (i32.load + (local.get $$arrayidx206) + ) + ) + (local.set $$z208 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$z208) + (local.get $$33) + ) + (local.set $$w210 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (f32.store + (local.get $$w210) + (f32.const 1) + ) + (local.set $$add211 + (i32.add + (local.get $$k$0126) + (i32.const 3) + ) + ) + (local.set $$k$1 + (local.get $$add211) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx214 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$k$0126) + (i32.const 2) + ) + ) + ) + (local.set $$34 + (i32.load + (local.get $$arrayidx214) + ) + ) + (local.set $$arrayidx215 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + ) + (i32.store + (local.get $$arrayidx215) + (local.get $$34) + ) + (local.set $$add218 + (i32.add + (local.get $$k$0126) + (i32.const 1) + ) + ) + (local.set $$arrayidx219 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$add218) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (i32.load + (local.get $$arrayidx219) + ) + ) + (local.set $$y221 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 4) + ) + ) + (i32.store + (local.get $$y221) + (local.get $$35) + ) + (local.set $$add223 + (i32.add + (local.get $$k$0126) + (i32.const 2) + ) + ) + (local.set $$arrayidx224 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$add223) + (i32.const 2) + ) + ) + ) + (local.set $$36 + (i32.load + (local.get $$arrayidx224) + ) + ) + (local.set $$z226 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $$z226) + (local.get $$36) + ) + (local.set $$add228 + (i32.add + (local.get $$k$0126) + (i32.const 3) + ) + ) + (local.set $$arrayidx229 + (i32.add + (local.get $$4) + (i32.shl + (local.get $$add228) + (i32.const 2) + ) + ) + ) + (local.set $$37 + (i32.load + (local.get $$arrayidx229) + ) + ) + (local.set $$w231 + (i32.add + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$0127) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (i32.store + (local.get $$w231) + (local.get $$37) + ) + (local.set $$add232 + (i32.add + (local.get $$k$0126) + (i32.const 4) + ) + ) + (local.set $$k$1 + (local.get $$add232) + ) + (br $switch) + ) + ) + (local.set $$k$1 + (local.get $$k$0126) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$0127) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$i$0127 + (local.get $$inc) + ) + (local.set $$k$0126 + (local.get $$k$1) + ) + ) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call) + ) + ) + (func $_ImageMipmaps (; 443 ;) (param $$image i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr46 i32) + (local $$call i32) + (local $$call22 i32) + (local $$call28 i32) + (local $$call37 i32) + (local $$call43 i32) + (local $$call58 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp25 i32) + (local $$cmp29 i32) + (local $$cmp3 i32) + (local $$cmp4469 i32) + (local $$cmp51 i32) + (local $$cmp54 i32) + (local $$cmp675 i32) + (local $$cmp681 i32) + (local $$cmp776 i32) + (local $$cmp782 i32) + (local $$div i32) + (local $$div13 i32) + (local $$div39 i32) + (local $$div41 i32) + (local $$div49 i32) + (local $$div50 i32) + (local $$exitcond i32) + (local $$format i32) + (local $$height i32) + (local $$i$074 i32) + (local $$imCopy i32) + (local $$imCopy$byval_copy i32) + (local $$image$byval_copy i32) + (local $$inc i32) + (local $$inc48 i32) + (local $$inc59 i32) + (local $$mipCount$0$lcssa i32) + (local $$mipCount$080 i32) + (local $$mipHeight$078 i32) + (local $$mipHeight$1 i32) + (local $$mipHeight$2 i32) + (local $$mipHeight$371 i32) + (local $$mipHeight$4 i32) + (local $$mipSize$0$lcssa i32) + (local $$mipSize$079 i32) + (local $$mipSize$172 i32) + (local $$mipWidth$077 i32) + (local $$mipWidth$1 i32) + (local $$mipWidth$370 i32) + (local $$mipmaps i32) + (local $$nextmip$073 i32) + (local $$spec$select i32) + (local $$spec$select68 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer10 i32) + (local $$vararg_buffer13 i32) + (local $$vararg_buffer16 i32) + (local $$vararg_buffer18 i32) + (local $$vararg_buffer25 i32) + (local $$vararg_buffer3 i32) + (local $$vararg_buffer7 i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr21 i32) + (local $$vararg_ptr22 i32) + (local $$vararg_ptr23 i32) + (local $$vararg_ptr24 i32) + (local $$vararg_ptr6 i32) + (local $$width i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$imCopy$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 124) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$vararg_buffer25 + (i32.add + (local.get $sp_a) + (i32.const 80) + ) + ) + (local.set $$vararg_buffer18 + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$vararg_buffer16 + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$vararg_buffer13 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vararg_buffer10 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$vararg_buffer7 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer3 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$imCopy + (i32.add + (local.get $sp_a) + (i32.const 84) + ) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$3 + (i32.load + (local.get $$format) + ) + ) + (local.set $$call + (call $_GetPixelDataSize + (local.get $$1) + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$cmp675 + (i32.ne + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$cmp776 + (i32.ne + (local.get $$2) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.or + (local.get $$cmp675) + (local.get $$cmp776) + ) + ) + (if + (local.get $$4) + (block + (local.set $$cmp681 + (local.get $$cmp675) + ) + (local.set $$cmp782 + (local.get $$cmp776) + ) + (local.set $$mipCount$080 + (i32.const 1) + ) + (local.set $$mipHeight$078 + (local.get $$2) + ) + (local.set $$mipSize$079 + (local.get $$call) + ) + (local.set $$mipWidth$077 + (local.get $$1) + ) + (loop $while-in + (block $while-out + (local.set $$div + (i32.and + (i32.div_s + (local.get $$mipWidth$077) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$mipWidth$1 + (if (result i32) + (local.get $$cmp681) + (local.get $$div) + (i32.const 1) + ) + ) + (local.set $$div13 + (i32.and + (i32.div_s + (local.get $$mipHeight$078) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$mipHeight$1 + (if (result i32) + (local.get $$cmp782) + (local.get $$div13) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.gt_s + (local.get $$mipWidth$1) + (i32.const 1) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$5) + (local.get $$mipWidth$1) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.gt_s + (local.get $$mipHeight$1) + (i32.const 1) + ) + ) + (local.set $$mipHeight$2 + (if (result i32) + (local.get $$6) + (local.get $$mipHeight$1) + (i32.const 1) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$spec$select) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$mipHeight$2) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (local.get $$mipSize$079) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12703) + (local.get $$vararg_buffer) + ) + (local.set $$inc + (i32.add + (local.get $$mipCount$080) + (i32.const 1) + ) + ) + (local.set $$7 + (i32.load + (local.get $$format) + ) + ) + (local.set $$call22 + (call $_GetPixelDataSize + (local.get $$spec$select) + (local.get $$mipHeight$2) + (local.get $$7) + ) + ) + (local.set $$add + (i32.add + (local.get $$call22) + (local.get $$mipSize$079) + ) + ) + (local.set $$8 + (i32.or + (local.get $$5) + (local.get $$6) + ) + ) + (if + (local.get $$8) + (block + (local.set $$cmp681 + (local.get $$5) + ) + (local.set $$cmp782 + (local.get $$6) + ) + (local.set $$mipCount$080 + (local.get $$inc) + ) + (local.set $$mipHeight$078 + (local.get $$mipHeight$2) + ) + (local.set $$mipSize$079 + (local.get $$add) + ) + (local.set $$mipWidth$077 + (local.get $$spec$select) + ) + ) + (block + (local.set $$mipCount$0$lcssa + (local.get $$inc) + ) + (local.set $$mipSize$0$lcssa + (local.get $$add) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + (block + (local.set $$mipCount$0$lcssa + (i32.const 1) + ) + (local.set $$mipSize$0$lcssa + (local.get $$call) + ) + ) + ) + (local.set $$mipmaps + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (local.set $$9 + (i32.load + (local.get $$mipmaps) + ) + ) + (i32.store + (local.get $$vararg_buffer3) + (local.get $$9) + ) + (local.set $$vararg_ptr6 + (i32.add + (local.get $$vararg_buffer3) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr6) + (local.get $$mipCount$0$lcssa) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12748) + (local.get $$vararg_buffer3) + ) + (i32.store + (local.get $$vararg_buffer7) + (local.get $$mipSize$0$lcssa) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12793) + (local.get $$vararg_buffer7) + ) + (local.set $$10 + (i32.load + (local.get $$image) + ) + ) + (i32.store + (local.get $$vararg_buffer10) + (local.get $$10) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12825) + (local.get $$vararg_buffer10) + ) + (local.set $$11 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$cmp25 + (i32.lt_s + (local.get $$11) + (local.get $$mipCount$0$lcssa) + ) + ) + (if + (i32.eqz + (local.get $$cmp25) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 13009) + (local.get $$vararg_buffer25) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$12 + (i32.load + (local.get $$image) + ) + ) + (local.set $$call28 + (call $_realloc + (local.get $$12) + (local.get $$mipSize$0$lcssa) + ) + ) + (local.set $$cmp29 + (i32.eq + (local.get $$call28) + (i32.const 0) + ) + ) + (if + (local.get $$cmp29) + (call $_TraceLog + (i32.const 4) + (i32.const 12905) + (local.get $$vararg_buffer16) + ) + (block + (i32.store + (local.get $$image) + (local.get $$call28) + ) + (i32.store + (local.get $$vararg_buffer13) + (local.get $$call28) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12863) + (local.get $$vararg_buffer13) + ) + ) + ) + (local.set $$13 + (i32.load + (local.get $$image) + ) + ) + (local.set $$14 + (i32.load + (local.get $$width) + ) + ) + (local.set $$15 + (i32.load + (local.get $$height) + ) + ) + (local.set $$16 + (i32.load + (local.get $$format) + ) + ) + (local.set $$div39 + (i32.and + (i32.div_s + (local.get $$14) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div41 + (i32.and + (i32.div_s + (local.get $$15) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_ImageCopy + (local.get $$imCopy) + (local.get $$image$byval_copy) + ) + (local.set $$cmp4469 + (i32.gt_u + (local.get $$mipCount$0$lcssa) + (i32.const 1) + ) + ) + (if + (local.get $$cmp4469) + (block + (local.set $$call43 + (call $_GetPixelDataSize + (local.get $$div39) + (local.get $$div41) + (local.get $$16) + ) + ) + (local.set $$call37 + (call $_GetPixelDataSize + (local.get $$14) + (local.get $$15) + (local.get $$16) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$13) + (local.get $$call37) + ) + ) + (local.set $$i$074 + (i32.const 1) + ) + (local.set $$mipHeight$371 + (local.get $$div41) + ) + (local.set $$mipSize$172 + (local.get $$call43) + ) + (local.set $$mipWidth$370 + (local.get $$div39) + ) + (local.set $$nextmip$073 + (local.get $$add$ptr) + ) + (loop $while-in1 + (block $while-out0 + (i32.store + (local.get $$vararg_buffer18) + (local.get $$i$074) + ) + (local.set $$vararg_ptr21 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr21) + (local.get $$mipWidth$370) + ) + (local.set $$vararg_ptr22 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr22) + (local.get $$mipHeight$371) + ) + (local.set $$vararg_ptr23 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr23) + (local.get $$mipSize$172) + ) + (local.set $$vararg_ptr24 + (i32.add + (local.get $$vararg_buffer18) + (i32.const 16) + ) + ) + (i32.store + (local.get $$vararg_ptr24) + (local.get $$nextmip$073) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12952) + (local.get $$vararg_buffer18) + ) + (call $_ImageResize + (local.get $$imCopy) + (local.get $$mipWidth$370) + (local.get $$mipHeight$371) + ) + (local.set $$17 + (i32.load + (local.get $$imCopy) + ) + ) + (drop + (call $_memcpy + (local.get $$nextmip$073) + (local.get $$17) + (local.get $$mipSize$172) + ) + ) + (local.set $$add$ptr46 + (i32.add + (local.get $$nextmip$073) + (local.get $$mipSize$172) + ) + ) + (local.set $$18 + (i32.load + (local.get $$mipmaps) + ) + ) + (local.set $$inc48 + (i32.add + (local.get $$18) + (i32.const 1) + ) + ) + (i32.store + (local.get $$mipmaps) + (local.get $$inc48) + ) + (local.set $$div49 + (i32.and + (i32.div_s + (local.get $$mipWidth$370) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$div50 + (i32.and + (i32.div_s + (local.get $$mipHeight$371) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp51 + (i32.lt_s + (local.get $$mipWidth$370) + (i32.const 2) + ) + ) + (local.set $$spec$select68 + (if (result i32) + (local.get $$cmp51) + (i32.const 1) + (local.get $$div49) + ) + ) + (local.set $$cmp54 + (i32.lt_s + (local.get $$mipHeight$371) + (i32.const 2) + ) + ) + (local.set $$mipHeight$4 + (if (result i32) + (local.get $$cmp54) + (i32.const 1) + (local.get $$div50) + ) + ) + (local.set $$19 + (i32.load + (local.get $$format) + ) + ) + (local.set $$call58 + (call $_GetPixelDataSize + (local.get $$spec$select68) + (local.get $$mipHeight$4) + (local.get $$19) + ) + ) + (local.set $$inc59 + (i32.add + (local.get $$i$074) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc59) + (local.get $$mipCount$0$lcssa) + ) + ) + (if + (local.get $$exitcond) + (br $while-out0) + (block + (local.set $$i$074 + (local.get $$inc59) + ) + (local.set $$mipHeight$371 + (local.get $$mipHeight$4) + ) + (local.set $$mipSize$172 + (local.get $$call58) + ) + (local.set $$mipWidth$370 + (local.get $$spec$select68) + ) + (local.set $$nextmip$073 + (local.get $$add$ptr46) + ) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (i64.store align=4 + (local.get $$imCopy$byval_copy) + (i64.load align=4 + (local.get $$imCopy) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$imCopy$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$imCopy) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$imCopy$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$imCopy) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$imCopy$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_ImageResize (; 444 ;) (param $$image i32) (param $$newWidth i32) (param $$newHeight i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$call i32) + (local $$call5 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp3 i32) + (local $$format9 i32) + (local $$height i32) + (local $$image$byval_copy i32) + (local $$image$byval_copy1 i32) + (local $$mul i32) + (local $$mul4 i32) + (local $$tmp i32) + (local $$width i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$image$byval_copy1 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$image) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (local.set $$call + (call $_GetImageData + (local.get $$image$byval_copy) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$newWidth) + (i32.const 2) + ) + ) + (local.set $$mul4 + (i32.mul + (local.get $$mul) + (local.get $$newHeight) + ) + ) + (local.set $$call5 + (call $_malloc + (local.get $$mul4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$width) + ) + ) + (local.set $$4 + (i32.load + (local.get $$height) + ) + ) + (drop + (call $_stbir_resize_uint8 + (local.get $$call) + (local.get $$3) + (local.get $$4) + (i32.const 0) + (local.get $$call5) + (local.get $$newWidth) + (local.get $$newHeight) + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$format9 + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$5 + (i32.load + (local.get $$format9) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy1) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy1) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy1) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$image$byval_copy1) + ) + (call $_LoadImageEx + (local.get $$tmp) + (local.get $$call5) + (local.get $$newWidth) + (local.get $$newHeight) + ) + (i64.store align=4 + (local.get $$image) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (call $_ImageFormat + (local.get $$image) + (local.get $$5) + ) + (call $_free + (local.get $$call5) + ) + (call $_free + (local.get $$call) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_stbir_resize_uint8 (; 445 ;) (param $$input_pixels i32) (param $$input_w i32) (param $$input_h i32) (param $$input_stride_in_bytes i32) (param $$output_pixels i32) (param $$output_w i32) (param $$output_h i32) (param $$output_stride_in_bytes i32) (param $$num_channels i32) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__resize_arbitrary + (local.get $$input_pixels) + (local.get $$input_w) + (local.get $$input_h) + (local.get $$input_stride_in_bytes) + (local.get $$output_pixels) + (local.get $$output_w) + (local.get $$output_h) + (local.get $$output_stride_in_bytes) + (f32.const 0) + (f32.const 0) + (f32.const 1) + (f32.const 1) + (i32.const 0) + (local.get $$num_channels) + (i32.const -1) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 1) + (i32.const 1) + (i32.const 0) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbir__resize_arbitrary (; 446 ;) (param $$input_data i32) (param $$input_w i32) (param $$input_h i32) (param $$input_stride_in_bytes i32) (param $$output_data i32) (param $$output_w i32) (param $$output_h i32) (param $$output_stride_in_bytes i32) (param $$s0 f32) (param $$t0 f32) (param $$s1 f32) (param $$t1 f32) (param $$transform i32) (param $$channels i32) (param $$alpha_channel i32) (param $$flags i32) (param $$type i32) (param $$h_filter i32) (param $$v_filter i32) (param $$edge_horizontal i32) (param $$edge_vertical i32) (param $$colorspace i32) (result i32) + (local $$call i32) + (local $$call1 i32) + (local $$call2 i32) + (local $$info i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 224) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 224) + ) + ) + (local.set $$info + (local.get $sp_a) + ) + (call $_stbir__setup + (local.get $$info) + (local.get $$input_w) + (local.get $$input_h) + (local.get $$output_w) + (local.get $$output_h) + (local.get $$channels) + ) + (call $_stbir__calculate_transform + (local.get $$info) + (local.get $$s0) + (local.get $$t0) + (local.get $$s1) + (local.get $$t1) + (local.get $$transform) + ) + (call $_stbir__choose_filter + (local.get $$info) + (local.get $$h_filter) + (local.get $$v_filter) + ) + (local.set $$call + (call $_stbir__calculate_memory + (local.get $$info) + ) + ) + (local.set $$call1 + (call $_malloc + (local.get $$call) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call2 + (call $_stbir__resize_allocated + (local.get $$info) + (local.get $$input_data) + (local.get $$input_stride_in_bytes) + (local.get $$output_data) + (local.get $$output_stride_in_bytes) + (local.get $$alpha_channel) + (local.get $$flags) + (local.get $$type) + (local.get $$edge_horizontal) + (local.get $$edge_vertical) + (local.get $$colorspace) + (local.get $$call1) + (local.get $$call) + ) + ) + (call $_free + (local.get $$call1) + ) + (local.set $$retval$0 + (local.get $$call2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__setup (; 447 ;) (param $$info i32) (param $$input_w i32) (param $$input_h i32) (param $$output_w i32) (param $$output_h i32) (param $$channels i32) + (local $$channels5 i32) + (local $$input_h2 i32) + (local $$input_w1 i32) + (local $$output_h4 i32) + (local $$output_w3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$input_w1 + (i32.add + (local.get $$info) + (i32.const 4) + ) + ) + (i32.store + (local.get $$input_w1) + (local.get $$input_w) + ) + (local.set $$input_h2 + (i32.add + (local.get $$info) + (i32.const 8) + ) + ) + (i32.store + (local.get $$input_h2) + (local.get $$input_h) + ) + (local.set $$output_w3 + (i32.add + (local.get $$info) + (i32.const 20) + ) + ) + (i32.store + (local.get $$output_w3) + (local.get $$output_w) + ) + (local.set $$output_h4 + (i32.add + (local.get $$info) + (i32.const 24) + ) + ) + (i32.store + (local.get $$output_h4) + (local.get $$output_h) + ) + (local.set $$channels5 + (i32.add + (local.get $$info) + (i32.const 64) + ) + ) + (i32.store + (local.get $$channels5) + (local.get $$channels) + ) + (return) + ) + (func $_stbir__calculate_transform (; 448 ;) (param $$info i32) (param $$s0 f32) (param $$t0 f32) (param $$s1 f32) (param $$t1 f32) (param $$transform i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$arrayidx5 i32) + (local $$arrayidx6 i32) + (local $$arrayidx7 i32) + (local $$conv f32) + (local $$conv11 f32) + (local $$conv12 f32) + (local $$conv8 f32) + (local $$div f32) + (local $$div13 f32) + (local $$div15 f32) + (local $$div20 f32) + (local $$div26 f32) + (local $$div9 f32) + (local $$horizontal_scale i32) + (local $$horizontal_scale10 i32) + (local $$horizontal_shift i32) + (local $$horizontal_shift21 i32) + (local $$input_h i32) + (local $$input_w i32) + (local $$mul f32) + (local $$mul24 f32) + (local $$output_h i32) + (local $$output_w i32) + (local $$s01 i32) + (local $$s13 i32) + (local $$sub f32) + (local $$sub14 f32) + (local $$t02 i32) + (local $$t14 i32) + (local $$tobool i32) + (local $$vertical_scale i32) + (local $$vertical_scale16 i32) + (local $$vertical_shift i32) + (local $$vertical_shift27 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$s01 + (i32.add + (local.get $$info) + (i32.const 32) + ) + ) + (f32.store + (local.get $$s01) + (local.get $$s0) + ) + (local.set $$t02 + (i32.add + (local.get $$info) + (i32.const 36) + ) + ) + (f32.store + (local.get $$t02) + (local.get $$t0) + ) + (local.set $$s13 + (i32.add + (local.get $$info) + (i32.const 40) + ) + ) + (f32.store + (local.get $$s13) + (local.get $$s1) + ) + (local.set $$t14 + (i32.add + (local.get $$info) + (i32.const 44) + ) + ) + (f32.store + (local.get $$t14) + (local.get $$t1) + ) + (local.set $$tobool + (i32.eq + (local.get $$transform) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$output_w + (i32.add + (local.get $$info) + (i32.const 20) + ) + ) + (local.set $$4 + (i32.load + (local.get $$output_w) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$4) + ) + ) + (local.set $$input_w + (i32.add + (local.get $$info) + (i32.const 4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$input_w) + ) + ) + (local.set $$conv8 + (f32.convert_i32_s + (local.get $$5) + ) + ) + (local.set $$div + (f32.div + (local.get $$conv) + (local.get $$conv8) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$s1) + (local.get $$s0) + ) + ) + (local.set $$div9 + (f32.div + (local.get $$div) + (local.get $$sub) + ) + ) + (local.set $$horizontal_scale10 + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (f32.store + (local.get $$horizontal_scale10) + (local.get $$div9) + ) + (local.set $$output_h + (i32.add + (local.get $$info) + (i32.const 24) + ) + ) + (local.set $$6 + (i32.load + (local.get $$output_h) + ) + ) + (local.set $$conv11 + (f32.convert_i32_s + (local.get $$6) + ) + ) + (local.set $$input_h + (i32.add + (local.get $$info) + (i32.const 8) + ) + ) + (local.set $$7 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$conv12 + (f32.convert_i32_s + (local.get $$7) + ) + ) + (local.set $$div13 + (f32.div + (local.get $$conv11) + (local.get $$conv12) + ) + ) + (local.set $$sub14 + (f32.sub + (local.get $$t1) + (local.get $$t0) + ) + ) + (local.set $$div15 + (f32.div + (local.get $$div13) + (local.get $$sub14) + ) + ) + (local.set $$vertical_scale16 + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (f32.store + (local.get $$vertical_scale16) + (local.get $$div15) + ) + (local.set $$mul + (f32.mul + (local.get $$conv) + (local.get $$s0) + ) + ) + (local.set $$div20 + (f32.div + (local.get $$mul) + (local.get $$sub) + ) + ) + (local.set $$horizontal_shift21 + (i32.add + (local.get $$info) + (i32.const 48) + ) + ) + (f32.store + (local.get $$horizontal_shift21) + (local.get $$div20) + ) + (local.set $$mul24 + (f32.mul + (local.get $$conv11) + (local.get $$t0) + ) + ) + (local.set $$div26 + (f32.div + (local.get $$mul24) + (local.get $$sub14) + ) + ) + (local.set $$vertical_shift27 + (i32.add + (local.get $$info) + (i32.const 52) + ) + ) + (f32.store + (local.get $$vertical_shift27) + (local.get $$div26) + ) + (return) + ) + (block + (local.set $$0 + (i32.load + (local.get $$transform) + ) + ) + (local.set $$horizontal_scale + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (i32.store + (local.get $$horizontal_scale) + (local.get $$0) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$transform) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx5) + ) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (i32.store + (local.get $$vertical_scale) + (local.get $$1) + ) + (local.set $$arrayidx6 + (i32.add + (local.get $$transform) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx6) + ) + ) + (local.set $$horizontal_shift + (i32.add + (local.get $$info) + (i32.const 48) + ) + ) + (i32.store + (local.get $$horizontal_shift) + (local.get $$2) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$transform) + (i32.const 12) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx7) + ) + ) + (local.set $$vertical_shift + (i32.add + (local.get $$info) + (i32.const 52) + ) + ) + (i32.store + (local.get $$vertical_shift) + (local.get $$3) + ) + (return) + ) + ) + ) + (func $_stbir__choose_filter (; 449 ;) (param $$info i32) (param $$h_filter i32) (param $$v_filter i32) + (local $$0 f32) + (local $$1 f32) + (local $$call i32) + (local $$call3 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cond i32) + (local $$cond5 i32) + (local $$h_filter$addr$0 i32) + (local $$horizontal_filter i32) + (local $$horizontal_scale i32) + (local $$tobool i32) + (local $$tobool4 i32) + (local $$v_filter$addr$0 i32) + (local $$vertical_filter i32) + (local $$vertical_scale i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$h_filter) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$horizontal_scale + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (local.set $$0 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$0) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$tobool) + (i32.const 5) + (i32.const 4) + ) + ) + (local.set $$h_filter$addr$0 + (local.get $$cond) + ) + ) + (local.set $$h_filter$addr$0 + (local.get $$h_filter) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$v_filter) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$vertical_scale + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (local.set $$1 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call3 + (call $_stbir__use_upsampling + (local.get $$1) + ) + ) + (local.set $$tobool4 + (i32.eq + (local.get $$call3) + (i32.const 0) + ) + ) + (local.set $$cond5 + (if (result i32) + (local.get $$tobool4) + (i32.const 5) + (i32.const 4) + ) + ) + (local.set $$v_filter$addr$0 + (local.get $$cond5) + ) + ) + (local.set $$v_filter$addr$0 + (local.get $$v_filter) + ) + ) + (local.set $$horizontal_filter + (i32.add + (local.get $$info) + (i32.const 80) + ) + ) + (i32.store + (local.get $$horizontal_filter) + (local.get $$h_filter$addr$0) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$info) + (i32.const 84) + ) + ) + (i32.store + (local.get $$vertical_filter) + (local.get $$v_filter$addr$0) + ) + (return) + ) + (func $_stbir__calculate_memory (; 450 ;) (param $$info i32) (result i32) + (local $$0 i32) + (local $$1 f32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$3 f32) + (local $$4 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 f32) + (local $$9 i32) + (local $$add i32) + (local $$add17 i32) + (local $$add55 i32) + (local $$add57 i32) + (local $$add59 i32) + (local $$add61 i32) + (local $$add63 i32) + (local $$add65 i32) + (local $$add67 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call13 i32) + (local $$call4 i32) + (local $$call50 i32) + (local $$call7 i32) + (local $$call9 i32) + (local $$channels i32) + (local $$cmp i32) + (local $$cmp36 i32) + (local $$cmp41 i32) + (local $$cmp46 i32) + (local $$decode_buffer_size i32) + (local $$encode_buffer_size i32) + (local $$encode_buffer_size$sink i32) + (local $$horizontal_buffer_size i32) + (local $$horizontal_coefficients_size i32) + (local $$horizontal_contributors_size i32) + (local $$horizontal_filter i32) + (local $$horizontal_num_contributors i32) + (local $$horizontal_scale i32) + (local $$input_h i32) + (local $$input_w i32) + (local $$mul i32) + (local $$mul10 i32) + (local $$mul12 i32) + (local $$mul14 i32) + (local $$mul16 i32) + (local $$mul18 i32) + (local $$mul19 i32) + (local $$mul22 i32) + (local $$mul23 i32) + (local $$mul28 i32) + (local $$mul29 i32) + (local $$output_h i32) + (local $$output_w i32) + (local $$ring_buffer_num_entries i32) + (local $$ring_buffer_size i32) + (local $$tobool i32) + (local $$vertical_coefficients_size i32) + (local $$vertical_contributors_size i32) + (local $$vertical_filter i32) + (local $$vertical_num_contributors i32) + (local $$vertical_scale i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$horizontal_filter + (i32.add + (local.get $$info) + (i32.const 80) + ) + ) + (local.set $$0 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$horizontal_scale + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (local.set $$1 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call + (call $_stbir__get_filter_pixel_margin + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$info) + (i32.const 84) + ) + ) + (local.set $$2 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (local.set $$3 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call1 + (call $_stbir__get_filter_pixel_width + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$4 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$5 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$input_w + (i32.add + (local.get $$info) + (i32.const 4) + ) + ) + (local.set $$6 + (i32.load + (local.get $$input_w) + ) + ) + (local.set $$output_w + (i32.add + (local.get $$info) + (i32.const 20) + ) + ) + (local.set $$7 + (i32.load + (local.get $$output_w) + ) + ) + (local.set $$call4 + (call $_stbir__get_contributors + (local.get $$4) + (local.get $$5) + (local.get $$6) + (local.get $$7) + ) + ) + (local.set $$horizontal_num_contributors + (i32.add + (local.get $$info) + (i32.const 152) + ) + ) + (i32.store + (local.get $$horizontal_num_contributors) + (local.get $$call4) + ) + (local.set $$8 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$9 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$input_h + (i32.add + (local.get $$info) + (i32.const 8) + ) + ) + (local.set $$10 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$output_h + (i32.add + (local.get $$info) + (i32.const 24) + ) + ) + (local.set $$11 + (i32.load + (local.get $$output_h) + ) + ) + (local.set $$call7 + (call $_stbir__get_contributors + (local.get $$8) + (local.get $$9) + (local.get $$10) + (local.get $$11) + ) + ) + (local.set $$vertical_num_contributors + (i32.add + (local.get $$info) + (i32.const 156) + ) + ) + (i32.store + (local.get $$vertical_num_contributors) + (local.get $$call7) + ) + (local.set $$add + (i32.add + (local.get $$call1) + (i32.const 1) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$info) + (i32.const 164) + ) + ) + (i32.store + (local.get $$ring_buffer_num_entries) + (local.get $$add) + ) + (local.set $$12 + (i32.load + (local.get $$horizontal_num_contributors) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$12) + (i32.const 3) + ) + ) + (local.set $$horizontal_contributors_size + (i32.add + (local.get $$info) + (i32.const 188) + ) + ) + (i32.store + (local.get $$horizontal_contributors_size) + (local.get $$mul) + ) + (local.set $$call9 + (call $_stbir__get_total_horizontal_coefficients + (local.get $$info) + ) + ) + (local.set $$mul10 + (i32.shl + (local.get $$call9) + (i32.const 2) + ) + ) + (local.set $$horizontal_coefficients_size + (i32.add + (local.get $$info) + (i32.const 192) + ) + ) + (i32.store + (local.get $$horizontal_coefficients_size) + (local.get $$mul10) + ) + (local.set $$13 + (i32.load + (local.get $$vertical_num_contributors) + ) + ) + (local.set $$mul12 + (i32.shl + (local.get $$13) + (i32.const 3) + ) + ) + (local.set $$vertical_contributors_size + (i32.add + (local.get $$info) + (i32.const 196) + ) + ) + (i32.store + (local.get $$vertical_contributors_size) + (local.get $$mul12) + ) + (local.set $$call13 + (call $_stbir__get_total_vertical_coefficients + (local.get $$info) + ) + ) + (local.set $$mul14 + (i32.shl + (local.get $$call13) + (i32.const 2) + ) + ) + (local.set $$vertical_coefficients_size + (i32.add + (local.get $$info) + (i32.const 200) + ) + ) + (i32.store + (local.get $$vertical_coefficients_size) + (local.get $$mul14) + ) + (local.set $$14 + (i32.load + (local.get $$input_w) + ) + ) + (local.set $$mul16 + (i32.shl + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$add17 + (i32.add + (local.get $$14) + (local.get $$mul16) + ) + ) + (local.set $$channels + (i32.add + (local.get $$info) + (i32.const 64) + ) + ) + (local.set $$15 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$mul18 + (i32.shl + (local.get $$15) + (i32.const 2) + ) + ) + (local.set $$mul19 + (i32.mul + (local.get $$mul18) + (local.get $$add17) + ) + ) + (local.set $$decode_buffer_size + (i32.add + (local.get $$info) + (i32.const 204) + ) + ) + (i32.store + (local.get $$decode_buffer_size) + (local.get $$mul19) + ) + (local.set $$16 + (i32.load + (local.get $$output_w) + ) + ) + (local.set $$mul22 + (i32.mul + (local.get $$16) + (local.get $$15) + ) + ) + (local.set $$mul23 + (i32.shl + (local.get $$mul22) + (i32.const 2) + ) + ) + (local.set $$horizontal_buffer_size + (i32.add + (local.get $$info) + (i32.const 208) + ) + ) + (i32.store + (local.get $$horizontal_buffer_size) + (local.get $$mul23) + ) + (local.set $$17 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$mul28 + (i32.shl + (local.get $$mul22) + (i32.const 2) + ) + ) + (local.set $$mul29 + (i32.mul + (local.get $$mul28) + (local.get $$17) + ) + ) + (local.set $$ring_buffer_size + (i32.add + (local.get $$info) + (i32.const 212) + ) + ) + (i32.store + (local.get $$ring_buffer_size) + (local.get $$mul29) + ) + (local.set $$encode_buffer_size + (i32.add + (local.get $$info) + (i32.const 216) + ) + ) + (i32.store + (local.get $$encode_buffer_size) + (local.get $$mul23) + ) + (local.set $$18 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$18) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 15528) + (i32.const 13065) + (i32.const 2265) + (i32.const 15557) + ) + ) + (local.set $$cmp36 + (i32.lt_u + (local.get $$18) + (i32.const 6) + ) + ) + (if + (i32.eqz + (local.get $$cmp36) + ) + (call $___assert_fail + (i32.const 13140) + (i32.const 13065) + (i32.const 2266) + (i32.const 15557) + ) + ) + (local.set $$19 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$cmp41 + (i32.eq + (local.get $$19) + (i32.const 0) + ) + ) + (if + (local.get $$cmp41) + (call $___assert_fail + (i32.const 15581) + (i32.const 13065) + (i32.const 2267) + (i32.const 15557) + ) + ) + (local.set $$cmp46 + (i32.lt_u + (local.get $$19) + (i32.const 6) + ) + ) + (if + (local.get $$cmp46) + (block + (local.set $$call50 + (call $_stbir__use_height_upsampling + (local.get $$info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call50) + (i32.const 0) + ) + ) + (local.set $$encode_buffer_size$sink + (if (result i32) + (local.get $$tobool) + (local.get $$encode_buffer_size) + (local.get $$horizontal_buffer_size) + ) + ) + (i32.store + (local.get $$encode_buffer_size$sink) + (i32.const 0) + ) + (local.set $$20 + (i32.load + (local.get $$horizontal_contributors_size) + ) + ) + (local.set $$21 + (i32.load + (local.get $$horizontal_coefficients_size) + ) + ) + (local.set $$22 + (i32.load + (local.get $$vertical_contributors_size) + ) + ) + (local.set $$23 + (i32.load + (local.get $$horizontal_buffer_size) + ) + ) + (local.set $$24 + (i32.load + (local.get $$encode_buffer_size) + ) + ) + (local.set $$add55 + (i32.add + (local.get $$mul19) + (local.get $$mul14) + ) + ) + (local.set $$add57 + (i32.add + (local.get $$add55) + (local.get $$mul29) + ) + ) + (local.set $$add59 + (i32.add + (local.get $$add57) + (local.get $$20) + ) + ) + (local.set $$add61 + (i32.add + (local.get $$add59) + (local.get $$21) + ) + ) + (local.set $$add63 + (i32.add + (local.get $$add61) + (local.get $$22) + ) + ) + (local.set $$add65 + (i32.add + (local.get $$add63) + (local.get $$23) + ) + ) + (local.set $$add67 + (i32.add + (local.get $$add65) + (local.get $$24) + ) + ) + (return + (local.get $$add67) + ) + ) + (call $___assert_fail + (i32.const 13241) + (i32.const 13065) + (i32.const 2268) + (i32.const 15557) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_stbir__resize_allocated (; 451 ;) (param $$info i32) (param $$input_data i32) (param $$input_stride_in_bytes i32) (param $$output_data i32) (param $$output_stride_in_bytes i32) (param $$alpha_channel i32) (param $$flags i32) (param $$type i32) (param $$edge_horizontal i32) (param $$edge_vertical i32) (param $$colorspace i32) (param $$tempmem i32) (param $$tempmem_size_in_bytes i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 f32) + (local $$13 i32) + (local $$14 f32) + (local $$15 i32) + (local $$16 f32) + (local $$17 i32) + (local $$18 f32) + (local $$19 i32) + (local $$2 i32) + (local $$20 f32) + (local $$21 i32) + (local $$22 f32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 f32) + (local $$45 f32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 f32) + (local $$5 i32) + (local $$50 f32) + (local $$51 i32) + (local $$52 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr118 i32) + (local $$add$ptr120 i32) + (local $$add$ptr122 i32) + (local $$add$ptr127 i32) + (local $$add$ptr129 i32) + (local $$add$ptr131 i32) + (local $$add$ptr140 i32) + (local $$add$ptr143 i32) + (local $$add$ptr148 i32) + (local $$add132 i32) + (local $$add149 i32) + (local $$alpha_channel87 i32) + (local $$arrayidx i32) + (local $$arrayidx7 i32) + (local $$call i32) + (local $$call102 i32) + (local $$call105 i32) + (local $$call108 i32) + (local $$call123 i32) + (local $$call166 i32) + (local $$call94 i32) + (local $$call96 i32) + (local $$call99 i32) + (local $$channels i32) + (local $$channels12 i32) + (local $$channels5 i32) + (local $$cmp i32) + (local $$cmp133 i32) + (local $$cmp15 i32) + (local $$cmp150 i32) + (local $$cmp26 i32) + (local $$cmp31 i32) + (local $$cmp46 i32) + (local $$cmp55 i32) + (local $$cmp58 i32) + (local $$cmp65 i32) + (local $$cmp76 i32) + (local $$colorspace92 i32) + (local $$cond i32) + (local $$cond11 i32) + (local $$conv i32) + (local $$conv8 i32) + (local $$decode_buffer i32) + (local $$decode_buffer_pixels i32) + (local $$decode_buffer_size i32) + (local $$decode_buffer_size139 i32) + (local $$edge_horizontal90 i32) + (local $$edge_vertical91 i32) + (local $$encode_buffer i32) + (local $$encode_buffer145 i32) + (local $$encode_buffer_size i32) + (local $$flags88 i32) + (local $$horizontal_buffer i32) + (local $$horizontal_buffer141 i32) + (local $$horizontal_buffer_size i32) + (local $$horizontal_coefficient_width i32) + (local $$horizontal_coefficients i32) + (local $$horizontal_coefficients_size i32) + (local $$horizontal_contributors i32) + (local $$horizontal_contributors_size i32) + (local $$horizontal_filter i32) + (local $$horizontal_filter_pixel_margin i32) + (local $$horizontal_filter_pixel_width i32) + (local $$horizontal_scale i32) + (local $$horizontal_shift i32) + (local $$input_h i32) + (local $$input_stride_bytes i32) + (local $$input_w i32) + (local $$input_w113 i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$mul111 i32) + (local $$mul112 i32) + (local $$mul115 i32) + (local $$mul6 i32) + (local $$mul9 i32) + (local $$or i32) + (local $$or$cond123 i32) + (local $$output_data86 i32) + (local $$output_h i32) + (local $$output_stride_bytes i32) + (local $$output_w i32) + (local $$output_w109 i32) + (local $$retval$0 i32) + (local $$ring_buffer i32) + (local $$ring_buffer144 i32) + (local $$ring_buffer_begin_index i32) + (local $$ring_buffer_length_bytes i32) + (local $$ring_buffer_size i32) + (local $$ring_buffer_size147 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $$tobool124 i32) + (local $$tobool167 i32) + (local $$tobool2 i32) + (local $$tobool69 i32) + (local $$type89 i32) + (local $$vertical_coefficient_width i32) + (local $$vertical_coefficients i32) + (local $$vertical_coefficients_size i32) + (local $$vertical_contributors i32) + (local $$vertical_contributors_size i32) + (local $$vertical_filter i32) + (local $$vertical_filter_pixel_margin i32) + (local $$vertical_filter_pixel_width i32) + (local $$vertical_scale i32) + (local $$vertical_shift i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__calculate_memory + (local.get $$info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$input_stride_in_bytes) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$channels + (i32.add + (local.get $$info) + (i32.const 64) + ) + ) + (local.set $$0 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$input_w + (i32.add + (local.get $$info) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$input_w) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$1) + (local.get $$0) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 13041) + (local.get $$type) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$mul1 + (i32.mul + (local.get $$mul) + (local.get $$conv) + ) + ) + (local.set $$cond + (local.get $$mul1) + ) + ) + (local.set $$cond + (local.get $$input_stride_in_bytes) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$output_stride_in_bytes) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (block + (local.set $$channels5 + (i32.add + (local.get $$info) + (i32.const 64) + ) + ) + (local.set $$3 + (i32.load + (local.get $$channels5) + ) + ) + (local.set $$output_w + (i32.add + (local.get $$info) + (i32.const 20) + ) + ) + (local.set $$4 + (i32.load + (local.get $$output_w) + ) + ) + (local.set $$mul6 + (i32.mul + (local.get $$4) + (local.get $$3) + ) + ) + (local.set $$arrayidx7 + (i32.add + (i32.const 13041) + (local.get $$type) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx7) + ) + ) + (local.set $$conv8 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$mul9 + (i32.mul + (local.get $$mul6) + (local.get $$conv8) + ) + ) + (local.set $$cond11 + (local.get $$mul9) + ) + ) + (local.set $$cond11 + (local.get $$output_stride_in_bytes) + ) + ) + (local.set $$channels12 + (i32.add + (local.get $$info) + (i32.const 64) + ) + ) + (local.set $$6 + (i32.load + (local.get $$channels12) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$6) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (call $___assert_fail + (i32.const 13045) + (i32.const 13065) + (i32.const 2312) + (i32.const 13095) + ) + ) + (local.set $$cmp15 + (i32.lt_s + (local.get $$6) + (i32.const 65) + ) + ) + (if + (i32.eqz + (local.get $$cmp15) + ) + (call $___assert_fail + (i32.const 13119) + (i32.const 13065) + (i32.const 2313) + (i32.const 13095) + ) + ) + (local.set $$horizontal_filter + (i32.add + (local.get $$info) + (i32.const 80) + ) + ) + (local.set $$7 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$cmp26 + (i32.lt_u + (local.get $$7) + (i32.const 6) + ) + ) + (if + (i32.eqz + (local.get $$cmp26) + ) + (call $___assert_fail + (i32.const 13140) + (i32.const 13065) + (i32.const 2318) + (i32.const 13095) + ) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$info) + (i32.const 84) + ) + ) + (local.set $$8 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$cmp31 + (i32.lt_u + (local.get $$8) + (i32.const 6) + ) + ) + (if + (i32.eqz + (local.get $$cmp31) + ) + (call $___assert_fail + (i32.const 13241) + (i32.const 13065) + (i32.const 2319) + (i32.const 13095) + ) + ) + (local.set $$cmp46 + (i32.lt_s + (local.get $$alpha_channel) + (i32.const 0) + ) + ) + (local.set $$or + (i32.or + (local.get $$flags) + (i32.const 3) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp46) + (local.get $$or) + (local.get $$flags) + ) + ) + (local.set $$9 + (i32.and + (local.get $$spec$select) + (i32.const 3) + ) + ) + (local.set $$10 + (i32.eq + (local.get $$9) + (i32.const 3) + ) + ) + (if + (i32.eqz + (local.get $$10) + ) + (block + (local.set $$cmp55 + (i32.gt_s + (local.get $$alpha_channel) + (i32.const -1) + ) + ) + (local.set $$cmp58 + (i32.gt_s + (local.get $$6) + (local.get $$alpha_channel) + ) + ) + (local.set $$or$cond123 + (i32.and + (local.get $$cmp55) + (local.get $$cmp58) + ) + ) + (if + (i32.eqz + (local.get $$or$cond123) + ) + (call $___assert_fail + (i32.const 13340) + (i32.const 13065) + (i32.const 2330) + (i32.const 13095) + ) + ) + ) + ) + (local.set $$cmp65 + (i32.gt_s + (local.get $$6) + (local.get $$alpha_channel) + ) + ) + (if + (i32.eqz + (local.get $$cmp65) + ) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$tobool69 + (i32.eq + (local.get $$tempmem) + (i32.const 0) + ) + ) + (if + (local.get $$tobool69) + (call $___assert_fail + (i32.const 13393) + (i32.const 13065) + (i32.const 2336) + (i32.const 13095) + ) + ) + (local.set $$cmp76 + (i32.gt_u + (local.get $$call) + (local.get $$tempmem_size_in_bytes) + ) + ) + (if + (local.get $$cmp76) + (call $___assert_fail + (i32.const 13401) + (i32.const 13065) + (i32.const 2341) + (i32.const 13095) + ) + ) + (drop + (call $_memset + (local.get $$tempmem) + (i32.const 0) + (local.get $$tempmem_size_in_bytes) + ) + ) + (i32.store + (local.get $$info) + (local.get $$input_data) + ) + (local.set $$input_stride_bytes + (i32.add + (local.get $$info) + (i32.const 12) + ) + ) + (i32.store + (local.get $$input_stride_bytes) + (local.get $$cond) + ) + (local.set $$output_data86 + (i32.add + (local.get $$info) + (i32.const 16) + ) + ) + (i32.store + (local.get $$output_data86) + (local.get $$output_data) + ) + (local.set $$output_stride_bytes + (i32.add + (local.get $$info) + (i32.const 28) + ) + ) + (i32.store + (local.get $$output_stride_bytes) + (local.get $$cond11) + ) + (local.set $$alpha_channel87 + (i32.add + (local.get $$info) + (i32.const 68) + ) + ) + (i32.store + (local.get $$alpha_channel87) + (local.get $$alpha_channel) + ) + (local.set $$flags88 + (i32.add + (local.get $$info) + (i32.const 72) + ) + ) + (i32.store + (local.get $$flags88) + (local.get $$spec$select) + ) + (local.set $$type89 + (i32.add + (local.get $$info) + (i32.const 76) + ) + ) + (i32.store + (local.get $$type89) + (local.get $$type) + ) + (local.set $$edge_horizontal90 + (i32.add + (local.get $$info) + (i32.const 88) + ) + ) + (i32.store + (local.get $$edge_horizontal90) + (local.get $$edge_horizontal) + ) + (local.set $$edge_vertical91 + (i32.add + (local.get $$info) + (i32.const 92) + ) + ) + (i32.store + (local.get $$edge_vertical91) + (local.get $$edge_vertical) + ) + (local.set $$colorspace92 + (i32.add + (local.get $$info) + (i32.const 96) + ) + ) + (i32.store + (local.get $$colorspace92) + (local.get $$colorspace) + ) + (local.set $$11 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$horizontal_scale + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (local.set $$12 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call94 + (call $_stbir__get_coefficient_width + (local.get $$11) + (local.get $$12) + ) + ) + (local.set $$horizontal_coefficient_width + (i32.add + (local.get $$info) + (i32.const 128) + ) + ) + (i32.store + (local.get $$horizontal_coefficient_width) + (local.get $$call94) + ) + (local.set $$13 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (local.set $$14 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call96 + (call $_stbir__get_coefficient_width + (local.get $$13) + (local.get $$14) + ) + ) + (local.set $$vertical_coefficient_width + (i32.add + (local.get $$info) + (i32.const 132) + ) + ) + (i32.store + (local.get $$vertical_coefficient_width) + (local.get $$call96) + ) + (local.set $$15 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$16 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call99 + (call $_stbir__get_filter_pixel_width + (local.get $$15) + (local.get $$16) + ) + ) + (local.set $$horizontal_filter_pixel_width + (i32.add + (local.get $$info) + (i32.const 136) + ) + ) + (i32.store + (local.get $$horizontal_filter_pixel_width) + (local.get $$call99) + ) + (local.set $$17 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$18 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call102 + (call $_stbir__get_filter_pixel_width + (local.get $$17) + (local.get $$18) + ) + ) + (local.set $$vertical_filter_pixel_width + (i32.add + (local.get $$info) + (i32.const 140) + ) + ) + (i32.store + (local.get $$vertical_filter_pixel_width) + (local.get $$call102) + ) + (local.set $$19 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$20 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call105 + (call $_stbir__get_filter_pixel_margin + (local.get $$19) + (local.get $$20) + ) + ) + (local.set $$horizontal_filter_pixel_margin + (i32.add + (local.get $$info) + (i32.const 144) + ) + ) + (i32.store + (local.get $$horizontal_filter_pixel_margin) + (local.get $$call105) + ) + (local.set $$21 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$22 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call108 + (call $_stbir__get_filter_pixel_margin + (local.get $$21) + (local.get $$22) + ) + ) + (local.set $$vertical_filter_pixel_margin + (i32.add + (local.get $$info) + (i32.const 148) + ) + ) + (i32.store + (local.get $$vertical_filter_pixel_margin) + (local.get $$call108) + ) + (local.set $$output_w109 + (i32.add + (local.get $$info) + (i32.const 20) + ) + ) + (local.set $$23 + (i32.load + (local.get $$output_w109) + ) + ) + (local.set $$24 + (i32.load + (local.get $$channels12) + ) + ) + (local.set $$mul111 + (i32.shl + (local.get $$23) + (i32.const 2) + ) + ) + (local.set $$mul112 + (i32.mul + (local.get $$mul111) + (local.get $$24) + ) + ) + (local.set $$ring_buffer_length_bytes + (i32.add + (local.get $$info) + (i32.const 160) + ) + ) + (i32.store + (local.get $$ring_buffer_length_bytes) + (local.get $$mul112) + ) + (local.set $$input_w113 + (i32.add + (local.get $$info) + (i32.const 4) + ) + ) + (local.set $$25 + (i32.load + (local.get $$input_w113) + ) + ) + (local.set $$26 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$mul115 + (i32.shl + (local.get $$26) + (i32.const 1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul115) + (local.get $$25) + ) + ) + (local.set $$decode_buffer_pixels + (i32.add + (local.get $$info) + (i32.const 116) + ) + ) + (i32.store + (local.get $$decode_buffer_pixels) + (local.get $$add) + ) + (local.set $$horizontal_contributors + (i32.add + (local.get $$info) + (i32.const 100) + ) + ) + (i32.store + (local.get $$horizontal_contributors) + (local.get $$tempmem) + ) + (local.set $$horizontal_contributors_size + (i32.add + (local.get $$info) + (i32.const 188) + ) + ) + (local.set $$27 + (i32.load + (local.get $$horizontal_contributors_size) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$tempmem) + (local.get $$27) + ) + ) + (local.set $$horizontal_coefficients + (i32.add + (local.get $$info) + (i32.const 104) + ) + ) + (i32.store + (local.get $$horizontal_coefficients) + (local.get $$add$ptr) + ) + (local.set $$horizontal_coefficients_size + (i32.add + (local.get $$info) + (i32.const 192) + ) + ) + (local.set $$28 + (i32.load + (local.get $$horizontal_coefficients_size) + ) + ) + (local.set $$add$ptr118 + (i32.add + (local.get $$add$ptr) + (local.get $$28) + ) + ) + (local.set $$vertical_contributors + (i32.add + (local.get $$info) + (i32.const 108) + ) + ) + (i32.store + (local.get $$vertical_contributors) + (local.get $$add$ptr118) + ) + (local.set $$vertical_contributors_size + (i32.add + (local.get $$info) + (i32.const 196) + ) + ) + (local.set $$29 + (i32.load + (local.get $$vertical_contributors_size) + ) + ) + (local.set $$add$ptr120 + (i32.add + (local.get $$add$ptr118) + (local.get $$29) + ) + ) + (local.set $$vertical_coefficients + (i32.add + (local.get $$info) + (i32.const 112) + ) + ) + (i32.store + (local.get $$vertical_coefficients) + (local.get $$add$ptr120) + ) + (local.set $$vertical_coefficients_size + (i32.add + (local.get $$info) + (i32.const 200) + ) + ) + (local.set $$30 + (i32.load + (local.get $$vertical_coefficients_size) + ) + ) + (local.set $$add$ptr122 + (i32.add + (local.get $$add$ptr120) + (local.get $$30) + ) + ) + (local.set $$decode_buffer + (i32.add + (local.get $$info) + (i32.const 120) + ) + ) + (i32.store + (local.get $$decode_buffer) + (local.get $$add$ptr122) + ) + (local.set $$call123 + (call $_stbir__use_height_upsampling + (local.get $$info) + ) + ) + (local.set $$tobool124 + (i32.eq + (local.get $$call123) + (i32.const 0) + ) + ) + (if + (local.get $$tobool124) + (block + (local.set $$decode_buffer_size139 + (i32.add + (local.get $$info) + (i32.const 204) + ) + ) + (local.set $$36 + (i32.load + (local.get $$decode_buffer_size139) + ) + ) + (local.set $$add$ptr140 + (i32.add + (local.get $$add$ptr122) + (local.get $$36) + ) + ) + (local.set $$horizontal_buffer141 + (i32.add + (local.get $$info) + (i32.const 124) + ) + ) + (i32.store + (local.get $$horizontal_buffer141) + (local.get $$add$ptr140) + ) + (local.set $$horizontal_buffer_size + (i32.add + (local.get $$info) + (i32.const 208) + ) + ) + (local.set $$37 + (i32.load + (local.get $$horizontal_buffer_size) + ) + ) + (local.set $$add$ptr143 + (i32.add + (local.get $$add$ptr140) + (local.get $$37) + ) + ) + (local.set $$ring_buffer144 + (i32.add + (local.get $$info) + (i32.const 180) + ) + ) + (i32.store + (local.get $$ring_buffer144) + (local.get $$add$ptr143) + ) + (local.set $$encode_buffer145 + (i32.add + (local.get $$info) + (i32.const 184) + ) + ) + (i32.store + (local.get $$encode_buffer145) + (i32.const 0) + ) + (local.set $$ring_buffer_size147 + (i32.add + (local.get $$info) + (i32.const 212) + ) + ) + (local.set $$38 + (i32.load + (local.get $$ring_buffer_size147) + ) + ) + (local.set $$add$ptr148 + (i32.add + (local.get $$add$ptr143) + (local.get $$38) + ) + ) + (local.set $$39 + (local.get $$add$ptr148) + ) + (local.set $$40 + (local.get $$tempmem) + ) + (local.set $$add149 + (i32.add + (local.get $$40) + (local.get $$tempmem_size_in_bytes) + ) + ) + (local.set $$cmp150 + (i32.eq + (local.get $$add149) + (local.get $$39) + ) + ) + (if + (i32.eqz + (local.get $$cmp150) + ) + (call $___assert_fail + (i32.const 13576) + (i32.const 13065) + (i32.const 2393) + (i32.const 13095) + ) + ) + ) + (block + (local.set $$horizontal_buffer + (i32.add + (local.get $$info) + (i32.const 124) + ) + ) + (i32.store + (local.get $$horizontal_buffer) + (i32.const 0) + ) + (local.set $$decode_buffer_size + (i32.add + (local.get $$info) + (i32.const 204) + ) + ) + (local.set $$31 + (i32.load + (local.get $$decode_buffer_size) + ) + ) + (local.set $$add$ptr127 + (i32.add + (local.get $$add$ptr122) + (local.get $$31) + ) + ) + (local.set $$ring_buffer + (i32.add + (local.get $$info) + (i32.const 180) + ) + ) + (i32.store + (local.get $$ring_buffer) + (local.get $$add$ptr127) + ) + (local.set $$ring_buffer_size + (i32.add + (local.get $$info) + (i32.const 212) + ) + ) + (local.set $$32 + (i32.load + (local.get $$ring_buffer_size) + ) + ) + (local.set $$add$ptr129 + (i32.add + (local.get $$add$ptr127) + (local.get $$32) + ) + ) + (local.set $$encode_buffer + (i32.add + (local.get $$info) + (i32.const 184) + ) + ) + (i32.store + (local.get $$encode_buffer) + (local.get $$add$ptr129) + ) + (local.set $$encode_buffer_size + (i32.add + (local.get $$info) + (i32.const 216) + ) + ) + (local.set $$33 + (i32.load + (local.get $$encode_buffer_size) + ) + ) + (local.set $$add$ptr131 + (i32.add + (local.get $$add$ptr129) + (local.get $$33) + ) + ) + (local.set $$34 + (local.get $$add$ptr131) + ) + (local.set $$35 + (local.get $$tempmem) + ) + (local.set $$add132 + (i32.add + (local.get $$35) + (local.get $$tempmem_size_in_bytes) + ) + ) + (local.set $$cmp133 + (i32.eq + (local.get $$add132) + (local.get $$34) + ) + ) + (if + (i32.eqz + (local.get $$cmp133) + ) + (call $___assert_fail + (i32.const 13442) + (i32.const 13065) + (i32.const 2385) + (i32.const 13095) + ) + ) + ) + ) + (local.set $$ring_buffer_begin_index + (i32.add + (local.get $$info) + (i32.const 176) + ) + ) + (i32.store + (local.get $$ring_buffer_begin_index) + (i32.const -1) + ) + (local.set $$41 + (i32.load + (local.get $$horizontal_contributors) + ) + ) + (local.set $$42 + (i32.load + (local.get $$horizontal_coefficients) + ) + ) + (local.set $$43 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$44 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$horizontal_shift + (i32.add + (local.get $$info) + (i32.const 48) + ) + ) + (local.set $$45 + (f32.load + (local.get $$horizontal_shift) + ) + ) + (call $_stbir__calculate_filters + (local.get $$41) + (local.get $$42) + (local.get $$43) + (local.get $$44) + (local.get $$45) + (local.get $$25) + (local.get $$23) + ) + (local.set $$46 + (i32.load + (local.get $$vertical_contributors) + ) + ) + (local.set $$47 + (i32.load + (local.get $$vertical_coefficients) + ) + ) + (local.set $$48 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$49 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$vertical_shift + (i32.add + (local.get $$info) + (i32.const 52) + ) + ) + (local.set $$50 + (f32.load + (local.get $$vertical_shift) + ) + ) + (local.set $$input_h + (i32.add + (local.get $$info) + (i32.const 8) + ) + ) + (local.set $$51 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$output_h + (i32.add + (local.get $$info) + (i32.const 24) + ) + ) + (local.set $$52 + (i32.load + (local.get $$output_h) + ) + ) + (call $_stbir__calculate_filters + (local.get $$46) + (local.get $$47) + (local.get $$48) + (local.get $$49) + (local.get $$50) + (local.get $$51) + (local.get $$52) + ) + (local.set $$call166 + (call $_stbir__use_height_upsampling + (local.get $$info) + ) + ) + (local.set $$tobool167 + (i32.eq + (local.get $$call166) + (i32.const 0) + ) + ) + (if + (local.get $$tobool167) + (block + (call $_stbir__buffer_loop_downsample + (local.get $$info) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (call $_stbir__buffer_loop_upsample + (local.get $$info) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_stbir__get_coefficient_width (; 452 ;) (param $$filter i32) (param $$scale f32) (result i32) + (local $$0 i32) + (local $$1 f32) + (local $$call i32) + (local $$call5 f32) + (local $$div f32) + (local $$mul6 f32) + (local $$retval$0 i32) + (local $$scale$sink f32) + (local $$support i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$scale) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$support) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$scale) + ) + ) + (local.set $$scale$sink + (if (result f32) + (local.get $$tobool) + (local.get $$scale) + (local.get $$div) + ) + ) + (local.set $$call5 + (call_indirect (type $FUNCSIG$ff) + (local.get $$scale$sink) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul6 + (f32.mul + (local.get $$call5) + (f32.const 2) + ) + ) + (local.set $$1 + (f32.ceil + (local.get $$mul6) + ) + ) + (local.set $$retval$0 + (i32.trunc_f32_s + (local.get $$1) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__get_filter_pixel_width (; 453 ;) (param $$filter i32) (param $$scale f32) (result i32) + (local $$0 i32) + (local $$1 f32) + (local $$call i32) + (local $$call5 f32) + (local $$call9 f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$div f32) + (local $$div11 f32) + (local $$div11$sink f32) + (local $$mul f32) + (local $$mul10 f32) + (local $$retval$0 i32) + (local $$support i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$filter) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 15402) + (i32.const 13065) + (i32.const 884) + (i32.const 15414) + ) + ) + (local.set $$cmp1 + (i32.lt_u + (local.get $$filter) + (i32.const 6) + ) + ) + (if + (i32.eqz + (local.get $$cmp1) + ) + (call $___assert_fail + (i32.const 15444) + (i32.const 13065) + (i32.const 885) + (i32.const 15414) + ) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$scale) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$support) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call9 + (call_indirect (type $FUNCSIG$ff) + (local.get $$scale) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$call9) + (f32.const 2) + ) + ) + (local.set $$div11 + (f32.div + (local.get $$mul10) + (local.get $$scale) + ) + ) + (local.set $$div11$sink + (local.get $$div11) + ) + (local.set $$1 + (f32.ceil + (local.get $$div11$sink) + ) + ) + (local.set $$retval$0 + (i32.trunc_f32_s + (local.get $$1) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$scale) + ) + ) + (local.set $$call5 + (call_indirect (type $FUNCSIG$ff) + (local.get $$div) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$call5) + (f32.const 2) + ) + ) + (local.set $$div11$sink + (local.get $$mul) + ) + (local.set $$1 + (f32.ceil + (local.get $$div11$sink) + ) + ) + (local.set $$retval$0 + (i32.trunc_f32_s + (local.get $$1) + ) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_stbir__get_filter_pixel_margin (; 454 ;) (param $$filter i32) (param $$scale f32) (result i32) + (local $$call i32) + (local $$div i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__get_filter_pixel_width + (local.get $$filter) + (local.get $$scale) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$call) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (return + (local.get $$div) + ) + ) + (func $_stbir__use_height_upsampling (; 455 ;) (param $$stbir_info i32) (result i32) + (local $$0 f32) + (local $$call i32) + (local $$vertical_scale i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$stbir_info) + (i32.const 60) + ) + ) + (local.set $$0 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$0) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbir__calculate_filters (; 456 ;) (param $$contributors i32) (param $$coefficients i32) (param $$filter i32) (param $$scale_ratio f32) (param $$shift f32) (param $$input_size i32) (param $$output_size i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 f32) + (local $$4 i32) + (local $$5 i32) + (local $$6 f32) + (local $$call i32) + (local $$call1 i32) + (local $$call12 i32) + (local $$call13 i32) + (local $$call14 i32) + (local $$call2 f32) + (local $$call3 i32) + (local $$call4 i32) + (local $$call7 f32) + (local $$cmp1044 i32) + (local $$cmp46 i32) + (local $$div f32) + (local $$div8 f32) + (local $$exitcond i32) + (local $$exitcond48 i32) + (local $$in_center_of_out i32) + (local $$in_first_pixel i32) + (local $$in_last_pixel i32) + (local $$inc i32) + (local $$inc16 i32) + (local $$mul f32) + (local $$n$047 i32) + (local $$n$145 i32) + (local $$out_center_of_in i32) + (local $$out_first_pixel i32) + (local $$out_last_pixel i32) + (local $$sub i32) + (local $$support6 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$in_center_of_out + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (local.set $$in_first_pixel + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$in_last_pixel + (i32.add + (local.get $sp_a) + (i32.const 12) + ) + ) + (local.set $$out_center_of_in + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$out_first_pixel + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$out_last_pixel + (local.get $sp_a) + ) + (local.set $$call + (call $_stbir__get_contributors + (local.get $$scale_ratio) + (local.get $$filter) + (local.get $$input_size) + (local.get $$output_size) + ) + ) + (local.set $$call1 + (call $_stbir__use_upsampling + (local.get $$scale_ratio) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (local.set $$support6 + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$support6) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call7 + (call_indirect (type $FUNCSIG$ff) + (local.get $$scale_ratio) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$div8 + (f32.div + (local.get $$call7) + (local.get $$scale_ratio) + ) + ) + (local.set $$cmp1044 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1044) + (block + (local.set $$n$145 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$call12 + (call $_stbir__get_filter_pixel_margin + (local.get $$filter) + (local.get $$scale_ratio) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$n$145) + (local.get $$call12) + ) + ) + (call $_stbir__calculate_sample_range_downsample + (local.get $$sub) + (local.get $$div8) + (local.get $$scale_ratio) + (local.get $$shift) + (local.get $$out_first_pixel) + (local.get $$out_last_pixel) + (local.get $$out_center_of_in) + ) + (local.set $$4 + (i32.load + (local.get $$out_first_pixel) + ) + ) + (local.set $$5 + (i32.load + (local.get $$out_last_pixel) + ) + ) + (local.set $$6 + (f32.load + (local.get $$out_center_of_in) + ) + ) + (local.set $$call13 + (call $_stbir__get_contributor + (local.get $$contributors) + (local.get $$n$145) + ) + ) + (local.set $$call14 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$n$145) + (i32.const 0) + ) + ) + (call $_stbir__calculate_coefficients_downsample + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$4) + (local.get $$5) + (local.get $$6) + (local.get $$call13) + (local.get $$call14) + ) + (local.set $$inc16 + (i32.add + (local.get $$n$145) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc16) + (local.get $$call) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$n$145 + (local.get $$inc16) + ) + ) + (br $while-in) + ) + ) + ) + ) + (call $_stbir__normalize_downsample_coefficients + (local.get $$contributors) + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$input_size) + (local.get $$output_size) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (block + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$scale_ratio) + ) + ) + (local.set $$call2 + (call_indirect (type $FUNCSIG$ff) + (local.get $$div) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$call2) + (local.get $$scale_ratio) + ) + ) + (local.set $$cmp46 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp46) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$n$047 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (call $_stbir__calculate_sample_range_upsample + (local.get $$n$047) + (local.get $$mul) + (local.get $$scale_ratio) + (local.get $$shift) + (local.get $$in_first_pixel) + (local.get $$in_last_pixel) + (local.get $$in_center_of_out) + ) + (local.set $$1 + (i32.load + (local.get $$in_first_pixel) + ) + ) + (local.set $$2 + (i32.load + (local.get $$in_last_pixel) + ) + ) + (local.set $$3 + (f32.load + (local.get $$in_center_of_out) + ) + ) + (local.set $$call3 + (call $_stbir__get_contributor + (local.get $$contributors) + (local.get $$n$047) + ) + ) + (local.set $$call4 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$n$047) + (i32.const 0) + ) + ) + (call $_stbir__calculate_coefficients_upsample + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$1) + (local.get $$2) + (local.get $$3) + (local.get $$call3) + (local.get $$call4) + ) + (local.set $$inc + (i32.add + (local.get $$n$047) + (i32.const 1) + ) + ) + (local.set $$exitcond48 + (i32.eq + (local.get $$inc) + (local.get $$call) + ) + ) + (if + (local.get $$exitcond48) + (br $while-out0) + (local.set $$n$047 + (local.get $$inc) + ) + ) + (br $while-in1) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + (func $_stbir__buffer_loop_upsample (; 457 ;) (param $$stbir_info i32) + (local $$0 f32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add16 i32) + (local $$add29 i32) + (local $$call f32) + (local $$call1 i32) + (local $$cmp i32) + (local $$cmp2 i32) + (local $$cmp21 i32) + (local $$cmp26 i32) + (local $$cmp2632 i32) + (local $$cmp33 i32) + (local $$cmp6 i32) + (local $$cmp7 i32) + (local $$cmp731 i32) + (local $$cmp9 i32) + (local $$div f32) + (local $$in_center_of_out i32) + (local $$in_first_scanline i32) + (local $$in_last_scanline i32) + (local $$inc i32) + (local $$inc31 i32) + (local $$mul f32) + (local $$output_h i32) + (local $$rem i32) + (local $$ring_buffer_begin_index i32) + (local $$ring_buffer_first_scanline i32) + (local $$ring_buffer_last_scanline i32) + (local $$ring_buffer_last_scanline$le i32) + (local $$ring_buffer_last_scanline25 i32) + (local $$ring_buffer_num_entries i32) + (local $$sub i32) + (local $$support i32) + (local $$tobool i32) + (local $$vertical_filter i32) + (local $$vertical_scale i32) + (local $$vertical_shift i32) + (local $$y$034 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$in_center_of_out + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$in_first_scanline + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$in_last_scanline + (local.get $sp_a) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$stbir_info) + (i32.const 60) + ) + ) + (local.set $$0 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$stbir_info) + (i32.const 84) + ) + ) + (local.set $$1 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$1) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$2 + (i32.load + (local.get $$support) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$0) + ) + ) + (local.set $$call + (call_indirect (type $FUNCSIG$ff) + (local.get $$div) + (i32.add + (i32.and + (local.get $$2) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$0) + (local.get $$call) + ) + ) + (local.set $$call1 + (call $_stbir__use_height_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (call $___assert_fail + (i32.const 14573) + (i32.const 13065) + (i32.const 2069) + (i32.const 14614) + ) + ) + (local.set $$output_h + (i32.add + (local.get $$stbir_info) + (i32.const 24) + ) + ) + (local.set $$3 + (i32.load + (local.get $$output_h) + ) + ) + (local.set $$cmp33 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp33) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$vertical_shift + (i32.add + (local.get $$stbir_info) + (i32.const 52) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$ring_buffer_begin_index + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$ring_buffer_first_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (local.set $$ring_buffer_last_scanline25 + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (local.set $$ring_buffer_last_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (local.set $$ring_buffer_last_scanline$le + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (local.set $$y$034 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (f32.store + (local.get $$in_center_of_out) + (f32.const 0) + ) + (i32.store + (local.get $$in_first_scanline) + (i32.const 0) + ) + (i32.store + (local.get $$in_last_scanline) + (i32.const 0) + ) + (local.set $$4 + (f32.load + (local.get $$vertical_shift) + ) + ) + (call $_stbir__calculate_sample_range_upsample + (local.get $$y$034) + (local.get $$mul) + (local.get $$0) + (local.get $$4) + (local.get $$in_first_scanline) + (local.get $$in_last_scanline) + (local.get $$in_center_of_out) + ) + (local.set $$5 + (i32.load + (local.get $$in_last_scanline) + ) + ) + (local.set $$6 + (i32.load + (local.get $$in_first_scanline) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$5) + (local.get $$6) + ) + ) + (local.set $$7 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$cmp2 + (i32.lt_s + (local.get $$sub) + (local.get $$7) + ) + ) + (if + (i32.eqz + (local.get $$cmp2) + ) + (block + (local.set $label + (i32.const 6) + ) + (br $while-out) + ) + ) + (local.set $$8 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$cmp6 + (i32.gt_s + (local.get $$8) + (i32.const -1) + ) + ) + (block $do-once + (if + (local.get $$cmp6) + (block + (local.set $$9 + (i32.load + (local.get $$ring_buffer_first_scanline) + ) + ) + (local.set $$cmp731 + (i32.gt_s + (local.get $$6) + (local.get $$9) + ) + ) + (if + (local.get $$cmp731) + (block + (local.set $$10 + (i32.load + (local.get $$ring_buffer_last_scanline) + ) + ) + (local.set $$11 + (local.get $$9) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$cmp9 + (i32.eq + (local.get $$11) + (local.get $$10) + ) + ) + (if + (local.get $$cmp9) + (block + (local.set $label + (i32.const 11) + ) + (br $while-out0) + ) + ) + (local.set $$inc + (i32.add + (local.get $$11) + (i32.const 1) + ) + ) + (i32.store + (local.get $$ring_buffer_first_scanline) + (local.get $$inc) + ) + (local.set $$12 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$add16 + (i32.add + (local.get $$12) + (i32.const 1) + ) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$add16) + (local.get $$7) + ) + (i32.const -1) + ) + ) + (i32.store + (local.get $$ring_buffer_begin_index) + (local.get $$rem) + ) + (local.set $$cmp7 + (i32.gt_s + (local.get $$6) + (local.get $$inc) + ) + ) + (if + (local.get $$cmp7) + (local.set $$11 + (local.get $$inc) + ) + (block + (local.set $label + (i32.const 13) + ) + (br $while-out0) + ) + ) + (br $while-in1) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 11) + ) + (block + (local.set $label + (i32.const 0) + ) + (i32.store + (local.get $$ring_buffer_begin_index) + (i32.const -1) + ) + (i32.store + (local.get $$ring_buffer_first_scanline) + (i32.const 0) + ) + (i32.store + (local.get $$ring_buffer_last_scanline$le) + (i32.const 0) + ) + (local.set $label + (i32.const 14) + ) + (br $do-once) + ) + (if + (i32.eq + (local.get $label) + (i32.const 13) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$cmp21 + (i32.lt_s + (local.get $$rem) + (i32.const 0) + ) + ) + (if + (local.get $$cmp21) + (block + (local.set $label + (i32.const 14) + ) + (br $do-once) + ) + (br $do-once) + ) + ) + ) + ) + ) + ) + ) + (local.set $label + (i32.const 14) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 14) + ) + (block + (local.set $label + (i32.const 0) + ) + (call $_stbir__decode_and_resample_upsample + (local.get $$stbir_info) + (local.get $$6) + ) + ) + ) + (local.set $$13 + (i32.load + (local.get $$ring_buffer_last_scanline25) + ) + ) + (local.set $$cmp2632 + (i32.gt_s + (local.get $$5) + (local.get $$13) + ) + ) + (if + (local.get $$cmp2632) + (block + (local.set $$14 + (local.get $$13) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$add29 + (i32.add + (local.get $$14) + (i32.const 1) + ) + ) + (call $_stbir__decode_and_resample_upsample + (local.get $$stbir_info) + (local.get $$add29) + ) + (local.set $$15 + (i32.load + (local.get $$ring_buffer_last_scanline25) + ) + ) + (local.set $$cmp26 + (i32.gt_s + (local.get $$5) + (local.get $$15) + ) + ) + (if + (local.get $$cmp26) + (local.set $$14 + (local.get $$15) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + ) + ) + (call $_stbir__resample_vertical_upsample + (local.get $$stbir_info) + (local.get $$y$034) + ) + (local.set $$inc31 + (i32.add + (local.get $$y$034) + (i32.const 1) + ) + ) + (local.set $$16 + (i32.load + (local.get $$output_h) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc31) + (local.get $$16) + ) + ) + (if + (local.get $$cmp) + (local.set $$y$034 + (local.get $$inc31) + ) + (block + (local.set $label + (i32.const 19) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 14642) + (i32.const 13065) + (i32.const 2078) + (i32.const 14614) + ) + (if + (i32.eq + (local.get $label) + (i32.const 19) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + (func $_stbir__buffer_loop_downsample (; 458 ;) (param $$stbir_info i32) + (local $$0 f32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 f32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add17 i32) + (local $$call f32) + (local $$call2 i32) + (local $$cmp i32) + (local $$cmp10 i32) + (local $$cmp11 i32) + (local $$cmp15 i32) + (local $$cmp1530 i32) + (local $$cmp31 i32) + (local $$cmp5 i32) + (local $$cmp9 i32) + (local $$div f32) + (local $$inc i32) + (local $$input_h i32) + (local $$or$cond i32) + (local $$out_center_of_in i32) + (local $$out_first_scanline i32) + (local $$out_last_scanline i32) + (local $$output_h1 i32) + (local $$ring_buffer_begin_index i32) + (local $$ring_buffer_last_scanline i32) + (local $$ring_buffer_num_entries i32) + (local $$sub i32) + (local $$sub3 i32) + (local $$support i32) + (local $$tobool i32) + (local $$vertical_filter i32) + (local $$vertical_filter_pixel_margin i32) + (local $$vertical_scale i32) + (local $$vertical_shift i32) + (local $$y$032 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$out_center_of_in + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$out_first_scanline + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$out_last_scanline + (local.get $sp_a) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$stbir_info) + (i32.const 60) + ) + ) + (local.set $$0 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$output_h1 + (i32.add + (local.get $$stbir_info) + (i32.const 24) + ) + ) + (local.set $$1 + (i32.load + (local.get $$output_h1) + ) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$stbir_info) + (i32.const 84) + ) + ) + (local.set $$2 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$2) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$support) + ) + ) + (local.set $$call + (call_indirect (type $FUNCSIG$ff) + (local.get $$0) + (i32.add + (i32.and + (local.get $$3) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$div + (f32.div + (local.get $$call) + (local.get $$0) + ) + ) + (local.set $$vertical_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 148) + ) + ) + (local.set $$4 + (i32.load + (local.get $$vertical_filter_pixel_margin) + ) + ) + (local.set $$input_h + (i32.add + (local.get $$stbir_info) + (i32.const 8) + ) + ) + (local.set $$5 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$add + (i32.add + (local.get $$5) + (local.get $$4) + ) + ) + (local.set $$call2 + (call $_stbir__use_height_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call2) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (call $___assert_fail + (i32.const 13706) + (i32.const 13065) + (i32.const 2170) + (i32.const 13748) + ) + ) + (local.set $$sub + (i32.sub + (i32.const 0) + (local.get $$4) + ) + ) + (local.set $$cmp31 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (i32.eqz + (local.get $$cmp31) + ) + (block + (local.set $$14 + (i32.load + (local.get $$output_h1) + ) + ) + (call $_stbir__empty_ring_buffer + (local.get $$stbir_info) + (local.get $$14) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$vertical_shift + (i32.add + (local.get $$stbir_info) + (i32.const 52) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$ring_buffer_begin_index + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$ring_buffer_last_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (local.set $$y$032 + (local.get $$sub) + ) + (loop $while-in + (block $while-out + (local.set $$6 + (f32.load + (local.get $$vertical_shift) + ) + ) + (call $_stbir__calculate_sample_range_downsample + (local.get $$y$032) + (local.get $$div) + (local.get $$0) + (local.get $$6) + (local.get $$out_first_scanline) + (local.get $$out_last_scanline) + (local.get $$out_center_of_in) + ) + (local.set $$7 + (i32.load + (local.get $$out_last_scanline) + ) + ) + (local.set $$8 + (i32.load + (local.get $$out_first_scanline) + ) + ) + (local.set $$sub3 + (i32.sub + (local.get $$7) + (local.get $$8) + ) + ) + (local.set $$9 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$cmp5 + (i32.lt_s + (local.get $$sub3) + (local.get $$9) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $label + (i32.const 6) + ) + (br $while-out) + ) + ) + (local.set $$cmp9 + (i32.gt_s + (local.get $$7) + (i32.const -1) + ) + ) + (local.set $$cmp10 + (i32.lt_s + (local.get $$8) + (local.get $$1) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp9) + (local.get $$cmp10) + ) + ) + (if + (local.get $$or$cond) + (block + (call $_stbir__empty_ring_buffer + (local.get $$stbir_info) + (local.get $$8) + ) + (call $_stbir__decode_and_resample_downsample + (local.get $$stbir_info) + (local.get $$y$032) + ) + (local.set $$10 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$cmp11 + (i32.lt_s + (local.get $$10) + (i32.const 0) + ) + ) + (if + (local.get $$cmp11) + (drop + (call $_stbir__add_empty_ring_buffer_entry + (local.get $$stbir_info) + (local.get $$8) + ) + ) + ) + (local.set $$11 + (i32.load + (local.get $$ring_buffer_last_scanline) + ) + ) + (local.set $$cmp1530 + (i32.gt_s + (local.get $$7) + (local.get $$11) + ) + ) + (if + (local.get $$cmp1530) + (block + (local.set $$12 + (local.get $$11) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$add17 + (i32.add + (local.get $$12) + (i32.const 1) + ) + ) + (drop + (call $_stbir__add_empty_ring_buffer_entry + (local.get $$stbir_info) + (local.get $$add17) + ) + ) + (local.set $$13 + (i32.load + (local.get $$ring_buffer_last_scanline) + ) + ) + (local.set $$cmp15 + (i32.gt_s + (local.get $$7) + (local.get $$13) + ) + ) + (if + (local.get $$cmp15) + (local.set $$12 + (local.get $$13) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (call $_stbir__resample_vertical_downsample + (local.get $$stbir_info) + (local.get $$y$032) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$y$032) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$add) + ) + ) + (if + (local.get $$cmp) + (local.set $$y$032 + (local.get $$inc) + ) + (block + (local.set $label + (i32.const 15) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 13778) + (i32.const 13065) + (i32.const 2179) + (i32.const 13748) + ) + (if + (i32.eq + (local.get $label) + (i32.const 15) + ) + (block + (local.set $$14 + (i32.load + (local.get $$output_h1) + ) + ) + (call $_stbir__empty_ring_buffer + (local.get $$stbir_info) + (local.get $$14) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + (func $_stbir__calculate_sample_range_downsample (; 459 ;) (param $$n i32) (param $$in_pixels_radius f32) (param $$scale_ratio f32) (param $$out_shift f32) (param $$out_first_pixel i32) (param $$out_last_pixel i32) (param $$out_center_of_in i32) + (local $$0 f64) + (local $$1 f64) + (local $$add f32) + (local $$add1 f32) + (local $$add8 f64) + (local $$conv f32) + (local $$conv10 f64) + (local $$conv12 i32) + (local $$conv7 f64) + (local $$conv9 i32) + (local $$mul f32) + (local $$mul3 f32) + (local $$mul5 f32) + (local $$sub f32) + (local $$sub11 f64) + (local $$sub2 f32) + (local $$sub4 f32) + (local $$sub6 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$n) + ) + ) + (local.set $$add + (f32.add + (local.get $$conv) + (f32.const 0.5) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$add) + (local.get $$in_pixels_radius) + ) + ) + (local.set $$add1 + (f32.add + (local.get $$add) + (local.get $$in_pixels_radius) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$sub) + (local.get $$scale_ratio) + ) + ) + (local.set $$sub2 + (f32.sub + (local.get $$mul) + (local.get $$out_shift) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$add1) + (local.get $$scale_ratio) + ) + ) + (local.set $$sub4 + (f32.sub + (local.get $$mul3) + (local.get $$out_shift) + ) + ) + (local.set $$mul5 + (f32.mul + (local.get $$add) + (local.get $$scale_ratio) + ) + ) + (local.set $$sub6 + (f32.sub + (local.get $$mul5) + (local.get $$out_shift) + ) + ) + (f32.store + (local.get $$out_center_of_in) + (local.get $$sub6) + ) + (local.set $$conv7 + (f64.promote_f32 + (local.get $$sub2) + ) + ) + (local.set $$add8 + (f64.add + (local.get $$conv7) + (f64.const 0.5) + ) + ) + (local.set $$0 + (f64.floor + (local.get $$add8) + ) + ) + (local.set $$conv9 + (i32.trunc_f64_s + (local.get $$0) + ) + ) + (i32.store + (local.get $$out_first_pixel) + (local.get $$conv9) + ) + (local.set $$conv10 + (f64.promote_f32 + (local.get $$sub4) + ) + ) + (local.set $$sub11 + (f64.add + (local.get $$conv10) + (f64.const -0.5) + ) + ) + (local.set $$1 + (f64.floor + (local.get $$sub11) + ) + ) + (local.set $$conv12 + (i32.trunc_f64_s + (local.get $$1) + ) + ) + (i32.store + (local.get $$out_last_pixel) + (local.get $$conv12) + ) + (return) + ) + (func $_stbir__empty_ring_buffer (; 460 ;) (param $$stbir_info i32) (param $$first_necessary_scanline i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add26 i32) + (local $$alpha_channel3 i32) + (local $$call i32) + (local $$channels2 i32) + (local $$cmp i32) + (local $$cmp11 i32) + (local $$cmp13 i32) + (local $$cmp19 i32) + (local $$cmp9 i32) + (local $$cmp938 i32) + (local $$colorspace5 i32) + (local $$div i32) + (local $$inc i32) + (local $$mul i32) + (local $$mul16 i32) + (local $$output_data7 i32) + (local $$output_h i32) + (local $$output_stride_bytes1 i32) + (local $$output_w6 i32) + (local $$rem i32) + (local $$ring_buffer8 i32) + (local $$ring_buffer_begin_index i32) + (local $$ring_buffer_first_scanline i32) + (local $$ring_buffer_last_scanline i32) + (local $$ring_buffer_last_scanline$le i32) + (local $$ring_buffer_length_bytes i32) + (local $$ring_buffer_num_entries i32) + (local $$type4 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$output_stride_bytes1 + (i32.add + (local.get $$stbir_info) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$output_stride_bytes1) + ) + ) + (local.set $$channels2 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels2) + ) + ) + (local.set $$alpha_channel3 + (i32.add + (local.get $$stbir_info) + (i32.const 68) + ) + ) + (local.set $$2 + (i32.load + (local.get $$alpha_channel3) + ) + ) + (local.set $$type4 + (i32.add + (local.get $$stbir_info) + (i32.const 76) + ) + ) + (local.set $$3 + (i32.load + (local.get $$type4) + ) + ) + (local.set $$colorspace5 + (i32.add + (local.get $$stbir_info) + (i32.const 96) + ) + ) + (local.set $$4 + (i32.load + (local.get $$colorspace5) + ) + ) + (local.set $$output_w6 + (i32.add + (local.get $$stbir_info) + (i32.const 20) + ) + ) + (local.set $$5 + (i32.load + (local.get $$output_w6) + ) + ) + (local.set $$output_data7 + (i32.add + (local.get $$stbir_info) + (i32.const 16) + ) + ) + (local.set $$6 + (i32.load + (local.get $$output_data7) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$3) + (i32.const 1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$4) + ) + ) + (local.set $$ring_buffer8 + (i32.add + (local.get $$stbir_info) + (i32.const 180) + ) + ) + (local.set $$7 + (i32.load + (local.get $$ring_buffer8) + ) + ) + (local.set $$ring_buffer_length_bytes + (i32.add + (local.get $$stbir_info) + (i32.const 160) + ) + ) + (local.set $$8 + (i32.load + (local.get $$ring_buffer_length_bytes) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$8) + (i32.const 2) + ) + ) + (local.set $$ring_buffer_begin_index + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$9 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$9) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (local.set $$ring_buffer_first_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (local.set $$10 + (i32.load + (local.get $$ring_buffer_first_scanline) + ) + ) + (local.set $$cmp938 + (i32.lt_s + (local.get $$10) + (local.get $$first_necessary_scanline) + ) + ) + (if + (i32.eqz + (local.get $$cmp938) + ) + (return) + ) + (local.set $$output_h + (i32.add + (local.get $$stbir_info) + (i32.const 24) + ) + ) + (local.set $$ring_buffer_last_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$11 + (local.get $$10) + ) + (loop $while-in + (block $while-out + (local.set $$cmp11 + (i32.gt_s + (local.get $$11) + (i32.const -1) + ) + ) + (if + (local.get $$cmp11) + (block + (local.set $$12 + (i32.load + (local.get $$output_h) + ) + ) + (local.set $$cmp13 + (i32.lt_s + (local.get $$11) + (local.get $$12) + ) + ) + (if + (local.get $$cmp13) + (block + (local.set $$mul16 + (i32.mul + (local.get $$11) + (local.get $$0) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$6) + (local.get $$mul16) + ) + ) + (local.set $$13 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$call + (call $_stbir__get_ring_buffer_entry + (local.get $$7) + (local.get $$13) + (local.get $$div) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$5) + (local.get $$add$ptr) + (local.get $$call) + (local.get $$1) + (local.get $$2) + (local.get $$add) + ) + ) + ) + ) + ) + (local.set $$14 + (i32.load + (local.get $$ring_buffer_first_scanline) + ) + ) + (local.set $$15 + (i32.load + (local.get $$ring_buffer_last_scanline) + ) + ) + (local.set $$cmp19 + (i32.eq + (local.get $$14) + (local.get $$15) + ) + ) + (if + (local.get $$cmp19) + (br $while-out) + ) + (local.set $$inc + (i32.add + (local.get $$14) + (i32.const 1) + ) + ) + (i32.store + (local.get $$ring_buffer_first_scanline) + (local.get $$inc) + ) + (local.set $$16 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$add26 + (i32.add + (local.get $$16) + (i32.const 1) + ) + ) + (local.set $$17 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$add26) + (local.get $$17) + ) + (i32.const -1) + ) + ) + (i32.store + (local.get $$ring_buffer_begin_index) + (local.get $$rem) + ) + (local.set $$cmp9 + (i32.lt_s + (local.get $$inc) + (local.get $$first_necessary_scanline) + ) + ) + (if + (local.get $$cmp9) + (local.set $$11 + (local.get $$inc) + ) + (block + (local.set $label + (i32.const 10) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 10) + ) + (return) + ) + (local.set $$ring_buffer_last_scanline$le + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (i32.store + (local.get $$ring_buffer_begin_index) + (i32.const -1) + ) + (i32.store + (local.get $$ring_buffer_first_scanline) + (i32.const 0) + ) + (i32.store + (local.get $$ring_buffer_last_scanline$le) + (i32.const 0) + ) + (return) + ) + (func $_stbir__decode_and_resample_downsample (; 461 ;) (param $$stbir_info i32) (param $$n i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$call i32) + (local $$channels i32) + (local $$horizontal_buffer i32) + (local $$mul i32) + (local $$mul1 i32) + (local $$output_w i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_stbir__decode_scanline + (local.get $$stbir_info) + (local.get $$n) + ) + (local.set $$horizontal_buffer + (i32.add + (local.get $$stbir_info) + (i32.const 124) + ) + ) + (local.set $$0 + (i32.load + (local.get $$horizontal_buffer) + ) + ) + (local.set $$output_w + (i32.add + (local.get $$stbir_info) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$output_w) + ) + ) + (local.set $$channels + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$2 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$1) + (i32.const 2) + ) + ) + (local.set $$mul1 + (i32.mul + (local.get $$mul) + (local.get $$2) + ) + ) + (drop + (call $_memset + (local.get $$0) + (i32.const 0) + (local.get $$mul1) + ) + ) + (local.set $$call + (call $_stbir__use_width_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$3 + (i32.load + (local.get $$horizontal_buffer) + ) + ) + (if + (local.get $$tobool) + (block + (call $_stbir__resample_horizontal_downsample + (local.get $$stbir_info) + (local.get $$3) + ) + (return) + ) + (block + (call $_stbir__resample_horizontal_upsample + (local.get $$stbir_info) + (local.get $$3) + ) + (return) + ) + ) + ) + (func $_stbir__add_empty_ring_buffer_entry (; 462 ;) (param $$stbir_info i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$add i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp6 i32) + (local $$div i32) + (local $$rem i32) + (local $$ring_buffer7 i32) + (local $$ring_buffer_begin_index i32) + (local $$ring_buffer_first_scanline i32) + (local $$ring_buffer_first_scanline4 i32) + (local $$ring_buffer_index$0 i32) + (local $$ring_buffer_last_scanline i32) + (local $$ring_buffer_length_bytes i32) + (local $$ring_buffer_num_entries i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$ring_buffer_last_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 172) + ) + ) + (i32.store + (local.get $$ring_buffer_last_scanline) + (local.get $$n) + ) + (local.set $$ring_buffer_begin_index + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$0 + (i32.load + (local.get $$ring_buffer_begin_index) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (i32.store + (local.get $$ring_buffer_begin_index) + (i32.const 0) + ) + (local.set $$ring_buffer_first_scanline + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (i32.store + (local.get $$ring_buffer_first_scanline) + (local.get $$n) + ) + (local.set $$ring_buffer_index$0 + (i32.const 0) + ) + ) + (block + (local.set $$ring_buffer_first_scanline4 + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (local.set $$1 + (i32.load + (local.get $$ring_buffer_first_scanline4) + ) + ) + (local.set $$sub + (i32.add + (local.get $$0) + (local.get $$n) + ) + ) + (local.set $$add + (i32.sub + (local.get $$sub) + (local.get $$1) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$2 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$add) + (local.get $$2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$rem) + (local.get $$0) + ) + ) + (if + (local.get $$cmp6) + (call $___assert_fail + (i32.const 13896) + (i32.const 13065) + (i32.const 1431) + (i32.const 13953) + ) + (local.set $$ring_buffer_index$0 + (local.get $$rem) + ) + ) + ) + ) + (local.set $$ring_buffer7 + (i32.add + (local.get $$stbir_info) + (i32.const 180) + ) + ) + (local.set $$3 + (i32.load + (local.get $$ring_buffer7) + ) + ) + (local.set $$ring_buffer_length_bytes + (i32.add + (local.get $$stbir_info) + (i32.const 160) + ) + ) + (local.set $$4 + (i32.load + (local.get $$ring_buffer_length_bytes) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$4) + (i32.const 2) + ) + ) + (local.set $$call + (call $_stbir__get_ring_buffer_entry + (local.get $$3) + (local.get $$ring_buffer_index$0) + (local.get $$div) + ) + ) + (drop + (call $_memset + (local.get $$call) + (i32.const 0) + (local.get $$4) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbir__resample_vertical_downsample (; 463 ;) (param $$stbir_info i32) (param $$n i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 f32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 f32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 i32) + (local $$30 f32) + (local $$31 f32) + (local $$32 f32) + (local $$33 f32) + (local $$34 f32) + (local $$35 f32) + (local $$36 f32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add102 f32) + (local $$add114 i32) + (local $$add119 f32) + (local $$add12 i32) + (local $$add24 f32) + (local $$add36 f32) + (local $$add37 i32) + (local $$add42 f32) + (local $$add57 f32) + (local $$add58 i32) + (local $$add63 f32) + (local $$add64 i32) + (local $$add69 f32) + (local $$add84 f32) + (local $$add85 i32) + (local $$add90 f32) + (local $$add91 i32) + (local $$add96 f32) + (local $$add97 i32) + (local $$arrayidx101 i32) + (local $$arrayidx115 i32) + (local $$arrayidx118 i32) + (local $$arrayidx13 i32) + (local $$arrayidx20 i32) + (local $$arrayidx23 i32) + (local $$arrayidx32 i32) + (local $$arrayidx35 i32) + (local $$arrayidx38 i32) + (local $$arrayidx41 i32) + (local $$arrayidx53 i32) + (local $$arrayidx56 i32) + (local $$arrayidx59 i32) + (local $$arrayidx62 i32) + (local $$arrayidx65 i32) + (local $$arrayidx68 i32) + (local $$arrayidx80 i32) + (local $$arrayidx83 i32) + (local $$arrayidx86 i32) + (local $$arrayidx89 i32) + (local $$arrayidx92 i32) + (local $$arrayidx95 i32) + (local $$arrayidx98 i32) + (local $$c$0129 i32) + (local $$call i32) + (local $$call14 i32) + (local $$channels4 i32) + (local $$cmp i32) + (local $$cmp107130 i32) + (local $$cmp112128 i32) + (local $$cmp132 i32) + (local $$cmp16126 i32) + (local $$cmp27124 i32) + (local $$cmp48122 i32) + (local $$cmp75120 i32) + (local $$div i32) + (local $$exitcond i32) + (local $$exitcond138 i32) + (local $$exitcond139 i32) + (local $$exitcond140 i32) + (local $$exitcond141 i32) + (local $$exitcond142 i32) + (local $$horizontal_buffer5 i32) + (local $$inc i32) + (local $$inc104 i32) + (local $$inc121 i32) + (local $$inc124 i32) + (local $$inc127 i32) + (local $$inc44 i32) + (local $$inc71 i32) + (local $$k$0133 i32) + (local $$mul i32) + (local $$mul110 i32) + (local $$mul116 f32) + (local $$mul21 f32) + (local $$mul30 i32) + (local $$mul33 f32) + (local $$mul39 f32) + (local $$mul51 i32) + (local $$mul54 f32) + (local $$mul60 f32) + (local $$mul66 f32) + (local $$mul78 i32) + (local $$mul81 f32) + (local $$mul87 f32) + (local $$mul93 f32) + (local $$mul99 f32) + (local $$n09 i32) + (local $$n111 i32) + (local $$output_w1 i32) + (local $$ring_buffer6 i32) + (local $$ring_buffer_begin_index7 i32) + (local $$ring_buffer_first_scanline8 i32) + (local $$ring_buffer_length_bytes i32) + (local $$ring_buffer_num_entries i32) + (local $$sub i32) + (local $$tobool i32) + (local $$vertical_coefficient_width i32) + (local $$vertical_coefficients3 i32) + (local $$vertical_contributors2 i32) + (local $$vertical_filter_pixel_margin i32) + (local $$x$0127 i32) + (local $$x$1125 i32) + (local $$x$2123 i32) + (local $$x$3121 i32) + (local $$x$4131 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$output_w1 + (i32.add + (local.get $$stbir_info) + (i32.const 20) + ) + ) + (local.set $$0 + (i32.load + (local.get $$output_w1) + ) + ) + (local.set $$vertical_contributors2 + (i32.add + (local.get $$stbir_info) + (i32.const 108) + ) + ) + (local.set $$1 + (i32.load + (local.get $$vertical_contributors2) + ) + ) + (local.set $$vertical_coefficients3 + (i32.add + (local.get $$stbir_info) + (i32.const 112) + ) + ) + (local.set $$2 + (i32.load + (local.get $$vertical_coefficients3) + ) + ) + (local.set $$channels4 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$3 + (i32.load + (local.get $$channels4) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$4 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$horizontal_buffer5 + (i32.add + (local.get $$stbir_info) + (i32.const 124) + ) + ) + (local.set $$5 + (i32.load + (local.get $$horizontal_buffer5) + ) + ) + (local.set $$vertical_coefficient_width + (i32.add + (local.get $$stbir_info) + (i32.const 132) + ) + ) + (local.set $$6 + (i32.load + (local.get $$vertical_coefficient_width) + ) + ) + (local.set $$vertical_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 148) + ) + ) + (local.set $$7 + (i32.load + (local.get $$vertical_filter_pixel_margin) + ) + ) + (local.set $$add + (i32.add + (local.get $$7) + (local.get $$n) + ) + ) + (local.set $$ring_buffer6 + (i32.add + (local.get $$stbir_info) + (i32.const 180) + ) + ) + (local.set $$8 + (i32.load + (local.get $$ring_buffer6) + ) + ) + (local.set $$ring_buffer_begin_index7 + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$9 + (i32.load + (local.get $$ring_buffer_begin_index7) + ) + ) + (local.set $$ring_buffer_first_scanline8 + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (local.set $$10 + (i32.load + (local.get $$ring_buffer_first_scanline8) + ) + ) + (local.set $$ring_buffer_length_bytes + (i32.add + (local.get $$stbir_info) + (i32.const 160) + ) + ) + (local.set $$11 + (i32.load + (local.get $$ring_buffer_length_bytes) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$11) + (i32.const 2) + ) + ) + (local.set $$n09 + (i32.add + (local.get $$1) + (i32.shl + (local.get $$add) + (i32.const 3) + ) + ) + ) + (local.set $$12 + (i32.load + (local.get $$n09) + ) + ) + (local.set $$n111 + (i32.add + (i32.add + (local.get $$1) + (i32.shl + (local.get $$add) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$13 + (i32.load + (local.get $$n111) + ) + ) + (local.set $$call + (call $_stbir__use_height_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (call $___assert_fail + (i32.const 13706) + (i32.const 13065) + (i32.const 2004) + (i32.const 13860) + ) + ) + (local.set $$cmp132 + (i32.gt_s + (local.get $$12) + (local.get $$13) + ) + ) + (if + (local.get $$cmp132) + (return) + ) + (local.set $$mul + (i32.mul + (local.get $$add) + (local.get $$6) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$mul) + (local.get $$12) + ) + ) + (local.set $$cmp107130 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp16126 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp27124 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp48122 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp75120 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp112128 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (local.set $$k$0133 + (local.get $$12) + ) + (loop $while-in + (block $while-out + (local.set $$add12 + (i32.add + (local.get $$sub) + (local.get $$k$0133) + ) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add12) + (i32.const 2) + ) + ) + ) + (local.set $$14 + (f32.load + (local.get $$arrayidx13) + ) + ) + (local.set $$call14 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$0133) + (local.get $$8) + (local.get $$9) + (local.get $$10) + (local.get $$4) + (local.get $$div) + ) + ) + (block $switch + (block $switch-default + (block $switch-case10 + (block $switch-case7 + (block $switch-case4 + (block $switch-case + (br_table $switch-case $switch-case4 $switch-case7 $switch-case10 $switch-default + (i32.sub + (local.get $$3) + (i32.const 1) + ) + ) + ) + (block + (if + (local.get $$cmp16126) + (block + (local.set $$x$0127 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx20 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$x$0127) + (i32.const 2) + ) + ) + ) + (local.set $$15 + (f32.load + (local.get $$arrayidx20) + ) + ) + (local.set $$mul21 + (f32.mul + (local.get $$14) + (local.get $$15) + ) + ) + (local.set $$arrayidx23 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$x$0127) + (i32.const 2) + ) + ) + ) + (local.set $$16 + (f32.load + (local.get $$arrayidx23) + ) + ) + (local.set $$add24 + (f32.add + (local.get $$16) + (local.get $$mul21) + ) + ) + (f32.store + (local.get $$arrayidx23) + (local.get $$add24) + ) + (local.set $$inc + (i32.add + (local.get $$x$0127) + (i32.const 1) + ) + ) + (local.set $$exitcond140 + (i32.eq + (local.get $$inc) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond140) + (br $while-out0) + (local.set $$x$0127 + (local.get $$inc) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (if + (local.get $$cmp27124) + (block + (local.set $$x$1125 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$mul30 + (i32.shl + (local.get $$x$1125) + (i32.const 1) + ) + ) + (local.set $$arrayidx32 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$mul30) + (i32.const 2) + ) + ) + ) + (local.set $$17 + (f32.load + (local.get $$arrayidx32) + ) + ) + (local.set $$mul33 + (f32.mul + (local.get $$14) + (local.get $$17) + ) + ) + (local.set $$arrayidx35 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$mul30) + (i32.const 2) + ) + ) + ) + (local.set $$18 + (f32.load + (local.get $$arrayidx35) + ) + ) + (local.set $$add36 + (f32.add + (local.get $$18) + (local.get $$mul33) + ) + ) + (f32.store + (local.get $$arrayidx35) + (local.get $$add36) + ) + (local.set $$add37 + (i32.or + (local.get $$mul30) + (i32.const 1) + ) + ) + (local.set $$arrayidx38 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add37) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (f32.load + (local.get $$arrayidx38) + ) + ) + (local.set $$mul39 + (f32.mul + (local.get $$14) + (local.get $$19) + ) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add37) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (f32.load + (local.get $$arrayidx41) + ) + ) + (local.set $$add42 + (f32.add + (local.get $$20) + (local.get $$mul39) + ) + ) + (f32.store + (local.get $$arrayidx41) + (local.get $$add42) + ) + (local.set $$inc44 + (i32.add + (local.get $$x$1125) + (i32.const 1) + ) + ) + (local.set $$exitcond139 + (i32.eq + (local.get $$inc44) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond139) + (br $while-out2) + (local.set $$x$1125 + (local.get $$inc44) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (if + (local.get $$cmp48122) + (block + (local.set $$x$2123 + (i32.const 0) + ) + (loop $while-in6 + (block $while-out5 + (local.set $$mul51 + (i32.mul + (local.get $$x$2123) + (i32.const 3) + ) + ) + (local.set $$arrayidx53 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$mul51) + (i32.const 2) + ) + ) + ) + (local.set $$21 + (f32.load + (local.get $$arrayidx53) + ) + ) + (local.set $$mul54 + (f32.mul + (local.get $$14) + (local.get $$21) + ) + ) + (local.set $$arrayidx56 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$mul51) + (i32.const 2) + ) + ) + ) + (local.set $$22 + (f32.load + (local.get $$arrayidx56) + ) + ) + (local.set $$add57 + (f32.add + (local.get $$22) + (local.get $$mul54) + ) + ) + (f32.store + (local.get $$arrayidx56) + (local.get $$add57) + ) + (local.set $$add58 + (i32.add + (local.get $$mul51) + (i32.const 1) + ) + ) + (local.set $$arrayidx59 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add58) + (i32.const 2) + ) + ) + ) + (local.set $$23 + (f32.load + (local.get $$arrayidx59) + ) + ) + (local.set $$mul60 + (f32.mul + (local.get $$14) + (local.get $$23) + ) + ) + (local.set $$arrayidx62 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add58) + (i32.const 2) + ) + ) + ) + (local.set $$24 + (f32.load + (local.get $$arrayidx62) + ) + ) + (local.set $$add63 + (f32.add + (local.get $$24) + (local.get $$mul60) + ) + ) + (f32.store + (local.get $$arrayidx62) + (local.get $$add63) + ) + (local.set $$add64 + (i32.add + (local.get $$mul51) + (i32.const 2) + ) + ) + (local.set $$arrayidx65 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add64) + (i32.const 2) + ) + ) + ) + (local.set $$25 + (f32.load + (local.get $$arrayidx65) + ) + ) + (local.set $$mul66 + (f32.mul + (local.get $$14) + (local.get $$25) + ) + ) + (local.set $$arrayidx68 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add64) + (i32.const 2) + ) + ) + ) + (local.set $$26 + (f32.load + (local.get $$arrayidx68) + ) + ) + (local.set $$add69 + (f32.add + (local.get $$26) + (local.get $$mul66) + ) + ) + (f32.store + (local.get $$arrayidx68) + (local.get $$add69) + ) + (local.set $$inc71 + (i32.add + (local.get $$x$2123) + (i32.const 1) + ) + ) + (local.set $$exitcond138 + (i32.eq + (local.get $$inc71) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond138) + (br $while-out5) + (local.set $$x$2123 + (local.get $$inc71) + ) + ) + (br $while-in6) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (if + (local.get $$cmp75120) + (block + (local.set $$x$3121 + (i32.const 0) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$mul78 + (i32.shl + (local.get $$x$3121) + (i32.const 2) + ) + ) + (local.set $$arrayidx80 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$mul78) + (i32.const 2) + ) + ) + ) + (local.set $$27 + (f32.load + (local.get $$arrayidx80) + ) + ) + (local.set $$mul81 + (f32.mul + (local.get $$14) + (local.get $$27) + ) + ) + (local.set $$arrayidx83 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$mul78) + (i32.const 2) + ) + ) + ) + (local.set $$28 + (f32.load + (local.get $$arrayidx83) + ) + ) + (local.set $$add84 + (f32.add + (local.get $$28) + (local.get $$mul81) + ) + ) + (f32.store + (local.get $$arrayidx83) + (local.get $$add84) + ) + (local.set $$add85 + (i32.or + (local.get $$mul78) + (i32.const 1) + ) + ) + (local.set $$arrayidx86 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add85) + (i32.const 2) + ) + ) + ) + (local.set $$29 + (f32.load + (local.get $$arrayidx86) + ) + ) + (local.set $$mul87 + (f32.mul + (local.get $$14) + (local.get $$29) + ) + ) + (local.set $$arrayidx89 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add85) + (i32.const 2) + ) + ) + ) + (local.set $$30 + (f32.load + (local.get $$arrayidx89) + ) + ) + (local.set $$add90 + (f32.add + (local.get $$30) + (local.get $$mul87) + ) + ) + (f32.store + (local.get $$arrayidx89) + (local.get $$add90) + ) + (local.set $$add91 + (i32.or + (local.get $$mul78) + (i32.const 2) + ) + ) + (local.set $$arrayidx92 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add91) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (f32.load + (local.get $$arrayidx92) + ) + ) + (local.set $$mul93 + (f32.mul + (local.get $$14) + (local.get $$31) + ) + ) + (local.set $$arrayidx95 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add91) + (i32.const 2) + ) + ) + ) + (local.set $$32 + (f32.load + (local.get $$arrayidx95) + ) + ) + (local.set $$add96 + (f32.add + (local.get $$32) + (local.get $$mul93) + ) + ) + (f32.store + (local.get $$arrayidx95) + (local.get $$add96) + ) + (local.set $$add97 + (i32.or + (local.get $$mul78) + (i32.const 3) + ) + ) + (local.set $$arrayidx98 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add97) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (f32.load + (local.get $$arrayidx98) + ) + ) + (local.set $$mul99 + (f32.mul + (local.get $$14) + (local.get $$33) + ) + ) + (local.set $$arrayidx101 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add97) + (i32.const 2) + ) + ) + ) + (local.set $$34 + (f32.load + (local.get $$arrayidx101) + ) + ) + (local.set $$add102 + (f32.add + (local.get $$34) + (local.get $$mul99) + ) + ) + (f32.store + (local.get $$arrayidx101) + (local.get $$add102) + ) + (local.set $$inc104 + (i32.add + (local.get $$x$3121) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc104) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond) + (br $while-out8) + (local.set $$x$3121 + (local.get $$inc104) + ) + ) + (br $while-in9) + ) + ) + ) + ) + (br $switch) + ) + ) + (if + (local.get $$cmp107130) + (block + (local.set $$x$4131 + (i32.const 0) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$mul110 + (i32.mul + (local.get $$x$4131) + (local.get $$3) + ) + ) + (if + (local.get $$cmp112128) + (block + (local.set $$c$0129 + (i32.const 0) + ) + (loop $while-in14 + (block $while-out13 + (local.set $$add114 + (i32.add + (local.get $$c$0129) + (local.get $$mul110) + ) + ) + (local.set $$arrayidx115 + (i32.add + (local.get $$5) + (i32.shl + (local.get $$add114) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (f32.load + (local.get $$arrayidx115) + ) + ) + (local.set $$mul116 + (f32.mul + (local.get $$14) + (local.get $$35) + ) + ) + (local.set $$arrayidx118 + (i32.add + (local.get $$call14) + (i32.shl + (local.get $$add114) + (i32.const 2) + ) + ) + ) + (local.set $$36 + (f32.load + (local.get $$arrayidx118) + ) + ) + (local.set $$add119 + (f32.add + (local.get $$36) + (local.get $$mul116) + ) + ) + (f32.store + (local.get $$arrayidx118) + (local.get $$add119) + ) + (local.set $$inc121 + (i32.add + (local.get $$c$0129) + (i32.const 1) + ) + ) + (local.set $$exitcond141 + (i32.eq + (local.get $$inc121) + (local.get $$3) + ) + ) + (if + (local.get $$exitcond141) + (br $while-out13) + (local.set $$c$0129 + (local.get $$inc121) + ) + ) + (br $while-in14) + ) + ) + ) + ) + (local.set $$inc124 + (i32.add + (local.get $$x$4131) + (i32.const 1) + ) + ) + (local.set $$exitcond142 + (i32.eq + (local.get $$inc124) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond142) + (br $while-out11) + (local.set $$x$4131 + (local.get $$inc124) + ) + ) + (br $while-in12) + ) + ) + ) + ) + ) + (local.set $$inc127 + (i32.add + (local.get $$k$0133) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$k$0133) + (local.get $$13) + ) + ) + (if + (local.get $$cmp) + (local.set $$k$0133 + (local.get $$inc127) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (return) + ) + (func $_stbir__get_ring_buffer_scanline (; 464 ;) (param $$get_scanline i32) (param $$ring_buffer i32) (param $$begin_index i32) (param $$first_scanline i32) (param $$ring_buffer_num_entries i32) (param $$ring_buffer_length i32) (result i32) + (local $$add i32) + (local $$call i32) + (local $$rem i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (i32.add + (local.get $$begin_index) + (local.get $$get_scanline) + ) + ) + (local.set $$add + (i32.sub + (local.get $$sub) + (local.get $$first_scanline) + ) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$add) + (local.get $$ring_buffer_num_entries) + ) + (i32.const -1) + ) + ) + (local.set $$call + (call $_stbir__get_ring_buffer_entry + (local.get $$ring_buffer) + (local.get $$rem) + (local.get $$ring_buffer_length) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbir__get_ring_buffer_entry (; 465 ;) (param $$ring_buffer i32) (param $$index i32) (param $$ring_buffer_length i32) (result i32) + (local $$arrayidx i32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$ring_buffer_length) + (local.get $$index) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$ring_buffer) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (return + (local.get $$arrayidx) + ) + ) + (func $_stbir__decode_scanline (; 466 ;) (param $$stbir_info i32) (param $$n i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 f32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 f32) + (local $$45 i32) + (local $$46 f32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add118 i32) + (local $$add12 i32) + (local $$add123 i32) + (local $$add132 i32) + (local $$add136 i32) + (local $$add156 i32) + (local $$add161 i32) + (local $$add183 i32) + (local $$add189 i32) + (local $$add198 i32) + (local $$add203 i32) + (local $$add223 i32) + (local $$add225 i32) + (local $$add247 i32) + (local $$add250 i32) + (local $$add259 i32) + (local $$add261 i32) + (local $$add279 i32) + (local $$add285 f32) + (local $$add297 i32) + (local $$add35 i32) + (local $$add37 i32) + (local $$add59 i32) + (local $$add62 i32) + (local $$add68 i32) + (local $$add72 i32) + (local $$add92 i32) + (local $$add96 i32) + (local $$alpha$0 f32) + (local $$alpha_channel2 i32) + (local $$and i32) + (local $$and129 i32) + (local $$and195 i32) + (local $$and256 i32) + (local $$and268 i32) + (local $$arrayidx119 i32) + (local $$arrayidx124 i32) + (local $$arrayidx133 i32) + (local $$arrayidx137 i32) + (local $$arrayidx157 i32) + (local $$arrayidx162 i32) + (local $$arrayidx184 i32) + (local $$arrayidx190 i32) + (local $$arrayidx199 i32) + (local $$arrayidx204 i32) + (local $$arrayidx224 i32) + (local $$arrayidx226 i32) + (local $$arrayidx248 i32) + (local $$arrayidx251 i32) + (local $$arrayidx260 i32) + (local $$arrayidx262 i32) + (local $$arrayidx280 i32) + (local $$arrayidx298 i32) + (local $$arrayidx36 i32) + (local $$arrayidx38 i32) + (local $$arrayidx60 i32) + (local $$arrayidx61 i32) + (local $$arrayidx63 i32) + (local $$arrayidx69 i32) + (local $$arrayidx73 i32) + (local $$arrayidx93 i32) + (local $$arrayidx97 i32) + (local $$c$1278 i32) + (local $$c$2282 i32) + (local $$c$3286 i32) + (local $$c$4290 i32) + (local $$c$5294 i32) + (local $$c$6298 i32) + (local $$c$7302 i32) + (local $$c$8306 i32) + (local $$c$9274 i32) + (local $$call i32) + (local $$call112 i32) + (local $$call122 f32) + (local $$call150 i32) + (local $$call177 i32) + (local $$call188 f32) + (local $$call217 i32) + (local $$call241 i32) + (local $$call249 f32) + (local $$call30 i32) + (local $$call53 i32) + (local $$call86 i32) + (local $$call9 i32) + (local $$channels1 i32) + (local $$cmp i32) + (local $$cmp106291 i32) + (local $$cmp115289 i32) + (local $$cmp14 i32) + (local $$cmp144295 i32) + (local $$cmp153293 i32) + (local $$cmp16 i32) + (local $$cmp171299 i32) + (local $$cmp17263 i32) + (local $$cmp180297 i32) + (local $$cmp19261 i32) + (local $$cmp211303 i32) + (local $$cmp220301 i32) + (local $$cmp235307 i32) + (local $$cmp244305 i32) + (local $$cmp27279 i32) + (local $$cmp274275 i32) + (local $$cmp282 i32) + (local $$cmp290273 i32) + (local $$cmp293 i32) + (local $$cmp307 i32) + (local $$cmp313271 i32) + (local $$cmp317269 i32) + (local $$cmp330 i32) + (local $$cmp330267 i32) + (local $$cmp33277 i32) + (local $$cmp334265 i32) + (local $$cmp47283 i32) + (local $$cmp56281 i32) + (local $$cmp80287 i32) + (local $$cmp89285 i32) + (local $$colorspace4 i32) + (local $$conv f32) + (local $$conv120 f32) + (local $$conv134 f32) + (local $$conv158 f64) + (local $$conv160 f32) + (local $$conv185 f64) + (local $$conv187 f32) + (local $$conv200 f64) + (local $$conv202 f32) + (local $$conv70 f32) + (local $$conv94 f32) + (local $$div f32) + (local $$div121 f32) + (local $$div135 f32) + (local $$div159 f64) + (local $$div186 f64) + (local $$div201 f64) + (local $$div71 f32) + (local $$div95 f32) + (local $$edge_horizontal7 i32) + (local $$edge_vertical8 i32) + (local $$exitcond i32) + (local $$exitcond328 i32) + (local $$exitcond329 i32) + (local $$exitcond330 i32) + (local $$exitcond331 i32) + (local $$exitcond332 i32) + (local $$exitcond333 i32) + (local $$exitcond334 i32) + (local $$exitcond335 i32) + (local $$exitcond336 i32) + (local $$exitcond337 i32) + (local $$exitcond338 i32) + (local $$exitcond339 i32) + (local $$exitcond340 i32) + (local $$exitcond341 i32) + (local $$exitcond342 i32) + (local $$exitcond343 i32) + (local $$exitcond348 i32) + (local $$exitcond349 i32) + (local $$exitcond350 i32) + (local $$flags i32) + (local $$flags128 i32) + (local $$flags194 i32) + (local $$flags255 i32) + (local $$flags267 i32) + (local $$horizontal_filter_pixel_margin i32) + (local $$idxprom i32) + (local $$inc102 i32) + (local $$inc126 i32) + (local $$inc140 i32) + (local $$inc164 i32) + (local $$inc167 i32) + (local $$inc192 i32) + (local $$inc207 i32) + (local $$inc228 i32) + (local $$inc231 i32) + (local $$inc253 i32) + (local $$inc265 i32) + (local $$inc301 i32) + (local $$inc304 i32) + (local $$inc344 i32) + (local $$inc40 i32) + (local $$inc43 i32) + (local $$inc65 i32) + (local $$inc76 i32) + (local $$inc99 i32) + (local $$indvar i32) + (local $$indvar$next i32) + (local $$indvar$next320 i32) + (local $$indvar$next325 i32) + (local $$indvar319 i32) + (local $$indvar324 i32) + (local $$input_h i32) + (local $$input_stride_bytes6 i32) + (local $$input_w5 i32) + (local $$mul i32) + (local $$mul11 i32) + (local $$mul110 i32) + (local $$mul113 i32) + (local $$mul148 i32) + (local $$mul151 i32) + (local $$mul175 i32) + (local $$mul178 i32) + (local $$mul215 i32) + (local $$mul218 i32) + (local $$mul239 i32) + (local $$mul242 i32) + (local $$mul278 i32) + (local $$mul29 i32) + (local $$mul299 f32) + (local $$mul31 i32) + (local $$mul51 i32) + (local $$mul54 i32) + (local $$mul84 i32) + (local $$mul87 i32) + (local $$scevgep i32) + (local $$scevgep321 i32) + (local $$scevgep326 i32) + (local $$sub i32) + (local $$sub272 i32) + (local $$tobool i32) + (local $$tobool130 i32) + (local $$tobool196 i32) + (local $$tobool257 i32) + (local $$tobool269 i32) + (local $$type3 i32) + (local $$x$11268 i32) + (local $$x$1280 i32) + (local $$x$2284 i32) + (local $$x$3288 i32) + (local $$x$4292 i32) + (local $$x$5296 i32) + (local $$x$6300 i32) + (local $$x$7304 i32) + (local $$x$8308 i32) + (local $$x$9276 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$channels1 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$0 + (i32.load + (local.get $$channels1) + ) + ) + (local.set $$alpha_channel2 + (i32.add + (local.get $$stbir_info) + (i32.const 68) + ) + ) + (local.set $$1 + (i32.load + (local.get $$alpha_channel2) + ) + ) + (local.set $$type3 + (i32.add + (local.get $$stbir_info) + (i32.const 76) + ) + ) + (local.set $$2 + (i32.load + (local.get $$type3) + ) + ) + (local.set $$colorspace4 + (i32.add + (local.get $$stbir_info) + (i32.const 96) + ) + ) + (local.set $$3 + (i32.load + (local.get $$colorspace4) + ) + ) + (local.set $$input_w5 + (i32.add + (local.get $$stbir_info) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$input_w5) + ) + ) + (local.set $$input_stride_bytes6 + (i32.add + (local.get $$stbir_info) + (i32.const 12) + ) + ) + (local.set $$5 + (i32.load + (local.get $$input_stride_bytes6) + ) + ) + (local.set $$call + (call $_stbir__get_decode_buffer + (local.get $$stbir_info) + ) + ) + (local.set $$edge_horizontal7 + (i32.add + (local.get $$stbir_info) + (i32.const 88) + ) + ) + (local.set $$6 + (i32.load + (local.get $$edge_horizontal7) + ) + ) + (local.set $$edge_vertical8 + (i32.add + (local.get $$stbir_info) + (i32.const 92) + ) + ) + (local.set $$7 + (i32.load + (local.get $$edge_vertical8) + ) + ) + (local.set $$input_h + (i32.add + (local.get $$stbir_info) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$call9 + (call $_stbir__edge_wrap + (local.get $$7) + (local.get $$n) + (local.get $$8) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$call9) + (local.get $$5) + ) + ) + (local.set $$9 + (i32.load + (local.get $$stbir_info) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$9) + (local.get $$mul) + ) + ) + (local.set $$horizontal_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 144) + ) + ) + (local.set $$10 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$add + (i32.add + (local.get $$10) + (local.get $$4) + ) + ) + (local.set $$mul11 + (i32.shl + (local.get $$2) + (i32.const 1) + ) + ) + (local.set $$add12 + (i32.add + (local.get $$mul11) + (local.get $$3) + ) + ) + (local.set $$sub + (i32.sub + (i32.const 0) + (local.get $$10) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$7) + (i32.const 4) + ) + ) + (block $do-once + (if + (local.get $$cmp) + (block + (local.set $$cmp14 + (i32.lt_s + (local.get $$n) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp14) + ) + (block + (local.set $$11 + (i32.load + (local.get $$input_h) + ) + ) + (local.set $$cmp16 + (i32.gt_s + (local.get $$11) + (local.get $$n) + ) + ) + (if + (local.get $$cmp16) + (br $do-once) + ) + ) + ) + (local.set $$cmp17263 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (i32.eqz + (local.get $$cmp17263) + ) + (return) + ) + (local.set $$cmp19261 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$12 + (i32.shl + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$13 + (i32.shl + (local.get $$10) + (i32.const 1) + ) + ) + (local.set $$14 + (i32.add + (local.get $$4) + (local.get $$13) + ) + ) + (local.set $$indvar + (i32.const 0) + ) + (loop $while-in + (block $while-out + (if + (local.get $$cmp19261) + (block + (local.set $$15 + (i32.sub + (local.get $$indvar) + (local.get $$10) + ) + ) + (local.set $$16 + (i32.mul + (local.get $$0) + (local.get $$15) + ) + ) + (local.set $$scevgep + (i32.add + (local.get $$call) + (i32.shl + (local.get $$16) + (i32.const 2) + ) + ) + ) + (drop + (call $_memset + (local.get $$scevgep) + (i32.const 0) + (local.get $$12) + ) + ) + ) + ) + (local.set $$indvar$next + (i32.add + (local.get $$indvar) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$indvar$next) + (local.get $$14) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$indvar + (local.get $$indvar$next) + ) + ) + (br $while-in) + ) + ) + (return) + ) + ) + ) + (block $switch + (block $switch-default + (block $switch-case38 + (block $switch-case33 + (block $switch-case28 + (block $switch-case23 + (block $switch-case18 + (block $switch-case13 + (block $switch-case8 + (block $switch-case + (br_table $switch-case $switch-case8 $switch-case13 $switch-case18 $switch-case23 $switch-case28 $switch-case33 $switch-case38 $switch-default + (i32.sub + (local.get $$add12) + (i32.const 0) + ) + ) + ) + (block + (local.set $$cmp27279 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp27279) + (block + (local.set $$cmp33277 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$17 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$1280 + (local.get $$sub) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$mul29 + (i32.mul + (local.get $$x$1280) + (local.get $$0) + ) + ) + (local.set $$call30 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$1280) + (local.get $$4) + ) + ) + (local.set $$mul31 + (i32.mul + (local.get $$call30) + (local.get $$0) + ) + ) + (if + (local.get $$cmp33277) + (block + (local.set $$c$1278 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$add35 + (i32.add + (local.get $$c$1278) + (local.get $$mul31) + ) + ) + (local.set $$arrayidx36 + (i32.add + (local.get $$add$ptr) + (local.get $$add35) + ) + ) + (local.set $$18 + (i32.load8_s + (local.get $$arrayidx36) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (i32.and + (local.get $$18) + (i32.const 255) + ) + ) + ) + (local.set $$div + (f32.div + (local.get $$conv) + (f32.const 255) + ) + ) + (local.set $$add37 + (i32.add + (local.get $$c$1278) + (local.get $$mul29) + ) + ) + (local.set $$arrayidx38 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add37) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx38) + (local.get $$div) + ) + (local.set $$inc40 + (i32.add + (local.get $$c$1278) + (i32.const 1) + ) + ) + (local.set $$exitcond331 + (i32.eq + (local.get $$inc40) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond331) + (br $while-out2) + (local.set $$c$1278 + (local.get $$inc40) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (local.set $$inc43 + (i32.add + (local.get $$x$1280) + (i32.const 1) + ) + ) + (local.set $$exitcond332 + (i32.eq + (local.get $$inc43) + (local.get $$17) + ) + ) + (if + (local.get $$exitcond332) + (br $while-out0) + (local.set $$x$1280 + (local.get $$inc43) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp47283 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp47283) + (block + (local.set $$cmp56281 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$flags + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$19 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$2284 + (local.get $$sub) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$mul51 + (i32.mul + (local.get $$x$2284) + (local.get $$0) + ) + ) + (local.set $$call53 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$2284) + (local.get $$4) + ) + ) + (local.set $$mul54 + (i32.mul + (local.get $$call53) + (local.get $$0) + ) + ) + (if + (local.get $$cmp56281) + (block + (local.set $$c$2282 + (i32.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$add59 + (i32.add + (local.get $$c$2282) + (local.get $$mul54) + ) + ) + (local.set $$arrayidx60 + (i32.add + (local.get $$add$ptr) + (local.get $$add59) + ) + ) + (local.set $$20 + (i32.load8_s + (local.get $$arrayidx60) + ) + ) + (local.set $$idxprom + (i32.and + (local.get $$20) + (i32.const 255) + ) + ) + (local.set $$arrayidx61 + (i32.add + (i32.const 4048) + (i32.shl + (local.get $$idxprom) + (i32.const 2) + ) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx61) + ) + ) + (local.set $$add62 + (i32.add + (local.get $$c$2282) + (local.get $$mul51) + ) + ) + (local.set $$arrayidx63 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add62) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx63) + (local.get $$21) + ) + (local.set $$inc65 + (i32.add + (local.get $$c$2282) + (i32.const 1) + ) + ) + (local.set $$exitcond333 + (i32.eq + (local.get $$inc65) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond333) + (br $while-out6) + (local.set $$c$2282 + (local.get $$inc65) + ) + ) + (br $while-in7) + ) + ) + ) + ) + (local.set $$22 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and + (i32.and + (local.get $$22) + (i32.const 2) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$add72 + (i32.add + (local.get $$mul51) + (local.get $$1) + ) + ) + (local.set $$arrayidx73 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add72) + (i32.const 2) + ) + ) + ) + (local.set $$add68 + (i32.add + (local.get $$mul54) + (local.get $$1) + ) + ) + (local.set $$arrayidx69 + (i32.add + (local.get $$add$ptr) + (local.get $$add68) + ) + ) + (local.set $$23 + (i32.load8_s + (local.get $$arrayidx69) + ) + ) + (local.set $$conv70 + (f32.convert_i32_s + (i32.and + (local.get $$23) + (i32.const 255) + ) + ) + ) + (local.set $$div71 + (f32.div + (local.get $$conv70) + (f32.const 255) + ) + ) + (f32.store + (local.get $$arrayidx73) + (local.get $$div71) + ) + ) + ) + (local.set $$inc76 + (i32.add + (local.get $$x$2284) + (i32.const 1) + ) + ) + (local.set $$exitcond334 + (i32.eq + (local.get $$inc76) + (local.get $$19) + ) + ) + (if + (local.get $$exitcond334) + (br $while-out4) + (local.set $$x$2284 + (local.get $$inc76) + ) + ) + (br $while-in5) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp80287 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp80287) + (block + (local.set $$cmp89285 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$24 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$3288 + (local.get $$sub) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$mul84 + (i32.mul + (local.get $$x$3288) + (local.get $$0) + ) + ) + (local.set $$call86 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$3288) + (local.get $$4) + ) + ) + (local.set $$mul87 + (i32.mul + (local.get $$call86) + (local.get $$0) + ) + ) + (if + (local.get $$cmp89285) + (block + (local.set $$c$3286 + (i32.const 0) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$add92 + (i32.add + (local.get $$c$3286) + (local.get $$mul87) + ) + ) + (local.set $$arrayidx93 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add92) + (i32.const 1) + ) + ) + ) + (local.set $$25 + (i32.load16_s + (local.get $$arrayidx93) + ) + ) + (local.set $$conv94 + (f32.convert_i32_s + (i32.and + (local.get $$25) + (i32.const 65535) + ) + ) + ) + (local.set $$div95 + (f32.div + (local.get $$conv94) + (f32.const 65535) + ) + ) + (local.set $$add96 + (i32.add + (local.get $$c$3286) + (local.get $$mul84) + ) + ) + (local.set $$arrayidx97 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add96) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx97) + (local.get $$div95) + ) + (local.set $$inc99 + (i32.add + (local.get $$c$3286) + (i32.const 1) + ) + ) + (local.set $$exitcond335 + (i32.eq + (local.get $$inc99) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond335) + (br $while-out11) + (local.set $$c$3286 + (local.get $$inc99) + ) + ) + (br $while-in12) + ) + ) + ) + ) + (local.set $$inc102 + (i32.add + (local.get $$x$3288) + (i32.const 1) + ) + ) + (local.set $$exitcond336 + (i32.eq + (local.get $$inc102) + (local.get $$24) + ) + ) + (if + (local.get $$exitcond336) + (br $while-out9) + (local.set $$x$3288 + (local.get $$inc102) + ) + ) + (br $while-in10) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp106291 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp106291) + (block + (local.set $$cmp115289 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$flags128 + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$26 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$4292 + (local.get $$sub) + ) + (loop $while-in15 + (block $while-out14 + (local.set $$mul110 + (i32.mul + (local.get $$x$4292) + (local.get $$0) + ) + ) + (local.set $$call112 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$4292) + (local.get $$4) + ) + ) + (local.set $$mul113 + (i32.mul + (local.get $$call112) + (local.get $$0) + ) + ) + (if + (local.get $$cmp115289) + (block + (local.set $$c$4290 + (i32.const 0) + ) + (loop $while-in17 + (block $while-out16 + (local.set $$add118 + (i32.add + (local.get $$c$4290) + (local.get $$mul113) + ) + ) + (local.set $$arrayidx119 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add118) + (i32.const 1) + ) + ) + ) + (local.set $$27 + (i32.load16_s + (local.get $$arrayidx119) + ) + ) + (local.set $$conv120 + (f32.convert_i32_s + (i32.and + (local.get $$27) + (i32.const 65535) + ) + ) + ) + (local.set $$div121 + (f32.div + (local.get $$conv120) + (f32.const 65535) + ) + ) + (local.set $$call122 + (call $_stbir__srgb_to_linear + (local.get $$div121) + ) + ) + (local.set $$add123 + (i32.add + (local.get $$c$4290) + (local.get $$mul110) + ) + ) + (local.set $$arrayidx124 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add123) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx124) + (local.get $$call122) + ) + (local.set $$inc126 + (i32.add + (local.get $$c$4290) + (i32.const 1) + ) + ) + (local.set $$exitcond337 + (i32.eq + (local.get $$inc126) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond337) + (br $while-out16) + (local.set $$c$4290 + (local.get $$inc126) + ) + ) + (br $while-in17) + ) + ) + ) + ) + (local.set $$28 + (i32.load + (local.get $$flags128) + ) + ) + (local.set $$and129 + (i32.and + (local.get $$28) + (i32.const 2) + ) + ) + (local.set $$tobool130 + (i32.eq + (local.get $$and129) + (i32.const 0) + ) + ) + (if + (local.get $$tobool130) + (block + (local.set $$add136 + (i32.add + (local.get $$mul110) + (local.get $$1) + ) + ) + (local.set $$arrayidx137 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add136) + (i32.const 2) + ) + ) + ) + (local.set $$add132 + (i32.add + (local.get $$mul113) + (local.get $$1) + ) + ) + (local.set $$arrayidx133 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add132) + (i32.const 1) + ) + ) + ) + (local.set $$29 + (i32.load16_s + (local.get $$arrayidx133) + ) + ) + (local.set $$conv134 + (f32.convert_i32_s + (i32.and + (local.get $$29) + (i32.const 65535) + ) + ) + ) + (local.set $$div135 + (f32.div + (local.get $$conv134) + (f32.const 65535) + ) + ) + (f32.store + (local.get $$arrayidx137) + (local.get $$div135) + ) + ) + ) + (local.set $$inc140 + (i32.add + (local.get $$x$4292) + (i32.const 1) + ) + ) + (local.set $$exitcond338 + (i32.eq + (local.get $$inc140) + (local.get $$26) + ) + ) + (if + (local.get $$exitcond338) + (br $while-out14) + (local.set $$x$4292 + (local.get $$inc140) + ) + ) + (br $while-in15) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp144295 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp144295) + (block + (local.set $$cmp153293 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$30 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$5296 + (local.get $$sub) + ) + (loop $while-in20 + (block $while-out19 + (local.set $$mul148 + (i32.mul + (local.get $$x$5296) + (local.get $$0) + ) + ) + (local.set $$call150 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$5296) + (local.get $$4) + ) + ) + (local.set $$mul151 + (i32.mul + (local.get $$call150) + (local.get $$0) + ) + ) + (if + (local.get $$cmp153293) + (block + (local.set $$c$5294 + (i32.const 0) + ) + (loop $while-in22 + (block $while-out21 + (local.set $$add156 + (i32.add + (local.get $$c$5294) + (local.get $$mul151) + ) + ) + (local.set $$arrayidx157 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add156) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (i32.load + (local.get $$arrayidx157) + ) + ) + (local.set $$conv158 + (f64.convert_i32_u + (local.get $$31) + ) + ) + (local.set $$div159 + (f64.div + (local.get $$conv158) + (f64.const 4294967295) + ) + ) + (local.set $$conv160 + (f32.demote_f64 + (local.get $$div159) + ) + ) + (local.set $$add161 + (i32.add + (local.get $$c$5294) + (local.get $$mul148) + ) + ) + (local.set $$arrayidx162 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add161) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx162) + (local.get $$conv160) + ) + (local.set $$inc164 + (i32.add + (local.get $$c$5294) + (i32.const 1) + ) + ) + (local.set $$exitcond339 + (i32.eq + (local.get $$inc164) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond339) + (br $while-out21) + (local.set $$c$5294 + (local.get $$inc164) + ) + ) + (br $while-in22) + ) + ) + ) + ) + (local.set $$inc167 + (i32.add + (local.get $$x$5296) + (i32.const 1) + ) + ) + (local.set $$exitcond340 + (i32.eq + (local.get $$inc167) + (local.get $$30) + ) + ) + (if + (local.get $$exitcond340) + (br $while-out19) + (local.set $$x$5296 + (local.get $$inc167) + ) + ) + (br $while-in20) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp171299 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp171299) + (block + (local.set $$cmp180297 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$flags194 + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$32 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$6300 + (local.get $$sub) + ) + (loop $while-in25 + (block $while-out24 + (local.set $$mul175 + (i32.mul + (local.get $$x$6300) + (local.get $$0) + ) + ) + (local.set $$call177 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$6300) + (local.get $$4) + ) + ) + (local.set $$mul178 + (i32.mul + (local.get $$call177) + (local.get $$0) + ) + ) + (if + (local.get $$cmp180297) + (block + (local.set $$c$6298 + (i32.const 0) + ) + (loop $while-in27 + (block $while-out26 + (local.set $$add183 + (i32.add + (local.get $$c$6298) + (local.get $$mul178) + ) + ) + (local.set $$arrayidx184 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add183) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (i32.load + (local.get $$arrayidx184) + ) + ) + (local.set $$conv185 + (f64.convert_i32_u + (local.get $$33) + ) + ) + (local.set $$div186 + (f64.div + (local.get $$conv185) + (f64.const 4294967295) + ) + ) + (local.set $$conv187 + (f32.demote_f64 + (local.get $$div186) + ) + ) + (local.set $$call188 + (call $_stbir__srgb_to_linear + (local.get $$conv187) + ) + ) + (local.set $$add189 + (i32.add + (local.get $$c$6298) + (local.get $$mul175) + ) + ) + (local.set $$arrayidx190 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add189) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx190) + (local.get $$call188) + ) + (local.set $$inc192 + (i32.add + (local.get $$c$6298) + (i32.const 1) + ) + ) + (local.set $$exitcond341 + (i32.eq + (local.get $$inc192) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond341) + (br $while-out26) + (local.set $$c$6298 + (local.get $$inc192) + ) + ) + (br $while-in27) + ) + ) + ) + ) + (local.set $$34 + (i32.load + (local.get $$flags194) + ) + ) + (local.set $$and195 + (i32.and + (local.get $$34) + (i32.const 2) + ) + ) + (local.set $$tobool196 + (i32.eq + (local.get $$and195) + (i32.const 0) + ) + ) + (if + (local.get $$tobool196) + (block + (local.set $$add198 + (i32.add + (local.get $$mul178) + (local.get $$1) + ) + ) + (local.set $$arrayidx199 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add198) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (i32.load + (local.get $$arrayidx199) + ) + ) + (local.set $$conv200 + (f64.convert_i32_u + (local.get $$35) + ) + ) + (local.set $$div201 + (f64.div + (local.get $$conv200) + (f64.const 4294967295) + ) + ) + (local.set $$conv202 + (f32.demote_f64 + (local.get $$div201) + ) + ) + (local.set $$add203 + (i32.add + (local.get $$mul175) + (local.get $$1) + ) + ) + (local.set $$arrayidx204 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add203) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx204) + (local.get $$conv202) + ) + ) + ) + (local.set $$inc207 + (i32.add + (local.get $$x$6300) + (i32.const 1) + ) + ) + (local.set $$exitcond342 + (i32.eq + (local.get $$inc207) + (local.get $$32) + ) + ) + (if + (local.get $$exitcond342) + (br $while-out24) + (local.set $$x$6300 + (local.get $$inc207) + ) + ) + (br $while-in25) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp211303 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp211303) + (block + (local.set $$cmp220301 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$36 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$7304 + (local.get $$sub) + ) + (loop $while-in30 + (block $while-out29 + (local.set $$mul215 + (i32.mul + (local.get $$x$7304) + (local.get $$0) + ) + ) + (local.set $$call217 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$7304) + (local.get $$4) + ) + ) + (local.set $$mul218 + (i32.mul + (local.get $$call217) + (local.get $$0) + ) + ) + (if + (local.get $$cmp220301) + (block + (local.set $$c$7302 + (i32.const 0) + ) + (loop $while-in32 + (block $while-out31 + (local.set $$add223 + (i32.add + (local.get $$c$7302) + (local.get $$mul218) + ) + ) + (local.set $$arrayidx224 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add223) + (i32.const 2) + ) + ) + ) + (local.set $$37 + (i32.load + (local.get $$arrayidx224) + ) + ) + (local.set $$add225 + (i32.add + (local.get $$c$7302) + (local.get $$mul215) + ) + ) + (local.set $$arrayidx226 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add225) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx226) + (local.get $$37) + ) + (local.set $$inc228 + (i32.add + (local.get $$c$7302) + (i32.const 1) + ) + ) + (local.set $$exitcond343 + (i32.eq + (local.get $$inc228) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond343) + (br $while-out31) + (local.set $$c$7302 + (local.get $$inc228) + ) + ) + (br $while-in32) + ) + ) + ) + ) + (local.set $$inc231 + (i32.add + (local.get $$x$7304) + (i32.const 1) + ) + ) + (local.set $$exitcond348 + (i32.eq + (local.get $$inc231) + (local.get $$36) + ) + ) + (if + (local.get $$exitcond348) + (br $while-out29) + (local.set $$x$7304 + (local.get $$inc231) + ) + ) + (br $while-in30) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp235307 + (i32.gt_s + (local.get $$add) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp235307) + (block + (local.set $$cmp244305 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$flags255 + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$38 + (i32.add + (local.get $$4) + (local.get $$10) + ) + ) + (local.set $$x$8308 + (local.get $$sub) + ) + (loop $while-in35 + (block $while-out34 + (local.set $$mul239 + (i32.mul + (local.get $$x$8308) + (local.get $$0) + ) + ) + (local.set $$call241 + (call $_stbir__edge_wrap + (local.get $$6) + (local.get $$x$8308) + (local.get $$4) + ) + ) + (local.set $$mul242 + (i32.mul + (local.get $$call241) + (local.get $$0) + ) + ) + (if + (local.get $$cmp244305) + (block + (local.set $$c$8306 + (i32.const 0) + ) + (loop $while-in37 + (block $while-out36 + (local.set $$add247 + (i32.add + (local.get $$c$8306) + (local.get $$mul242) + ) + ) + (local.set $$arrayidx248 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add247) + (i32.const 2) + ) + ) + ) + (local.set $$39 + (f32.load + (local.get $$arrayidx248) + ) + ) + (local.set $$call249 + (call $_stbir__srgb_to_linear + (local.get $$39) + ) + ) + (local.set $$add250 + (i32.add + (local.get $$c$8306) + (local.get $$mul239) + ) + ) + (local.set $$arrayidx251 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add250) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx251) + (local.get $$call249) + ) + (local.set $$inc253 + (i32.add + (local.get $$c$8306) + (i32.const 1) + ) + ) + (local.set $$exitcond349 + (i32.eq + (local.get $$inc253) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond349) + (br $while-out36) + (local.set $$c$8306 + (local.get $$inc253) + ) + ) + (br $while-in37) + ) + ) + ) + ) + (local.set $$40 + (i32.load + (local.get $$flags255) + ) + ) + (local.set $$and256 + (i32.and + (local.get $$40) + (i32.const 2) + ) + ) + (local.set $$tobool257 + (i32.eq + (local.get $$and256) + (i32.const 0) + ) + ) + (if + (local.get $$tobool257) + (block + (local.set $$add261 + (i32.add + (local.get $$mul239) + (local.get $$1) + ) + ) + (local.set $$arrayidx262 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add261) + (i32.const 2) + ) + ) + ) + (local.set $$add259 + (i32.add + (local.get $$mul242) + (local.get $$1) + ) + ) + (local.set $$arrayidx260 + (i32.add + (local.get $$add$ptr) + (i32.shl + (local.get $$add259) + (i32.const 2) + ) + ) + ) + (local.set $$41 + (i32.load + (local.get $$arrayidx260) + ) + ) + (i32.store + (local.get $$arrayidx262) + (local.get $$41) + ) + ) + ) + (local.set $$inc265 + (i32.add + (local.get $$x$8308) + (i32.const 1) + ) + ) + (local.set $$exitcond350 + (i32.eq + (local.get $$inc265) + (local.get $$38) + ) + ) + (if + (local.get $$exitcond350) + (br $while-out34) + (local.set $$x$8308 + (local.get $$inc265) + ) + ) + (br $while-in35) + ) + ) + ) + ) + (br $switch) + ) + ) + (call $___assert_fail + (i32.const 14369) + (i32.const 13065) + (i32.const 1368) + (i32.const 14418) + ) + ) + (local.set $$flags267 + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$42 + (i32.load + (local.get $$flags267) + ) + ) + (local.set $$and268 + (i32.and + (local.get $$42) + (i32.const 1) + ) + ) + (local.set $$tobool269 + (i32.eq + (local.get $$and268) + (i32.const 0) + ) + ) + (if + (local.get $$tobool269) + (block + (local.set $$43 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$sub272 + (i32.sub + (i32.const 0) + (local.get $$43) + ) + ) + (local.set $$cmp274275 + (i32.gt_s + (local.get $$add) + (local.get $$sub272) + ) + ) + (if + (local.get $$cmp274275) + (block + (local.set $$cmp290273 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$x$9276 + (local.get $$sub272) + ) + (loop $while-in40 + (block $while-out39 + (local.set $$mul278 + (i32.mul + (local.get $$x$9276) + (local.get $$0) + ) + ) + (local.set $$add279 + (i32.add + (local.get $$mul278) + (local.get $$1) + ) + ) + (local.set $$arrayidx280 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add279) + (i32.const 2) + ) + ) + ) + (local.set $$44 + (f32.load + (local.get $$arrayidx280) + ) + ) + (local.set $$45 + (i32.load + (local.get $$type3) + ) + ) + (local.set $$cmp282 + (i32.eq + (local.get $$45) + (i32.const 3) + ) + ) + (local.set $$add285 + (f32.add + (local.get $$44) + (f32.const 8.271806125530277e-25) + ) + ) + (if + (local.get $$cmp282) + (local.set $$alpha$0 + (local.get $$44) + ) + (block + (f32.store + (local.get $$arrayidx280) + (local.get $$add285) + ) + (local.set $$alpha$0 + (local.get $$add285) + ) + ) + ) + (if + (local.get $$cmp290273) + (block + (local.set $$c$9274 + (i32.const 0) + ) + (loop $while-in42 + (block $while-out41 + (local.set $$cmp293 + (i32.eq + (local.get $$c$9274) + (local.get $$1) + ) + ) + (local.set $$add297 + (i32.add + (local.get $$c$9274) + (local.get $$mul278) + ) + ) + (local.set $$arrayidx298 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add297) + (i32.const 2) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp293) + ) + (block + (local.set $$46 + (f32.load + (local.get $$arrayidx298) + ) + ) + (local.set $$mul299 + (f32.mul + (local.get $$alpha$0) + (local.get $$46) + ) + ) + (f32.store + (local.get $$arrayidx298) + (local.get $$mul299) + ) + ) + ) + (local.set $$inc301 + (i32.add + (local.get $$c$9274) + (i32.const 1) + ) + ) + (local.set $$exitcond329 + (i32.eq + (local.get $$inc301) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond329) + (br $while-out41) + (local.set $$c$9274 + (local.get $$inc301) + ) + ) + (br $while-in42) + ) + ) + ) + ) + (local.set $$inc304 + (i32.add + (local.get $$x$9276) + (i32.const 1) + ) + ) + (local.set $$exitcond330 + (i32.eq + (local.get $$inc304) + (local.get $$add) + ) + ) + (if + (local.get $$exitcond330) + (br $while-out39) + (local.set $$x$9276 + (local.get $$inc304) + ) + ) + (br $while-in40) + ) + ) + ) + ) + ) + ) + (local.set $$cmp307 + (i32.eq + (local.get $$6) + (i32.const 4) + ) + ) + (if + (i32.eqz + (local.get $$cmp307) + ) + (return) + ) + (local.set $$47 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$cmp313271 + (i32.gt_s + (local.get $$47) + (i32.const 0) + ) + ) + (if + (local.get $$cmp313271) + (block + (local.set $$cmp317269 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$48 + (i32.shl + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$indvar324 + (i32.const 0) + ) + (loop $while-in44 + (block $while-out43 + (if + (local.get $$cmp317269) + (block + (local.set $$49 + (i32.sub + (local.get $$indvar324) + (local.get $$47) + ) + ) + (local.set $$50 + (i32.mul + (local.get $$0) + (local.get $$49) + ) + ) + (local.set $$scevgep326 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$50) + (i32.const 2) + ) + ) + ) + (drop + (call $_memset + (local.get $$scevgep326) + (i32.const 0) + (local.get $$48) + ) + ) + ) + ) + (local.set $$indvar$next325 + (i32.add + (local.get $$indvar324) + (i32.const 1) + ) + ) + (local.set $$exitcond328 + (i32.eq + (local.get $$indvar$next325) + (local.get $$47) + ) + ) + (if + (local.get $$exitcond328) + (br $while-out43) + (local.set $$indvar324 + (local.get $$indvar$next325) + ) + ) + (br $while-in44) + ) + ) + ) + ) + (local.set $$cmp330267 + (i32.gt_s + (local.get $$10) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp330267) + ) + (return) + ) + (local.set $$cmp334265 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$51 + (i32.shl + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$indvar319 + (i32.const 0) + ) + (local.set $$x$11268 + (local.get $$4) + ) + (loop $while-in46 + (block $while-out45 + (if + (local.get $$cmp334265) + (block + (local.set $$52 + (i32.add + (local.get $$4) + (local.get $$indvar319) + ) + ) + (local.set $$53 + (i32.mul + (local.get $$52) + (local.get $$0) + ) + ) + (local.set $$scevgep321 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$53) + (i32.const 2) + ) + ) + ) + (drop + (call $_memset + (local.get $$scevgep321) + (i32.const 0) + (local.get $$51) + ) + ) + ) + ) + (local.set $$inc344 + (i32.add + (local.get $$x$11268) + (i32.const 1) + ) + ) + (local.set $$cmp330 + (i32.lt_s + (local.get $$inc344) + (local.get $$add) + ) + ) + (local.set $$indvar$next320 + (i32.add + (local.get $$indvar319) + (i32.const 1) + ) + ) + (if + (local.get $$cmp330) + (block + (local.set $$indvar319 + (local.get $$indvar$next320) + ) + (local.set $$x$11268 + (local.get $$inc344) + ) + ) + (br $while-out45) + ) + (br $while-in46) + ) + ) + (return) + ) + (func $_stbir__use_width_upsampling (; 467 ;) (param $$stbir_info i32) (result i32) + (local $$0 f32) + (local $$call i32) + (local $$horizontal_scale i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$horizontal_scale + (i32.add + (local.get $$stbir_info) + (i32.const 56) + ) + ) + (local.set $$0 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$0) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbir__resample_horizontal_upsample (; 468 ;) (param $$stbir_info i32) (param $$output_buffer i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 f32) + (local $$11 f32) + (local $$12 f32) + (local $$13 f32) + (local $$14 f32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 f32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 i32) + (local $$30 f32) + (local $$31 f32) + (local $$32 f32) + (local $$33 f32) + (local $$34 f32) + (local $$35 f32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 f32) + (local $$add i32) + (local $$add101 i32) + (local $$add103 f32) + (local $$add104 i32) + (local $$add107 i32) + (local $$add109 f32) + (local $$add121 i32) + (local $$add132 f32) + (local $$add133 i32) + (local $$add136 i32) + (local $$add138 f32) + (local $$add139 i32) + (local $$add142 i32) + (local $$add144 f32) + (local $$add145 i32) + (local $$add148 i32) + (local $$add150 f32) + (local $$add161 i32) + (local $$add170 i32) + (local $$add173 i32) + (local $$add175 f32) + (local $$add36 i32) + (local $$add47 f32) + (local $$add57 i32) + (local $$add68 f32) + (local $$add69 i32) + (local $$add72 i32) + (local $$add74 f32) + (local $$add86 i32) + (local $$add97 f32) + (local $$add98 i32) + (local $$arrayidx102 i32) + (local $$arrayidx105 i32) + (local $$arrayidx108 i32) + (local $$arrayidx122 i32) + (local $$arrayidx128 i32) + (local $$arrayidx131 i32) + (local $$arrayidx134 i32) + (local $$arrayidx137 i32) + (local $$arrayidx140 i32) + (local $$arrayidx143 i32) + (local $$arrayidx146 i32) + (local $$arrayidx149 i32) + (local $$arrayidx162 i32) + (local $$arrayidx171 i32) + (local $$arrayidx174 i32) + (local $$arrayidx37 i32) + (local $$arrayidx43 i32) + (local $$arrayidx46 i32) + (local $$arrayidx58 i32) + (local $$arrayidx64 i32) + (local $$arrayidx67 i32) + (local $$arrayidx70 i32) + (local $$arrayidx73 i32) + (local $$arrayidx87 i32) + (local $$arrayidx93 i32) + (local $$arrayidx96 i32) + (local $$arrayidx99 i32) + (local $$c$0152 i32) + (local $$call i32) + (local $$channels2 i32) + (local $$cmp i32) + (local $$cmp10 i32) + (local $$cmp115 i32) + (local $$cmp115139 i32) + (local $$cmp123 i32) + (local $$cmp155 i32) + (local $$cmp155153 i32) + (local $$cmp156 i32) + (local $$cmp16 i32) + (local $$cmp163 i32) + (local $$cmp168151 i32) + (local $$cmp21 i32) + (local $$cmp28 i32) + (local $$cmp33 i32) + (local $$cmp33148 i32) + (local $$cmp38 i32) + (local $$cmp51 i32) + (local $$cmp51145 i32) + (local $$cmp59 i32) + (local $$cmp80 i32) + (local $$cmp80142 i32) + (local $$cmp88 i32) + (local $$cmp9 i32) + (local $$coefficient_counter$0149 i32) + (local $$coefficient_counter$1146 i32) + (local $$coefficient_counter$2143 i32) + (local $$coefficient_counter$3140 i32) + (local $$coefficient_counter$4154 i32) + (local $$exitcond i32) + (local $$horizontal_coefficient_width i32) + (local $$horizontal_coefficients4 i32) + (local $$horizontal_contributors3 i32) + (local $$horizontal_filter_pixel_margin i32) + (local $$inc i32) + (local $$inc111 i32) + (local $$inc120 i32) + (local $$inc152 i32) + (local $$inc160 i32) + (local $$inc177 i32) + (local $$inc180 i32) + (local $$inc183 i32) + (local $$inc48 i32) + (local $$inc56 i32) + (local $$inc76 i32) + (local $$inc85 i32) + (local $$input_w i32) + (local $$k$0150 i32) + (local $$k$1147 i32) + (local $$k$2144 i32) + (local $$k$3141 i32) + (local $$k$4155 i32) + (local $$mul i32) + (local $$mul100 f32) + (local $$mul106 f32) + (local $$mul118 i32) + (local $$mul129 f32) + (local $$mul135 f32) + (local $$mul141 f32) + (local $$mul147 f32) + (local $$mul158 i32) + (local $$mul172 f32) + (local $$mul44 f32) + (local $$mul54 i32) + (local $$mul65 f32) + (local $$mul71 f32) + (local $$mul8 i32) + (local $$mul83 i32) + (local $$mul94 f32) + (local $$n05 i32) + (local $$n17 i32) + (local $$output_w1 i32) + (local $$sub i32) + (local $$x$0157 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$output_w1 + (i32.add + (local.get $$stbir_info) + (i32.const 20) + ) + ) + (local.set $$0 + (i32.load + (local.get $$output_w1) + ) + ) + (local.set $$channels2 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels2) + ) + ) + (local.set $$call + (call $_stbir__get_decode_buffer + (local.get $$stbir_info) + ) + ) + (local.set $$horizontal_contributors3 + (i32.add + (local.get $$stbir_info) + (i32.const 100) + ) + ) + (local.set $$2 + (i32.load + (local.get $$horizontal_contributors3) + ) + ) + (local.set $$horizontal_coefficients4 + (i32.add + (local.get $$stbir_info) + (i32.const 104) + ) + ) + (local.set $$3 + (i32.load + (local.get $$horizontal_coefficients4) + ) + ) + (local.set $$horizontal_coefficient_width + (i32.add + (local.get $$stbir_info) + (i32.const 128) + ) + ) + (local.set $$4 + (i32.load + (local.get $$horizontal_coefficient_width) + ) + ) + (local.set $$cmp156 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp156) + ) + (return) + ) + (local.set $$horizontal_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 144) + ) + ) + (local.set $$input_w + (i32.add + (local.get $$stbir_info) + (i32.const 4) + ) + ) + (local.set $$cmp168151 + (i32.gt_s + (local.get $$1) + (i32.const 0) + ) + ) + (local.set $$x$0157 + (i32.const 0) + ) + (loop $label$continue$L4 + (block $label$break$L4 + (local.set $$n05 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$0157) + (i32.const 3) + ) + ) + ) + (local.set $$5 + (i32.load + (local.get $$n05) + ) + ) + (local.set $$n17 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$0157) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$6 + (i32.load + (local.get $$n17) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$x$0157) + (local.get $$1) + ) + ) + (local.set $$mul8 + (i32.mul + (local.get $$x$0157) + (local.get $$4) + ) + ) + (local.set $$cmp9 + (i32.lt_s + (local.get $$6) + (local.get $$5) + ) + ) + (if + (local.get $$cmp9) + (block + (local.set $label + (i32.const 4) + ) + (br $label$break$L4) + ) + ) + (local.set $$7 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$sub + (i32.sub + (i32.const 0) + (local.get $$7) + ) + ) + (local.set $$cmp10 + (i32.lt_s + (local.get $$5) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $label + (i32.const 6) + ) + (br $label$break$L4) + ) + ) + (local.set $$cmp16 + (i32.lt_s + (local.get $$6) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp16) + (block + (local.set $label + (i32.const 8) + ) + (br $label$break$L4) + ) + ) + (local.set $$8 + (i32.load + (local.get $$input_w) + ) + ) + (local.set $$add + (i32.add + (local.get $$8) + (local.get $$7) + ) + ) + (local.set $$cmp21 + (i32.lt_s + (local.get $$5) + (local.get $$add) + ) + ) + (if + (i32.eqz + (local.get $$cmp21) + ) + (block + (local.set $label + (i32.const 10) + ) + (br $label$break$L4) + ) + ) + (local.set $$cmp28 + (i32.lt_s + (local.get $$6) + (local.get $$add) + ) + ) + (if + (i32.eqz + (local.get $$cmp28) + ) + (block + (local.set $label + (i32.const 12) + ) + (br $label$break$L4) + ) + ) + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-default + (i32.sub + (local.get $$1) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp33148 + (i32.gt_s + (local.get $$5) + (local.get $$6) + ) + ) + (if + (i32.eqz + (local.get $$cmp33148) + ) + (block + (local.set $$arrayidx46 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (local.set $$coefficient_counter$0149 + (i32.const 0) + ) + (local.set $$k$0150 + (local.get $$5) + ) + (loop $while-in + (block $while-out + (local.set $$add36 + (i32.add + (local.get $$coefficient_counter$0149) + (local.get $$mul8) + ) + ) + (local.set $$arrayidx37 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add36) + (i32.const 2) + ) + ) + ) + (local.set $$9 + (f32.load + (local.get $$arrayidx37) + ) + ) + (local.set $$cmp38 + (f32.ne + (local.get $$9) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp38) + ) + (block + (local.set $label + (i32.const 17) + ) + (br $label$break$L4) + ) + ) + (local.set $$inc + (i32.add + (local.get $$coefficient_counter$0149) + (i32.const 1) + ) + ) + (local.set $$arrayidx43 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$k$0150) + (i32.const 2) + ) + ) + ) + (local.set $$10 + (f32.load + (local.get $$arrayidx43) + ) + ) + (local.set $$mul44 + (f32.mul + (local.get $$9) + (local.get $$10) + ) + ) + (local.set $$11 + (f32.load + (local.get $$arrayidx46) + ) + ) + (local.set $$add47 + (f32.add + (local.get $$11) + (local.get $$mul44) + ) + ) + (f32.store + (local.get $$arrayidx46) + (local.get $$add47) + ) + (local.set $$inc48 + (i32.add + (local.get $$k$0150) + (i32.const 1) + ) + ) + (local.set $$cmp33 + (i32.lt_s + (local.get $$k$0150) + (local.get $$6) + ) + ) + (if + (local.get $$cmp33) + (block + (local.set $$coefficient_counter$0149 + (local.get $$inc) + ) + (local.set $$k$0150 + (local.get $$inc48) + ) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp51145 + (i32.gt_s + (local.get $$5) + (local.get $$6) + ) + ) + (if + (i32.eqz + (local.get $$cmp51145) + ) + (block + (local.set $$arrayidx67 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (local.set $$add72 + (i32.add + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx73 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add72) + (i32.const 2) + ) + ) + ) + (local.set $$coefficient_counter$1146 + (i32.const 0) + ) + (local.set $$k$1147 + (local.get $$5) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$mul54 + (i32.shl + (local.get $$k$1147) + (i32.const 1) + ) + ) + (local.set $$add57 + (i32.add + (local.get $$coefficient_counter$1146) + (local.get $$mul8) + ) + ) + (local.set $$arrayidx58 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add57) + (i32.const 2) + ) + ) + ) + (local.set $$12 + (f32.load + (local.get $$arrayidx58) + ) + ) + (local.set $$cmp59 + (f32.ne + (local.get $$12) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp59) + ) + (block + (local.set $label + (i32.const 22) + ) + (br $label$break$L4) + ) + ) + (local.set $$inc56 + (i32.add + (local.get $$coefficient_counter$1146) + (i32.const 1) + ) + ) + (local.set $$arrayidx64 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul54) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (f32.load + (local.get $$arrayidx64) + ) + ) + (local.set $$mul65 + (f32.mul + (local.get $$12) + (local.get $$13) + ) + ) + (local.set $$14 + (f32.load + (local.get $$arrayidx67) + ) + ) + (local.set $$add68 + (f32.add + (local.get $$14) + (local.get $$mul65) + ) + ) + (f32.store + (local.get $$arrayidx67) + (local.get $$add68) + ) + (local.set $$add69 + (i32.or + (local.get $$mul54) + (i32.const 1) + ) + ) + (local.set $$arrayidx70 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add69) + (i32.const 2) + ) + ) + ) + (local.set $$15 + (f32.load + (local.get $$arrayidx70) + ) + ) + (local.set $$mul71 + (f32.mul + (local.get $$12) + (local.get $$15) + ) + ) + (local.set $$16 + (f32.load + (local.get $$arrayidx73) + ) + ) + (local.set $$add74 + (f32.add + (local.get $$16) + (local.get $$mul71) + ) + ) + (f32.store + (local.get $$arrayidx73) + (local.get $$add74) + ) + (local.set $$inc76 + (i32.add + (local.get $$k$1147) + (i32.const 1) + ) + ) + (local.set $$cmp51 + (i32.lt_s + (local.get $$k$1147) + (local.get $$6) + ) + ) + (if + (local.get $$cmp51) + (block + (local.set $$coefficient_counter$1146 + (local.get $$inc56) + ) + (local.set $$k$1147 + (local.get $$inc76) + ) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp80142 + (i32.gt_s + (local.get $$5) + (local.get $$6) + ) + ) + (if + (i32.eqz + (local.get $$cmp80142) + ) + (block + (local.set $$arrayidx96 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (local.set $$add101 + (i32.add + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx102 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add101) + (i32.const 2) + ) + ) + ) + (local.set $$add107 + (i32.add + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$arrayidx108 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add107) + (i32.const 2) + ) + ) + ) + (local.set $$coefficient_counter$2143 + (i32.const 0) + ) + (local.set $$k$2144 + (local.get $$5) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$mul83 + (i32.mul + (local.get $$k$2144) + (i32.const 3) + ) + ) + (local.set $$add86 + (i32.add + (local.get $$coefficient_counter$2143) + (local.get $$mul8) + ) + ) + (local.set $$arrayidx87 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add86) + (i32.const 2) + ) + ) + ) + (local.set $$17 + (f32.load + (local.get $$arrayidx87) + ) + ) + (local.set $$cmp88 + (f32.ne + (local.get $$17) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp88) + ) + (block + (local.set $label + (i32.const 27) + ) + (br $label$break$L4) + ) + ) + (local.set $$inc85 + (i32.add + (local.get $$coefficient_counter$2143) + (i32.const 1) + ) + ) + (local.set $$arrayidx93 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul83) + (i32.const 2) + ) + ) + ) + (local.set $$18 + (f32.load + (local.get $$arrayidx93) + ) + ) + (local.set $$mul94 + (f32.mul + (local.get $$17) + (local.get $$18) + ) + ) + (local.set $$19 + (f32.load + (local.get $$arrayidx96) + ) + ) + (local.set $$add97 + (f32.add + (local.get $$19) + (local.get $$mul94) + ) + ) + (f32.store + (local.get $$arrayidx96) + (local.get $$add97) + ) + (local.set $$add98 + (i32.add + (local.get $$mul83) + (i32.const 1) + ) + ) + (local.set $$arrayidx99 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add98) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (f32.load + (local.get $$arrayidx99) + ) + ) + (local.set $$mul100 + (f32.mul + (local.get $$17) + (local.get $$20) + ) + ) + (local.set $$21 + (f32.load + (local.get $$arrayidx102) + ) + ) + (local.set $$add103 + (f32.add + (local.get $$21) + (local.get $$mul100) + ) + ) + (f32.store + (local.get $$arrayidx102) + (local.get $$add103) + ) + (local.set $$add104 + (i32.add + (local.get $$mul83) + (i32.const 2) + ) + ) + (local.set $$arrayidx105 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add104) + (i32.const 2) + ) + ) + ) + (local.set $$22 + (f32.load + (local.get $$arrayidx105) + ) + ) + (local.set $$mul106 + (f32.mul + (local.get $$17) + (local.get $$22) + ) + ) + (local.set $$23 + (f32.load + (local.get $$arrayidx108) + ) + ) + (local.set $$add109 + (f32.add + (local.get $$23) + (local.get $$mul106) + ) + ) + (f32.store + (local.get $$arrayidx108) + (local.get $$add109) + ) + (local.set $$inc111 + (i32.add + (local.get $$k$2144) + (i32.const 1) + ) + ) + (local.set $$cmp80 + (i32.lt_s + (local.get $$k$2144) + (local.get $$6) + ) + ) + (if + (local.get $$cmp80) + (block + (local.set $$coefficient_counter$2143 + (local.get $$inc85) + ) + (local.set $$k$2144 + (local.get $$inc111) + ) + ) + (br $while-out3) + ) + (br $while-in4) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp115139 + (i32.gt_s + (local.get $$5) + (local.get $$6) + ) + ) + (if + (i32.eqz + (local.get $$cmp115139) + ) + (block + (local.set $$arrayidx131 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (local.set $$add136 + (i32.add + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$arrayidx137 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add136) + (i32.const 2) + ) + ) + ) + (local.set $$add142 + (i32.add + (local.get $$mul) + (i32.const 2) + ) + ) + (local.set $$arrayidx143 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add142) + (i32.const 2) + ) + ) + ) + (local.set $$add148 + (i32.add + (local.get $$mul) + (i32.const 3) + ) + ) + (local.set $$arrayidx149 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add148) + (i32.const 2) + ) + ) + ) + (local.set $$coefficient_counter$3140 + (i32.const 0) + ) + (local.set $$k$3141 + (local.get $$5) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$mul118 + (i32.shl + (local.get $$k$3141) + (i32.const 2) + ) + ) + (local.set $$add121 + (i32.add + (local.get $$coefficient_counter$3140) + (local.get $$mul8) + ) + ) + (local.set $$arrayidx122 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add121) + (i32.const 2) + ) + ) + ) + (local.set $$24 + (f32.load + (local.get $$arrayidx122) + ) + ) + (local.set $$cmp123 + (f32.ne + (local.get $$24) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp123) + ) + (block + (local.set $label + (i32.const 32) + ) + (br $label$break$L4) + ) + ) + (local.set $$inc120 + (i32.add + (local.get $$coefficient_counter$3140) + (i32.const 1) + ) + ) + (local.set $$arrayidx128 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul118) + (i32.const 2) + ) + ) + ) + (local.set $$25 + (f32.load + (local.get $$arrayidx128) + ) + ) + (local.set $$mul129 + (f32.mul + (local.get $$24) + (local.get $$25) + ) + ) + (local.set $$26 + (f32.load + (local.get $$arrayidx131) + ) + ) + (local.set $$add132 + (f32.add + (local.get $$26) + (local.get $$mul129) + ) + ) + (f32.store + (local.get $$arrayidx131) + (local.get $$add132) + ) + (local.set $$add133 + (i32.or + (local.get $$mul118) + (i32.const 1) + ) + ) + (local.set $$arrayidx134 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add133) + (i32.const 2) + ) + ) + ) + (local.set $$27 + (f32.load + (local.get $$arrayidx134) + ) + ) + (local.set $$mul135 + (f32.mul + (local.get $$24) + (local.get $$27) + ) + ) + (local.set $$28 + (f32.load + (local.get $$arrayidx137) + ) + ) + (local.set $$add138 + (f32.add + (local.get $$28) + (local.get $$mul135) + ) + ) + (f32.store + (local.get $$arrayidx137) + (local.get $$add138) + ) + (local.set $$add139 + (i32.or + (local.get $$mul118) + (i32.const 2) + ) + ) + (local.set $$arrayidx140 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add139) + (i32.const 2) + ) + ) + ) + (local.set $$29 + (f32.load + (local.get $$arrayidx140) + ) + ) + (local.set $$mul141 + (f32.mul + (local.get $$24) + (local.get $$29) + ) + ) + (local.set $$30 + (f32.load + (local.get $$arrayidx143) + ) + ) + (local.set $$add144 + (f32.add + (local.get $$30) + (local.get $$mul141) + ) + ) + (f32.store + (local.get $$arrayidx143) + (local.get $$add144) + ) + (local.set $$add145 + (i32.or + (local.get $$mul118) + (i32.const 3) + ) + ) + (local.set $$arrayidx146 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add145) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (f32.load + (local.get $$arrayidx146) + ) + ) + (local.set $$mul147 + (f32.mul + (local.get $$24) + (local.get $$31) + ) + ) + (local.set $$32 + (f32.load + (local.get $$arrayidx149) + ) + ) + (local.set $$add150 + (f32.add + (local.get $$32) + (local.get $$mul147) + ) + ) + (f32.store + (local.get $$arrayidx149) + (local.get $$add150) + ) + (local.set $$inc152 + (i32.add + (local.get $$k$3141) + (i32.const 1) + ) + ) + (local.set $$cmp115 + (i32.lt_s + (local.get $$k$3141) + (local.get $$6) + ) + ) + (if + (local.get $$cmp115) + (block + (local.set $$coefficient_counter$3140 + (local.get $$inc120) + ) + (local.set $$k$3141 + (local.get $$inc152) + ) + ) + (br $while-out6) + ) + (br $while-in7) + ) + ) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp155153 + (i32.gt_s + (local.get $$5) + (local.get $$6) + ) + ) + (if + (i32.eqz + (local.get $$cmp155153) + ) + (block + (local.set $$coefficient_counter$4154 + (i32.const 0) + ) + (local.set $$k$4155 + (local.get $$5) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$mul158 + (i32.mul + (local.get $$k$4155) + (local.get $$1) + ) + ) + (local.set $$inc160 + (i32.add + (local.get $$coefficient_counter$4154) + (i32.const 1) + ) + ) + (local.set $$add161 + (i32.add + (local.get $$coefficient_counter$4154) + (local.get $$mul8) + ) + ) + (local.set $$arrayidx162 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$add161) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (f32.load + (local.get $$arrayidx162) + ) + ) + (local.set $$cmp163 + (f32.ne + (local.get $$33) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp163) + ) + (block + (local.set $label + (i32.const 37) + ) + (br $label$break$L4) + ) + ) + (if + (local.get $$cmp168151) + (block + (local.set $$c$0152 + (i32.const 0) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$add170 + (i32.add + (local.get $$c$0152) + (local.get $$mul158) + ) + ) + (local.set $$arrayidx171 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add170) + (i32.const 2) + ) + ) + ) + (local.set $$34 + (f32.load + (local.get $$arrayidx171) + ) + ) + (local.set $$mul172 + (f32.mul + (local.get $$33) + (local.get $$34) + ) + ) + (local.set $$add173 + (i32.add + (local.get $$c$0152) + (local.get $$mul) + ) + ) + (local.set $$arrayidx174 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add173) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (f32.load + (local.get $$arrayidx174) + ) + ) + (local.set $$add175 + (f32.add + (local.get $$35) + (local.get $$mul172) + ) + ) + (f32.store + (local.get $$arrayidx174) + (local.get $$add175) + ) + (local.set $$inc177 + (i32.add + (local.get $$c$0152) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc177) + (local.get $$1) + ) + ) + (if + (local.get $$exitcond) + (br $while-out11) + (local.set $$c$0152 + (local.get $$inc177) + ) + ) + (br $while-in12) + ) + ) + ) + ) + (local.set $$inc180 + (i32.add + (local.get $$k$4155) + (i32.const 1) + ) + ) + (local.set $$cmp155 + (i32.lt_s + (local.get $$k$4155) + (local.get $$6) + ) + ) + (if + (local.get $$cmp155) + (block + (local.set $$coefficient_counter$4154 + (local.get $$inc160) + ) + (local.set $$k$4155 + (local.get $$inc180) + ) + ) + (br $while-out9) + ) + (br $while-in10) + ) + ) + ) + ) + ) + ) + (local.set $$inc183 + (i32.add + (local.get $$x$0157) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc183) + (local.get $$0) + ) + ) + (if + (local.get $$cmp) + (local.set $$x$0157 + (local.get $$inc183) + ) + (block + (local.set $label + (i32.const 43) + ) + (br $label$break$L4) + ) + ) + (br $label$continue$L4) + ) + ) + (block $switch13 + (block $switch-case24 + (block $switch-case23 + (block $switch-case22 + (block $switch-case21 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (block $switch-case15 + (block $switch-case14 + (br_table $switch-case14 $switch13 $switch-case15 $switch13 $switch-case16 $switch13 $switch-case17 $switch13 $switch-case18 $switch13 $switch13 $switch13 $switch13 $switch-case19 $switch13 $switch13 $switch13 $switch13 $switch-case20 $switch13 $switch13 $switch13 $switch13 $switch-case21 $switch13 $switch13 $switch13 $switch13 $switch-case22 $switch13 $switch13 $switch13 $switch13 $switch-case23 $switch13 $switch13 $switch13 $switch13 $switch13 $switch-case24 $switch13 + (i32.sub + (local.get $label) + (i32.const 4) + ) + ) + ) + (block + (call $___assert_fail + (i32.const 14084) + (i32.const 13065) + (i32.const 1460) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14129) + (i32.const 13065) + (i32.const 1461) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14179) + (i32.const 13065) + (i32.const 1462) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14229) + (i32.const 13065) + (i32.const 1463) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14299) + (i32.const 13065) + (i32.const 1464) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1472) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1481) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1491) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1502) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (block + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1515) + (i32.const 14093) + ) + (br $switch13) + ) + ) + (return) + ) + ) + (func $_stbir__resample_horizontal_downsample (; 469 ;) (param $$stbir_info i32) (param $$output_buffer i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 f32) + (local $$11 i32) + (local $$12 i32) + (local $$13 f32) + (local $$14 f32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 i32) + (local $$28 i32) + (local $$29 f32) + (local $$3 i32) + (local $$30 f32) + (local $$31 f32) + (local $$32 f32) + (local $$33 f32) + (local $$34 f32) + (local $$35 f32) + (local $$36 f32) + (local $$37 f32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 f32) + (local $$41 f32) + (local $$42 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 f32) + (local $$9 f32) + (local $$add i32) + (local $$add102 i32) + (local $$add114 f32) + (local $$add115 i32) + (local $$add118 i32) + (local $$add120 f32) + (local $$add121 i32) + (local $$add124 i32) + (local $$add126 f32) + (local $$add15 i32) + (local $$add156 i32) + (local $$add168 f32) + (local $$add169 i32) + (local $$add172 i32) + (local $$add174 f32) + (local $$add175 i32) + (local $$add178 i32) + (local $$add180 f32) + (local $$add181 i32) + (local $$add184 i32) + (local $$add186 f32) + (local $$add215 i32) + (local $$add225 i32) + (local $$add228 i32) + (local $$add230 f32) + (local $$add27 f32) + (local $$add54 i32) + (local $$add66 f32) + (local $$add67 i32) + (local $$add70 i32) + (local $$add72 f32) + (local $$arrayidx104 i32) + (local $$arrayidx110 i32) + (local $$arrayidx113 i32) + (local $$arrayidx116 i32) + (local $$arrayidx119 i32) + (local $$arrayidx122 i32) + (local $$arrayidx125 i32) + (local $$arrayidx158 i32) + (local $$arrayidx164 i32) + (local $$arrayidx167 i32) + (local $$arrayidx17 i32) + (local $$arrayidx170 i32) + (local $$arrayidx173 i32) + (local $$arrayidx176 i32) + (local $$arrayidx179 i32) + (local $$arrayidx182 i32) + (local $$arrayidx185 i32) + (local $$arrayidx217 i32) + (local $$arrayidx226 i32) + (local $$arrayidx229 i32) + (local $$arrayidx23 i32) + (local $$arrayidx26 i32) + (local $$arrayidx56 i32) + (local $$arrayidx62 i32) + (local $$arrayidx65 i32) + (local $$arrayidx68 i32) + (local $$arrayidx71 i32) + (local $$c$0196 i32) + (local $$call i32) + (local $$call5 i32) + (local $$channels2 i32) + (local $$cmp i32) + (local $$cmp105 i32) + (local $$cmp12 i32) + (local $$cmp12201 i32) + (local $$cmp135 i32) + (local $$cmp135215 i32) + (local $$cmp151 i32) + (local $$cmp151213 i32) + (local $$cmp159 i32) + (local $$cmp18 i32) + (local $$cmp194 i32) + (local $$cmp194199 i32) + (local $$cmp203 i32) + (local $$cmp210 i32) + (local $$cmp210197 i32) + (local $$cmp218 i32) + (local $$cmp223195 i32) + (local $$cmp33 i32) + (local $$cmp33207 i32) + (local $$cmp49 i32) + (local $$cmp49205 i32) + (local $$cmp57 i32) + (local $$cmp81 i32) + (local $$cmp81211 i32) + (local $$cmp97 i32) + (local $$cmp97209 i32) + (local $$exitcond i32) + (local $$horizontal_coefficient_width i32) + (local $$horizontal_coefficients4 i32) + (local $$horizontal_contributors3 i32) + (local $$horizontal_filter_pixel_margin i32) + (local $$inc i32) + (local $$inc128 i32) + (local $$inc131 i32) + (local $$inc188 i32) + (local $$inc191 i32) + (local $$inc232 i32) + (local $$inc235 i32) + (local $$inc238 i32) + (local $$inc29 i32) + (local $$inc74 i32) + (local $$inc77 i32) + (local $$input_w1 i32) + (local $$k$0202 i32) + (local $$k$1206 i32) + (local $$k$2210 i32) + (local $$k$3214 i32) + (local $$k$4198 i32) + (local $$mul i32) + (local $$mul10 i32) + (local $$mul100 i32) + (local $$mul111 f32) + (local $$mul117 f32) + (local $$mul123 f32) + (local $$mul146 i32) + (local $$mul149 i32) + (local $$mul154 i32) + (local $$mul165 f32) + (local $$mul171 f32) + (local $$mul177 f32) + (local $$mul183 f32) + (local $$mul205 i32) + (local $$mul208 i32) + (local $$mul213 i32) + (local $$mul227 f32) + (local $$mul24 f32) + (local $$mul44 i32) + (local $$mul47 i32) + (local $$mul52 i32) + (local $$mul63 f32) + (local $$mul69 f32) + (local $$mul92 i32) + (local $$mul95 i32) + (local $$n0139 i32) + (local $$n0198 i32) + (local $$n037 i32) + (local $$n06 i32) + (local $$n085 i32) + (local $$n1142 i32) + (local $$n1201 i32) + (local $$n140 i32) + (local $$n18 i32) + (local $$n188 i32) + (local $$sub i32) + (local $$sub103 i32) + (local $$sub144 i32) + (local $$sub157 i32) + (local $$sub16 i32) + (local $$sub203 i32) + (local $$sub216 i32) + (local $$sub42 i32) + (local $$sub55 i32) + (local $$sub90 i32) + (local $$tobool i32) + (local $$x$0204 i32) + (local $$x$1208 i32) + (local $$x$2212 i32) + (local $$x$3216 i32) + (local $$x$4200 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$input_w1 + (i32.add + (local.get $$stbir_info) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$input_w1) + ) + ) + (local.set $$channels2 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$1 + (i32.load + (local.get $$channels2) + ) + ) + (local.set $$call + (call $_stbir__get_decode_buffer + (local.get $$stbir_info) + ) + ) + (local.set $$horizontal_contributors3 + (i32.add + (local.get $$stbir_info) + (i32.const 100) + ) + ) + (local.set $$2 + (i32.load + (local.get $$horizontal_contributors3) + ) + ) + (local.set $$horizontal_coefficients4 + (i32.add + (local.get $$stbir_info) + (i32.const 104) + ) + ) + (local.set $$3 + (i32.load + (local.get $$horizontal_coefficients4) + ) + ) + (local.set $$horizontal_coefficient_width + (i32.add + (local.get $$stbir_info) + (i32.const 128) + ) + ) + (local.set $$4 + (i32.load + (local.get $$horizontal_coefficient_width) + ) + ) + (local.set $$horizontal_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 144) + ) + ) + (local.set $$5 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$5) + (i32.const 1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$0) + ) + ) + (local.set $$call5 + (call $_stbir__use_width_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call5) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (call $___assert_fail + (i32.const 13988) + (i32.const 13065) + (i32.const 1536) + (i32.const 14029) + ) + ) + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-default + (i32.sub + (local.get $$1) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp203 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp203) + ) + (return) + ) + (local.set $$x$0204 + (i32.const 0) + ) + (loop $label$continue$L29 + (block $label$break$L29 + (local.set $$n06 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$0204) + (i32.const 3) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$n06) + ) + ) + (local.set $$n18 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$0204) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$7 + (i32.load + (local.get $$n18) + ) + ) + (local.set $$cmp12201 + (i32.gt_s + (local.get $$6) + (local.get $$7) + ) + ) + (if + (i32.eqz + (local.get $$cmp12201) + ) + (block + (local.set $$mul10 + (i32.mul + (local.get $$x$0204) + (local.get $$4) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$x$0204) + (local.get $$5) + ) + ) + (local.set $$add15 + (i32.sub + (local.get $$mul10) + (local.get $$6) + ) + ) + (local.set $$arrayidx23 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$sub) + (i32.const 2) + ) + ) + ) + (local.set $$k$0202 + (local.get $$6) + ) + (loop $while-in + (block $while-out + (local.set $$sub16 + (i32.add + (local.get $$add15) + (local.get $$k$0202) + ) + ) + (local.set $$arrayidx17 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$sub16) + (i32.const 2) + ) + ) + ) + (local.set $$8 + (f32.load + (local.get $$arrayidx17) + ) + ) + (local.set $$cmp18 + (f32.ne + (local.get $$8) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp18) + ) + (block + (local.set $label + (i32.const 9) + ) + (br $label$break$L29) + ) + ) + (local.set $$9 + (f32.load + (local.get $$arrayidx23) + ) + ) + (local.set $$mul24 + (f32.mul + (local.get $$8) + (local.get $$9) + ) + ) + (local.set $$arrayidx26 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$k$0202) + (i32.const 2) + ) + ) + ) + (local.set $$10 + (f32.load + (local.get $$arrayidx26) + ) + ) + (local.set $$add27 + (f32.add + (local.get $$10) + (local.get $$mul24) + ) + ) + (f32.store + (local.get $$arrayidx26) + (local.get $$add27) + ) + (local.set $$inc + (i32.add + (local.get $$k$0202) + (i32.const 1) + ) + ) + (local.set $$cmp12 + (i32.lt_s + (local.get $$k$0202) + (local.get $$7) + ) + ) + (if + (local.get $$cmp12) + (local.set $$k$0202 + (local.get $$inc) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$inc29 + (i32.add + (local.get $$x$0204) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc29) + (local.get $$add) + ) + ) + (if + (local.get $$cmp) + (local.set $$x$0204 + (local.get $$inc29) + ) + (block + (local.set $label + (i32.const 47) + ) + (br $label$break$L29) + ) + ) + (br $label$continue$L29) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 9) + ) + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1554) + (i32.const 14029) + ) + (if + (i32.eq + (local.get $label) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp33207 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp33207) + ) + (return) + ) + (local.set $$x$1208 + (i32.const 0) + ) + (loop $label$continue$L44 + (block $label$break$L44 + (local.set $$n037 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$1208) + (i32.const 3) + ) + ) + ) + (local.set $$11 + (i32.load + (local.get $$n037) + ) + ) + (local.set $$n140 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$1208) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$12 + (i32.load + (local.get $$n140) + ) + ) + (local.set $$sub42 + (i32.sub + (local.get $$x$1208) + (local.get $$5) + ) + ) + (local.set $$mul44 + (i32.shl + (local.get $$sub42) + (i32.const 1) + ) + ) + (local.set $$cmp49205 + (i32.gt_s + (local.get $$11) + (local.get $$12) + ) + ) + (if + (i32.eqz + (local.get $$cmp49205) + ) + (block + (local.set $$mul47 + (i32.mul + (local.get $$x$1208) + (local.get $$4) + ) + ) + (local.set $$add54 + (i32.sub + (local.get $$mul47) + (local.get $$11) + ) + ) + (local.set $$arrayidx62 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul44) + (i32.const 2) + ) + ) + ) + (local.set $$add67 + (i32.or + (local.get $$mul44) + (i32.const 1) + ) + ) + (local.set $$arrayidx68 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add67) + (i32.const 2) + ) + ) + ) + (local.set $$k$1206 + (local.get $$11) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$mul52 + (i32.shl + (local.get $$k$1206) + (i32.const 1) + ) + ) + (local.set $$sub55 + (i32.add + (local.get $$add54) + (local.get $$k$1206) + ) + ) + (local.set $$arrayidx56 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$sub55) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (f32.load + (local.get $$arrayidx56) + ) + ) + (local.set $$cmp57 + (f32.ne + (local.get $$13) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp57) + ) + (block + (local.set $label + (i32.const 17) + ) + (br $label$break$L44) + ) + ) + (local.set $$14 + (f32.load + (local.get $$arrayidx62) + ) + ) + (local.set $$mul63 + (f32.mul + (local.get $$13) + (local.get $$14) + ) + ) + (local.set $$arrayidx65 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul52) + (i32.const 2) + ) + ) + ) + (local.set $$15 + (f32.load + (local.get $$arrayidx65) + ) + ) + (local.set $$add66 + (f32.add + (local.get $$15) + (local.get $$mul63) + ) + ) + (f32.store + (local.get $$arrayidx65) + (local.get $$add66) + ) + (local.set $$16 + (f32.load + (local.get $$arrayidx68) + ) + ) + (local.set $$mul69 + (f32.mul + (local.get $$13) + (local.get $$16) + ) + ) + (local.set $$add70 + (i32.or + (local.get $$mul52) + (i32.const 1) + ) + ) + (local.set $$arrayidx71 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add70) + (i32.const 2) + ) + ) + ) + (local.set $$17 + (f32.load + (local.get $$arrayidx71) + ) + ) + (local.set $$add72 + (f32.add + (local.get $$17) + (local.get $$mul69) + ) + ) + (f32.store + (local.get $$arrayidx71) + (local.get $$add72) + ) + (local.set $$inc74 + (i32.add + (local.get $$k$1206) + (i32.const 1) + ) + ) + (local.set $$cmp49 + (i32.lt_s + (local.get $$k$1206) + (local.get $$12) + ) + ) + (if + (local.get $$cmp49) + (local.set $$k$1206 + (local.get $$inc74) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$inc77 + (i32.add + (local.get $$x$1208) + (i32.const 1) + ) + ) + (local.set $$cmp33 + (i32.lt_s + (local.get $$inc77) + (local.get $$add) + ) + ) + (if + (local.get $$cmp33) + (local.set $$x$1208 + (local.get $$inc77) + ) + (block + (local.set $label + (i32.const 47) + ) + (br $label$break$L44) + ) + ) + (br $label$continue$L44) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 17) + ) + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1575) + (i32.const 14029) + ) + (if + (i32.eq + (local.get $label) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp81211 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp81211) + ) + (return) + ) + (local.set $$x$2212 + (i32.const 0) + ) + (loop $label$continue$L59 + (block $label$break$L59 + (local.set $$n085 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$2212) + (i32.const 3) + ) + ) + ) + (local.set $$18 + (i32.load + (local.get $$n085) + ) + ) + (local.set $$n188 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$2212) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$19 + (i32.load + (local.get $$n188) + ) + ) + (local.set $$sub90 + (i32.sub + (local.get $$x$2212) + (local.get $$5) + ) + ) + (local.set $$mul92 + (i32.mul + (local.get $$sub90) + (i32.const 3) + ) + ) + (local.set $$cmp97209 + (i32.gt_s + (local.get $$18) + (local.get $$19) + ) + ) + (if + (i32.eqz + (local.get $$cmp97209) + ) + (block + (local.set $$mul95 + (i32.mul + (local.get $$x$2212) + (local.get $$4) + ) + ) + (local.set $$add102 + (i32.sub + (local.get $$mul95) + (local.get $$18) + ) + ) + (local.set $$arrayidx110 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul92) + (i32.const 2) + ) + ) + ) + (local.set $$add115 + (i32.add + (local.get $$mul92) + (i32.const 1) + ) + ) + (local.set $$arrayidx116 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add115) + (i32.const 2) + ) + ) + ) + (local.set $$add121 + (i32.add + (local.get $$mul92) + (i32.const 2) + ) + ) + (local.set $$arrayidx122 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add121) + (i32.const 2) + ) + ) + ) + (local.set $$k$2210 + (local.get $$18) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$mul100 + (i32.mul + (local.get $$k$2210) + (i32.const 3) + ) + ) + (local.set $$sub103 + (i32.add + (local.get $$add102) + (local.get $$k$2210) + ) + ) + (local.set $$arrayidx104 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$sub103) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (f32.load + (local.get $$arrayidx104) + ) + ) + (local.set $$cmp105 + (f32.ne + (local.get $$20) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp105) + ) + (block + (local.set $label + (i32.const 25) + ) + (br $label$break$L59) + ) + ) + (local.set $$21 + (f32.load + (local.get $$arrayidx110) + ) + ) + (local.set $$mul111 + (f32.mul + (local.get $$20) + (local.get $$21) + ) + ) + (local.set $$arrayidx113 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul100) + (i32.const 2) + ) + ) + ) + (local.set $$22 + (f32.load + (local.get $$arrayidx113) + ) + ) + (local.set $$add114 + (f32.add + (local.get $$22) + (local.get $$mul111) + ) + ) + (f32.store + (local.get $$arrayidx113) + (local.get $$add114) + ) + (local.set $$23 + (f32.load + (local.get $$arrayidx116) + ) + ) + (local.set $$mul117 + (f32.mul + (local.get $$20) + (local.get $$23) + ) + ) + (local.set $$add118 + (i32.add + (local.get $$mul100) + (i32.const 1) + ) + ) + (local.set $$arrayidx119 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add118) + (i32.const 2) + ) + ) + ) + (local.set $$24 + (f32.load + (local.get $$arrayidx119) + ) + ) + (local.set $$add120 + (f32.add + (local.get $$24) + (local.get $$mul117) + ) + ) + (f32.store + (local.get $$arrayidx119) + (local.get $$add120) + ) + (local.set $$25 + (f32.load + (local.get $$arrayidx122) + ) + ) + (local.set $$mul123 + (f32.mul + (local.get $$20) + (local.get $$25) + ) + ) + (local.set $$add124 + (i32.add + (local.get $$mul100) + (i32.const 2) + ) + ) + (local.set $$arrayidx125 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add124) + (i32.const 2) + ) + ) + ) + (local.set $$26 + (f32.load + (local.get $$arrayidx125) + ) + ) + (local.set $$add126 + (f32.add + (local.get $$26) + (local.get $$mul123) + ) + ) + (f32.store + (local.get $$arrayidx125) + (local.get $$add126) + ) + (local.set $$inc128 + (i32.add + (local.get $$k$2210) + (i32.const 1) + ) + ) + (local.set $$cmp97 + (i32.lt_s + (local.get $$k$2210) + (local.get $$19) + ) + ) + (if + (local.get $$cmp97) + (local.set $$k$2210 + (local.get $$inc128) + ) + (br $while-out3) + ) + (br $while-in4) + ) + ) + ) + ) + (local.set $$inc131 + (i32.add + (local.get $$x$2212) + (i32.const 1) + ) + ) + (local.set $$cmp81 + (i32.lt_s + (local.get $$inc131) + (local.get $$add) + ) + ) + (if + (local.get $$cmp81) + (local.set $$x$2212 + (local.get $$inc131) + ) + (block + (local.set $label + (i32.const 47) + ) + (br $label$break$L59) + ) + ) + (br $label$continue$L59) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 25) + ) + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1597) + (i32.const 14029) + ) + (if + (i32.eq + (local.get $label) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp135215 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp135215) + ) + (return) + ) + (local.set $$x$3216 + (i32.const 0) + ) + (loop $label$continue$L74 + (block $label$break$L74 + (local.set $$n0139 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$3216) + (i32.const 3) + ) + ) + ) + (local.set $$27 + (i32.load + (local.get $$n0139) + ) + ) + (local.set $$n1142 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$3216) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$28 + (i32.load + (local.get $$n1142) + ) + ) + (local.set $$sub144 + (i32.sub + (local.get $$x$3216) + (local.get $$5) + ) + ) + (local.set $$mul146 + (i32.shl + (local.get $$sub144) + (i32.const 2) + ) + ) + (local.set $$cmp151213 + (i32.gt_s + (local.get $$27) + (local.get $$28) + ) + ) + (if + (i32.eqz + (local.get $$cmp151213) + ) + (block + (local.set $$mul149 + (i32.mul + (local.get $$x$3216) + (local.get $$4) + ) + ) + (local.set $$add156 + (i32.sub + (local.get $$mul149) + (local.get $$27) + ) + ) + (local.set $$arrayidx164 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$mul146) + (i32.const 2) + ) + ) + ) + (local.set $$add169 + (i32.or + (local.get $$mul146) + (i32.const 1) + ) + ) + (local.set $$arrayidx170 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add169) + (i32.const 2) + ) + ) + ) + (local.set $$add175 + (i32.or + (local.get $$mul146) + (i32.const 2) + ) + ) + (local.set $$arrayidx176 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add175) + (i32.const 2) + ) + ) + ) + (local.set $$add181 + (i32.or + (local.get $$mul146) + (i32.const 3) + ) + ) + (local.set $$arrayidx182 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add181) + (i32.const 2) + ) + ) + ) + (local.set $$k$3214 + (local.get $$27) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$mul154 + (i32.shl + (local.get $$k$3214) + (i32.const 2) + ) + ) + (local.set $$sub157 + (i32.add + (local.get $$add156) + (local.get $$k$3214) + ) + ) + (local.set $$arrayidx158 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$sub157) + (i32.const 2) + ) + ) + ) + (local.set $$29 + (f32.load + (local.get $$arrayidx158) + ) + ) + (local.set $$cmp159 + (f32.ne + (local.get $$29) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp159) + ) + (block + (local.set $label + (i32.const 33) + ) + (br $label$break$L74) + ) + ) + (local.set $$30 + (f32.load + (local.get $$arrayidx164) + ) + ) + (local.set $$mul165 + (f32.mul + (local.get $$29) + (local.get $$30) + ) + ) + (local.set $$arrayidx167 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$mul154) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (f32.load + (local.get $$arrayidx167) + ) + ) + (local.set $$add168 + (f32.add + (local.get $$31) + (local.get $$mul165) + ) + ) + (f32.store + (local.get $$arrayidx167) + (local.get $$add168) + ) + (local.set $$32 + (f32.load + (local.get $$arrayidx170) + ) + ) + (local.set $$mul171 + (f32.mul + (local.get $$29) + (local.get $$32) + ) + ) + (local.set $$add172 + (i32.or + (local.get $$mul154) + (i32.const 1) + ) + ) + (local.set $$arrayidx173 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add172) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (f32.load + (local.get $$arrayidx173) + ) + ) + (local.set $$add174 + (f32.add + (local.get $$33) + (local.get $$mul171) + ) + ) + (f32.store + (local.get $$arrayidx173) + (local.get $$add174) + ) + (local.set $$34 + (f32.load + (local.get $$arrayidx176) + ) + ) + (local.set $$mul177 + (f32.mul + (local.get $$29) + (local.get $$34) + ) + ) + (local.set $$add178 + (i32.or + (local.get $$mul154) + (i32.const 2) + ) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add178) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (f32.load + (local.get $$arrayidx179) + ) + ) + (local.set $$add180 + (f32.add + (local.get $$35) + (local.get $$mul177) + ) + ) + (f32.store + (local.get $$arrayidx179) + (local.get $$add180) + ) + (local.set $$36 + (f32.load + (local.get $$arrayidx182) + ) + ) + (local.set $$mul183 + (f32.mul + (local.get $$29) + (local.get $$36) + ) + ) + (local.set $$add184 + (i32.or + (local.get $$mul154) + (i32.const 3) + ) + ) + (local.set $$arrayidx185 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add184) + (i32.const 2) + ) + ) + ) + (local.set $$37 + (f32.load + (local.get $$arrayidx185) + ) + ) + (local.set $$add186 + (f32.add + (local.get $$37) + (local.get $$mul183) + ) + ) + (f32.store + (local.get $$arrayidx185) + (local.get $$add186) + ) + (local.set $$inc188 + (i32.add + (local.get $$k$3214) + (i32.const 1) + ) + ) + (local.set $$cmp151 + (i32.lt_s + (local.get $$k$3214) + (local.get $$28) + ) + ) + (if + (local.get $$cmp151) + (local.set $$k$3214 + (local.get $$inc188) + ) + (br $while-out6) + ) + (br $while-in7) + ) + ) + ) + ) + (local.set $$inc191 + (i32.add + (local.get $$x$3216) + (i32.const 1) + ) + ) + (local.set $$cmp135 + (i32.lt_s + (local.get $$inc191) + (local.get $$add) + ) + ) + (if + (local.get $$cmp135) + (local.set $$x$3216 + (local.get $$inc191) + ) + (block + (local.set $label + (i32.const 47) + ) + (br $label$break$L74) + ) + ) + (br $label$continue$L74) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 33) + ) + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1620) + (i32.const 14029) + ) + (if + (i32.eq + (local.get $label) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp194199 + (i32.gt_s + (local.get $$add) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp194199) + ) + (return) + ) + (local.set $$cmp223195 + (i32.gt_s + (local.get $$1) + (i32.const 0) + ) + ) + (local.set $$x$4200 + (i32.const 0) + ) + (loop $label$continue$L9 + (block $label$break$L9 + (local.set $$n0198 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$4200) + (i32.const 3) + ) + ) + ) + (local.set $$38 + (i32.load + (local.get $$n0198) + ) + ) + (local.set $$n1201 + (i32.add + (i32.add + (local.get $$2) + (i32.shl + (local.get $$x$4200) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$39 + (i32.load + (local.get $$n1201) + ) + ) + (local.set $$sub203 + (i32.sub + (local.get $$x$4200) + (local.get $$5) + ) + ) + (local.set $$mul205 + (i32.mul + (local.get $$sub203) + (local.get $$1) + ) + ) + (local.set $$cmp210197 + (i32.gt_s + (local.get $$38) + (local.get $$39) + ) + ) + (if + (i32.eqz + (local.get $$cmp210197) + ) + (block + (local.set $$mul208 + (i32.mul + (local.get $$x$4200) + (local.get $$4) + ) + ) + (local.set $$add215 + (i32.sub + (local.get $$mul208) + (local.get $$38) + ) + ) + (local.set $$k$4198 + (local.get $$38) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$mul213 + (i32.mul + (local.get $$k$4198) + (local.get $$1) + ) + ) + (local.set $$sub216 + (i32.add + (local.get $$add215) + (local.get $$k$4198) + ) + ) + (local.set $$arrayidx217 + (i32.add + (local.get $$3) + (i32.shl + (local.get $$sub216) + (i32.const 2) + ) + ) + ) + (local.set $$40 + (f32.load + (local.get $$arrayidx217) + ) + ) + (local.set $$cmp218 + (f32.ne + (local.get $$40) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp218) + ) + (block + (local.set $label + (i32.const 41) + ) + (br $label$break$L9) + ) + ) + (if + (local.get $$cmp223195) + (block + (local.set $$c$0196 + (i32.const 0) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$add225 + (i32.add + (local.get $$c$0196) + (local.get $$mul205) + ) + ) + (local.set $$arrayidx226 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$add225) + (i32.const 2) + ) + ) + ) + (local.set $$41 + (f32.load + (local.get $$arrayidx226) + ) + ) + (local.set $$mul227 + (f32.mul + (local.get $$40) + (local.get $$41) + ) + ) + (local.set $$add228 + (i32.add + (local.get $$c$0196) + (local.get $$mul213) + ) + ) + (local.set $$arrayidx229 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add228) + (i32.const 2) + ) + ) + ) + (local.set $$42 + (f32.load + (local.get $$arrayidx229) + ) + ) + (local.set $$add230 + (f32.add + (local.get $$42) + (local.get $$mul227) + ) + ) + (f32.store + (local.get $$arrayidx229) + (local.get $$add230) + ) + (local.set $$inc232 + (i32.add + (local.get $$c$0196) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc232) + (local.get $$1) + ) + ) + (if + (local.get $$exitcond) + (br $while-out11) + (local.set $$c$0196 + (local.get $$inc232) + ) + ) + (br $while-in12) + ) + ) + ) + ) + (local.set $$inc235 + (i32.add + (local.get $$k$4198) + (i32.const 1) + ) + ) + (local.set $$cmp210 + (i32.lt_s + (local.get $$k$4198) + (local.get $$39) + ) + ) + (if + (local.get $$cmp210) + (local.set $$k$4198 + (local.get $$inc235) + ) + (br $while-out9) + ) + (br $while-in10) + ) + ) + ) + ) + (local.set $$inc238 + (i32.add + (local.get $$x$4200) + (i32.const 1) + ) + ) + (local.set $$cmp194 + (i32.lt_s + (local.get $$inc238) + (local.get $$add) + ) + ) + (if + (local.get $$cmp194) + (local.set $$x$4200 + (local.get $$inc238) + ) + (block + (local.set $label + (i32.const 47) + ) + (br $label$break$L9) + ) + ) + (br $label$continue$L9) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 41) + ) + (call $___assert_fail + (i32.const 14067) + (i32.const 13065) + (i32.const 1645) + (i32.const 14029) + ) + (if + (i32.eq + (local.get $label) + (i32.const 47) + ) + (return) + ) + ) + ) + ) + ) + (func $_stbir__get_decode_buffer (; 470 ;) (param $$stbir_info i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$arrayidx i32) + (local $$channels i32) + (local $$decode_buffer i32) + (local $$horizontal_filter_pixel_margin i32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$decode_buffer + (i32.add + (local.get $$stbir_info) + (i32.const 120) + ) + ) + (local.set $$0 + (i32.load + (local.get $$decode_buffer) + ) + ) + (local.set $$horizontal_filter_pixel_margin + (i32.add + (local.get $$stbir_info) + (i32.const 144) + ) + ) + (local.set $$1 + (i32.load + (local.get $$horizontal_filter_pixel_margin) + ) + ) + (local.set $$channels + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$2 + (i32.load + (local.get $$channels) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$2) + (local.get $$1) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$0) + (i32.shl + (local.get $$mul) + (i32.const 2) + ) + ) + ) + (return + (local.get $$arrayidx) + ) + ) + (func $_stbir__use_upsampling (; 471 ;) (param $$ratio f32) (result i32) + (local $$cmp i32) + (local $$conv i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (f32.gt + (local.get $$ratio) + (f32.const 1) + ) + ) + (local.set $$conv + (i32.and + (local.get $$cmp) + (i32.const 1) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $_stbir__edge_wrap (; 472 ;) (param $$edge i32) (param $$n i32) (param $$max i32) (result i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$or$cond i32) + (local $$retval$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$n) + (i32.const -1) + ) + ) + (local.set $$cmp1 + (i32.lt_s + (local.get $$n) + (local.get $$max) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (local.get $$n) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call + (call $_stbir__edge_wrap_slow + (local.get $$edge) + (local.get $$n) + (local.get $$max) + ) + ) + (local.set $$retval$0 + (local.get $$call) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__srgb_to_linear (; 473 ;) (param $$f f32) (result f32) + (local $$0 f64) + (local $$add f32) + (local $$cmp i32) + (local $$conv f64) + (local $$conv2 f32) + (local $$div f32) + (local $$div1 f32) + (local $$retval$0 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$f) + (f32.const 0.040449999272823334) + ) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$add + (f32.add + (local.get $$f) + (f32.const 0.054999999701976776) + ) + ) + (local.set $$div1 + (f32.div + (local.get $$add) + (f32.const 1.0549999475479126) + ) + ) + (local.set $$conv + (f64.promote_f32 + (local.get $$div1) + ) + ) + (local.set $$0 + (call $_pow + (local.get $$conv) + (f64.const 2.4000000953674316) + ) + ) + (local.set $$conv2 + (f32.demote_f64 + (local.get $$0) + ) + ) + (local.set $$retval$0 + (local.get $$conv2) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$div + (f32.div + (local.get $$f) + (f32.const 12.920000076293945) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_stbir__edge_wrap_slow (; 474 ;) (param $$edge i32) (param $$n i32) (param $$max i32) (result i32) + (local $$cmp i32) + (local $$cmp15 i32) + (local $$cmp2 i32) + (local $$cmp22 i32) + (local $$cmp27 i32) + (local $$cmp6 i32) + (local $$cmp8 i32) + (local $$mul i32) + (local $$rem i32) + (local $$rem26 i32) + (local $$retval$0 i32) + (local $$retval$1 i32) + (local $$spec$select i32) + (local $$spec$select24 i32) + (local $$spec$select25 i32) + (local $$spec$select26 i32) + (local $$sub i32) + (local $$sub10 i32) + (local $$sub11 i32) + (local $$sub18 i32) + (local $$sub19 i32) + (local $$sub25 i32) + (local $$sub29 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub10 + (i32.sub + (i32.const 0) + (local.get $$n) + ) + ) + (block $switch + (block $switch-default + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-default + (i32.sub + (local.get $$edge) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp + (i32.lt_s + (local.get $$n) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$1 + (i32.const 0) + ) + (return + (local.get $$retval$1) + ) + ) + (block + (local.set $$cmp2 + (i32.lt_s + (local.get $$n) + (local.get $$max) + ) + ) + (local.set $$sub + (i32.add + (local.get $$max) + (i32.const -1) + ) + ) + (local.set $$spec$select24 + (if (result i32) + (local.get $$cmp2) + (local.get $$n) + (local.get $$sub) + ) + ) + (return + (local.get $$spec$select24) + ) + ) + ) + ) + ) + (block + (local.set $$cmp6 + (i32.lt_s + (local.get $$n) + (i32.const 0) + ) + ) + (local.set $$cmp8 + (i32.lt_s + (local.get $$n) + (local.get $$max) + ) + ) + (if + (local.get $$cmp6) + (block + (local.set $$sub11 + (i32.add + (local.get $$max) + (i32.const -1) + ) + ) + (local.set $$spec$select26 + (if (result i32) + (local.get $$cmp8) + (local.get $$sub10) + (local.get $$sub11) + ) + ) + (return + (local.get $$spec$select26) + ) + ) + (block + (local.set $$mul + (i32.shl + (local.get $$max) + (i32.const 1) + ) + ) + (local.set $$cmp15 + (i32.gt_s + (local.get $$mul) + (local.get $$n) + ) + ) + (local.set $$sub18 + (i32.xor + (local.get $$n) + (i32.const -1) + ) + ) + (local.set $$sub19 + (i32.add + (local.get $$mul) + (local.get $$sub18) + ) + ) + (local.set $$retval$0 + (if (result i32) + (local.get $$cmp15) + (local.get $$sub19) + (i32.const 0) + ) + ) + (local.set $$spec$select25 + (if (result i32) + (local.get $$cmp8) + (local.get $$n) + (local.get $$retval$0) + ) + ) + (return + (local.get $$spec$select25) + ) + ) + ) + ) + ) + (block + (local.set $$cmp22 + (i32.gt_s + (local.get $$n) + (i32.const -1) + ) + ) + (if + (local.get $$cmp22) + (block + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$n) + (local.get $$max) + ) + (i32.const -1) + ) + ) + (local.set $$retval$1 + (local.get $$rem) + ) + (return + (local.get $$retval$1) + ) + ) + (block + (local.set $$sub25 + (i32.sub + (i32.const 0) + (local.get $$n) + ) + ) + (local.set $$rem26 + (i32.and + (i32.rem_s + (local.get $$sub25) + (local.get $$max) + ) + (i32.const -1) + ) + ) + (local.set $$cmp27 + (i32.eq + (local.get $$rem26) + (i32.const 0) + ) + ) + (local.set $$sub29 + (i32.sub + (local.get $$max) + (local.get $$rem26) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp27) + (i32.const 0) + (local.get $$sub29) + ) + ) + (local.set $$retval$1 + (local.get $$spec$select) + ) + (return + (local.get $$retval$1) + ) + ) + ) + ) + ) + (block + (local.set $$retval$1 + (i32.const 0) + ) + (return + (local.get $$retval$1) + ) + ) + ) + (call $___assert_fail + (i32.const 14441) + (i32.const 13065) + (i32.const 994) + (i32.const 14468) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_stbir__encode_scanline (; 475 ;) (param $$stbir_info i32) (param $$num_pixels i32) (param $$output_buffer i32) (param $$encode_buffer i32) (param $$channels i32) (param $$alpha_channel i32) (param $$decode i32) + (local $$0 i32) + (local $$1 f32) + (local $$10 i32) + (local $$11 f32) + (local $$12 i32) + (local $$13 f32) + (local $$14 f32) + (local $$15 i32) + (local $$16 f32) + (local $$17 i32) + (local $$18 f32) + (local $$19 i32) + (local $$2 f32) + (local $$20 i32) + (local $$21 f32) + (local $$22 i32) + (local $$23 i32) + (local $$3 i32) + (local $$4 f32) + (local $$5 i32) + (local $$6 f32) + (local $$7 i32) + (local $$8 f32) + (local $$9 f32) + (local $$add i32) + (local $$add103 i32) + (local $$add108 f64) + (local $$add132 i32) + (local $$add138 f64) + (local $$add149 i32) + (local $$add154 f64) + (local $$add175 i32) + (local $$add180 f64) + (local $$add203 i32) + (local $$add209 f64) + (local $$add219 i32) + (local $$add224 f64) + (local $$add244 i32) + (local $$add267 i32) + (local $$add278 i32) + (local $$add38 i32) + (local $$add42 f64) + (local $$add66 i32) + (local $$add7 i32) + (local $$add77 i32) + (local $$add82 f64) + (local $$and i32) + (local $$and146 i32) + (local $$and19 i32) + (local $$and216 i32) + (local $$and275 i32) + (local $$and74 i32) + (local $$arrayidx i32) + (local $$arrayidx104 i32) + (local $$arrayidx111 i32) + (local $$arrayidx130 i32) + (local $$arrayidx133 i32) + (local $$arrayidx141 i32) + (local $$arrayidx150 i32) + (local $$arrayidx158 i32) + (local $$arrayidx176 i32) + (local $$arrayidx182 i32) + (local $$arrayidx201 i32) + (local $$arrayidx204 i32) + (local $$arrayidx211 i32) + (local $$arrayidx220 i32) + (local $$arrayidx227 i32) + (local $$arrayidx23 i32) + (local $$arrayidx245 i32) + (local $$arrayidx246 i32) + (local $$arrayidx265 i32) + (local $$arrayidx268 i32) + (local $$arrayidx270 i32) + (local $$arrayidx279 i32) + (local $$arrayidx281 i32) + (local $$arrayidx39 i32) + (local $$arrayidx45 i32) + (local $$arrayidx64 i32) + (local $$arrayidx67 i32) + (local $$arrayidx69 i32) + (local $$arrayidx78 i32) + (local $$arrayidx8 i32) + (local $$arrayidx86 i32) + (local $$call f32) + (local $$call105 f32) + (local $$call134 f32) + (local $$call135 f32) + (local $$call151 f32) + (local $$call177 f32) + (local $$call205 f32) + (local $$call206 f32) + (local $$call221 f32) + (local $$call269 f32) + (local $$call68 i32) + (local $$call79 f32) + (local $$cmp120184 i32) + (local $$cmp126182 i32) + (local $$cmp15202 i32) + (local $$cmp165188 i32) + (local $$cmp17 i32) + (local $$cmp171186 i32) + (local $$cmp191192 i32) + (local $$cmp197190 i32) + (local $$cmp207 i32) + (local $$cmp234196 i32) + (local $$cmp240194 i32) + (local $$cmp255200 i32) + (local $$cmp261198 i32) + (local $$cmp29172 i32) + (local $$cmp3205 i32) + (local $$cmp35170 i32) + (local $$cmp5 i32) + (local $$cmp54176 i32) + (local $$cmp60174 i32) + (local $$cmp93180 i32) + (local $$cmp99178 i32) + (local $$cond f32) + (local $$conv i32) + (local $$conv107 f64) + (local $$conv109 i32) + (local $$conv110 i32) + (local $$conv131 i32) + (local $$conv137 f64) + (local $$conv139 i32) + (local $$conv140 i32) + (local $$conv153 f64) + (local $$conv155 i32) + (local $$conv156 i32) + (local $$conv178 f64) + (local $$conv181 i32) + (local $$conv202 i32) + (local $$conv207 f64) + (local $$conv210 i32) + (local $$conv222 f64) + (local $$conv225 i32) + (local $$conv266 i32) + (local $$conv41 f64) + (local $$conv43 i32) + (local $$conv44 i32) + (local $$conv65 i32) + (local $$conv81 f64) + (local $$conv83 i32) + (local $$conv84 i32) + (local $$div f32) + (local $$exitcond i32) + (local $$exitcond216 i32) + (local $$exitcond217 i32) + (local $$exitcond218 i32) + (local $$exitcond219 i32) + (local $$exitcond220 i32) + (local $$exitcond221 i32) + (local $$exitcond222 i32) + (local $$exitcond223 i32) + (local $$exitcond224 i32) + (local $$exitcond225 i32) + (local $$exitcond226 i32) + (local $$exitcond227 i32) + (local $$exitcond228 i32) + (local $$exitcond229 i32) + (local $$exitcond230 i32) + (local $$exitcond231 i32) + (local $$exitcond232 i32) + (local $$exitcond233 i32) + (local $$flags i32) + (local $$inc i32) + (local $$inc11 i32) + (local $$inc113 i32) + (local $$inc116 i32) + (local $$inc143 i32) + (local $$inc161 i32) + (local $$inc184 i32) + (local $$inc187 i32) + (local $$inc213 i32) + (local $$inc22 i32) + (local $$inc230 i32) + (local $$inc248 i32) + (local $$inc251 i32) + (local $$inc26 i32) + (local $$inc272 i32) + (local $$inc284 i32) + (local $$inc47 i32) + (local $$inc50 i32) + (local $$inc71 i32) + (local $$inc89 i32) + (local $$mul i32) + (local $$mul106 f32) + (local $$mul124 i32) + (local $$mul136 f32) + (local $$mul152 f32) + (local $$mul169 i32) + (local $$mul179 f64) + (local $$mul195 i32) + (local $$mul208 f64) + (local $$mul223 f64) + (local $$mul238 i32) + (local $$mul259 i32) + (local $$mul33 i32) + (local $$mul40 f32) + (local $$mul58 i32) + (local $$mul80 f32) + (local $$mul9 f32) + (local $$mul97 i32) + (local $$n$0206 i32) + (local $$n$1171 i32) + (local $$n$2175 i32) + (local $$n$3179 i32) + (local $$n$4183 i32) + (local $$n$5187 i32) + (local $$n$6191 i32) + (local $$n$7195 i32) + (local $$n$8199 i32) + (local $$nonalpha i32) + (local $$num_nonalpha$0$lcssa i32) + (local $$num_nonalpha$0203 i32) + (local $$num_nonalpha$1 i32) + (local $$or$cond i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$tobool147 i32) + (local $$tobool20 i32) + (local $$tobool217 i32) + (local $$tobool276 i32) + (local $$tobool75 i32) + (local $$x$0208 i32) + (local $$x$1204 i32) + (local $$x$2173 i32) + (local $$x$3177 i32) + (local $$x$4181 i32) + (local $$x$5185 i32) + (local $$x$6189 i32) + (local $$x$7193 i32) + (local $$x$8197 i32) + (local $$x$9201 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (local.set $$nonalpha + (local.get $sp_a) + ) + (local.set $$flags + (i32.add + (local.get $$stbir_info) + (i32.const 72) + ) + ) + (local.set $$0 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$cmp207 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$tobool) + (local.get $$cmp207) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$cmp3205 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (local.set $$x$0208 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$mul + (i32.mul + (local.get $$x$0208) + (local.get $$channels) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$alpha_channel) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (f32.load + (local.get $$arrayidx) + ) + ) + (local.set $$tobool1 + (f32.ne + (local.get $$1) + (f32.const 0) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$1) + ) + ) + (local.set $$cond + (if (result f32) + (local.get $$tobool1) + (local.get $$div) + (f32.const 0) + ) + ) + (if + (local.get $$cmp3205) + (block + (local.set $$n$0206 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$cmp5 + (i32.eq + (local.get $$n$0206) + (local.get $$alpha_channel) + ) + ) + (local.set $$add7 + (i32.add + (local.get $$n$0206) + (local.get $$mul) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add7) + (i32.const 2) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$2 + (f32.load + (local.get $$arrayidx8) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$cond) + (local.get $$2) + ) + ) + (f32.store + (local.get $$arrayidx8) + (local.get $$mul9) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$n$0206) + (i32.const 1) + ) + ) + (local.set $$exitcond232 + (i32.eq + (local.get $$inc) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond232) + (br $while-out0) + (local.set $$n$0206 + (local.get $$inc) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$inc11 + (i32.add + (local.get $$x$0208) + (i32.const 1) + ) + ) + (local.set $$exitcond233 + (i32.eq + (local.get $$inc11) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond233) + (br $while-out) + (local.set $$x$0208 + (local.get $$inc11) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$cmp15202 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (if + (local.get $$cmp15202) + (block + (local.set $$num_nonalpha$0203 + (i32.const 0) + ) + (local.set $$x$1204 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$cmp17 + (i32.eq + (local.get $$x$1204) + (local.get $$alpha_channel) + ) + ) + (if + (local.get $$cmp17) + (block + (local.set $$3 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and19 + (i32.and + (local.get $$3) + (i32.const 2) + ) + ) + (local.set $$tobool20 + (i32.eq + (local.get $$and19) + (i32.const 0) + ) + ) + (if + (local.get $$tobool20) + (local.set $$num_nonalpha$1 + (local.get $$num_nonalpha$0203) + ) + (local.set $label + (i32.const 13) + ) + ) + ) + (local.set $label + (i32.const 13) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 13) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$conv + (i32.and + (local.get $$x$1204) + (i32.const 65535) + ) + ) + (local.set $$inc22 + (i32.add + (local.get $$num_nonalpha$0203) + (i32.const 1) + ) + ) + (local.set $$arrayidx23 + (i32.add + (local.get $$nonalpha) + (i32.shl + (local.get $$num_nonalpha$0203) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx23) + (local.get $$conv) + ) + (local.set $$num_nonalpha$1 + (local.get $$inc22) + ) + ) + ) + (local.set $$inc26 + (i32.add + (local.get $$x$1204) + (i32.const 1) + ) + ) + (local.set $$exitcond231 + (i32.eq + (local.get $$inc26) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond231) + (block + (local.set $$num_nonalpha$0$lcssa + (local.get $$num_nonalpha$1) + ) + (br $while-out2) + ) + (block + (local.set $$num_nonalpha$0203 + (local.get $$num_nonalpha$1) + ) + (local.set $$x$1204 + (local.get $$inc26) + ) + ) + ) + (br $while-in3) + ) + ) + ) + (local.set $$num_nonalpha$0$lcssa + (i32.const 0) + ) + ) + (block $switch + (block $switch-default + (block $switch-case42 + (block $switch-case37 + (block $switch-case32 + (block $switch-case27 + (block $switch-case22 + (block $switch-case17 + (block $switch-case12 + (block $switch-case + (br_table $switch-case $switch-case12 $switch-case17 $switch-case22 $switch-case27 $switch-case32 $switch-case37 $switch-case42 $switch-default + (i32.sub + (local.get $$decode) + (i32.const 0) + ) + ) + ) + (block + (local.set $$cmp29172 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp29172) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp35170 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (local.set $$x$2173 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$mul33 + (i32.mul + (local.get $$x$2173) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp35170) + (block + (local.set $$n$1171 + (i32.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$add38 + (i32.add + (local.get $$n$1171) + (local.get $$mul33) + ) + ) + (local.set $$arrayidx39 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add38) + (i32.const 2) + ) + ) + ) + (local.set $$4 + (f32.load + (local.get $$arrayidx39) + ) + ) + (local.set $$call + (call $_stbir__saturate + (local.get $$4) + ) + ) + (local.set $$mul40 + (f32.mul + (local.get $$call) + (f32.const 255) + ) + ) + (local.set $$conv41 + (f64.promote_f32 + (local.get $$mul40) + ) + ) + (local.set $$add42 + (f64.add + (local.get $$conv41) + (f64.const 0.5) + ) + ) + (local.set $$conv43 + (i32.trunc_f64_s + (local.get $$add42) + ) + ) + (local.set $$conv44 + (i32.and + (local.get $$conv43) + (i32.const 255) + ) + ) + (local.set $$arrayidx45 + (i32.add + (local.get $$output_buffer) + (local.get $$add38) + ) + ) + (i32.store8 + (local.get $$arrayidx45) + (local.get $$conv44) + ) + (local.set $$inc47 + (i32.add + (local.get $$n$1171) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc47) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond) + (br $while-out6) + (local.set $$n$1171 + (local.get $$inc47) + ) + ) + (br $while-in7) + ) + ) + ) + ) + (local.set $$inc50 + (i32.add + (local.get $$x$2173) + (i32.const 1) + ) + ) + (local.set $$exitcond216 + (i32.eq + (local.get $$inc50) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond216) + (br $while-out4) + (local.set $$x$2173 + (local.get $$inc50) + ) + ) + (br $while-in5) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp54176 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp54176) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp60174 + (i32.gt_s + (local.get $$num_nonalpha$0$lcssa) + (i32.const 0) + ) + ) + (local.set $$x$3177 + (i32.const 0) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$mul58 + (i32.mul + (local.get $$x$3177) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp60174) + (block + (local.set $$n$2175 + (i32.const 0) + ) + (loop $while-in11 + (block $while-out10 + (local.set $$arrayidx64 + (i32.add + (local.get $$nonalpha) + (i32.shl + (local.get $$n$2175) + (i32.const 1) + ) + ) + ) + (local.set $$5 + (i32.load16_s + (local.get $$arrayidx64) + ) + ) + (local.set $$conv65 + (i32.and + (local.get $$5) + (i32.const 65535) + ) + ) + (local.set $$add66 + (i32.add + (local.get $$mul58) + (local.get $$conv65) + ) + ) + (local.set $$arrayidx67 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add66) + (i32.const 2) + ) + ) + ) + (local.set $$6 + (f32.load + (local.get $$arrayidx67) + ) + ) + (local.set $$call68 + (call $_stbir__linear_to_srgb_uchar + (local.get $$6) + ) + ) + (local.set $$arrayidx69 + (i32.add + (local.get $$output_buffer) + (local.get $$add66) + ) + ) + (i32.store8 + (local.get $$arrayidx69) + (local.get $$call68) + ) + (local.set $$inc71 + (i32.add + (local.get $$n$2175) + (i32.const 1) + ) + ) + (local.set $$exitcond217 + (i32.eq + (local.get $$inc71) + (local.get $$num_nonalpha$0$lcssa) + ) + ) + (if + (local.get $$exitcond217) + (br $while-out10) + (local.set $$n$2175 + (local.get $$inc71) + ) + ) + (br $while-in11) + ) + ) + ) + ) + (local.set $$7 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and74 + (i32.and + (local.get $$7) + (i32.const 2) + ) + ) + (local.set $$tobool75 + (i32.eq + (local.get $$and74) + (i32.const 0) + ) + ) + (if + (local.get $$tobool75) + (block + (local.set $$add77 + (i32.add + (local.get $$mul58) + (local.get $$alpha_channel) + ) + ) + (local.set $$arrayidx78 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add77) + (i32.const 2) + ) + ) + ) + (local.set $$8 + (f32.load + (local.get $$arrayidx78) + ) + ) + (local.set $$call79 + (call $_stbir__saturate + (local.get $$8) + ) + ) + (local.set $$mul80 + (f32.mul + (local.get $$call79) + (f32.const 255) + ) + ) + (local.set $$conv81 + (f64.promote_f32 + (local.get $$mul80) + ) + ) + (local.set $$add82 + (f64.add + (local.get $$conv81) + (f64.const 0.5) + ) + ) + (local.set $$conv83 + (i32.trunc_f64_s + (local.get $$add82) + ) + ) + (local.set $$conv84 + (i32.and + (local.get $$conv83) + (i32.const 255) + ) + ) + (local.set $$arrayidx86 + (i32.add + (local.get $$output_buffer) + (local.get $$add77) + ) + ) + (i32.store8 + (local.get $$arrayidx86) + (local.get $$conv84) + ) + ) + ) + (local.set $$inc89 + (i32.add + (local.get $$x$3177) + (i32.const 1) + ) + ) + (local.set $$exitcond218 + (i32.eq + (local.get $$inc89) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond218) + (br $while-out8) + (local.set $$x$3177 + (local.get $$inc89) + ) + ) + (br $while-in9) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp93180 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp93180) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp99178 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (local.set $$x$4181 + (i32.const 0) + ) + (loop $while-in14 + (block $while-out13 + (local.set $$mul97 + (i32.mul + (local.get $$x$4181) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp99178) + (block + (local.set $$n$3179 + (i32.const 0) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$add103 + (i32.add + (local.get $$n$3179) + (local.get $$mul97) + ) + ) + (local.set $$arrayidx104 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add103) + (i32.const 2) + ) + ) + ) + (local.set $$9 + (f32.load + (local.get $$arrayidx104) + ) + ) + (local.set $$call105 + (call $_stbir__saturate + (local.get $$9) + ) + ) + (local.set $$mul106 + (f32.mul + (local.get $$call105) + (f32.const 65535) + ) + ) + (local.set $$conv107 + (f64.promote_f32 + (local.get $$mul106) + ) + ) + (local.set $$add108 + (f64.add + (local.get $$conv107) + (f64.const 0.5) + ) + ) + (local.set $$conv109 + (i32.trunc_f64_s + (local.get $$add108) + ) + ) + (local.set $$conv110 + (i32.and + (local.get $$conv109) + (i32.const 65535) + ) + ) + (local.set $$arrayidx111 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add103) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx111) + (local.get $$conv110) + ) + (local.set $$inc113 + (i32.add + (local.get $$n$3179) + (i32.const 1) + ) + ) + (local.set $$exitcond219 + (i32.eq + (local.get $$inc113) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond219) + (br $while-out15) + (local.set $$n$3179 + (local.get $$inc113) + ) + ) + (br $while-in16) + ) + ) + ) + ) + (local.set $$inc116 + (i32.add + (local.get $$x$4181) + (i32.const 1) + ) + ) + (local.set $$exitcond220 + (i32.eq + (local.get $$inc116) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond220) + (br $while-out13) + (local.set $$x$4181 + (local.get $$inc116) + ) + ) + (br $while-in14) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp120184 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp120184) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp126182 + (i32.gt_s + (local.get $$num_nonalpha$0$lcssa) + (i32.const 0) + ) + ) + (local.set $$x$5185 + (i32.const 0) + ) + (loop $while-in19 + (block $while-out18 + (local.set $$mul124 + (i32.mul + (local.get $$x$5185) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp126182) + (block + (local.set $$n$4183 + (i32.const 0) + ) + (loop $while-in21 + (block $while-out20 + (local.set $$arrayidx130 + (i32.add + (local.get $$nonalpha) + (i32.shl + (local.get $$n$4183) + (i32.const 1) + ) + ) + ) + (local.set $$10 + (i32.load16_s + (local.get $$arrayidx130) + ) + ) + (local.set $$conv131 + (i32.and + (local.get $$10) + (i32.const 65535) + ) + ) + (local.set $$add132 + (i32.add + (local.get $$mul124) + (local.get $$conv131) + ) + ) + (local.set $$arrayidx133 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add132) + (i32.const 2) + ) + ) + ) + (local.set $$11 + (f32.load + (local.get $$arrayidx133) + ) + ) + (local.set $$call134 + (call $_stbir__saturate + (local.get $$11) + ) + ) + (local.set $$call135 + (call $_stbir__linear_to_srgb + (local.get $$call134) + ) + ) + (local.set $$mul136 + (f32.mul + (local.get $$call135) + (f32.const 65535) + ) + ) + (local.set $$conv137 + (f64.promote_f32 + (local.get $$mul136) + ) + ) + (local.set $$add138 + (f64.add + (local.get $$conv137) + (f64.const 0.5) + ) + ) + (local.set $$conv139 + (i32.trunc_f64_s + (local.get $$add138) + ) + ) + (local.set $$conv140 + (i32.and + (local.get $$conv139) + (i32.const 65535) + ) + ) + (local.set $$arrayidx141 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add132) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx141) + (local.get $$conv140) + ) + (local.set $$inc143 + (i32.add + (local.get $$n$4183) + (i32.const 1) + ) + ) + (local.set $$exitcond221 + (i32.eq + (local.get $$inc143) + (local.get $$num_nonalpha$0$lcssa) + ) + ) + (if + (local.get $$exitcond221) + (br $while-out20) + (local.set $$n$4183 + (local.get $$inc143) + ) + ) + (br $while-in21) + ) + ) + ) + ) + (local.set $$12 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and146 + (i32.and + (local.get $$12) + (i32.const 2) + ) + ) + (local.set $$tobool147 + (i32.eq + (local.get $$and146) + (i32.const 0) + ) + ) + (if + (local.get $$tobool147) + (block + (local.set $$add149 + (i32.add + (local.get $$mul124) + (local.get $$alpha_channel) + ) + ) + (local.set $$arrayidx150 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add149) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (f32.load + (local.get $$arrayidx150) + ) + ) + (local.set $$call151 + (call $_stbir__saturate + (local.get $$13) + ) + ) + (local.set $$mul152 + (f32.mul + (local.get $$call151) + (f32.const 65535) + ) + ) + (local.set $$conv153 + (f64.promote_f32 + (local.get $$mul152) + ) + ) + (local.set $$add154 + (f64.add + (local.get $$conv153) + (f64.const 0.5) + ) + ) + (local.set $$conv155 + (i32.trunc_f64_s + (local.get $$add154) + ) + ) + (local.set $$conv156 + (i32.and + (local.get $$conv155) + (i32.const 65535) + ) + ) + (local.set $$arrayidx158 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add149) + (i32.const 1) + ) + ) + ) + (i32.store16 + (local.get $$arrayidx158) + (local.get $$conv156) + ) + ) + ) + (local.set $$inc161 + (i32.add + (local.get $$x$5185) + (i32.const 1) + ) + ) + (local.set $$exitcond222 + (i32.eq + (local.get $$inc161) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond222) + (br $while-out18) + (local.set $$x$5185 + (local.get $$inc161) + ) + ) + (br $while-in19) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp165188 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp165188) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp171186 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (local.set $$x$6189 + (i32.const 0) + ) + (loop $while-in24 + (block $while-out23 + (local.set $$mul169 + (i32.mul + (local.get $$x$6189) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp171186) + (block + (local.set $$n$5187 + (i32.const 0) + ) + (loop $while-in26 + (block $while-out25 + (local.set $$add175 + (i32.add + (local.get $$n$5187) + (local.get $$mul169) + ) + ) + (local.set $$arrayidx176 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add175) + (i32.const 2) + ) + ) + ) + (local.set $$14 + (f32.load + (local.get $$arrayidx176) + ) + ) + (local.set $$call177 + (call $_stbir__saturate + (local.get $$14) + ) + ) + (local.set $$conv178 + (f64.promote_f32 + (local.get $$call177) + ) + ) + (local.set $$mul179 + (f64.mul + (local.get $$conv178) + (f64.const 4294967295) + ) + ) + (local.set $$add180 + (f64.add + (local.get $$mul179) + (f64.const 0.5) + ) + ) + (local.set $$conv181 + (i32.trunc_f64_u + (local.get $$add180) + ) + ) + (local.set $$arrayidx182 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add175) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx182) + (local.get $$conv181) + ) + (local.set $$inc184 + (i32.add + (local.get $$n$5187) + (i32.const 1) + ) + ) + (local.set $$exitcond223 + (i32.eq + (local.get $$inc184) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond223) + (br $while-out25) + (local.set $$n$5187 + (local.get $$inc184) + ) + ) + (br $while-in26) + ) + ) + ) + ) + (local.set $$inc187 + (i32.add + (local.get $$x$6189) + (i32.const 1) + ) + ) + (local.set $$exitcond224 + (i32.eq + (local.get $$inc187) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond224) + (br $while-out23) + (local.set $$x$6189 + (local.get $$inc187) + ) + ) + (br $while-in24) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp191192 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp191192) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp197190 + (i32.gt_s + (local.get $$num_nonalpha$0$lcssa) + (i32.const 0) + ) + ) + (local.set $$x$7193 + (i32.const 0) + ) + (loop $while-in29 + (block $while-out28 + (local.set $$mul195 + (i32.mul + (local.get $$x$7193) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp197190) + (block + (local.set $$n$6191 + (i32.const 0) + ) + (loop $while-in31 + (block $while-out30 + (local.set $$arrayidx201 + (i32.add + (local.get $$nonalpha) + (i32.shl + (local.get $$n$6191) + (i32.const 1) + ) + ) + ) + (local.set $$15 + (i32.load16_s + (local.get $$arrayidx201) + ) + ) + (local.set $$conv202 + (i32.and + (local.get $$15) + (i32.const 65535) + ) + ) + (local.set $$add203 + (i32.add + (local.get $$mul195) + (local.get $$conv202) + ) + ) + (local.set $$arrayidx204 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add203) + (i32.const 2) + ) + ) + ) + (local.set $$16 + (f32.load + (local.get $$arrayidx204) + ) + ) + (local.set $$call205 + (call $_stbir__saturate + (local.get $$16) + ) + ) + (local.set $$call206 + (call $_stbir__linear_to_srgb + (local.get $$call205) + ) + ) + (local.set $$conv207 + (f64.promote_f32 + (local.get $$call206) + ) + ) + (local.set $$mul208 + (f64.mul + (local.get $$conv207) + (f64.const 4294967295) + ) + ) + (local.set $$add209 + (f64.add + (local.get $$mul208) + (f64.const 0.5) + ) + ) + (local.set $$conv210 + (i32.trunc_f64_u + (local.get $$add209) + ) + ) + (local.set $$arrayidx211 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add203) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx211) + (local.get $$conv210) + ) + (local.set $$inc213 + (i32.add + (local.get $$n$6191) + (i32.const 1) + ) + ) + (local.set $$exitcond225 + (i32.eq + (local.get $$inc213) + (local.get $$num_nonalpha$0$lcssa) + ) + ) + (if + (local.get $$exitcond225) + (br $while-out30) + (local.set $$n$6191 + (local.get $$inc213) + ) + ) + (br $while-in31) + ) + ) + ) + ) + (local.set $$17 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and216 + (i32.and + (local.get $$17) + (i32.const 2) + ) + ) + (local.set $$tobool217 + (i32.eq + (local.get $$and216) + (i32.const 0) + ) + ) + (if + (local.get $$tobool217) + (block + (local.set $$add219 + (i32.add + (local.get $$mul195) + (local.get $$alpha_channel) + ) + ) + (local.set $$arrayidx220 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add219) + (i32.const 2) + ) + ) + ) + (local.set $$18 + (f32.load + (local.get $$arrayidx220) + ) + ) + (local.set $$call221 + (call $_stbir__saturate + (local.get $$18) + ) + ) + (local.set $$conv222 + (f64.promote_f32 + (local.get $$call221) + ) + ) + (local.set $$mul223 + (f64.mul + (local.get $$conv222) + (f64.const 4294967295) + ) + ) + (local.set $$add224 + (f64.add + (local.get $$mul223) + (f64.const 0.5) + ) + ) + (local.set $$conv225 + (i32.trunc_f64_s + (local.get $$add224) + ) + ) + (local.set $$arrayidx227 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add219) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx227) + (local.get $$conv225) + ) + ) + ) + (local.set $$inc230 + (i32.add + (local.get $$x$7193) + (i32.const 1) + ) + ) + (local.set $$exitcond226 + (i32.eq + (local.get $$inc230) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond226) + (br $while-out28) + (local.set $$x$7193 + (local.get $$inc230) + ) + ) + (br $while-in29) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp234196 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp234196) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp240194 + (i32.gt_s + (local.get $$channels) + (i32.const 0) + ) + ) + (local.set $$x$8197 + (i32.const 0) + ) + (loop $while-in34 + (block $while-out33 + (local.set $$mul238 + (i32.mul + (local.get $$x$8197) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp240194) + (block + (local.set $$n$7195 + (i32.const 0) + ) + (loop $while-in36 + (block $while-out35 + (local.set $$add244 + (i32.add + (local.get $$n$7195) + (local.get $$mul238) + ) + ) + (local.set $$arrayidx245 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add244) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx245) + ) + ) + (local.set $$arrayidx246 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add244) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx246) + (local.get $$19) + ) + (local.set $$inc248 + (i32.add + (local.get $$n$7195) + (i32.const 1) + ) + ) + (local.set $$exitcond227 + (i32.eq + (local.get $$inc248) + (local.get $$channels) + ) + ) + (if + (local.get $$exitcond227) + (br $while-out35) + (local.set $$n$7195 + (local.get $$inc248) + ) + ) + (br $while-in36) + ) + ) + ) + ) + (local.set $$inc251 + (i32.add + (local.get $$x$8197) + (i32.const 1) + ) + ) + (local.set $$exitcond228 + (i32.eq + (local.get $$inc251) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond228) + (br $while-out33) + (local.set $$x$8197 + (local.get $$inc251) + ) + ) + (br $while-in34) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (block + (local.set $$cmp255200 + (i32.gt_s + (local.get $$num_pixels) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp255200) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp261198 + (i32.gt_s + (local.get $$num_nonalpha$0$lcssa) + (i32.const 0) + ) + ) + (local.set $$x$9201 + (i32.const 0) + ) + (loop $while-in39 + (block $while-out38 + (local.set $$mul259 + (i32.mul + (local.get $$x$9201) + (local.get $$channels) + ) + ) + (if + (local.get $$cmp261198) + (block + (local.set $$n$8199 + (i32.const 0) + ) + (loop $while-in41 + (block $while-out40 + (local.set $$arrayidx265 + (i32.add + (local.get $$nonalpha) + (i32.shl + (local.get $$n$8199) + (i32.const 1) + ) + ) + ) + (local.set $$20 + (i32.load16_s + (local.get $$arrayidx265) + ) + ) + (local.set $$conv266 + (i32.and + (local.get $$20) + (i32.const 65535) + ) + ) + (local.set $$add267 + (i32.add + (local.get $$mul259) + (local.get $$conv266) + ) + ) + (local.set $$arrayidx268 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add267) + (i32.const 2) + ) + ) + ) + (local.set $$21 + (f32.load + (local.get $$arrayidx268) + ) + ) + (local.set $$call269 + (call $_stbir__linear_to_srgb + (local.get $$21) + ) + ) + (local.set $$arrayidx270 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add267) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx270) + (local.get $$call269) + ) + (local.set $$inc272 + (i32.add + (local.get $$n$8199) + (i32.const 1) + ) + ) + (local.set $$exitcond229 + (i32.eq + (local.get $$inc272) + (local.get $$num_nonalpha$0$lcssa) + ) + ) + (if + (local.get $$exitcond229) + (br $while-out40) + (local.set $$n$8199 + (local.get $$inc272) + ) + ) + (br $while-in41) + ) + ) + ) + ) + (local.set $$22 + (i32.load + (local.get $$flags) + ) + ) + (local.set $$and275 + (i32.and + (local.get $$22) + (i32.const 2) + ) + ) + (local.set $$tobool276 + (i32.eq + (local.get $$and275) + (i32.const 0) + ) + ) + (local.set $$add278 + (i32.add + (local.get $$mul259) + (local.get $$alpha_channel) + ) + ) + (if + (local.get $$tobool276) + (block + (local.set $$arrayidx281 + (i32.add + (local.get $$output_buffer) + (i32.shl + (local.get $$add278) + (i32.const 2) + ) + ) + ) + (local.set $$arrayidx279 + (i32.add + (local.get $$encode_buffer) + (i32.shl + (local.get $$add278) + (i32.const 2) + ) + ) + ) + (local.set $$23 + (i32.load + (local.get $$arrayidx279) + ) + ) + (i32.store + (local.get $$arrayidx281) + (local.get $$23) + ) + ) + ) + (local.set $$inc284 + (i32.add + (local.get $$x$9201) + (i32.const 1) + ) + ) + (local.set $$exitcond230 + (i32.eq + (local.get $$inc284) + (local.get $$num_pixels) + ) + ) + (if + (local.get $$exitcond230) + (br $while-out38) + (local.set $$x$9201 + (local.get $$inc284) + ) + ) + (br $while-in39) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $___assert_fail + (i32.const 14369) + (i32.const 13065) + (i32.const 1861) + (i32.const 14490) + ) + ) + ) + (func $_stbir__saturate (; 476 ;) (param $$x f32) (result f32) + (local $$$x f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$retval$0 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (f32.lt + (local.get $$x) + (f32.const 0) + ) + ) + (local.set $$cmp1 + (f32.gt + (local.get $$x) + (f32.const 1) + ) + ) + (local.set $$$x + (if (result f32) + (local.get $$cmp1) + (f32.const 1) + (local.get $$x) + ) + ) + (local.set $$retval$0 + (if (result f32) + (local.get $$cmp) + (f32.const 0) + (local.get $$$x) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__linear_to_srgb_uchar (; 477 ;) (param $$in f32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$add i32) + (local $$and i32) + (local $$and8 i32) + (local $$arrayidx i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$conv i32) + (local $$in$addr$0 f32) + (local $$in$addr$1 f32) + (local $$mul i32) + (local $$shl i32) + (local $$shr i32) + (local $$shr5 i32) + (local $$shr7 i32) + (local $$shr9 i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (f32.gt + (local.get $$in) + (f32.const 0.0001220703125) + ) + ) + (local.set $$in$addr$0 + (if (result f32) + (local.get $$cmp) + (local.get $$in) + (f32.const 0.0001220703125) + ) + ) + (local.set $$cmp1 + (f32.gt + (local.get $$in$addr$0) + (f32.const 0.9999999403953552) + ) + ) + (local.set $$in$addr$1 + (if (result f32) + (local.get $$cmp1) + (f32.const 0.9999999403953552) + (local.get $$in$addr$0) + ) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$in$addr$1) + ) + ) + (local.set $$sub + (i32.add + (local.get $$0) + (i32.const -956301312) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$sub) + (i32.const 20) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 5072) + (i32.shl + (local.get $$shr) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$shr5 + (i32.shr_u + (local.get $$1) + (i32.const 16) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr5) + (i32.const 9) + ) + ) + (local.set $$and + (i32.and + (local.get $$1) + (i32.const 65535) + ) + ) + (local.set $$shr7 + (i32.shr_u + (local.get $$0) + (i32.const 12) + ) + ) + (local.set $$and8 + (i32.and + (local.get $$shr7) + (i32.const 255) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$and) + (local.get $$and8) + ) + ) + (local.set $$add + (i32.add + (local.get $$shl) + (local.get $$mul) + ) + ) + (local.set $$shr9 + (i32.shr_u + (local.get $$add) + (i32.const 16) + ) + ) + (local.set $$conv + (i32.and + (local.get $$shr9) + (i32.const 255) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $_stbir__linear_to_srgb (; 478 ;) (param $$f f32) (result f32) + (local $$0 f64) + (local $$cmp i32) + (local $$conv f64) + (local $$conv1 f32) + (local $$mul f32) + (local $$mul2 f32) + (local $$retval$0 f32) + (local $$sub f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$f) + (f32.const 3.1308000907301903e-03) + ) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$conv + (f64.promote_f32 + (local.get $$f) + ) + ) + (local.set $$0 + (call $_pow + (local.get $$conv) + (f64.const 0.4166666567325592) + ) + ) + (local.set $$conv1 + (f32.demote_f64 + (local.get $$0) + ) + ) + (local.set $$mul2 + (f32.mul + (local.get $$conv1) + (f32.const 1.0549999475479126) + ) + ) + (local.set $$sub + (f32.add + (local.get $$mul2) + (f32.const -0.054999999701976776) + ) + ) + (local.set $$retval$0 + (local.get $$sub) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$mul + (f32.mul + (local.get $$f) + (f32.const 12.920000076293945) + ) + ) + (local.set $$retval$0 + (local.get $$mul) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_stbir__support_zero (; 479 ;) (param $$s f32) (result f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (f32.const 0) + ) + ) + (func $_stbir__filter_trapezoid (; 480 ;) (param $$x f32) (param $$scale f32) (result f32) + (local $$0 f32) + (local $$add f32) + (local $$cmp i32) + (local $$cmp2 i32) + (local $$cmp4 i32) + (local $$div f32) + (local $$div9 f32) + (local $$retval$1 f32) + (local $$sub f32) + (local $$sub8 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$div + (f32.mul + (local.get $$scale) + (f32.const 0.5) + ) + ) + (local.set $$add + (f32.add + (local.get $$div) + (f32.const 0.5) + ) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$scale) + (f32.const 1) + ) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 14513) + (i32.const 13065) + (i32.const 762) + (i32.const 14549) + ) + ) + (local.set $$0 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp2 + (i32.eqz + (f32.ge + (local.get $$0) + (local.get $$add) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp2) + ) + (block + (local.set $$retval$1 + (f32.const 0) + ) + (return + (local.get $$retval$1) + ) + ) + ) + (local.set $$sub + (f32.sub + (f32.const 0.5) + (local.get $$div) + ) + ) + (local.set $$cmp4 + (i32.eqz + (f32.le + (local.get $$0) + (local.get $$sub) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp4) + ) + (block + (local.set $$retval$1 + (f32.const 1) + ) + (return + (local.get $$retval$1) + ) + ) + ) + (local.set $$sub8 + (f32.sub + (local.get $$add) + (local.get $$0) + ) + ) + (local.set $$div9 + (f32.div + (local.get $$sub8) + (local.get $$scale) + ) + ) + (local.set $$retval$1 + (local.get $$div9) + ) + (return + (local.get $$retval$1) + ) + ) + (func $_stbir__support_trapezoid (; 481 ;) (param $$scale f32) (result f32) + (local $$add f32) + (local $$cmp i32) + (local $$div f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$scale) + (f32.const 1) + ) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 14513) + (i32.const 13065) + (i32.const 780) + (i32.const 14524) + ) + (block + (local.set $$div + (f32.mul + (local.get $$scale) + (f32.const 0.5) + ) + ) + (local.set $$add + (f32.add + (local.get $$div) + (f32.const 0.5) + ) + ) + (return + (local.get $$add) + ) + ) + ) + (return + (f32.const 0) + ) + ) + (func $_stbir__filter_triangle (; 482 ;) (param $$x f32) (param $$s f32) (result f32) + (local $$0 f32) + (local $$cmp i32) + (local $$retval$0 f32) + (local $$sub f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$0) + (f32.const 1) + ) + ) + ) + (local.set $$sub + (f32.sub + (f32.const 1) + (local.get $$0) + ) + ) + (local.set $$retval$0 + (if (result f32) + (local.get $$cmp) + (f32.const 0) + (local.get $$sub) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__support_one (; 483 ;) (param $$s f32) (result f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (f32.const 1) + ) + ) + (func $_stbir__filter_cubic (; 484 ;) (param $$x f32) (param $$s f32) (result f32) + (local $$0 f32) + (local $$add f32) + (local $$add10 f32) + (local $$add12 f32) + (local $$cmp i32) + (local $$cmp5 i32) + (local $$div f32) + (local $$div13 f32) + (local $$mul f32) + (local $$mul11 f32) + (local $$mul3 f32) + (local $$mul4 f32) + (local $$mul9 f32) + (local $$retval$0 f32) + (local $$sub f32) + (local $$sub8 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp + (f32.lt + (local.get $$0) + (f32.const 1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$mul + (f32.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$0) + (f32.const 3) + ) + ) + (local.set $$sub + (f32.add + (local.get $$mul3) + (f32.const -6) + ) + ) + (local.set $$mul4 + (f32.mul + (local.get $$mul) + (local.get $$sub) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul4) + (f32.const 4) + ) + ) + (local.set $$div + (f32.div + (local.get $$add) + (f32.const 6) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp5 + (f32.lt + (local.get $$0) + (f32.const 2) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$retval$0 + (f32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$sub8 + (f32.sub + (f32.const 6) + (local.get $$0) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$0) + (local.get $$sub8) + ) + ) + (local.set $$add10 + (f32.add + (local.get $$mul9) + (f32.const -12) + ) + ) + (local.set $$mul11 + (f32.mul + (local.get $$0) + (local.get $$add10) + ) + ) + (local.set $$add12 + (f32.add + (local.get $$mul11) + (f32.const 8) + ) + ) + (local.set $$div13 + (f32.div + (local.get $$add12) + (f32.const 6) + ) + ) + (local.set $$retval$0 + (local.get $$div13) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__support_two (; 485 ;) (param $$s f32) (result f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (f32.const 2) + ) + ) + (func $_stbir__filter_catmullrom (; 486 ;) (param $$x f32) (param $$s f32) (result f32) + (local $$0 f32) + (local $$add f32) + (local $$cmp i32) + (local $$cmp6 i32) + (local $$mul f32) + (local $$mul11 f32) + (local $$mul12 f32) + (local $$mul3 f32) + (local $$mul4 f32) + (local $$mul9 f32) + (local $$retval$0 f32) + (local $$sub f32) + (local $$sub10 f32) + (local $$sub13 f32) + (local $$sub5 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp + (f32.lt + (local.get $$0) + (f32.const 1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$mul + (f32.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$0) + (f32.const 1.5) + ) + ) + (local.set $$sub + (f32.sub + (f32.const 2.5) + (local.get $$mul3) + ) + ) + (local.set $$mul4 + (f32.mul + (local.get $$mul) + (local.get $$sub) + ) + ) + (local.set $$sub5 + (f32.sub + (f32.const 1) + (local.get $$mul4) + ) + ) + (local.set $$retval$0 + (local.get $$sub5) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp6 + (f32.lt + (local.get $$0) + (f32.const 2) + ) + ) + (if + (i32.eqz + (local.get $$cmp6) + ) + (block + (local.set $$retval$0 + (f32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$0) + (f32.const 0.5) + ) + ) + (local.set $$sub10 + (f32.add + (local.get $$mul9) + (f32.const -2.5) + ) + ) + (local.set $$mul11 + (f32.mul + (local.get $$0) + (local.get $$sub10) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul11) + (f32.const 4) + ) + ) + (local.set $$mul12 + (f32.mul + (local.get $$0) + (local.get $$add) + ) + ) + (local.set $$sub13 + (f32.sub + (f32.const 2) + (local.get $$mul12) + ) + ) + (local.set $$retval$0 + (local.get $$sub13) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__filter_mitchell (; 487 ;) (param $$x f32) (param $$s f32) (result f32) + (local $$0 f32) + (local $$add f32) + (local $$add11 f32) + (local $$add13 f32) + (local $$cmp i32) + (local $$cmp5 i32) + (local $$div f32) + (local $$div14 f32) + (local $$mul f32) + (local $$mul10 f32) + (local $$mul12 f32) + (local $$mul3 f32) + (local $$mul4 f32) + (local $$mul8 f32) + (local $$retval$0 f32) + (local $$sub f32) + (local $$sub9 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp + (f32.lt + (local.get $$0) + (f32.const 1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$mul + (f32.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul3 + (f32.mul + (local.get $$0) + (f32.const 21) + ) + ) + (local.set $$sub + (f32.add + (local.get $$mul3) + (f32.const -36) + ) + ) + (local.set $$mul4 + (f32.mul + (local.get $$mul) + (local.get $$sub) + ) + ) + (local.set $$add + (f32.add + (local.get $$mul4) + (f32.const 16) + ) + ) + (local.set $$div + (f32.div + (local.get $$add) + (f32.const 18) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp5 + (f32.lt + (local.get $$0) + (f32.const 2) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$retval$0 + (f32.const 0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$mul8 + (f32.mul + (local.get $$0) + (f32.const 7) + ) + ) + (local.set $$sub9 + (f32.sub + (f32.const 36) + (local.get $$mul8) + ) + ) + (local.set $$mul10 + (f32.mul + (local.get $$0) + (local.get $$sub9) + ) + ) + (local.set $$add11 + (f32.add + (local.get $$mul10) + (f32.const -60) + ) + ) + (local.set $$mul12 + (f32.mul + (local.get $$0) + (local.get $$add11) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$mul12) + (f32.const 32) + ) + ) + (local.set $$div14 + (f32.div + (local.get $$add13) + (f32.const 18) + ) + ) + (local.set $$retval$0 + (local.get $$div14) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__calculate_sample_range_upsample (; 488 ;) (param $$n i32) (param $$out_filter_radius f32) (param $$scale_ratio f32) (param $$out_shift f32) (param $$in_first_pixel i32) (param $$in_last_pixel i32) (param $$in_center_of_out i32) + (local $$0 f64) + (local $$1 f64) + (local $$add f32) + (local $$add1 f32) + (local $$add2 f32) + (local $$add3 f32) + (local $$add5 f32) + (local $$add8 f64) + (local $$conv f32) + (local $$conv10 f64) + (local $$conv12 i32) + (local $$conv7 f64) + (local $$conv9 i32) + (local $$div f32) + (local $$div4 f32) + (local $$div6 f32) + (local $$sub f32) + (local $$sub11 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$n) + ) + ) + (local.set $$add + (f32.add + (local.get $$conv) + (f32.const 0.5) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$add) + (local.get $$out_filter_radius) + ) + ) + (local.set $$add1 + (f32.add + (local.get $$add) + (local.get $$out_filter_radius) + ) + ) + (local.set $$add2 + (f32.add + (local.get $$sub) + (local.get $$out_shift) + ) + ) + (local.set $$div + (f32.div + (local.get $$add2) + (local.get $$scale_ratio) + ) + ) + (local.set $$add3 + (f32.add + (local.get $$add1) + (local.get $$out_shift) + ) + ) + (local.set $$div4 + (f32.div + (local.get $$add3) + (local.get $$scale_ratio) + ) + ) + (local.set $$add5 + (f32.add + (local.get $$add) + (local.get $$out_shift) + ) + ) + (local.set $$div6 + (f32.div + (local.get $$add5) + (local.get $$scale_ratio) + ) + ) + (f32.store + (local.get $$in_center_of_out) + (local.get $$div6) + ) + (local.set $$conv7 + (f64.promote_f32 + (local.get $$div) + ) + ) + (local.set $$add8 + (f64.add + (local.get $$conv7) + (f64.const 0.5) + ) + ) + (local.set $$0 + (f64.floor + (local.get $$add8) + ) + ) + (local.set $$conv9 + (i32.trunc_f64_s + (local.get $$0) + ) + ) + (i32.store + (local.get $$in_first_pixel) + (local.get $$conv9) + ) + (local.set $$conv10 + (f64.promote_f32 + (local.get $$div4) + ) + ) + (local.set $$sub11 + (f64.add + (local.get $$conv10) + (f64.const -0.5) + ) + ) + (local.set $$1 + (f64.floor + (local.get $$sub11) + ) + ) + (local.set $$conv12 + (i32.trunc_f64_s + (local.get $$1) + ) + ) + (i32.store + (local.get $$in_last_pixel) + (local.get $$conv12) + ) + (return) + ) + (func $_stbir__decode_and_resample_upsample (; 489 ;) (param $$stbir_info i32) (param $$n i32) + (local $$call i32) + (local $$call1 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_stbir__decode_scanline + (local.get $$stbir_info) + (local.get $$n) + ) + (local.set $$call + (call $_stbir__use_width_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$call1 + (call $_stbir__add_empty_ring_buffer_entry + (local.get $$stbir_info) + (local.get $$n) + ) + ) + (if + (local.get $$tobool) + (block + (call $_stbir__resample_horizontal_downsample + (local.get $$stbir_info) + (local.get $$call1) + ) + (return) + ) + (block + (call $_stbir__resample_horizontal_upsample + (local.get $$stbir_info) + (local.get $$call1) + ) + (return) + ) + ) + ) + (func $_stbir__resample_vertical_upsample (; 490 ;) (param $$stbir_info i32) (param $$n i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 f32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 i32) + (local $$30 f32) + (local $$31 f32) + (local $$32 f32) + (local $$33 f32) + (local $$34 f32) + (local $$35 f32) + (local $$36 f32) + (local $$37 f32) + (local $$38 f32) + (local $$39 f32) + (local $$4 i32) + (local $$40 f32) + (local $$41 f32) + (local $$42 f32) + (local $$43 f32) + (local $$44 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add104 f32) + (local $$add120 i32) + (local $$add132 f32) + (local $$add133 i32) + (local $$add138 f32) + (local $$add139 i32) + (local $$add144 f32) + (local $$add145 i32) + (local $$add150 f32) + (local $$add165 i32) + (local $$add175 i32) + (local $$add180 f32) + (local $$add21 i32) + (local $$add32 f32) + (local $$add46 i32) + (local $$add58 f32) + (local $$add59 i32) + (local $$add64 f32) + (local $$add80 i32) + (local $$add92 f32) + (local $$add93 i32) + (local $$add98 f32) + (local $$add99 i32) + (local $$alpha_channel5 i32) + (local $$arrayidx100 i32) + (local $$arrayidx103 i32) + (local $$arrayidx121 i32) + (local $$arrayidx128 i32) + (local $$arrayidx131 i32) + (local $$arrayidx134 i32) + (local $$arrayidx137 i32) + (local $$arrayidx140 i32) + (local $$arrayidx143 i32) + (local $$arrayidx146 i32) + (local $$arrayidx149 i32) + (local $$arrayidx166 i32) + (local $$arrayidx176 i32) + (local $$arrayidx179 i32) + (local $$arrayidx22 i32) + (local $$arrayidx28 i32) + (local $$arrayidx31 i32) + (local $$arrayidx47 i32) + (local $$arrayidx54 i32) + (local $$arrayidx57 i32) + (local $$arrayidx60 i32) + (local $$arrayidx63 i32) + (local $$arrayidx81 i32) + (local $$arrayidx88 i32) + (local $$arrayidx91 i32) + (local $$arrayidx94 i32) + (local $$arrayidx97 i32) + (local $$c$0194 i32) + (local $$call i32) + (local $$call118 i32) + (local $$call163 i32) + (local $$call20 i32) + (local $$call44 i32) + (local $$call78 i32) + (local $$channels4 i32) + (local $$cmp i32) + (local $$cmp113 i32) + (local $$cmp113217 i32) + (local $$cmp123215 i32) + (local $$cmp158 i32) + (local $$cmp158197 i32) + (local $$cmp168195 i32) + (local $$cmp173193 i32) + (local $$cmp202 i32) + (local $$cmp24200 i32) + (local $$cmp39 i32) + (local $$cmp39207 i32) + (local $$cmp49205 i32) + (local $$cmp73 i32) + (local $$cmp73212 i32) + (local $$cmp83210 i32) + (local $$coefficient_counter$0203 i32) + (local $$coefficient_counter$1208 i32) + (local $$coefficient_counter$2213 i32) + (local $$coefficient_counter$3218 i32) + (local $$coefficient_counter$4198 i32) + (local $$colorspace7 i32) + (local $$div i32) + (local $$encode_buffer9 i32) + (local $$exitcond i32) + (local $$exitcond224 i32) + (local $$exitcond225 i32) + (local $$exitcond226 i32) + (local $$exitcond227 i32) + (local $$exitcond228 i32) + (local $$inc i32) + (local $$inc106 i32) + (local $$inc109 i32) + (local $$inc116 i32) + (local $$inc152 i32) + (local $$inc155 i32) + (local $$inc161 i32) + (local $$inc182 i32) + (local $$inc185 i32) + (local $$inc188 i32) + (local $$inc33 i32) + (local $$inc35 i32) + (local $$inc42 i32) + (local $$inc66 i32) + (local $$inc69 i32) + (local $$inc76 i32) + (local $$k$0204 i32) + (local $$k$1209 i32) + (local $$k$2214 i32) + (local $$k$3219 i32) + (local $$k$4199 i32) + (local $$mul i32) + (local $$mul101 f32) + (local $$mul126 i32) + (local $$mul129 f32) + (local $$mul13 i32) + (local $$mul135 f32) + (local $$mul141 f32) + (local $$mul147 f32) + (local $$mul17 i32) + (local $$mul171 i32) + (local $$mul177 f32) + (local $$mul18 i32) + (local $$mul19 i32) + (local $$mul29 f32) + (local $$mul52 i32) + (local $$mul55 f32) + (local $$mul61 f32) + (local $$mul86 i32) + (local $$mul89 f32) + (local $$mul95 f32) + (local $$n014 i32) + (local $$n116 i32) + (local $$output_data8 i32) + (local $$output_stride_bytes i32) + (local $$output_w1 i32) + (local $$ring_buffer10 i32) + (local $$ring_buffer_begin_index11 i32) + (local $$ring_buffer_first_scanline12 i32) + (local $$ring_buffer_length_bytes i32) + (local $$ring_buffer_num_entries i32) + (local $$tobool i32) + (local $$type6 i32) + (local $$vertical_coefficient_width i32) + (local $$vertical_coefficients3 i32) + (local $$vertical_contributors2 i32) + (local $$x$0201 i32) + (local $$x$1206 i32) + (local $$x$2211 i32) + (local $$x$3216 i32) + (local $$x$4196 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$output_w1 + (i32.add + (local.get $$stbir_info) + (i32.const 20) + ) + ) + (local.set $$0 + (i32.load + (local.get $$output_w1) + ) + ) + (local.set $$vertical_contributors2 + (i32.add + (local.get $$stbir_info) + (i32.const 108) + ) + ) + (local.set $$1 + (i32.load + (local.get $$vertical_contributors2) + ) + ) + (local.set $$vertical_coefficients3 + (i32.add + (local.get $$stbir_info) + (i32.const 112) + ) + ) + (local.set $$2 + (i32.load + (local.get $$vertical_coefficients3) + ) + ) + (local.set $$channels4 + (i32.add + (local.get $$stbir_info) + (i32.const 64) + ) + ) + (local.set $$3 + (i32.load + (local.get $$channels4) + ) + ) + (local.set $$alpha_channel5 + (i32.add + (local.get $$stbir_info) + (i32.const 68) + ) + ) + (local.set $$4 + (i32.load + (local.get $$alpha_channel5) + ) + ) + (local.set $$type6 + (i32.add + (local.get $$stbir_info) + (i32.const 76) + ) + ) + (local.set $$5 + (i32.load + (local.get $$type6) + ) + ) + (local.set $$colorspace7 + (i32.add + (local.get $$stbir_info) + (i32.const 96) + ) + ) + (local.set $$6 + (i32.load + (local.get $$colorspace7) + ) + ) + (local.set $$ring_buffer_num_entries + (i32.add + (local.get $$stbir_info) + (i32.const 164) + ) + ) + (local.set $$7 + (i32.load + (local.get $$ring_buffer_num_entries) + ) + ) + (local.set $$output_data8 + (i32.add + (local.get $$stbir_info) + (i32.const 16) + ) + ) + (local.set $$8 + (i32.load + (local.get $$output_data8) + ) + ) + (local.set $$encode_buffer9 + (i32.add + (local.get $$stbir_info) + (i32.const 184) + ) + ) + (local.set $$9 + (i32.load + (local.get $$encode_buffer9) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$5) + (i32.const 1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$6) + ) + ) + (local.set $$vertical_coefficient_width + (i32.add + (local.get $$stbir_info) + (i32.const 132) + ) + ) + (local.set $$10 + (i32.load + (local.get $$vertical_coefficient_width) + ) + ) + (local.set $$ring_buffer10 + (i32.add + (local.get $$stbir_info) + (i32.const 180) + ) + ) + (local.set $$11 + (i32.load + (local.get $$ring_buffer10) + ) + ) + (local.set $$ring_buffer_begin_index11 + (i32.add + (local.get $$stbir_info) + (i32.const 176) + ) + ) + (local.set $$12 + (i32.load + (local.get $$ring_buffer_begin_index11) + ) + ) + (local.set $$ring_buffer_first_scanline12 + (i32.add + (local.get $$stbir_info) + (i32.const 168) + ) + ) + (local.set $$13 + (i32.load + (local.get $$ring_buffer_first_scanline12) + ) + ) + (local.set $$ring_buffer_length_bytes + (i32.add + (local.get $$stbir_info) + (i32.const 160) + ) + ) + (local.set $$14 + (i32.load + (local.get $$ring_buffer_length_bytes) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$14) + (i32.const 2) + ) + ) + (local.set $$mul13 + (i32.mul + (local.get $$10) + (local.get $$n) + ) + ) + (local.set $$n014 + (i32.add + (local.get $$1) + (i32.shl + (local.get $$n) + (i32.const 3) + ) + ) + ) + (local.set $$15 + (i32.load + (local.get $$n014) + ) + ) + (local.set $$n116 + (i32.add + (i32.add + (local.get $$1) + (i32.shl + (local.get $$n) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$16 + (i32.load + (local.get $$n116) + ) + ) + (local.set $$output_stride_bytes + (i32.add + (local.get $$stbir_info) + (i32.const 28) + ) + ) + (local.set $$17 + (i32.load + (local.get $$output_stride_bytes) + ) + ) + (local.set $$mul17 + (i32.mul + (local.get $$17) + (local.get $$n) + ) + ) + (local.set $$call + (call $_stbir__use_height_upsampling + (local.get $$stbir_info) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (call $___assert_fail + (i32.const 14573) + (i32.const 13065) + (i32.const 1897) + (i32.const 14722) + ) + ) + (local.set $$mul18 + (i32.shl + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$mul19 + (i32.mul + (local.get $$mul18) + (local.get $$3) + ) + ) + (drop + (call $_memset + (local.get $$9) + (i32.const 0) + (local.get $$mul19) + ) + ) + (block $switch + (block $switch-default + (block $switch-case16 + (block $switch-case11 + (block $switch-case6 + (block $switch-case + (br_table $switch-case $switch-case6 $switch-case11 $switch-case16 $switch-default + (i32.sub + (local.get $$3) + (i32.const 1) + ) + ) + ) + (block + (local.set $$cmp202 + (i32.gt_s + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp202) + (block + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (local.set $$cmp24200 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$coefficient_counter$0203 + (i32.const 0) + ) + (local.set $$k$0204 + (local.get $$15) + ) + (loop $while-in + (block $while-out + (local.set $$inc + (i32.add + (local.get $$coefficient_counter$0203) + (i32.const 1) + ) + ) + (local.set $$call20 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$0204) + (local.get $$11) + (local.get $$12) + (local.get $$13) + (local.get $$7) + (local.get $$div) + ) + ) + (local.set $$add21 + (i32.add + (local.get $$coefficient_counter$0203) + (local.get $$mul13) + ) + ) + (local.set $$arrayidx22 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add21) + (i32.const 2) + ) + ) + ) + (local.set $$18 + (f32.load + (local.get $$arrayidx22) + ) + ) + (if + (local.get $$cmp24200) + (block + (local.set $$x$0201 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx28 + (i32.add + (local.get $$call20) + (i32.shl + (local.get $$x$0201) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (f32.load + (local.get $$arrayidx28) + ) + ) + (local.set $$mul29 + (f32.mul + (local.get $$18) + (local.get $$19) + ) + ) + (local.set $$arrayidx31 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$x$0201) + (i32.const 2) + ) + ) + ) + (local.set $$20 + (f32.load + (local.get $$arrayidx31) + ) + ) + (local.set $$add32 + (f32.add + (local.get $$20) + (local.get $$mul29) + ) + ) + (f32.store + (local.get $$arrayidx31) + (local.get $$add32) + ) + (local.set $$inc33 + (i32.add + (local.get $$x$0201) + (i32.const 1) + ) + ) + (local.set $$exitcond225 + (i32.eq + (local.get $$inc33) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond225) + (br $while-out0) + (local.set $$x$0201 + (local.get $$inc33) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$inc35 + (i32.add + (local.get $$k$0204) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$k$0204) + (local.get $$16) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$coefficient_counter$0203 + (local.get $$inc) + ) + (local.set $$k$0204 + (local.get $$inc35) + ) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (block + (local.set $$cmp39207 + (i32.gt_s + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp39207) + (block + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (local.set $$cmp49205 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$coefficient_counter$1208 + (i32.const 0) + ) + (local.set $$k$1209 + (local.get $$15) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$inc42 + (i32.add + (local.get $$coefficient_counter$1208) + (i32.const 1) + ) + ) + (local.set $$call44 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$1209) + (local.get $$11) + (local.get $$12) + (local.get $$13) + (local.get $$7) + (local.get $$div) + ) + ) + (local.set $$add46 + (i32.add + (local.get $$coefficient_counter$1208) + (local.get $$mul13) + ) + ) + (local.set $$arrayidx47 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add46) + (i32.const 2) + ) + ) + ) + (local.set $$21 + (f32.load + (local.get $$arrayidx47) + ) + ) + (if + (local.get $$cmp49205) + (block + (local.set $$x$1206 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$mul52 + (i32.shl + (local.get $$x$1206) + (i32.const 1) + ) + ) + (local.set $$arrayidx54 + (i32.add + (local.get $$call44) + (i32.shl + (local.get $$mul52) + (i32.const 2) + ) + ) + ) + (local.set $$22 + (f32.load + (local.get $$arrayidx54) + ) + ) + (local.set $$mul55 + (f32.mul + (local.get $$21) + (local.get $$22) + ) + ) + (local.set $$arrayidx57 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$mul52) + (i32.const 2) + ) + ) + ) + (local.set $$23 + (f32.load + (local.get $$arrayidx57) + ) + ) + (local.set $$add58 + (f32.add + (local.get $$23) + (local.get $$mul55) + ) + ) + (f32.store + (local.get $$arrayidx57) + (local.get $$add58) + ) + (local.set $$add59 + (i32.or + (local.get $$mul52) + (i32.const 1) + ) + ) + (local.set $$arrayidx60 + (i32.add + (local.get $$call44) + (i32.shl + (local.get $$add59) + (i32.const 2) + ) + ) + ) + (local.set $$24 + (f32.load + (local.get $$arrayidx60) + ) + ) + (local.set $$mul61 + (f32.mul + (local.get $$21) + (local.get $$24) + ) + ) + (local.set $$arrayidx63 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add59) + (i32.const 2) + ) + ) + ) + (local.set $$25 + (f32.load + (local.get $$arrayidx63) + ) + ) + (local.set $$add64 + (f32.add + (local.get $$25) + (local.get $$mul61) + ) + ) + (f32.store + (local.get $$arrayidx63) + (local.get $$add64) + ) + (local.set $$inc66 + (i32.add + (local.get $$x$1206) + (i32.const 1) + ) + ) + (local.set $$exitcond226 + (i32.eq + (local.get $$inc66) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond226) + (br $while-out4) + (local.set $$x$1206 + (local.get $$inc66) + ) + ) + (br $while-in5) + ) + ) + ) + ) + (local.set $$inc69 + (i32.add + (local.get $$k$1209) + (i32.const 1) + ) + ) + (local.set $$cmp39 + (i32.lt_s + (local.get $$k$1209) + (local.get $$16) + ) + ) + (if + (local.get $$cmp39) + (block + (local.set $$coefficient_counter$1208 + (local.get $$inc42) + ) + (local.set $$k$1209 + (local.get $$inc69) + ) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (block + (local.set $$cmp73212 + (i32.gt_s + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp73212) + (block + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (local.set $$cmp83210 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$coefficient_counter$2213 + (i32.const 0) + ) + (local.set $$k$2214 + (local.get $$15) + ) + (loop $while-in8 + (block $while-out7 + (local.set $$inc76 + (i32.add + (local.get $$coefficient_counter$2213) + (i32.const 1) + ) + ) + (local.set $$call78 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$2214) + (local.get $$11) + (local.get $$12) + (local.get $$13) + (local.get $$7) + (local.get $$div) + ) + ) + (local.set $$add80 + (i32.add + (local.get $$coefficient_counter$2213) + (local.get $$mul13) + ) + ) + (local.set $$arrayidx81 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add80) + (i32.const 2) + ) + ) + ) + (local.set $$26 + (f32.load + (local.get $$arrayidx81) + ) + ) + (if + (local.get $$cmp83210) + (block + (local.set $$x$2211 + (i32.const 0) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$mul86 + (i32.mul + (local.get $$x$2211) + (i32.const 3) + ) + ) + (local.set $$arrayidx88 + (i32.add + (local.get $$call78) + (i32.shl + (local.get $$mul86) + (i32.const 2) + ) + ) + ) + (local.set $$27 + (f32.load + (local.get $$arrayidx88) + ) + ) + (local.set $$mul89 + (f32.mul + (local.get $$26) + (local.get $$27) + ) + ) + (local.set $$arrayidx91 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$mul86) + (i32.const 2) + ) + ) + ) + (local.set $$28 + (f32.load + (local.get $$arrayidx91) + ) + ) + (local.set $$add92 + (f32.add + (local.get $$28) + (local.get $$mul89) + ) + ) + (f32.store + (local.get $$arrayidx91) + (local.get $$add92) + ) + (local.set $$add93 + (i32.add + (local.get $$mul86) + (i32.const 1) + ) + ) + (local.set $$arrayidx94 + (i32.add + (local.get $$call78) + (i32.shl + (local.get $$add93) + (i32.const 2) + ) + ) + ) + (local.set $$29 + (f32.load + (local.get $$arrayidx94) + ) + ) + (local.set $$mul95 + (f32.mul + (local.get $$26) + (local.get $$29) + ) + ) + (local.set $$arrayidx97 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add93) + (i32.const 2) + ) + ) + ) + (local.set $$30 + (f32.load + (local.get $$arrayidx97) + ) + ) + (local.set $$add98 + (f32.add + (local.get $$30) + (local.get $$mul95) + ) + ) + (f32.store + (local.get $$arrayidx97) + (local.get $$add98) + ) + (local.set $$add99 + (i32.add + (local.get $$mul86) + (i32.const 2) + ) + ) + (local.set $$arrayidx100 + (i32.add + (local.get $$call78) + (i32.shl + (local.get $$add99) + (i32.const 2) + ) + ) + ) + (local.set $$31 + (f32.load + (local.get $$arrayidx100) + ) + ) + (local.set $$mul101 + (f32.mul + (local.get $$26) + (local.get $$31) + ) + ) + (local.set $$arrayidx103 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add99) + (i32.const 2) + ) + ) + ) + (local.set $$32 + (f32.load + (local.get $$arrayidx103) + ) + ) + (local.set $$add104 + (f32.add + (local.get $$32) + (local.get $$mul101) + ) + ) + (f32.store + (local.get $$arrayidx103) + (local.get $$add104) + ) + (local.set $$inc106 + (i32.add + (local.get $$x$2211) + (i32.const 1) + ) + ) + (local.set $$exitcond227 + (i32.eq + (local.get $$inc106) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond227) + (br $while-out9) + (local.set $$x$2211 + (local.get $$inc106) + ) + ) + (br $while-in10) + ) + ) + ) + ) + (local.set $$inc109 + (i32.add + (local.get $$k$2214) + (i32.const 1) + ) + ) + (local.set $$cmp73 + (i32.lt_s + (local.get $$k$2214) + (local.get $$16) + ) + ) + (if + (local.get $$cmp73) + (block + (local.set $$coefficient_counter$2213 + (local.get $$inc76) + ) + (local.set $$k$2214 + (local.get $$inc109) + ) + ) + (br $while-out7) + ) + (br $while-in8) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (block + (local.set $$cmp113217 + (i32.gt_s + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp113217) + (block + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (local.set $$cmp123215 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$coefficient_counter$3218 + (i32.const 0) + ) + (local.set $$k$3219 + (local.get $$15) + ) + (loop $while-in13 + (block $while-out12 + (local.set $$inc116 + (i32.add + (local.get $$coefficient_counter$3218) + (i32.const 1) + ) + ) + (local.set $$call118 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$3219) + (local.get $$11) + (local.get $$12) + (local.get $$13) + (local.get $$7) + (local.get $$div) + ) + ) + (local.set $$add120 + (i32.add + (local.get $$coefficient_counter$3218) + (local.get $$mul13) + ) + ) + (local.set $$arrayidx121 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add120) + (i32.const 2) + ) + ) + ) + (local.set $$33 + (f32.load + (local.get $$arrayidx121) + ) + ) + (if + (local.get $$cmp123215) + (block + (local.set $$x$3216 + (i32.const 0) + ) + (loop $while-in15 + (block $while-out14 + (local.set $$mul126 + (i32.shl + (local.get $$x$3216) + (i32.const 2) + ) + ) + (local.set $$arrayidx128 + (i32.add + (local.get $$call118) + (i32.shl + (local.get $$mul126) + (i32.const 2) + ) + ) + ) + (local.set $$34 + (f32.load + (local.get $$arrayidx128) + ) + ) + (local.set $$mul129 + (f32.mul + (local.get $$33) + (local.get $$34) + ) + ) + (local.set $$arrayidx131 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$mul126) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (f32.load + (local.get $$arrayidx131) + ) + ) + (local.set $$add132 + (f32.add + (local.get $$35) + (local.get $$mul129) + ) + ) + (f32.store + (local.get $$arrayidx131) + (local.get $$add132) + ) + (local.set $$add133 + (i32.or + (local.get $$mul126) + (i32.const 1) + ) + ) + (local.set $$arrayidx134 + (i32.add + (local.get $$call118) + (i32.shl + (local.get $$add133) + (i32.const 2) + ) + ) + ) + (local.set $$36 + (f32.load + (local.get $$arrayidx134) + ) + ) + (local.set $$mul135 + (f32.mul + (local.get $$33) + (local.get $$36) + ) + ) + (local.set $$arrayidx137 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add133) + (i32.const 2) + ) + ) + ) + (local.set $$37 + (f32.load + (local.get $$arrayidx137) + ) + ) + (local.set $$add138 + (f32.add + (local.get $$37) + (local.get $$mul135) + ) + ) + (f32.store + (local.get $$arrayidx137) + (local.get $$add138) + ) + (local.set $$add139 + (i32.or + (local.get $$mul126) + (i32.const 2) + ) + ) + (local.set $$arrayidx140 + (i32.add + (local.get $$call118) + (i32.shl + (local.get $$add139) + (i32.const 2) + ) + ) + ) + (local.set $$38 + (f32.load + (local.get $$arrayidx140) + ) + ) + (local.set $$mul141 + (f32.mul + (local.get $$33) + (local.get $$38) + ) + ) + (local.set $$arrayidx143 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add139) + (i32.const 2) + ) + ) + ) + (local.set $$39 + (f32.load + (local.get $$arrayidx143) + ) + ) + (local.set $$add144 + (f32.add + (local.get $$39) + (local.get $$mul141) + ) + ) + (f32.store + (local.get $$arrayidx143) + (local.get $$add144) + ) + (local.set $$add145 + (i32.or + (local.get $$mul126) + (i32.const 3) + ) + ) + (local.set $$arrayidx146 + (i32.add + (local.get $$call118) + (i32.shl + (local.get $$add145) + (i32.const 2) + ) + ) + ) + (local.set $$40 + (f32.load + (local.get $$arrayidx146) + ) + ) + (local.set $$mul147 + (f32.mul + (local.get $$33) + (local.get $$40) + ) + ) + (local.set $$arrayidx149 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add145) + (i32.const 2) + ) + ) + ) + (local.set $$41 + (f32.load + (local.get $$arrayidx149) + ) + ) + (local.set $$add150 + (f32.add + (local.get $$41) + (local.get $$mul147) + ) + ) + (f32.store + (local.get $$arrayidx149) + (local.get $$add150) + ) + (local.set $$inc152 + (i32.add + (local.get $$x$3216) + (i32.const 1) + ) + ) + (local.set $$exitcond228 + (i32.eq + (local.get $$inc152) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond228) + (br $while-out14) + (local.set $$x$3216 + (local.get $$inc152) + ) + ) + (br $while-in15) + ) + ) + ) + ) + (local.set $$inc155 + (i32.add + (local.get $$k$3219) + (i32.const 1) + ) + ) + (local.set $$cmp113 + (i32.lt_s + (local.get $$k$3219) + (local.get $$16) + ) + ) + (if + (local.get $$cmp113) + (block + (local.set $$coefficient_counter$3218 + (local.get $$inc116) + ) + (local.set $$k$3219 + (local.get $$inc155) + ) + ) + (br $while-out12) + ) + (br $while-in13) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (block + (local.set $$cmp158197 + (i32.gt_s + (local.get $$15) + (local.get $$16) + ) + ) + (if + (local.get $$cmp158197) + (block + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + (local.set $$cmp168195 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$cmp173193 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (local.set $$coefficient_counter$4198 + (i32.const 0) + ) + (local.set $$k$4199 + (local.get $$15) + ) + (loop $while-in18 + (block $while-out17 + (local.set $$inc161 + (i32.add + (local.get $$coefficient_counter$4198) + (i32.const 1) + ) + ) + (local.set $$call163 + (call $_stbir__get_ring_buffer_scanline + (local.get $$k$4199) + (local.get $$11) + (local.get $$12) + (local.get $$13) + (local.get $$7) + (local.get $$div) + ) + ) + (local.set $$add165 + (i32.add + (local.get $$coefficient_counter$4198) + (local.get $$mul13) + ) + ) + (local.set $$arrayidx166 + (i32.add + (local.get $$2) + (i32.shl + (local.get $$add165) + (i32.const 2) + ) + ) + ) + (local.set $$42 + (f32.load + (local.get $$arrayidx166) + ) + ) + (if + (local.get $$cmp168195) + (block + (local.set $$x$4196 + (i32.const 0) + ) + (loop $while-in20 + (block $while-out19 + (local.set $$mul171 + (i32.mul + (local.get $$x$4196) + (local.get $$3) + ) + ) + (if + (local.get $$cmp173193) + (block + (local.set $$c$0194 + (i32.const 0) + ) + (loop $while-in22 + (block $while-out21 + (local.set $$add175 + (i32.add + (local.get $$c$0194) + (local.get $$mul171) + ) + ) + (local.set $$arrayidx176 + (i32.add + (local.get $$call163) + (i32.shl + (local.get $$add175) + (i32.const 2) + ) + ) + ) + (local.set $$43 + (f32.load + (local.get $$arrayidx176) + ) + ) + (local.set $$mul177 + (f32.mul + (local.get $$42) + (local.get $$43) + ) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$9) + (i32.shl + (local.get $$add175) + (i32.const 2) + ) + ) + ) + (local.set $$44 + (f32.load + (local.get $$arrayidx179) + ) + ) + (local.set $$add180 + (f32.add + (local.get $$44) + (local.get $$mul177) + ) + ) + (f32.store + (local.get $$arrayidx179) + (local.get $$add180) + ) + (local.set $$inc182 + (i32.add + (local.get $$c$0194) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc182) + (local.get $$3) + ) + ) + (if + (local.get $$exitcond) + (br $while-out21) + (local.set $$c$0194 + (local.get $$inc182) + ) + ) + (br $while-in22) + ) + ) + ) + ) + (local.set $$inc185 + (i32.add + (local.get $$x$4196) + (i32.const 1) + ) + ) + (local.set $$exitcond224 + (i32.eq + (local.get $$inc185) + (local.get $$0) + ) + ) + (if + (local.get $$exitcond224) + (br $while-out19) + (local.set $$x$4196 + (local.get $$inc185) + ) + ) + (br $while-in20) + ) + ) + ) + ) + (local.set $$inc188 + (i32.add + (local.get $$k$4199) + (i32.const 1) + ) + ) + (local.set $$cmp158 + (i32.lt_s + (local.get $$k$4199) + (local.get $$16) + ) + ) + (if + (local.get $$cmp158) + (block + (local.set $$coefficient_counter$4198 + (local.get $$inc161) + ) + (local.set $$k$4199 + (local.get $$inc188) + ) + ) + (br $while-out17) + ) + (br $while-in18) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$8) + (local.get $$mul17) + ) + ) + (call $_stbir__encode_scanline + (local.get $$stbir_info) + (local.get $$0) + (local.get $$add$ptr) + (local.get $$9) + (local.get $$3) + (local.get $$4) + (local.get $$add) + ) + (return) + ) + ) + ) + (func $_stbir__get_contributors (; 491 ;) (param $$scale f32) (param $$filter i32) (param $$input_size i32) (param $$output_size i32) (result i32) + (local $$add i32) + (local $$call i32) + (local $$call1 i32) + (local $$mul i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__use_upsampling + (local.get $$scale) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$retval$0 + (local.get $$output_size) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call1 + (call $_stbir__get_filter_pixel_margin + (local.get $$filter) + (local.get $$scale) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$call1) + (i32.const 1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$input_size) + ) + ) + (local.set $$retval$0 + (local.get $$add) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbir__get_contributor (; 492 ;) (param $$contributors i32) (param $$n i32) (result i32) + (local $$arrayidx i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$arrayidx + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$n) + (i32.const 3) + ) + ) + ) + (return + (local.get $$arrayidx) + ) + ) + (func $_stbir__get_coefficient (; 493 ;) (param $$coefficients i32) (param $$filter i32) (param $$scale f32) (param $$n i32) (param $$c i32) (result i32) + (local $$add i32) + (local $$arrayidx i32) + (local $$call i32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__get_coefficient_width + (local.get $$filter) + (local.get $$scale) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$call) + (local.get $$n) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (local.get $$c) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$coefficients) + (i32.shl + (local.get $$add) + (i32.const 2) + ) + ) + ) + (return + (local.get $$arrayidx) + ) + ) + (func $_stbir__calculate_coefficients_upsample (; 494 ;) (param $$filter i32) (param $$scale f32) (param $$in_first_pixel i32) (param $$in_last_pixel i32) (param $$in_center_of_out f32) (param $$contributor i32) (param $$coefficient_group i32) + (local $$0 i32) + (local $$1 f32) + (local $$2 i32) + (local $$3 i32) + (local $$4 f32) + (local $$5 f32) + (local $$6 i32) + (local $$add i32) + (local $$add14 f32) + (local $$add25 f32) + (local $$add29 i32) + (local $$add31 f32) + (local $$add72 i32) + (local $$arrayidx i32) + (local $$arrayidx19 i32) + (local $$arrayidx57 i32) + (local $$arrayidx67 i32) + (local $$call f32) + (local $$call18 f32) + (local $$call34 f32) + (local $$cmp i32) + (local $$cmp11 i32) + (local $$cmp1153 i32) + (local $$cmp20 i32) + (local $$cmp35 i32) + (local $$cmp41 i32) + (local $$cmp46 i32) + (local $$cmp5 i32) + (local $$cmp5450 i32) + (local $$cmp64 i32) + (local $$cmp6448 i32) + (local $$conv1 i32) + (local $$conv13 f32) + (local $$conv30 f32) + (local $$conv40 f64) + (local $$dec76 i32) + (local $$div f32) + (local $$div51 f32) + (local $$exitcond i32) + (local $$i$055 i32) + (local $$i$1 i32) + (local $$i$251 i32) + (local $$i$349 i32) + (local $$in_first_pixel$addr$056 i32) + (local $$in_first_pixel$addr$1 i32) + (local $$inc i32) + (local $$inc26 i32) + (local $$inc60 i32) + (local $$mul f32) + (local $$mul58 f32) + (local $$n1 i32) + (local $$or$cond i32) + (local $$sub i32) + (local $$sub10 i32) + (local $$sub10$lcssa i32) + (local $$sub1052 i32) + (local $$sub16 f32) + (local $$sub32 f32) + (local $$sub73 i32) + (local $$support i32) + (local $$tobool i32) + (local $$tobool68 i32) + (local $$total_filter$0$lcssa f32) + (local $$total_filter$054 f32) + (local $$total_filter$1 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (i32.sub + (local.get $$in_last_pixel) + (local.get $$in_first_pixel) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$support) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$scale) + ) + ) + (local.set $$call + (call_indirect (type $FUNCSIG$ff) + (local.get $$div) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$call) + (f32.const 2) + ) + ) + (local.set $$1 + (f32.ceil + (local.get $$mul) + ) + ) + (local.set $$conv1 + (i32.trunc_f32_s + (local.get $$1) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$sub) + (local.get $$conv1) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 15117) + (i32.const 13065) + (i32.const 1043) + (i32.const 15216) + ) + ) + (i32.store + (local.get $$contributor) + (local.get $$in_first_pixel) + ) + (local.set $$n1 + (i32.add + (local.get $$contributor) + (i32.const 4) + ) + ) + (i32.store + (local.get $$n1) + (local.get $$in_last_pixel) + ) + (local.set $$cmp5 + (i32.lt_s + (local.get $$in_last_pixel) + (local.get $$in_first_pixel) + ) + ) + (if + (local.get $$cmp5) + (call $___assert_fail + (i32.const 14969) + (i32.const 13065) + (i32.const 1048) + (i32.const 15216) + ) + ) + (local.set $$sub1052 + (i32.sub + (local.get $$in_last_pixel) + (local.get $$in_first_pixel) + ) + ) + (local.set $$cmp1153 + (i32.lt_s + (local.get $$sub1052) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1153) + (block + (local.set $$sub10$lcssa + (local.get $$sub1052) + ) + (local.set $$total_filter$0$lcssa + (f32.const 0) + ) + ) + (block + (local.set $$i$055 + (i32.const 0) + ) + (local.set $$in_first_pixel$addr$056 + (local.get $$in_first_pixel) + ) + (local.set $$total_filter$054 + (f32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$add + (i32.add + (local.get $$in_first_pixel$addr$056) + (local.get $$i$055) + ) + ) + (local.set $$conv13 + (f32.convert_i32_s + (local.get $$add) + ) + ) + (local.set $$add14 + (f32.add + (local.get $$conv13) + (f32.const 0.5) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$sub16 + (f32.sub + (local.get $$in_center_of_out) + (local.get $$add14) + ) + ) + (local.set $$call18 + (call_indirect (type $FUNCSIG$fff) + (local.get $$sub16) + (local.get $$div) + (i32.add + (i32.and + (local.get $$2) + (i32.const 15) + ) + (i32.const 8) + ) + ) + ) + (local.set $$arrayidx19 + (i32.add + (local.get $$coefficient_group) + (i32.shl + (local.get $$i$055) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx19) + (local.get $$call18) + ) + (local.set $$cmp20 + (i32.ne + (local.get $$i$055) + (i32.const 0) + ) + ) + (local.set $$tobool + (f32.ne + (local.get $$call18) + (f32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp20) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$add25 + (f32.add + (local.get $$total_filter$054) + (local.get $$call18) + ) + ) + (local.set $$i$1 + (local.get $$i$055) + ) + (local.set $$in_first_pixel$addr$1 + (local.get $$in_first_pixel$addr$056) + ) + (local.set $$total_filter$1 + (local.get $$add25) + ) + ) + (block + (local.set $$inc + (i32.add + (local.get $$in_first_pixel$addr$056) + (i32.const 1) + ) + ) + (i32.store + (local.get $$contributor) + (local.get $$inc) + ) + (local.set $$i$1 + (i32.const -1) + ) + (local.set $$in_first_pixel$addr$1 + (local.get $$inc) + ) + (local.set $$total_filter$1 + (local.get $$total_filter$054) + ) + ) + ) + (local.set $$inc26 + (i32.add + (local.get $$i$1) + (i32.const 1) + ) + ) + (local.set $$sub10 + (i32.sub + (local.get $$in_last_pixel) + (local.get $$in_first_pixel$addr$1) + ) + ) + (local.set $$cmp11 + (i32.lt_s + (local.get $$i$1) + (local.get $$sub10) + ) + ) + (if + (local.get $$cmp11) + (block + (local.set $$i$055 + (local.get $$inc26) + ) + (local.set $$in_first_pixel$addr$056 + (local.get $$in_first_pixel$addr$1) + ) + (local.set $$total_filter$054 + (local.get $$total_filter$1) + ) + ) + (block + (local.set $$sub10$lcssa + (local.get $$sub10) + ) + (local.set $$total_filter$0$lcssa + (local.get $$total_filter$1) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$add29 + (i32.add + (local.get $$in_last_pixel) + (i32.const 1) + ) + ) + (local.set $$conv30 + (f32.convert_i32_s + (local.get $$add29) + ) + ) + (local.set $$add31 + (f32.add + (local.get $$conv30) + (f32.const 0.5) + ) + ) + (local.set $$sub32 + (f32.sub + (local.get $$add31) + (local.get $$in_center_of_out) + ) + ) + (local.set $$call34 + (call_indirect (type $FUNCSIG$fff) + (local.get $$sub32) + (local.get $$div) + (i32.add + (i32.and + (local.get $$3) + (i32.const 15) + ) + (i32.const 8) + ) + ) + ) + (local.set $$cmp35 + (f32.eq + (local.get $$call34) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp35) + ) + (call $___assert_fail + (i32.const 15255) + (i32.const 13065) + (i32.const 1066) + (i32.const 15216) + ) + ) + (local.set $$conv40 + (f64.promote_f32 + (local.get $$total_filter$0$lcssa) + ) + ) + (local.set $$cmp41 + (f64.gt + (local.get $$conv40) + (f64.const 0.9) + ) + ) + (if + (i32.eqz + (local.get $$cmp41) + ) + (call $___assert_fail + (i32.const 15363) + (i32.const 13065) + (i32.const 1068) + (i32.const 15216) + ) + ) + (local.set $$cmp46 + (f32.lt + (local.get $$total_filter$0$lcssa) + (f32.const 1.100000023841858) + ) + ) + (if + (i32.eqz + (local.get $$cmp46) + ) + (call $___assert_fail + (i32.const 15382) + (i32.const 13065) + (i32.const 1069) + (i32.const 15216) + ) + ) + (local.set $$div51 + (f32.div + (f32.const 1) + (local.get $$total_filter$0$lcssa) + ) + ) + (local.set $$cmp5450 + (i32.lt_s + (local.get $$sub10$lcssa) + (i32.const 0) + ) + ) + (if + (local.get $$cmp5450) + (return) + ) + (local.set $$i$251 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx57 + (i32.add + (local.get $$coefficient_group) + (i32.shl + (local.get $$i$251) + (i32.const 2) + ) + ) + ) + (local.set $$4 + (f32.load + (local.get $$arrayidx57) + ) + ) + (local.set $$mul58 + (f32.mul + (local.get $$div51) + (local.get $$4) + ) + ) + (f32.store + (local.get $$arrayidx57) + (local.get $$mul58) + ) + (local.set $$inc60 + (i32.add + (local.get $$i$251) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$i$251) + (local.get $$sub10$lcssa) + ) + ) + (if + (local.get $$exitcond) + (br $while-out0) + (local.set $$i$251 + (local.get $$inc60) + ) + ) + (br $while-in1) + ) + ) + (local.set $$cmp6448 + (i32.gt_s + (local.get $$sub10$lcssa) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp6448) + ) + (return) + ) + (local.set $$i$349 + (local.get $$sub10$lcssa) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$arrayidx67 + (i32.add + (local.get $$coefficient_group) + (i32.shl + (local.get $$i$349) + (i32.const 2) + ) + ) + ) + (local.set $$5 + (f32.load + (local.get $$arrayidx67) + ) + ) + (local.set $$tobool68 + (f32.ne + (local.get $$5) + (f32.const 0) + ) + ) + (if + (local.get $$tobool68) + (block + (local.set $label + (i32.const 24) + ) + (br $while-out2) + ) + ) + (local.set $$6 + (i32.load + (local.get $$contributor) + ) + ) + (local.set $$add72 + (i32.add + (local.get $$i$349) + (i32.const -1) + ) + ) + (local.set $$sub73 + (i32.add + (local.get $$add72) + (local.get $$6) + ) + ) + (i32.store + (local.get $$n1) + (local.get $$sub73) + ) + (local.set $$dec76 + (i32.add + (local.get $$i$349) + (i32.const -1) + ) + ) + (local.set $$cmp64 + (i32.gt_s + (local.get $$i$349) + (i32.const 0) + ) + ) + (if + (local.get $$cmp64) + (local.set $$i$349 + (local.get $$dec76) + ) + (block + (local.set $label + (i32.const 24) + ) + (br $while-out2) + ) + ) + (br $while-in3) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 24) + ) + (return) + ) + ) + (func $_stbir__calculate_coefficients_downsample (; 495 ;) (param $$filter i32) (param $$scale_ratio f32) (param $$out_first_pixel i32) (param $$out_last_pixel i32) (param $$out_center_of_in f32) (param $$contributor i32) (param $$coefficient_group i32) + (local $$0 i32) + (local $$1 f32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 f32) + (local $$7 i32) + (local $$add i32) + (local $$add14 f32) + (local $$add22 i32) + (local $$add24 f32) + (local $$add39 i32) + (local $$arrayidx i32) + (local $$arrayidx19 i32) + (local $$arrayidx37 i32) + (local $$call f32) + (local $$call17 f32) + (local $$call26 f32) + (local $$cmp i32) + (local $$cmp1133 i32) + (local $$cmp27 i32) + (local $$cmp34 i32) + (local $$cmp3431 i32) + (local $$cmp5 i32) + (local $$conv1 i32) + (local $$conv13 f32) + (local $$conv23 f32) + (local $$dec i32) + (local $$exitcond i32) + (local $$i$034 i32) + (local $$i$132 i32) + (local $$inc i32) + (local $$mul f32) + (local $$mul18 f32) + (local $$n1 i32) + (local $$sub i32) + (local $$sub15 f32) + (local $$sub25 f32) + (local $$sub40 i32) + (local $$support i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (i32.sub + (local.get $$out_last_pixel) + (local.get $$out_first_pixel) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + ) + (local.set $$support + (i32.add + (i32.add + (i32.const 4000) + (i32.shl + (local.get $$filter) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$support) + ) + ) + (local.set $$call + (call_indirect (type $FUNCSIG$ff) + (local.get $$scale_ratio) + (i32.add + (i32.and + (local.get $$0) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$call) + (f32.const 2) + ) + ) + (local.set $$1 + (f32.ceil + (local.get $$mul) + ) + ) + (local.set $$conv1 + (i32.trunc_f32_s + (local.get $$1) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$sub) + (local.get $$conv1) + ) + ) + (if + (local.get $$cmp) + (call $___assert_fail + (i32.const 14823) + (i32.const 13065) + (i32.const 1091) + (i32.const 14928) + ) + ) + (i32.store + (local.get $$contributor) + (local.get $$out_first_pixel) + ) + (local.set $$n1 + (i32.add + (local.get $$contributor) + (i32.const 4) + ) + ) + (i32.store + (local.get $$n1) + (local.get $$out_last_pixel) + ) + (local.set $$cmp5 + (i32.lt_s + (local.get $$out_last_pixel) + (local.get $$out_first_pixel) + ) + ) + (if + (local.get $$cmp5) + (call $___assert_fail + (i32.const 14969) + (i32.const 13065) + (i32.const 1096) + (i32.const 14928) + ) + ) + (local.set $$cmp1133 + (i32.lt_s + (local.get $$sub) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp1133) + ) + (block + (local.set $$2 + (i32.add + (local.get $$out_last_pixel) + (i32.const 1) + ) + ) + (local.set $$3 + (i32.sub + (local.get $$2) + (local.get $$out_first_pixel) + ) + ) + (local.set $$i$034 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$add + (i32.add + (local.get $$i$034) + (local.get $$out_first_pixel) + ) + ) + (local.set $$conv13 + (f32.convert_i32_s + (local.get $$add) + ) + ) + (local.set $$add14 + (f32.add + (local.get $$conv13) + (f32.const 0.5) + ) + ) + (local.set $$sub15 + (f32.sub + (local.get $$add14) + (local.get $$out_center_of_in) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$call17 + (call_indirect (type $FUNCSIG$fff) + (local.get $$sub15) + (local.get $$scale_ratio) + (i32.add + (i32.and + (local.get $$4) + (i32.const 15) + ) + (i32.const 8) + ) + ) + ) + (local.set $$mul18 + (f32.mul + (local.get $$call17) + (local.get $$scale_ratio) + ) + ) + (local.set $$arrayidx19 + (i32.add + (local.get $$coefficient_group) + (i32.shl + (local.get $$i$034) + (i32.const 2) + ) + ) + ) + (f32.store + (local.get $$arrayidx19) + (local.get $$mul18) + ) + (local.set $$inc + (i32.add + (local.get $$i$034) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$3) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$i$034 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$5 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$add22 + (i32.add + (local.get $$out_last_pixel) + (i32.const 1) + ) + ) + (local.set $$conv23 + (f32.convert_i32_s + (local.get $$add22) + ) + ) + (local.set $$add24 + (f32.add + (local.get $$conv23) + (f32.const 0.5) + ) + ) + (local.set $$sub25 + (f32.sub + (local.get $$add24) + (local.get $$out_center_of_in) + ) + ) + (local.set $$call26 + (call_indirect (type $FUNCSIG$fff) + (local.get $$sub25) + (local.get $$scale_ratio) + (i32.add + (i32.and + (local.get $$5) + (i32.const 15) + ) + (i32.const 8) + ) + ) + ) + (local.set $$cmp27 + (f32.eq + (local.get $$call26) + (f32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp27) + ) + (call $___assert_fail + (i32.const 15004) + (i32.const 13065) + (i32.const 1105) + (i32.const 14928) + ) + ) + (local.set $$cmp3431 + (i32.gt_s + (local.get $$sub) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp3431) + ) + (return) + ) + (local.set $$i$132 + (local.get $$sub) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx37 + (i32.add + (local.get $$coefficient_group) + (i32.shl + (local.get $$i$132) + (i32.const 2) + ) + ) + ) + (local.set $$6 + (f32.load + (local.get $$arrayidx37) + ) + ) + (local.set $$tobool + (f32.ne + (local.get $$6) + (f32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $label + (i32.const 14) + ) + (br $while-out0) + ) + ) + (local.set $$7 + (i32.load + (local.get $$contributor) + ) + ) + (local.set $$add39 + (i32.add + (local.get $$i$132) + (i32.const -1) + ) + ) + (local.set $$sub40 + (i32.add + (local.get $$add39) + (local.get $$7) + ) + ) + (i32.store + (local.get $$n1) + (local.get $$sub40) + ) + (local.set $$dec + (i32.add + (local.get $$i$132) + (i32.const -1) + ) + ) + (local.set $$cmp34 + (i32.gt_s + (local.get $$i$132) + (i32.const 0) + ) + ) + (if + (local.get $$cmp34) + (local.set $$i$132 + (local.get $$dec) + ) + (block + (local.set $label + (i32.const 14) + ) + (br $while-out0) + ) + ) + (br $while-in1) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 14) + ) + (return) + ) + ) + (func $_stbir__normalize_downsample_coefficients (; 496 ;) (param $$contributors i32) (param $$coefficients i32) (param $$filter i32) (param $$scale_ratio f32) (param $$input_size i32) (param $$output_size i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$2 f32) + (local $$3 i32) + (local $$4 i32) + (local $$5 f32) + (local $$6 f32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add f32) + (local $$add57 i32) + (local $$add57$op i32) + (local $$add73 i32) + (local $$add79 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call10 i32) + (local $$call35 i32) + (local $$call52 i32) + (local $$call74 i32) + (local $$call75 i32) + (local $$call84 i32) + (local $$call85 i32) + (local $$call98 i32) + (local $$cmp i32) + (local $$cmp112 i32) + (local $$cmp16 i32) + (local $$cmp17 i32) + (local $$cmp22 i32) + (local $$cmp22110 i32) + (local $$cmp26 i32) + (local $$cmp3 i32) + (local $$cmp30 i32) + (local $$cmp3105 i32) + (local $$cmp5 i32) + (local $$cmp50102 i32) + (local $$cmp53 i32) + (local $$cmp6197 i32) + (local $$cmp7 i32) + (local $$cmp77 i32) + (local $$cmp77100 i32) + (local $$cmp80 i32) + (local $$cmp9395 i32) + (local $$div f32) + (local $$exitcond i32) + (local $$exitcond114 i32) + (local $$i$0113 i32) + (local $$i$1101 i32) + (local $$i$296 i32) + (local $$inc i32) + (local $$inc102 i32) + (local $$inc44 i32) + (local $$inc47 i32) + (local $$inc54 i32) + (local $$inc87 i32) + (local $$inc90 i32) + (local $$j$0107 i32) + (local $$j$1111 i32) + (local $$j$2103 i32) + (local $$mul f32) + (local $$n0 i32) + (local $$n025 i32) + (local $$n056 i32) + (local $$n1 i32) + (local $$n129 i32) + (local $$n169 i32) + (local $$n196 i32) + (local $$skip$0 i32) + (local $$spec$select i32) + (local $$spec$select118 i32) + (local $$sub i32) + (local $$sub34 i32) + (local $$sub72 i32) + (local $$sub97 i32) + (local $$total$0$lcssa f32) + (local $$total$0106 f32) + (local $$total$1 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_stbir__get_contributors + (local.get $$scale_ratio) + (local.get $$filter) + (local.get $$input_size) + (local.get $$output_size) + ) + ) + (local.set $$call1 + (call $_stbir__get_coefficient_width + (local.get $$filter) + (local.get $$scale_ratio) + ) + ) + (local.set $$cmp112 + (i32.gt_s + (local.get $$output_size) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp112) + (block + (local.set $$cmp3105 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$cmp22110 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$i$0113 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (if + (i32.eqz + (local.get $$cmp3105) + ) + (block + (local.set $label + (i32.const 10) + ) + (br $while-out) + ) + ) + (local.set $$j$0107 + (i32.const 0) + ) + (local.set $$total$0106 + (f32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$n0 + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$0107) + (i32.const 3) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$n0) + ) + ) + (local.set $$cmp5 + (i32.lt_s + (local.get $$i$0113) + (local.get $$0) + ) + ) + (if + (local.get $$cmp5) + (block + (local.set $$total$0$lcssa + (local.get $$total$0106) + ) + (br $while-out0) + ) + ) + (local.set $$n1 + (i32.add + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$0107) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$n1) + ) + ) + (local.set $$cmp7 + (i32.gt_s + (local.get $$i$0113) + (local.get $$1) + ) + ) + (if + (local.get $$cmp7) + (local.set $$total$1 + (local.get $$total$0106) + ) + (block + (local.set $$sub + (i32.sub + (local.get $$i$0113) + (local.get $$0) + ) + ) + (local.set $$call10 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$j$0107) + (local.get $$sub) + ) + ) + (local.set $$2 + (f32.load + (local.get $$call10) + ) + ) + (local.set $$add + (f32.add + (local.get $$total$0106) + (local.get $$2) + ) + ) + (local.set $$total$1 + (local.get $$add) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$j$0107) + (i32.const 1) + ) + ) + (local.set $$cmp3 + (i32.lt_s + (local.get $$inc) + (local.get $$call) + ) + ) + (if + (local.get $$cmp3) + (block + (local.set $$j$0107 + (local.get $$inc) + ) + (local.set $$total$0106 + (local.get $$total$1) + ) + ) + (block + (local.set $$total$0$lcssa + (local.get $$total$1) + ) + (br $while-out0) + ) + ) + (br $while-in1) + ) + ) + (local.set $$cmp16 + (f32.gt + (local.get $$total$0$lcssa) + (f32.const 0.8999999761581421) + ) + ) + (if + (i32.eqz + (local.get $$cmp16) + ) + (block + (local.set $label + (i32.const 10) + ) + (br $while-out) + ) + ) + (local.set $$cmp17 + (f32.lt + (local.get $$total$0$lcssa) + (f32.const 1.100000023841858) + ) + ) + (if + (i32.eqz + (local.get $$cmp17) + ) + (block + (local.set $label + (i32.const 12) + ) + (br $while-out) + ) + ) + (local.set $$div + (f32.div + (f32.const 1) + (local.get $$total$0$lcssa) + ) + ) + (block $label$break$L15 + (if + (local.get $$cmp22110) + (block + (local.set $$j$1111 + (i32.const 0) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$n025 + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$1111) + (i32.const 3) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$n025) + ) + ) + (local.set $$cmp26 + (i32.lt_s + (local.get $$i$0113) + (local.get $$3) + ) + ) + (if + (local.get $$cmp26) + (br $label$break$L15) + ) + (local.set $$n129 + (i32.add + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$1111) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$n129) + ) + ) + (local.set $$cmp30 + (i32.gt_s + (local.get $$i$0113) + (local.get $$4) + ) + ) + (if + (i32.eqz + (local.get $$cmp30) + ) + (block + (local.set $$sub34 + (i32.sub + (local.get $$i$0113) + (local.get $$3) + ) + ) + (local.set $$call35 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$j$1111) + (local.get $$sub34) + ) + ) + (local.set $$5 + (f32.load + (local.get $$call35) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$div) + (local.get $$5) + ) + ) + (f32.store + (local.get $$call35) + (local.get $$mul) + ) + ) + ) + (local.set $$inc44 + (i32.add + (local.get $$j$1111) + (i32.const 1) + ) + ) + (local.set $$cmp22 + (i32.lt_s + (local.get $$inc44) + (local.get $$call) + ) + ) + (if + (local.get $$cmp22) + (local.set $$j$1111 + (local.get $$inc44) + ) + (br $while-out3) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (local.set $$inc47 + (i32.add + (local.get $$i$0113) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc47) + (local.get $$output_size) + ) + ) + (if + (local.get $$cmp) + (local.set $$i$0113 + (local.get $$inc47) + ) + (br $label$break$L1) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 10) + ) + (call $___assert_fail + (i32.const 14756) + (i32.const 13065) + (i32.const 1140) + (i32.const 14769) + ) + (if + (i32.eq + (local.get $label) + (i32.const 12) + ) + (call $___assert_fail + (i32.const 14810) + (i32.const 13065) + (i32.const 1141) + (i32.const 14769) + ) + ) + ) + ) + ) + ) + (local.set $$cmp50102 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp50102) + ) + (return) + ) + (local.set $$j$2103 + (i32.const 0) + ) + (loop $while-in6 + (block $while-out5 + (local.set $$skip$0 + (i32.const 0) + ) + (loop $while-in8 + (block $while-out7 + (local.set $$call52 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$j$2103) + (local.get $$skip$0) + ) + ) + (local.set $$6 + (f32.load + (local.get $$call52) + ) + ) + (local.set $$cmp53 + (f32.eq + (local.get $$6) + (f32.const 0) + ) + ) + (local.set $$inc54 + (i32.add + (local.get $$skip$0) + (i32.const 1) + ) + ) + (if + (local.get $$cmp53) + (local.set $$skip$0 + (local.get $$inc54) + ) + (br $while-out7) + ) + (br $while-in8) + ) + ) + (local.set $$n056 + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$2103) + (i32.const 3) + ) + ) + ) + (local.set $$7 + (i32.load + (local.get $$n056) + ) + ) + (local.set $$add57 + (i32.add + (local.get $$7) + (local.get $$skip$0) + ) + ) + (local.set $$cmp6197 + (i32.lt_s + (local.get $$add57) + (i32.const 0) + ) + ) + (local.set $$8 + (i32.sub + (i32.const 0) + (local.get $$7) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp6197) + (i32.const 0) + (local.get $$add57) + ) + ) + (local.set $$spec$select118 + (if (result i32) + (local.get $$cmp6197) + (local.get $$8) + (local.get $$skip$0) + ) + ) + (i32.store + (local.get $$n056) + (local.get $$spec$select) + ) + (local.set $$n169 + (i32.add + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$j$2103) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$9 + (i32.load + (local.get $$n169) + ) + ) + (local.set $$add57$op + (i32.sub + (i32.const 1) + (local.get $$add57) + ) + ) + (local.set $$sub72 + (if (result i32) + (local.get $$cmp6197) + (i32.const 1) + (local.get $$add57$op) + ) + ) + (local.set $$add73 + (i32.add + (local.get $$sub72) + (local.get $$9) + ) + ) + (local.set $$call74 + (call $_stbir__min + (local.get $$call1) + (local.get $$add73) + ) + ) + (local.set $$call75 + (call $_stbir__get_coefficient_width + (local.get $$filter) + (local.get $$scale_ratio) + ) + ) + (local.set $$cmp77100 + (i32.gt_s + (local.get $$call74) + (i32.const 0) + ) + ) + (block $label$break$L37 + (if + (local.get $$cmp77100) + (block + (local.set $$i$1101 + (i32.const 0) + ) + (loop $while-in11 + (block $while-out10 + (local.set $$add79 + (i32.add + (local.get $$i$1101) + (local.get $$spec$select118) + ) + ) + (local.set $$cmp80 + (i32.lt_s + (local.get $$add79) + (local.get $$call75) + ) + ) + (if + (i32.eqz + (local.get $$cmp80) + ) + (br $label$break$L37) + ) + (local.set $$call84 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$j$2103) + (local.get $$add79) + ) + ) + (local.set $$10 + (i32.load + (local.get $$call84) + ) + ) + (local.set $$call85 + (call $_stbir__get_coefficient + (local.get $$coefficients) + (local.get $$filter) + (local.get $$scale_ratio) + (local.get $$j$2103) + (local.get $$i$1101) + ) + ) + (i32.store + (local.get $$call85) + (local.get $$10) + ) + (local.set $$inc87 + (i32.add + (local.get $$i$1101) + (i32.const 1) + ) + ) + (local.set $$cmp77 + (i32.lt_s + (local.get $$inc87) + (local.get $$call74) + ) + ) + (if + (local.get $$cmp77) + (local.set $$i$1101 + (local.get $$inc87) + ) + (br $while-out10) + ) + (br $while-in11) + ) + ) + ) + ) + ) + (local.set $$inc90 + (i32.add + (local.get $$j$2103) + (i32.const 1) + ) + ) + (local.set $$exitcond114 + (i32.eq + (local.get $$inc90) + (local.get $$call) + ) + ) + (if + (local.get $$exitcond114) + (br $while-out5) + (local.set $$j$2103 + (local.get $$inc90) + ) + ) + (br $while-in6) + ) + ) + (local.set $$cmp9395 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp9395) + ) + (return) + ) + (local.set $$sub97 + (i32.add + (local.get $$output_size) + (i32.const -1) + ) + ) + (local.set $$i$296 + (i32.const 0) + ) + (loop $while-in13 + (block $while-out12 + (local.set $$n196 + (i32.add + (i32.add + (local.get $$contributors) + (i32.shl + (local.get $$i$296) + (i32.const 3) + ) + ) + (i32.const 4) + ) + ) + (local.set $$11 + (i32.load + (local.get $$n196) + ) + ) + (local.set $$call98 + (call $_stbir__min + (local.get $$11) + (local.get $$sub97) + ) + ) + (i32.store + (local.get $$n196) + (local.get $$call98) + ) + (local.set $$inc102 + (i32.add + (local.get $$i$296) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc102) + (local.get $$call) + ) + ) + (if + (local.get $$exitcond) + (br $while-out12) + (local.set $$i$296 + (local.get $$inc102) + ) + ) + (br $while-in13) + ) + ) + (return) + ) + (func $_stbir__min (; 497 ;) (param $$a i32) (param $$b i32) (result i32) + (local $$cmp i32) + (local $$cond i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$a) + (local.get $$b) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp) + (local.get $$a) + (local.get $$b) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $_stbir__get_total_horizontal_coefficients (; 498 ;) (param $$info i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 f32) + (local $$call i32) + (local $$horizontal_filter i32) + (local $$horizontal_num_contributors i32) + (local $$horizontal_scale i32) + (local $$mul i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$horizontal_num_contributors + (i32.add + (local.get $$info) + (i32.const 152) + ) + ) + (local.set $$0 + (i32.load + (local.get $$horizontal_num_contributors) + ) + ) + (local.set $$horizontal_filter + (i32.add + (local.get $$info) + (i32.const 80) + ) + ) + (local.set $$1 + (i32.load + (local.get $$horizontal_filter) + ) + ) + (local.set $$horizontal_scale + (i32.add + (local.get $$info) + (i32.const 56) + ) + ) + (local.set $$2 + (f32.load + (local.get $$horizontal_scale) + ) + ) + (local.set $$call + (call $_stbir__get_coefficient_width + (local.get $$1) + (local.get $$2) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$call) + (local.get $$0) + ) + ) + (return + (local.get $$mul) + ) + ) + (func $_stbir__get_total_vertical_coefficients (; 499 ;) (param $$info i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 f32) + (local $$call i32) + (local $$mul i32) + (local $$vertical_filter i32) + (local $$vertical_num_contributors i32) + (local $$vertical_scale i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$vertical_num_contributors + (i32.add + (local.get $$info) + (i32.const 156) + ) + ) + (local.set $$0 + (i32.load + (local.get $$vertical_num_contributors) + ) + ) + (local.set $$vertical_filter + (i32.add + (local.get $$info) + (i32.const 84) + ) + ) + (local.set $$1 + (i32.load + (local.get $$vertical_filter) + ) + ) + (local.set $$vertical_scale + (i32.add + (local.get $$info) + (i32.const 60) + ) + ) + (local.set $$2 + (f32.load + (local.get $$vertical_scale) + ) + ) + (local.set $$call + (call $_stbir__get_coefficient_width + (local.get $$1) + (local.get $$2) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$call) + (local.get $$0) + ) + ) + (return + (local.get $$mul) + ) + ) + (func $_GetTime (; 500 ;) (result f64) + (local $$call f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_glfwGetTime) + ) + (return + (local.get $$call) + ) + ) + (func $_ErrorCallback (; 501 ;) (param $$error i32) (param $$description i32) + (local $$vararg_buffer i32) + (local $$vararg_ptr1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$error) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$description) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16472) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_SetupFramebuffer (; 502 ;) + (local $$0 i32) + (local $$1 i32) + (local $$10 f32) + (local $$11 f32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp21 i32) + (local $$cmp24 i32) + (local $$cmp33 i32) + (local $$cmp6 i32) + (local $$conv f32) + (local $$conv11 i32) + (local $$conv15 i32) + (local $$conv17 f32) + (local $$conv2 f32) + (local $$conv27 f32) + (local $$conv28 f32) + (local $$conv3 f32) + (local $$conv30 f32) + (local $$conv31 f32) + (local $$conv39 i32) + (local $$conv4 f32) + (local $$conv45 i32) + (local $$div f32) + (local $$div19 f32) + (local $$div29 f32) + (local $$div32 f32) + (local $$div37 f32) + (local $$div5 f32) + (local $$mul f32) + (local $$mul13 f32) + (local $$mul43 f32) + (local $$or$cond i32) + (local $$storemerge i32) + (local $$storemerge1 i32) + (local $$sub i32) + (local $$sub16 i32) + (local $$sub40 i32) + (local $$sub46 i32) + (local $$tmp i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer4 i32) + (local $$vararg_buffer8 i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr11 i32) + (local $$vararg_ptr12 i32) + (local $$vararg_ptr13 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr3 i32) + (local $$vararg_ptr7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $$vararg_buffer8 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29252) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$0) + (local.get $$1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (local.set $$2 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29256) + ) + ) + (local.set $$cmp1 + (i32.gt_u + (local.get $$2) + (local.get $$3) + ) + ) + (if + (i32.eqz + (local.get $$cmp1) + ) + (block + (local.set $$cmp21 + (i32.lt_u + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$cmp24 + (i32.lt_u + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp21) + (local.get $$cmp24) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (block + (i32.store + (i32.const 29260) + (local.get $$0) + ) + (i32.store + (i32.const 29264) + (local.get $$2) + ) + (i32.store + (i32.const 29268) + (i32.const 0) + ) + (i32.store + (i32.const 29272) + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (i32.store + (local.get $$vararg_buffer8) + (local.get $$0) + ) + (local.set $$vararg_ptr11 + (i32.add + (local.get $$vararg_buffer8) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr11) + (local.get $$2) + ) + (local.set $$vararg_ptr12 + (i32.add + (local.get $$vararg_buffer8) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr12) + (local.get $$1) + ) + (local.set $$vararg_ptr13 + (i32.add + (local.get $$vararg_buffer8) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr13) + (local.get $$3) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 16406) + (local.get $$vararg_buffer8) + ) + (local.set $$15 + (i32.load + (i32.const 29252) + ) + ) + (local.set $$conv27 + (f32.convert_i32_u + (local.get $$15) + ) + ) + (local.set $$16 + (i32.load + (i32.const 29256) + ) + ) + (local.set $$conv28 + (f32.convert_i32_u + (local.get $$16) + ) + ) + (local.set $$div29 + (f32.div + (local.get $$conv27) + (local.get $$conv28) + ) + ) + (local.set $$17 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$conv30 + (f32.convert_i32_s + (local.get $$17) + ) + ) + (local.set $$18 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$conv31 + (f32.convert_i32_s + (local.get $$18) + ) + ) + (local.set $$div32 + (f32.div + (local.get $$conv30) + (local.get $$conv31) + ) + ) + (local.set $$cmp33 + (i32.eqz + (f32.le + (local.get $$div29) + (local.get $$div32) + ) + ) + ) + (if + (local.get $$cmp33) + (block + (local.set $$mul43 + (f32.mul + (local.get $$div29) + (local.get $$conv31) + ) + ) + (local.set $$20 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul43) + ) + ) + ) + ) + (local.set $$conv45 + (i32.trunc_f32_s + (local.get $$20) + ) + ) + (i32.store + (i32.const 29260) + (local.get $$conv45) + ) + (i32.store + (i32.const 29264) + (local.get $$18) + ) + (local.set $$sub46 + (i32.sub + (local.get $$conv45) + (local.get $$17) + ) + ) + (i32.store + (i32.const 29268) + (local.get $$sub46) + ) + (local.set $$storemerge + (i32.const 0) + ) + ) + (block + (i32.store + (i32.const 29260) + (local.get $$17) + ) + (local.set $$div37 + (f32.div + (local.get $$conv30) + (local.get $$div29) + ) + ) + (local.set $$19 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$div37) + ) + ) + ) + ) + (local.set $$conv39 + (i32.trunc_f32_s + (local.get $$19) + ) + ) + (i32.store + (i32.const 29264) + (local.get $$conv39) + ) + (i32.store + (i32.const 29268) + (i32.const 0) + ) + (local.set $$sub40 + (i32.sub + (local.get $$conv39) + (local.get $$18) + ) + ) + (local.set $$storemerge + (local.get $$sub40) + ) + ) + ) + (i32.store + (i32.const 29272) + (local.get $$storemerge) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29256) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$0) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$4) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (local.get $$1) + ) + (local.set $$vararg_ptr3 + (i32.add + (local.get $$vararg_buffer) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr3) + (local.get $$5) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16263) + (local.get $$vararg_buffer) + ) + (local.set $$6 + (i32.load + (i32.const 29252) + ) + ) + (local.set $$conv + (f32.convert_i32_u + (local.get $$6) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$conv2 + (f32.convert_i32_s + (local.get $$7) + ) + ) + (local.set $$div + (f32.div + (local.get $$conv) + (local.get $$conv2) + ) + ) + (local.set $$8 + (i32.load + (i32.const 29256) + ) + ) + (local.set $$conv3 + (f32.convert_i32_u + (local.get $$8) + ) + ) + (local.set $$9 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$conv4 + (f32.convert_i32_s + (local.get $$9) + ) + ) + (local.set $$div5 + (f32.div + (local.get $$conv3) + (local.get $$conv4) + ) + ) + (local.set $$cmp6 + (i32.eqz + (f32.le + (local.get $$div) + (local.get $$div5) + ) + ) + ) + (if + (local.get $$cmp6) + (block + (local.set $$mul13 + (f32.mul + (local.get $$div5) + (local.get $$conv2) + ) + ) + (local.set $$11 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul13) + ) + ) + ) + ) + (local.set $$conv15 + (i32.trunc_f32_s + (local.get $$11) + ) + ) + (i32.store + (i32.const 29260) + (local.get $$conv15) + ) + (i32.store + (i32.const 29264) + (local.get $$8) + ) + (local.set $$sub16 + (i32.sub + (local.get $$6) + (local.get $$conv15) + ) + ) + (i32.store + (i32.const 29268) + (local.get $$sub16) + ) + (local.set $$storemerge1 + (i32.const 0) + ) + ) + (block + (i32.store + (i32.const 29260) + (local.get $$6) + ) + (local.set $$mul + (f32.mul + (local.get $$div) + (local.get $$conv4) + ) + ) + (local.set $$10 + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (local.get $$mul) + ) + ) + ) + ) + (local.set $$conv11 + (i32.trunc_f32_s + (local.get $$10) + ) + ) + (i32.store + (i32.const 29264) + (local.get $$conv11) + ) + (i32.store + (i32.const 29268) + (i32.const 0) + ) + (local.set $$sub + (i32.sub + (local.get $$8) + (local.get $$conv11) + ) + ) + (local.set $$storemerge1 + (local.get $$sub) + ) + ) + ) + (i32.store + (i32.const 29272) + (local.get $$storemerge1) + ) + (local.set $$12 + (i32.load + (i32.const 29260) + ) + ) + (local.set $$conv17 + (f32.convert_i32_s + (local.get $$12) + ) + ) + (local.set $$div19 + (f32.div + (local.get $$conv17) + (local.get $$conv2) + ) + ) + (call $_MatrixScale + (local.get $$tmp) + (local.get $$div19) + (local.get $$div19) + (f32.const 1) + ) + (i64.store align=4 + (i32.const 29188) + (i64.load align=4 + (local.get $$tmp) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29188) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (local.get $$tmp) + (i32.const 56) + ) + ) + ) + (local.set $$13 + (i32.load + (i32.const 29252) + ) + ) + (i32.store + (i32.const 29260) + (local.get $$13) + ) + (local.set $$14 + (i32.load + (i32.const 29256) + ) + ) + (i32.store + (i32.const 29264) + (local.get $$14) + ) + (i32.store + (local.get $$vararg_buffer4) + (local.get $$13) + ) + (local.set $$vararg_ptr7 + (i32.add + (local.get $$vararg_buffer4) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr7) + (local.get $$14) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16341) + (local.get $$vararg_buffer4) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_WindowSizeCallback (; 503 ;) (param $$window i32) (param $$width i32) (param $$height i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $_SetupViewport + (local.get $$width) + (local.get $$height) + ) + (i32.store + (i32.const 29144) + (local.get $$width) + ) + (i32.store + (i32.const 29148) + (local.get $$height) + ) + (return) + ) + (func $_CursorEnterCallback (; 504 ;) (param $$window i32) (param $$enter i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return) + ) + (func $_KeyCallback (; 505 ;) (param $$window i32) (param $$key i32) (param $$scancode i32) (param $$action i32) (param $$mods i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$call11 i32) + (local $$call12 i32) + (local $$call14 i32) + (local $$call17 f32) + (local $$call19 i32) + (local $$call21 i32) + (local $$call9 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp2 i32) + (local $$cmp6 i32) + (local $$conv i32) + (local $$inc i32) + (local $$inc22 i32) + (local $$mul f32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$path i32) + (local $$sub i32) + (local $$sub10 i32) + (local $$tobool i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$vararg_buffer10 i32) + (local $$vararg_buffer13 i32) + (local $$vararg_buffer16 i32) + (local $$vararg_buffer19 i32) + (local $$vararg_buffer4 i32) + (local $$vararg_buffer8 i32) + (local $$vararg_ptr7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 576) + ) + ) + (local.set $$vararg_buffer19 + (i32.add + (local.get $sp_a) + (i32.const 568) + ) + ) + (local.set $$vararg_buffer16 + (i32.add + (local.get $sp_a) + (i32.const 560) + ) + ) + (local.set $$vararg_buffer13 + (i32.add + (local.get $sp_a) + (i32.const 552) + ) + ) + (local.set $$vararg_buffer10 + (i32.add + (local.get $sp_a) + (i32.const 544) + ) + ) + (local.set $$vararg_buffer8 + (i32.add + (local.get $sp_a) + (i32.const 536) + ) + ) + (local.set $$vararg_buffer4 + (i32.add + (local.get $sp_a) + (i32.const 528) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 520) + ) + ) + (local.set $$vararg_buffer + (i32.add + (local.get $sp_a) + (i32.const 512) + ) + ) + (local.set $$path + (local.get $sp_a) + ) + (local.set $$cmp + (i32.eq + (i32.const 256) + (local.get $$key) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$action) + (i32.const 1) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp1) + (local.get $$cmp) + ) + ) + (if + (local.get $$or$cond) + (block + (call $_glfwSetWindowShouldClose + (local.get $$window) + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp2 + (i32.eq + (local.get $$key) + (i32.const 301) + ) + ) + (local.set $$or$cond1 + (i32.and + (local.get $$cmp2) + (local.get $$cmp1) + ) + ) + (if + (i32.eqz + (local.get $$or$cond1) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$cmp6 + (i32.eq + (local.get $$mods) + (i32.const 2) + ) + ) + (if + (i32.eqz + (local.get $$cmp6) + ) + (block + (local.set $$7 + (i32.load + (i32.const 29292) + ) + ) + (i32.store + (local.get $$vararg_buffer19) + (local.get $$7) + ) + (local.set $$call21 + (call $_TextFormat + (i32.const 16013) + (local.get $$vararg_buffer19) + ) + ) + (call $_TakeScreenshot + (local.get $$call21) + ) + (local.set $$8 + (i32.load + (i32.const 29292) + ) + ) + (local.set $$inc22 + (i32.add + (local.get $$8) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29292) + (local.get $$inc22) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$0 + (i32.load8_s + (i32.const 29935) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (i32.store8 + (i32.const 29935) + (i32.const 1) + ) + (i32.store + (i32.const 29296) + (i32.const 0) + ) + (drop + (call $_memset + (local.get $$path) + (i32.const 0) + (i32.const 512) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29292) + ) + ) + (i32.store + (local.get $$vararg_buffer10) + (local.get $$3) + ) + (local.set $$call14 + (call $_TextFormat + (i32.const 15960) + (local.get $$vararg_buffer10) + ) + ) + (drop + (call $_strcpy + (local.get $$path) + (local.get $$call14) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$call17 + (call $_GetFrameTime) + ) + (local.set $$mul + (f32.mul + (local.get $$call17) + (f32.const 10) + ) + ) + (local.set $$conv + (i32.trunc_f32_s + (local.get $$mul) + ) + ) + (drop + (call $_GifBegin + (local.get $$path) + (local.get $$4) + (local.get $$5) + (local.get $$conv) + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $$6 + (i32.load + (i32.const 29292) + ) + ) + (local.set $$inc + (i32.add + (local.get $$6) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29292) + (local.get $$inc) + ) + (i32.store + (local.get $$vararg_buffer13) + (local.get $$inc) + ) + (local.set $$call19 + (call $_TextFormat + (i32.const 15880) + (local.get $$vararg_buffer13) + ) + ) + (i32.store + (local.get $$vararg_buffer16) + (local.get $$call19) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15980) + (local.get $$vararg_buffer16) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (block + (drop + (call $_GifEnd) + ) + (i32.store8 + (i32.const 29935) + (i32.const 0) + ) + (local.set $$1 + (i32.load + (i32.const 29292) + ) + ) + (local.set $$sub + (i32.add + (local.get $$1) + (i32.const -1) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$sub) + ) + (local.set $$call9 + (call $_TextFormat + (i32.const 15880) + (local.get $$vararg_buffer) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29292) + ) + ) + (local.set $$sub10 + (i32.add + (local.get $$2) + (i32.const -1) + ) + ) + (i32.store + (local.get $$vararg_buffer1) + (local.get $$sub10) + ) + (local.set $$call11 + (call $_TextFormat + (i32.const 15880) + (local.get $$vararg_buffer1) + ) + ) + (i32.store + (local.get $$vararg_buffer4) + (local.get $$call9) + ) + (local.set $$vararg_ptr7 + (i32.add + (local.get $$vararg_buffer4) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr7) + (local.get $$call11) + ) + (local.set $$call12 + (call $_TextFormat + (i32.const 15898) + (local.get $$vararg_buffer4) + ) + ) + (call $_emscripten_run_script + (local.get $$call12) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15933) + (local.get $$vararg_buffer8) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + (func $_MouseButtonCallback (; 506 ;) (param $$window i32) (param $$button i32) (param $$action i32) (param $$mods i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i64) + (local $$2 f32) + (local $$3 f32) + (local $$arrayidx i32) + (local $$arrayidx1 i32) + (local $$arrayidx7 i32) + (local $$arrayidx8 i32) + (local $$call i32) + (local $$call13 i32) + (local $$call3 i32) + (local $$call9 i32) + (local $$conv i32) + (local $$conv10 f32) + (local $$conv14 f32) + (local $$div f32) + (local $$div17 f32) + (local $$gestureEvent i32) + (local $$gestureEvent$byval_copy i32) + (local $$pointCount i32) + (local $$tmp i32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (local.set $$gestureEvent$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$gestureEvent + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29929) + (local.get $$button) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx1 + (i32.add + (i32.const 29932) + (local.get $$button) + ) + ) + (i32.store8 + (local.get $$arrayidx1) + (local.get $$0) + ) + (local.set $$conv + (i32.and + (local.get $$action) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$arrayidx) + (local.get $$conv) + ) + (local.set $$call + (call $_IsMouseButtonPressed + (i32.const 0) + ) + ) + (if + (local.get $$call) + (block + (local.set $$$sink + (i32.const 1) + ) + (local.set $label + (i32.const 3) + ) + ) + (block + (local.set $$call3 + (call $_IsMouseButtonReleased + (i32.const 0) + ) + ) + (if + (local.get $$call3) + (block + (local.set $$$sink + (i32.const 0) + ) + (local.set $label + (i32.const 3) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (i32.store + (local.get $$gestureEvent) + (local.get $$$sink) + ) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arrayidx7) + (i32.const 0) + ) + (local.set $$pointCount + (i32.add + (local.get $$gestureEvent) + (i32.const 4) + ) + ) + (i32.store + (local.get $$pointCount) + (i32.const 1) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + (call $_GetMousePosition + (local.get $$tmp) + ) + (local.set $$1 + (i64.load + (local.get $$tmp) + ) + ) + (i64.store align=4 + (local.get $$arrayidx8) + (local.get $$1) + ) + (local.set $$call9 + (call $_GetScreenWidth) + ) + (local.set $$conv10 + (f32.convert_i32_s + (local.get $$call9) + ) + ) + (local.set $$2 + (f32.load + (local.get $$arrayidx8) + ) + ) + (local.set $$div + (f32.div + (local.get $$2) + (local.get $$conv10) + ) + ) + (f32.store + (local.get $$arrayidx8) + (local.get $$div) + ) + (local.set $$call13 + (call $_GetScreenHeight) + ) + (local.set $$conv14 + (f32.convert_i32_s + (local.get $$call13) + ) + ) + (local.set $$y + (i32.add + (local.get $$gestureEvent) + (i32.const 28) + ) + ) + (local.set $$3 + (f32.load + (local.get $$y) + ) + ) + (local.set $$div17 + (f32.div + (local.get $$3) + (local.get $$conv14) + ) + ) + (f32.store + (local.get $$y) + (local.get $$div17) + ) + (i64.store align=4 + (local.get $$gestureEvent$byval_copy) + (i64.load align=4 + (local.get $$gestureEvent) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 48) + ) + ) + ) + (call $_ProcessGestureEvent + (local.get $$gestureEvent$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_MouseCursorPosCallback (; 507 ;) (param $$window i32) (param $$x f64) (param $$y f64) + (local $$$compoundliteral$sroa$0$0$$sroa_idx i32) + (local $$$compoundliteral$sroa$2$0$$sroa_idx1 i32) + (local $$0 f32) + (local $$arrayidx i32) + (local $$arrayidx6 i32) + (local $$call i32) + (local $$call11 i32) + (local $$conv f32) + (local $$conv12 f32) + (local $$conv4 f32) + (local $$conv7 f32) + (local $$div f32) + (local $$div16 f32) + (local $$gestureEvent i32) + (local $$gestureEvent$byval_copy i32) + (local $$pointCount i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $$gestureEvent$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$gestureEvent + (local.get $sp_a) + ) + (i32.store + (local.get $$gestureEvent) + (i32.const 2) + ) + (local.set $$arrayidx + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arrayidx) + (i32.const 0) + ) + (local.set $$pointCount + (i32.add + (local.get $$gestureEvent) + (i32.const 4) + ) + ) + (i32.store + (local.get $$pointCount) + (i32.const 1) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$x) + ) + ) + (local.set $$conv4 + (f32.demote_f64 + (local.get $$y) + ) + ) + (local.set $$$compoundliteral$sroa$0$0$$sroa_idx + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$0$0$$sroa_idx) + (local.get $$conv) + ) + (local.set $$$compoundliteral$sroa$2$0$$sroa_idx1 + (i32.add + (local.get $$gestureEvent) + (i32.const 28) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$2$0$$sroa_idx1) + (local.get $$conv4) + ) + (local.set $$arrayidx6 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + (local.set $$call + (call $_GetScreenWidth) + ) + (local.set $$conv7 + (f32.convert_i32_s + (local.get $$call) + ) + ) + (local.set $$0 + (f32.load + (local.get $$arrayidx6) + ) + ) + (local.set $$div + (f32.div + (local.get $$0) + (local.get $$conv7) + ) + ) + (f32.store + (local.get $$arrayidx6) + (local.get $$div) + ) + (local.set $$call11 + (call $_GetScreenHeight) + ) + (local.set $$conv12 + (f32.convert_i32_s + (local.get $$call11) + ) + ) + (local.set $$div16 + (f32.div + (local.get $$conv4) + (local.get $$conv12) + ) + ) + (f32.store + (local.get $$$compoundliteral$sroa$2$0$$sroa_idx1) + (local.get $$div16) + ) + (i64.store align=4 + (local.get $$gestureEvent$byval_copy) + (i64.load align=4 + (local.get $$gestureEvent) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$gestureEvent$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (local.get $$gestureEvent) + (i32.const 48) + ) + ) + ) + (call $_ProcessGestureEvent + (local.get $$gestureEvent$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_CharCallback (; 508 ;) (param $$window i32) (param $$key i32) + (local $$0 i32) + (local $$cmp i32) + (local $$inc i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29288) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$0) + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (local.set $$inc + (i32.add + (local.get $$0) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29288) + (local.get $$inc) + ) + (return) + ) + (func $_ScrollCallback (; 509 ;) (param $$window i32) (param $$xoffset f64) (param $$yoffset f64) + (local $$conv i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv + (i32.trunc_f64_s + (local.get $$yoffset) + ) + ) + (i32.store + (i32.const 29284) + (local.get $$conv) + ) + (return) + ) + (func $_WindowIconifyCallback (; 510 ;) (param $$window i32) (param $$iconified i32) + (local $$$ i32) + (local $$tobool i32) + (local $$windowMinimized i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$windowMinimized + (i32.const 0) + ) + (local.set $$tobool + (i32.ne + (local.get $$iconified) + (i32.const 0) + ) + ) + (local.set $$$ + (i32.and + (local.get $$tobool) + (i32.const 1) + ) + ) + (local.set $$windowMinimized + (local.get $$$) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_WindowDropCallback (; 511 ;) (param $$window i32) (param $$count i32) (param $$paths i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$arrayidx3 i32) + (local $$call i32) + (local $$call1 i32) + (local $$cmp8 i32) + (local $$exitcond i32) + (local $$i$09 i32) + (local $$inc i32) + (local $$mul i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 15858) + (local.get $$vararg_buffer) + ) + (call $_ClearDroppedFiles) + (local.set $$mul + (i32.shl + (local.get $$count) + (i32.const 2) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul) + ) + ) + (i32.store + (i32.const 29276) + (local.get $$call) + ) + (local.set $$cmp8 + (i32.gt_s + (local.get $$count) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp8) + ) + (block + (i32.store + (i32.const 29280) + (local.get $$count) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$i$09 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$call1 + (call $_malloc + (i32.const 512) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29276) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$0) + (i32.shl + (local.get $$i$09) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx) + (local.get $$call1) + ) + (local.set $$arrayidx3 + (i32.add + (local.get $$paths) + (i32.shl + (local.get $$i$09) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx3) + ) + ) + (drop + (call $_strcpy + (local.get $$call1) + (local.get $$1) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$09) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$count) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (local.set $$i$09 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + (i32.store + (i32.const 29280) + (local.get $$count) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_SetupViewport (; 512 ;) (param $$width i32) (param $$height i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$conv f64) + (local $$conv3 f64) + (local $$div i32) + (local $$div1 i32) + (local $$sub i32) + (local $$sub2 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (i32.store + (i32.const 29260) + (local.get $$width) + ) + (i32.store + (i32.const 29264) + (local.get $$height) + ) + (local.set $$0 + (i32.load + (i32.const 29268) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$0) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29272) + ) + ) + (local.set $$div1 + (i32.and + (i32.div_s + (local.get $$1) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$width) + (local.get $$0) + ) + ) + (local.set $$sub2 + (i32.sub + (local.get $$height) + (local.get $$1) + ) + ) + (call $_rlViewport + (local.get $$div) + (local.get $$div1) + (local.get $$sub) + (local.get $$sub2) + ) + (call $_rlMatrixMode + (i32.const 5889) + ) + (call $_rlLoadIdentity) + (local.set $$2 + (i32.load + (i32.const 29260) + ) + ) + (local.set $$conv + (f64.convert_i32_s + (local.get $$2) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29264) + ) + ) + (local.set $$conv3 + (f64.convert_i32_s + (local.get $$3) + ) + ) + (call $_rlOrtho + (f64.const 0) + (local.get $$conv) + (local.get $$conv3) + (f64.const 0) + (f64.const 0) + (f64.const 1) + ) + (call $_rlMatrixMode + (i32.const 5888) + ) + (call $_rlLoadIdentity) + (return) + ) + (func $_ClearBackground (; 513 ;) (param $$color i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$a i32) + (local $$b i32) + (local $$g i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$color) + ) + ) + (local.set $$g + (i32.add + (local.get $$color) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$g) + ) + ) + (local.set $$b + (i32.add + (local.get $$color) + (i32.const 2) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$b) + ) + ) + (local.set $$a + (i32.add + (local.get $$color) + (i32.const 3) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$a) + ) + ) + (call $_rlClearColor + (local.get $$0) + (local.get $$1) + (local.get $$2) + (local.get $$3) + ) + (call $_rlClearScreenBuffers) + (return) + ) + (func $_ClearDroppedFiles (; 514 ;) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$arrayidx i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp14 i32) + (local $$i$05 i32) + (local $$inc i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29280) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (return) + ) + (local.set $$1 + (i32.load + (i32.const 29280) + ) + ) + (local.set $$cmp14 + (i32.gt_s + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$cmp14) + (block + (local.set $$i$05 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$3 + (i32.load + (i32.const 29276) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$3) + (i32.shl + (local.get $$i$05) + (i32.const 2) + ) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx) + ) + ) + (call $_free + (local.get $$4) + ) + (local.set $$inc + (i32.add + (local.get $$i$05) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29280) + ) + ) + (local.set $$cmp1 + (i32.lt_s + (local.get $$inc) + (local.get $$5) + ) + ) + (if + (local.get $$cmp1) + (local.set $$i$05 + (local.get $$inc) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29276) + ) + ) + (call $_free + (local.get $$2) + ) + (i32.store + (i32.const 29280) + (i32.const 0) + ) + (return) + ) + (func $_IsMouseButtonPressed (; 515 ;) (param $$button i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$arrayidx1 i32) + (local $$cmp i32) + (local $$cmp6 i32) + (local $$or$cond i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29929) + (local.get $$button) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx1 + (i32.add + (i32.const 29932) + (local.get $$button) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$cmp + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$cmp6 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 1) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp6) + (local.get $$cmp) + ) + ) + (return + (local.get $$or$cond) + ) + ) + (func $_IsMouseButtonReleased (; 516 ;) (param $$button i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$arrayidx1 i32) + (local $$cmp i32) + (local $$cmp6 i32) + (local $$or$cond i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29929) + (local.get $$button) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx1 + (i32.add + (i32.const 29932) + (local.get $$button) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$cmp + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$cmp6 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp6) + (local.get $$cmp) + ) + ) + (return + (local.get $$or$cond) + ) + ) + (func $_TextFormat (; 517 ;) (param $$text i32) (param $$varargs i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$add i32) + (local $$args i32) + (local $$arraydecay i32) + (local $$cmp i32) + (local $$spec$store$select i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$args + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29300) + ) + ) + (local.set $$arraydecay + (i32.add + (i32.const 23344) + (i32.shl + (local.get $$0) + (i32.const 10) + ) + ) + ) + (i32.store + (local.get $$args) + (local.get $$varargs) + ) + (drop + (call $_vsprintf + (local.get $$arraydecay) + (local.get $$text) + (local.get $$args) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29300) + ) + ) + (local.set $$add + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$1) + (i32.const 2) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$cmp) + (i32.const 0) + (local.get $$add) + ) + ) + (i32.store + (i32.const 29300) + (local.get $$spec$store$select) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$arraydecay) + ) + ) + (func $_GetFrameTime (; 518 ;) (result f32) + (local $$0 f64) + (local $$conv f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (f64.load + (i32.const 28848) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$0) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $_TakeScreenshot (; 519 ;) (param $$fileName i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$call i32) + (local $$call4 i32) + (local $$call7 i32) + (local $$format i32) + (local $$height i32) + (local $$image i32) + (local $$image$byval_copy i32) + (local $$mipmaps i32) + (local $$path i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer2 i32) + (local $$vararg_ptr1 i32) + (local $$width i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 576) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 544) + ) + ) + (local.set $$vararg_buffer2 + (i32.add + (local.get $sp_a) + (i32.const 520) + ) + ) + (local.set $$vararg_buffer + (i32.add + (local.get $sp_a) + (i32.const 512) + ) + ) + (local.set $$image + (i32.add + (local.get $sp_a) + (i32.const 524) + ) + ) + (local.set $$path + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29260) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29264) + ) + ) + (local.set $$call + (call $_rlReadScreenPixels + (local.get $$0) + (local.get $$1) + ) + ) + (i32.store + (local.get $$image) + (local.get $$call) + ) + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29260) + ) + ) + (i32.store + (local.get $$width) + (local.get $$2) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29264) + ) + ) + (i32.store + (local.get $$height) + (local.get $$3) + ) + (local.set $$mipmaps + (i32.add + (local.get $$image) + (i32.const 12) + ) + ) + (i32.store + (local.get $$mipmaps) + (i32.const 1) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (i32.store + (local.get $$format) + (i32.const 7) + ) + (drop + (call $_memset + (local.get $$path) + (i32.const 0) + (i32.const 512) + ) + ) + (drop + (call $_strcpy + (local.get $$path) + (local.get $$fileName) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_ExportImage + (local.get $$image$byval_copy) + (local.get $$path) + ) + (call $_free + (local.get $$call) + ) + (local.set $$call4 + (call $_GetFileName + (local.get $$path) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$call4) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$call4) + ) + (local.set $$call7 + (call $_TextFormat + (i32.const 15898) + (local.get $$vararg_buffer) + ) + ) + (call $_emscripten_run_script + (local.get $$call7) + ) + (i32.store + (local.get $$vararg_buffer2) + (local.get $$path) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 16032) + (local.get $$vararg_buffer2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_ExportImage (; 520 ;) (param $$image i32) (param $$fileName i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call10 i32) + (local $$call3 i32) + (local $$call4 i32) + (local $$call6 i32) + (local $$call9 i32) + (local $$cmp i32) + (local $$format i32) + (local $$height i32) + (local $$height8 i32) + (local $$image$byval_copy i32) + (local $$mul i32) + (local $$success$0 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer1 i32) + (local $$width i32) + (local $$width7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 12) + ) + ) + (local.set $$vararg_buffer1 + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (local.set $$call + (call $_GetImageData + (local.get $$image$byval_copy) + ) + ) + (local.set $$call1 + (call $_IsFileExtension + (local.get $$fileName) + (i32.const 16056) + ) + ) + (block $do-once + (if + (local.get $$call1) + (block + (local.set $$width + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$width) + ) + ) + (local.set $$height + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$height) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$0) + (i32.const 2) + ) + ) + (local.set $$call3 + (call $_stbi_write_png + (local.get $$fileName) + (local.get $$0) + (local.get $$1) + (i32.const 4) + (local.get $$call) + (local.get $$mul) + ) + ) + (local.set $$success$0 + (local.get $$call3) + ) + (local.set $label + (i32.const 6) + ) + ) + (block + (local.set $$call4 + (call $_IsFileExtension + (local.get $$fileName) + (i32.const 16061) + ) + ) + (if + (local.get $$call4) + (block + (local.set $$call6 + (call $_fopen + (local.get $$fileName) + (i32.const 16066) + ) + ) + (local.set $$2 + (i32.load + (local.get $$image) + ) + ) + (local.set $$width7 + (i32.add + (local.get $$image) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$width7) + ) + ) + (local.set $$height8 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + (local.set $$4 + (i32.load + (local.get $$height8) + ) + ) + (local.set $$format + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + (local.set $$5 + (i32.load + (local.get $$format) + ) + ) + (local.set $$call9 + (call $_GetPixelDataSize + (local.get $$3) + (local.get $$4) + (local.get $$5) + ) + ) + (local.set $$call10 + (call $_fwrite + (local.get $$2) + (local.get $$call9) + (i32.const 1) + (local.get $$call6) + ) + ) + (drop + (call $_fclose + (local.get $$call6) + ) + ) + (local.set $$success$0 + (local.get $$call10) + ) + (local.set $label + (i32.const 6) + ) + (br $do-once) + ) + (block + (call $_free + (local.get $$call) + ) + (br $do-once) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (block + (call $_free + (local.get $$call) + ) + (local.set $$cmp + (i32.eq + (local.get $$success$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$fileName) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 16069) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16101) + (local.get $$vararg_buffer1) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GetFileName (; 521 ;) (param $$filePath i32) (result i32) + (local $$add$ptr i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$fileName$0 i32) + (local $$or$cond i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$filePath) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$fileName$0 + (i32.const 0) + ) + (block + (local.set $$call + (call $_strprbrk + (local.get $$filePath) + ) + ) + (local.set $$fileName$0 + (local.get $$call) + ) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$fileName$0) + (i32.const 0) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$fileName$0) + (local.get $$filePath) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$tobool) + (local.get $$cmp1) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$fileName$0) + (i32.const 1) + ) + ) + (local.set $$retval$0 + (if (result i32) + (local.get $$or$cond) + (local.get $$filePath) + (local.get $$add$ptr) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_strprbrk (; 522 ;) (param $$s i32) (result i32) + (local $$call i32) + (local $$cmp i32) + (local $$incdec$ptr i32) + (local $$latestMatch$0 i32) + (local $$s$addr$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$latestMatch$0 + (i32.const 0) + ) + (local.set $$s$addr$0 + (local.get $$s) + ) + (loop $while-in + (block $while-out + (local.set $$call + (call $_strpbrk + (local.get $$s$addr$0) + (i32.const 16053) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (if + (local.get $$cmp) + (br $while-out) + (block + (local.set $$latestMatch$0 + (local.get $$call) + ) + (local.set $$s$addr$0 + (local.get $$incdec$ptr) + ) + ) + ) + (br $while-in) + ) + ) + (return + (local.get $$latestMatch$0) + ) + ) + (func $_IsFileExtension (; 523 ;) (param $$fileName i32) (param $$ext i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add$ptr i32) + (local $$arrayidx i32) + (local $$call i32) + (local $$call1 i32) + (local $$call3 i32) + (local $$cmp i32) + (local $$cmp2 i32) + (local $$cmp27 i32) + (local $$cmp4 i32) + (local $$extCount i32) + (local $$i$08 i32) + (local $$inc i32) + (local $$result$0 i32) + (local $$result$1$off0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$extCount + (local.get $sp_a) + ) + (local.set $$call + (call $_GetExtension + (local.get $$fileName) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$result$1$off0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$result$1$off0) + ) + ) + ) + (i32.store + (local.get $$extCount) + (i32.const 0) + ) + (local.set $$call1 + (call $_TextSplit + (local.get $$ext) + (i32.const 59) + (local.get $$extCount) + ) + ) + (local.set $$0 + (i32.load + (local.get $$extCount) + ) + ) + (local.set $$cmp27 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (block $label$break$L4 + (if + (local.get $$cmp27) + (block + (local.set $$1 + (i32.load + (local.get $$extCount) + ) + ) + (local.set $$i$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$call1) + (i32.shl + (local.get $$i$08) + (i32.const 2) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (local.set $$call3 + (call $_strcmp + (local.get $$call) + (local.get $$add$ptr) + ) + ) + (local.set $$cmp4 + (i32.eq + (local.get $$call3) + (i32.const 0) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$08) + (i32.const 1) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$result$0 + (i32.const 1) + ) + (br $label$break$L4) + ) + ) + (local.set $$cmp2 + (i32.lt_s + (local.get $$inc) + (local.get $$1) + ) + ) + (if + (local.get $$cmp2) + (local.set $$i$08 + (local.get $$inc) + ) + (block + (local.set $$result$0 + (i32.const 0) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $$result$0 + (i32.const 0) + ) + ) + ) + (local.set $$result$1$off0 + (local.get $$result$0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$result$1$off0) + ) + ) + (func $_stbi_write_png (; 524 ;) (param $$filename i32) (param $$x i32) (param $$y i32) (param $$comp i32) (param $$data i32) (param $$stride_bytes i32) (result i32) + (local $$0 i32) + (local $$call i32) + (local $$call1 i32) + (local $$cmp i32) + (local $$len i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$len + (local.get $sp_a) + ) + (local.set $$call + (call $_stbi_write_png_to_mem + (local.get $$data) + (local.get $$stride_bytes) + (local.get $$x) + (local.get $$y) + (local.get $$comp) + (local.get $$len) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$cmp) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$call1 + (call $_stbiw__fopen + (local.get $$filename) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (call $_free + (local.get $$call) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (br $do-once) + ) + (block + (local.set $$0 + (i32.load + (local.get $$len) + ) + ) + (drop + (call $_fwrite + (local.get $$call) + (i32.const 1) + (local.get $$0) + (local.get $$call1) + ) + ) + (drop + (call $_fclose + (local.get $$call1) + ) + ) + (call $_free + (local.get $$call) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (br $do-once) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbi_write_png_to_mem (; 525 ;) (param $$pixels i32) (param $$stride_bytes i32) (param $$x i32) (param $$y i32) (param $$n i32) (param $$out_len i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr101 i32) + (local $$add$ptr117 i32) + (local $$add$ptr140 i32) + (local $$add$ptr157 i32) + (local $$add$ptr158 i32) + (local $$add$ptr163 i32) + (local $$add$ptr180 i32) + (local $$add$ptr181 i32) + (local $$add$ptr45 i32) + (local $$add$ptr65 i32) + (local $$add$ptr70 i32) + (local $$add$ptr86 i32) + (local $$add24 i32) + (local $$add24$1 i32) + (local $$add24$2 i32) + (local $$add24$3 i32) + (local $$add24$4 i32) + (local $$add58 i32) + (local $$arrayidx i32) + (local $$arrayidx$1 i32) + (local $$arrayidx$2 i32) + (local $$arrayidx$3 i32) + (local $$arrayidx$4 i32) + (local $$arrayidx100 i32) + (local $$arrayidx109 i32) + (local $$arrayidx113 i32) + (local $$arrayidx116 i32) + (local $$arrayidx118 i32) + (local $$arrayidx132 i32) + (local $$arrayidx136 i32) + (local $$arrayidx139 i32) + (local $$arrayidx148 i32) + (local $$arrayidx152 i32) + (local $$arrayidx156 i32) + (local $$arrayidx160 i32) + (local $$arrayidx161 i32) + (local $$arrayidx162 i32) + (local $$arrayidx171 i32) + (local $$arrayidx175 i32) + (local $$arrayidx179 i32) + (local $$arrayidx41 i32) + (local $$arrayidx67 i32) + (local $$arrayidx68 i32) + (local $$arrayidx69 i32) + (local $$arrayidx77 i32) + (local $$arrayidx81 i32) + (local $$arrayidx85 i32) + (local $$arrayidx93 i32) + (local $$arrayidx97 i32) + (local $$call i32) + (local $$call53 i32) + (local $$call59 i32) + (local $$call9 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp1397 i32) + (local $$cmp14 i32) + (local $$cmp182 i32) + (local $$cmp2191 i32) + (local $$cmp25$1 i32) + (local $$cmp25$2 i32) + (local $$cmp25$3 i32) + (local $$cmp25$4 i32) + (local $$conv i32) + (local $$conv$1 i32) + (local $$conv$2 i32) + (local $$conv$3 i32) + (local $$conv$4 i32) + (local $$conv104 i32) + (local $$conv108 i32) + (local $$conv112 i32) + (local $$conv115 i32) + (local $$conv120 i32) + (local $$conv127 i32) + (local $$conv131 i32) + (local $$conv135 i32) + (local $$conv138 i32) + (local $$conv37 i32) + (local $$conv88 i32) + (local $$conv92 i32) + (local $$conv96 i32) + (local $$conv99 i32) + (local $$est$0$lcssa$1 i32) + (local $$est$0$lcssa$2 i32) + (local $$est$0$lcssa$3 i32) + (local $$est$0$lcssa$4 i32) + (local $$est$0$lcssa101 i32) + (local $$est$092 i32) + (local $$est$092$1 i32) + (local $$est$092$2 i32) + (local $$est$092$3 i32) + (local $$est$092$4 i32) + (local $$exitcond i32) + (local $$exitcond$1 i32) + (local $$exitcond$2 i32) + (local $$exitcond$3 i32) + (local $$exitcond$4 i32) + (local $$exitcond100 i32) + (local $$filter_type$2 i32) + (local $$force_filter$0 i32) + (local $$i$093 i32) + (local $$i$093$1 i32) + (local $$i$093$2 i32) + (local $$i$093$3 i32) + (local $$i$093$4 i32) + (local $$inc i32) + (local $$inc$1 i32) + (local $$inc$2 i32) + (local $$inc$3 i32) + (local $$inc$4 i32) + (local $$inc48 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr121 i32) + (local $$incdec$ptr122 i32) + (local $$incdec$ptr123 i32) + (local $$incdec$ptr124 i32) + (local $$ispos i32) + (local $$ispos$1 i32) + (local $$ispos$2 i32) + (local $$ispos$3 i32) + (local $$ispos$4 i32) + (local $$j$098 i32) + (local $$mul i32) + (local $$mul40 i32) + (local $$mul5 i32) + (local $$neg i32) + (local $$neg$1 i32) + (local $$neg$2 i32) + (local $$neg$3 i32) + (local $$neg$4 i32) + (local $$o i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$spec$select89$1 i32) + (local $$spec$select89$2 i32) + (local $$spec$select89$3 i32) + (local $$spec$select89$4 i32) + (local $$spec$select90$1 i32) + (local $$spec$select90$2 i32) + (local $$spec$select90$3 i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool54 i32) + (local $$tobool60 i32) + (local $$zlen i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$o + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$zlen + (local.get $sp_a) + ) + (local.set $$cmp + (i32.eq + (local.get $$stride_bytes) + (i32.const 0) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$n) + (local.get $$x) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp) + (local.get $$mul) + (local.get $$stride_bytes) + ) + ) + (local.set $$cmp1 + (i32.gt_s + (i32.const -1) + (i32.const 4) + ) + ) + (local.set $$force_filter$0 + (if (result i32) + (local.get $$cmp1) + (i32.const -1) + (i32.const -1) + ) + ) + (local.set $$add + (i32.add + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$mul5 + (i32.mul + (local.get $$add) + (local.get $$y) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$mul5) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$call9 + (call $_malloc + (local.get $$mul) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$call9) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (block + (call $_free + (local.get $$call) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp1397 + (i32.gt_s + (local.get $$y) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1397) + (block + (local.set $$cmp14 + (i32.gt_s + (local.get $$force_filter$0) + (i32.const -1) + ) + ) + (local.set $$cmp2191 + (i32.gt_s + (local.get $$mul) + (i32.const 0) + ) + ) + (local.set $$j$098 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (if + (local.get $$cmp14) + (block + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (local.get $$force_filter$0) + (local.get $$call9) + ) + (local.set $$filter_type$2 + (local.get $$force_filter$0) + ) + ) + (block + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 0) + (local.get $$call9) + ) + (if + (local.get $$cmp2191) + (block + (local.set $$est$092 + (i32.const 0) + ) + (local.set $$i$093 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$arrayidx + (i32.add + (local.get $$call9) + (local.get $$i$093) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$ispos + (i32.gt_s + (local.get $$conv) + (i32.const -1) + ) + ) + (local.set $$neg + (i32.sub + (i32.const 0) + (local.get $$conv) + ) + ) + (local.set $$1 + (if (result i32) + (local.get $$ispos) + (local.get $$conv) + (local.get $$neg) + ) + ) + (local.set $$add24 + (i32.add + (local.get $$1) + (local.get $$est$092) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$093) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond) + (br $while-out0) + (block + (local.set $$est$092 + (local.get $$add24) + ) + (local.set $$i$093 + (local.get $$inc) + ) + ) + ) + (br $while-in1) + ) + ) + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 1) + (local.get $$call9) + ) + (if + (local.get $$cmp2191) + (block + (local.set $$est$092$1 + (i32.const 0) + ) + (local.set $$i$093$1 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$arrayidx$1 + (i32.add + (local.get $$call9) + (local.get $$i$093$1) + ) + ) + (local.set $$29 + (i32.load8_s + (local.get $$arrayidx$1) + ) + ) + (local.set $$conv$1 + (i32.shr_s + (i32.shl + (local.get $$29) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$ispos$1 + (i32.gt_s + (local.get $$conv$1) + (i32.const -1) + ) + ) + (local.set $$neg$1 + (i32.sub + (i32.const 0) + (local.get $$conv$1) + ) + ) + (local.set $$30 + (if (result i32) + (local.get $$ispos$1) + (local.get $$conv$1) + (local.get $$neg$1) + ) + ) + (local.set $$add24$1 + (i32.add + (local.get $$30) + (local.get $$est$092$1) + ) + ) + (local.set $$inc$1 + (i32.add + (local.get $$i$093$1) + (i32.const 1) + ) + ) + (local.set $$exitcond$1 + (i32.eq + (local.get $$inc$1) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond$1) + (block + (local.set $$est$0$lcssa$1 + (local.get $$add24$1) + ) + (local.set $$est$0$lcssa101 + (local.get $$add24) + ) + (br $while-out2) + ) + (block + (local.set $$est$092$1 + (local.get $$add24$1) + ) + (local.set $$i$093$1 + (local.get $$inc$1) + ) + ) + ) + (br $while-in3) + ) + ) + ) + (block + (local.set $$est$0$lcssa$1 + (i32.const 0) + ) + (local.set $$est$0$lcssa101 + (local.get $$add24) + ) + ) + ) + ) + (block + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 1) + (local.get $$call9) + ) + (local.set $$est$0$lcssa$1 + (i32.const 0) + ) + (local.set $$est$0$lcssa101 + (i32.const 0) + ) + ) + ) + (local.set $$cmp25$1 + (i32.lt_s + (local.get $$est$0$lcssa$1) + (local.get $$est$0$lcssa101) + ) + ) + (local.set $$spec$select89$1 + (i32.and + (local.get $$cmp25$1) + (i32.const 1) + ) + ) + (local.set $$spec$select90$1 + (if (result i32) + (local.get $$cmp25$1) + (local.get $$est$0$lcssa$1) + (local.get $$est$0$lcssa101) + ) + ) + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 2) + (local.get $$call9) + ) + (if + (local.get $$cmp2191) + (block + (local.set $$est$092$2 + (i32.const 0) + ) + (local.set $$i$093$2 + (i32.const 0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$arrayidx$2 + (i32.add + (local.get $$call9) + (local.get $$i$093$2) + ) + ) + (local.set $$31 + (i32.load8_s + (local.get $$arrayidx$2) + ) + ) + (local.set $$conv$2 + (i32.shr_s + (i32.shl + (local.get $$31) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$ispos$2 + (i32.gt_s + (local.get $$conv$2) + (i32.const -1) + ) + ) + (local.set $$neg$2 + (i32.sub + (i32.const 0) + (local.get $$conv$2) + ) + ) + (local.set $$32 + (if (result i32) + (local.get $$ispos$2) + (local.get $$conv$2) + (local.get $$neg$2) + ) + ) + (local.set $$add24$2 + (i32.add + (local.get $$32) + (local.get $$est$092$2) + ) + ) + (local.set $$inc$2 + (i32.add + (local.get $$i$093$2) + (i32.const 1) + ) + ) + (local.set $$exitcond$2 + (i32.eq + (local.get $$inc$2) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond$2) + (block + (local.set $$est$0$lcssa$2 + (local.get $$add24$2) + ) + (br $while-out4) + ) + (block + (local.set $$est$092$2 + (local.get $$add24$2) + ) + (local.set $$i$093$2 + (local.get $$inc$2) + ) + ) + ) + (br $while-in5) + ) + ) + ) + (local.set $$est$0$lcssa$2 + (i32.const 0) + ) + ) + (local.set $$cmp25$2 + (i32.lt_s + (local.get $$est$0$lcssa$2) + (local.get $$spec$select90$1) + ) + ) + (local.set $$spec$select89$2 + (if (result i32) + (local.get $$cmp25$2) + (i32.const 2) + (local.get $$spec$select89$1) + ) + ) + (local.set $$spec$select90$2 + (if (result i32) + (local.get $$cmp25$2) + (local.get $$est$0$lcssa$2) + (local.get $$spec$select90$1) + ) + ) + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 3) + (local.get $$call9) + ) + (if + (local.get $$cmp2191) + (block + (local.set $$est$092$3 + (i32.const 0) + ) + (local.set $$i$093$3 + (i32.const 0) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$arrayidx$3 + (i32.add + (local.get $$call9) + (local.get $$i$093$3) + ) + ) + (local.set $$33 + (i32.load8_s + (local.get $$arrayidx$3) + ) + ) + (local.set $$conv$3 + (i32.shr_s + (i32.shl + (local.get $$33) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$ispos$3 + (i32.gt_s + (local.get $$conv$3) + (i32.const -1) + ) + ) + (local.set $$neg$3 + (i32.sub + (i32.const 0) + (local.get $$conv$3) + ) + ) + (local.set $$34 + (if (result i32) + (local.get $$ispos$3) + (local.get $$conv$3) + (local.get $$neg$3) + ) + ) + (local.set $$add24$3 + (i32.add + (local.get $$34) + (local.get $$est$092$3) + ) + ) + (local.set $$inc$3 + (i32.add + (local.get $$i$093$3) + (i32.const 1) + ) + ) + (local.set $$exitcond$3 + (i32.eq + (local.get $$inc$3) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond$3) + (block + (local.set $$est$0$lcssa$3 + (local.get $$add24$3) + ) + (br $while-out6) + ) + (block + (local.set $$est$092$3 + (local.get $$add24$3) + ) + (local.set $$i$093$3 + (local.get $$inc$3) + ) + ) + ) + (br $while-in7) + ) + ) + ) + (local.set $$est$0$lcssa$3 + (i32.const 0) + ) + ) + (local.set $$cmp25$3 + (i32.lt_s + (local.get $$est$0$lcssa$3) + (local.get $$spec$select90$2) + ) + ) + (local.set $$spec$select89$3 + (if (result i32) + (local.get $$cmp25$3) + (i32.const 3) + (local.get $$spec$select89$2) + ) + ) + (local.set $$spec$select90$3 + (if (result i32) + (local.get $$cmp25$3) + (local.get $$est$0$lcssa$3) + (local.get $$spec$select90$2) + ) + ) + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (i32.const 4) + (local.get $$call9) + ) + (if + (local.get $$cmp2191) + (block + (local.set $$est$092$4 + (i32.const 0) + ) + (local.set $$i$093$4 + (i32.const 0) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$arrayidx$4 + (i32.add + (local.get $$call9) + (local.get $$i$093$4) + ) + ) + (local.set $$35 + (i32.load8_s + (local.get $$arrayidx$4) + ) + ) + (local.set $$conv$4 + (i32.shr_s + (i32.shl + (local.get $$35) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$ispos$4 + (i32.gt_s + (local.get $$conv$4) + (i32.const -1) + ) + ) + (local.set $$neg$4 + (i32.sub + (i32.const 0) + (local.get $$conv$4) + ) + ) + (local.set $$36 + (if (result i32) + (local.get $$ispos$4) + (local.get $$conv$4) + (local.get $$neg$4) + ) + ) + (local.set $$add24$4 + (i32.add + (local.get $$36) + (local.get $$est$092$4) + ) + ) + (local.set $$inc$4 + (i32.add + (local.get $$i$093$4) + (i32.const 1) + ) + ) + (local.set $$exitcond$4 + (i32.eq + (local.get $$inc$4) + (local.get $$mul) + ) + ) + (if + (local.get $$exitcond$4) + (block + (local.set $$est$0$lcssa$4 + (local.get $$add24$4) + ) + (br $while-out8) + ) + (block + (local.set $$est$092$4 + (local.get $$add24$4) + ) + (local.set $$i$093$4 + (local.get $$inc$4) + ) + ) + ) + (br $while-in9) + ) + ) + ) + (local.set $$est$0$lcssa$4 + (i32.const 0) + ) + ) + (local.set $$cmp25$4 + (i32.lt_s + (local.get $$est$0$lcssa$4) + (local.get $$spec$select90$3) + ) + ) + (local.set $$spec$select89$4 + (if (result i32) + (local.get $$cmp25$4) + (i32.const 4) + (local.get $$spec$select89$3) + ) + ) + (call $_stbiw__encode_png_line + (local.get $$pixels) + (local.get $$spec$select) + (local.get $$x) + (local.get $$y) + (local.get $$j$098) + (local.get $$n) + (local.get $$spec$select89$4) + (local.get $$call9) + ) + (local.set $$filter_type$2 + (local.get $$spec$select89$4) + ) + ) + ) + (local.set $$conv37 + (i32.and + (local.get $$filter_type$2) + (i32.const 255) + ) + ) + (local.set $$mul40 + (i32.mul + (local.get $$j$098) + (local.get $$add) + ) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$call) + (local.get $$mul40) + ) + ) + (i32.store8 + (local.get $$arrayidx41) + (local.get $$conv37) + ) + (local.set $$add$ptr45 + (i32.add + (local.get $$arrayidx41) + (i32.const 1) + ) + ) + (drop + (call $_memcpy + (local.get $$add$ptr45) + (local.get $$call9) + (local.get $$mul) + ) + ) + (local.set $$inc48 + (i32.add + (local.get $$j$098) + (i32.const 1) + ) + ) + (local.set $$exitcond100 + (i32.eq + (local.get $$inc48) + (local.get $$y) + ) + ) + (if + (local.get $$exitcond100) + (br $while-out) + (local.set $$j$098 + (local.get $$inc48) + ) + ) + (br $while-in) + ) + ) + ) + ) + (call $_free + (local.get $$call9) + ) + (local.set $$call53 + (call $_stbi_zlib_compress + (local.get $$call) + (local.get $$mul5) + (local.get $$zlen) + (i32.const 8) + ) + ) + (call $_free + (local.get $$call) + ) + (local.set $$tobool54 + (i32.eq + (local.get $$call53) + (i32.const 0) + ) + ) + (if + (local.get $$tobool54) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$2 + (i32.load + (local.get $$zlen) + ) + ) + (local.set $$add58 + (i32.add + (local.get $$2) + (i32.const 57) + ) + ) + (local.set $$call59 + (call $_malloc + (local.get $$add58) + ) + ) + (local.set $$tobool60 + (i32.eq + (local.get $$call59) + (i32.const 0) + ) + ) + (if + (local.get $$tobool60) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (i32.store + (local.get $$out_len) + (local.get $$add58) + ) + (i64.store align=1 + (local.get $$call59) + (i64.const 727905341920923785) + ) + (local.set $$add$ptr65 + (i32.add + (local.get $$call59) + (i32.const 8) + ) + ) + (i32.store8 + (local.get $$add$ptr65) + (i32.const 0) + ) + (local.set $$arrayidx67 + (i32.add + (local.get $$call59) + (i32.const 9) + ) + ) + (i32.store8 + (local.get $$arrayidx67) + (i32.const 0) + ) + (local.set $$arrayidx68 + (i32.add + (local.get $$call59) + (i32.const 10) + ) + ) + (i32.store8 + (local.get $$arrayidx68) + (i32.const 0) + ) + (local.set $$arrayidx69 + (i32.add + (local.get $$call59) + (i32.const 11) + ) + ) + (i32.store8 + (local.get $$arrayidx69) + (i32.const 13) + ) + (local.set $$add$ptr70 + (i32.add + (local.get $$call59) + (i32.const 12) + ) + ) + (i32.store8 + (local.get $$add$ptr70) + (i32.const 73) + ) + (local.set $$arrayidx77 + (i32.add + (local.get $$call59) + (i32.const 13) + ) + ) + (i32.store8 + (local.get $$arrayidx77) + (i32.const 72) + ) + (local.set $$arrayidx81 + (i32.add + (local.get $$call59) + (i32.const 14) + ) + ) + (i32.store8 + (local.get $$arrayidx81) + (i32.const 68) + ) + (local.set $$arrayidx85 + (i32.add + (local.get $$call59) + (i32.const 15) + ) + ) + (i32.store8 + (local.get $$arrayidx85) + (i32.const 82) + ) + (local.set $$add$ptr86 + (i32.add + (local.get $$call59) + (i32.const 16) + ) + ) + (i32.store + (local.get $$o) + (local.get $$add$ptr86) + ) + (local.set $$3 + (i32.shr_u + (local.get $$x) + (i32.const 24) + ) + ) + (local.set $$conv88 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$add$ptr86) + (local.get $$conv88) + ) + (local.set $$4 + (i32.shr_u + (local.get $$x) + (i32.const 16) + ) + ) + (local.set $$conv92 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$arrayidx93 + (i32.add + (local.get $$call59) + (i32.const 17) + ) + ) + (i32.store8 + (local.get $$arrayidx93) + (local.get $$conv92) + ) + (local.set $$5 + (i32.shr_u + (local.get $$x) + (i32.const 8) + ) + ) + (local.set $$conv96 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$arrayidx97 + (i32.add + (local.get $$call59) + (i32.const 18) + ) + ) + (i32.store8 + (local.get $$arrayidx97) + (local.get $$conv96) + ) + (local.set $$conv99 + (i32.and + (local.get $$x) + (i32.const 255) + ) + ) + (local.set $$6 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx100 + (i32.add + (local.get $$6) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx100) + (local.get $$conv99) + ) + (local.set $$7 + (i32.load + (local.get $$o) + ) + ) + (local.set $$add$ptr101 + (i32.add + (local.get $$7) + (i32.const 4) + ) + ) + (i32.store + (local.get $$o) + (local.get $$add$ptr101) + ) + (local.set $$8 + (i32.shr_u + (local.get $$y) + (i32.const 24) + ) + ) + (local.set $$conv104 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$add$ptr101) + (local.get $$conv104) + ) + (local.set $$9 + (i32.shr_u + (local.get $$y) + (i32.const 16) + ) + ) + (local.set $$conv108 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$arrayidx109 + (i32.add + (local.get $$7) + (i32.const 5) + ) + ) + (i32.store8 + (local.get $$arrayidx109) + (local.get $$conv108) + ) + (local.set $$10 + (i32.shr_u + (local.get $$y) + (i32.const 8) + ) + ) + (local.set $$conv112 + (i32.and + (local.get $$10) + (i32.const 255) + ) + ) + (local.set $$arrayidx113 + (i32.add + (local.get $$7) + (i32.const 6) + ) + ) + (i32.store8 + (local.get $$arrayidx113) + (local.get $$conv112) + ) + (local.set $$conv115 + (i32.and + (local.get $$y) + (i32.const 255) + ) + ) + (local.set $$11 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx116 + (i32.add + (local.get $$11) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx116) + (local.get $$conv115) + ) + (local.set $$12 + (i32.load + (local.get $$o) + ) + ) + (local.set $$add$ptr117 + (i32.add + (local.get $$12) + (i32.const 4) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$12) + (i32.const 5) + ) + ) + (i32.store8 + (local.get $$add$ptr117) + (i32.const 8) + ) + (local.set $$arrayidx118 + (i32.add + (i32.const 5488) + (i32.shl + (local.get $$n) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (i32.load + (local.get $$arrayidx118) + ) + ) + (local.set $$conv120 + (i32.and + (local.get $$13) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr121 + (i32.add + (local.get $$12) + (i32.const 6) + ) + ) + (i32.store8 + (local.get $$incdec$ptr) + (local.get $$conv120) + ) + (local.set $$incdec$ptr122 + (i32.add + (local.get $$12) + (i32.const 7) + ) + ) + (i32.store8 + (local.get $$incdec$ptr121) + (i32.const 0) + ) + (local.set $$incdec$ptr123 + (i32.add + (local.get $$12) + (i32.const 8) + ) + ) + (i32.store8 + (local.get $$incdec$ptr122) + (i32.const 0) + ) + (local.set $$incdec$ptr124 + (i32.add + (local.get $$12) + (i32.const 9) + ) + ) + (i32.store + (local.get $$o) + (local.get $$incdec$ptr124) + ) + (i32.store8 + (local.get $$incdec$ptr123) + (i32.const 0) + ) + (call $_stbiw__wpcrc + (local.get $$o) + (i32.const 13) + ) + (local.set $$14 + (i32.shr_u + (local.get $$2) + (i32.const 24) + ) + ) + (local.set $$conv127 + (i32.and + (local.get $$14) + (i32.const 255) + ) + ) + (local.set $$15 + (i32.load + (local.get $$o) + ) + ) + (i32.store8 + (local.get $$15) + (local.get $$conv127) + ) + (local.set $$16 + (i32.shr_u + (local.get $$2) + (i32.const 16) + ) + ) + (local.set $$conv131 + (i32.and + (local.get $$16) + (i32.const 255) + ) + ) + (local.set $$17 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx132 + (i32.add + (local.get $$17) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx132) + (local.get $$conv131) + ) + (local.set $$18 + (i32.shr_u + (local.get $$2) + (i32.const 8) + ) + ) + (local.set $$conv135 + (i32.and + (local.get $$18) + (i32.const 255) + ) + ) + (local.set $$19 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx136 + (i32.add + (local.get $$19) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx136) + (local.get $$conv135) + ) + (local.set $$conv138 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$20 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx139 + (i32.add + (local.get $$20) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx139) + (local.get $$conv138) + ) + (local.set $$21 + (i32.load + (local.get $$o) + ) + ) + (local.set $$add$ptr140 + (i32.add + (local.get $$21) + (i32.const 4) + ) + ) + (i32.store8 + (local.get $$add$ptr140) + (i32.const 73) + ) + (local.set $$arrayidx148 + (i32.add + (local.get $$21) + (i32.const 5) + ) + ) + (i32.store8 + (local.get $$arrayidx148) + (i32.const 68) + ) + (local.set $$arrayidx152 + (i32.add + (local.get $$21) + (i32.const 6) + ) + ) + (i32.store8 + (local.get $$arrayidx152) + (i32.const 65) + ) + (local.set $$arrayidx156 + (i32.add + (local.get $$21) + (i32.const 7) + ) + ) + (i32.store8 + (local.get $$arrayidx156) + (i32.const 84) + ) + (local.set $$add$ptr157 + (i32.add + (local.get $$21) + (i32.const 8) + ) + ) + (drop + (call $_memmove + (local.get $$add$ptr157) + (local.get $$call53) + (local.get $$2) + ) + ) + (local.set $$add$ptr158 + (i32.add + (local.get $$add$ptr157) + (local.get $$2) + ) + ) + (i32.store + (local.get $$o) + (local.get $$add$ptr158) + ) + (call $_free + (local.get $$call53) + ) + (call $_stbiw__wpcrc + (local.get $$o) + (local.get $$2) + ) + (local.set $$22 + (i32.load + (local.get $$o) + ) + ) + (i32.store8 + (local.get $$22) + (i32.const 0) + ) + (local.set $$23 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx160 + (i32.add + (local.get $$23) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx160) + (i32.const 0) + ) + (local.set $$24 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx161 + (i32.add + (local.get $$24) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx161) + (i32.const 0) + ) + (local.set $$25 + (i32.load + (local.get $$o) + ) + ) + (local.set $$arrayidx162 + (i32.add + (local.get $$25) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx162) + (i32.const 0) + ) + (local.set $$26 + (i32.load + (local.get $$o) + ) + ) + (local.set $$add$ptr163 + (i32.add + (local.get $$26) + (i32.const 4) + ) + ) + (i32.store8 + (local.get $$add$ptr163) + (i32.const 73) + ) + (local.set $$arrayidx171 + (i32.add + (local.get $$26) + (i32.const 5) + ) + ) + (i32.store8 + (local.get $$arrayidx171) + (i32.const 69) + ) + (local.set $$arrayidx175 + (i32.add + (local.get $$26) + (i32.const 6) + ) + ) + (i32.store8 + (local.get $$arrayidx175) + (i32.const 78) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$26) + (i32.const 7) + ) + ) + (i32.store8 + (local.get $$arrayidx179) + (i32.const 68) + ) + (local.set $$add$ptr180 + (i32.add + (local.get $$26) + (i32.const 8) + ) + ) + (i32.store + (local.get $$o) + (local.get $$add$ptr180) + ) + (call $_stbiw__wpcrc + (local.get $$o) + (i32.const 0) + ) + (local.set $$27 + (i32.load + (local.get $$o) + ) + ) + (local.set $$28 + (i32.load + (local.get $$out_len) + ) + ) + (local.set $$add$ptr181 + (i32.add + (local.get $$call59) + (local.get $$28) + ) + ) + (local.set $$cmp182 + (i32.eq + (local.get $$27) + (local.get $$add$ptr181) + ) + ) + (if + (local.get $$cmp182) + (block + (local.set $$retval$0 + (local.get $$call59) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (call $___assert_fail + (i32.const 16130) + (i32.const 16150) + (i32.const 1155) + (i32.const 16179) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_stbiw__fopen (; 526 ;) (param $$filename i32) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_fopen + (local.get $$filename) + (i32.const 16066) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_stbiw__encode_png_line (; 527 ;) (param $$pixels i32) (param $$stride_bytes i32) (param $$width i32) (param $$height i32) (param $$y i32) (param $$n i32) (param $$filter_type i32) (param $$line_buffer i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$arrayidx i32) + (local $$arrayidx108 i32) + (local $$arrayidx111 i32) + (local $$arrayidx114 i32) + (local $$arrayidx118 i32) + (local $$arrayidx12 i32) + (local $$arrayidx124 i32) + (local $$arrayidx13 i32) + (local $$arrayidx134 i32) + (local $$arrayidx137 i32) + (local $$arrayidx142 i32) + (local $$arrayidx15 i32) + (local $$arrayidx152 i32) + (local $$arrayidx155 i32) + (local $$arrayidx161 i32) + (local $$arrayidx17 i32) + (local $$arrayidx23 i32) + (local $$arrayidx26 i32) + (local $$arrayidx32 i32) + (local $$arrayidx35 i32) + (local $$arrayidx42 i32) + (local $$arrayidx45 i32) + (local $$arrayidx53 i32) + (local $$arrayidx56 i32) + (local $$arrayidx60 i32) + (local $$arrayidx70 i32) + (local $$arrayidx73 i32) + (local $$arrayidx77 i32) + (local $$arrayidx87 i32) + (local $$arrayidx90 i32) + (local $$arrayidx93 i32) + (local $$arrayidx98 i32) + (local $$call i32) + (local $$call120 i32) + (local $$call157 i32) + (local $$cmp i32) + (local $$cmp105137 i32) + (local $$cmp11143 i32) + (local $$cmp131139 i32) + (local $$cmp149141 i32) + (local $$cmp50131 i32) + (local $$cmp67133 i32) + (local $$cmp84135 i32) + (local $$cmp9 i32) + (local $$cond i32) + (local $$cond2 i32) + (local $$cond8 i32) + (local $$conv i32) + (local $$conv109 i32) + (local $$conv112 i32) + (local $$conv115 i32) + (local $$conv119 i32) + (local $$conv121 i32) + (local $$conv123 i32) + (local $$conv135 i32) + (local $$conv138 i32) + (local $$conv141 i32) + (local $$conv153 i32) + (local $$conv156 i32) + (local $$conv158 i32) + (local $$conv160 i32) + (local $$conv18 i32) + (local $$conv20 i32) + (local $$conv24 i32) + (local $$conv27 i32) + (local $$conv29 i32) + (local $$conv33 i32) + (local $$conv36 i32) + (local $$conv37 i32) + (local $$conv39 i32) + (local $$conv54 i32) + (local $$conv57 i32) + (local $$conv59 i32) + (local $$conv71 i32) + (local $$conv74 i32) + (local $$conv76 i32) + (local $$conv88 i32) + (local $$conv91 i32) + (local $$conv94 i32) + (local $$conv97 i32) + (local $$exitcond i32) + (local $$exitcond150 i32) + (local $$exitcond151 i32) + (local $$exitcond152 i32) + (local $$exitcond153 i32) + (local $$exitcond154 i32) + (local $$exitcond155 i32) + (local $$i$0144 i32) + (local $$i$1132 i32) + (local $$i$2134 i32) + (local $$i$3136 i32) + (local $$i$4138 i32) + (local $$i$5140 i32) + (local $$i$6142 i32) + (local $$inc i32) + (local $$inc100 i32) + (local $$inc126 i32) + (local $$inc144 i32) + (local $$inc163 i32) + (local $$inc62 i32) + (local $$inc79 i32) + (local $$mul i32) + (local $$mul10 i32) + (local $$mul104 i32) + (local $$mul130 i32) + (local $$mul148 i32) + (local $$mul49 i32) + (local $$mul66 i32) + (local $$mul83 i32) + (local $$sub i32) + (local $$sub1 i32) + (local $$sub110 i32) + (local $$sub113 i32) + (local $$sub117 i32) + (local $$sub122 i32) + (local $$sub136 i32) + (local $$sub140 i32) + (local $$sub154 i32) + (local $$sub159 i32) + (local $$sub16 i32) + (local $$sub19 i32) + (local $$sub25 i32) + (local $$sub28 i32) + (local $$sub34 i32) + (local $$sub38 i32) + (local $$sub5 i32) + (local $$sub55 i32) + (local $$sub58 i32) + (local $$sub72 i32) + (local $$sub75 i32) + (local $$sub89 i32) + (local $$sub92 i32) + (local $$sub96 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$y) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp) + (i32.const 6736) + (i32.const 6768) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$cond) + (i32.shl + (local.get $$filter_type) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$tobool + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $$sub + (i32.add + (local.get $$height) + (i32.const -1) + ) + ) + (local.set $$sub1 + (i32.sub + (local.get $$sub) + (local.get $$y) + ) + ) + (local.set $$cond2 + (if (result i32) + (local.get $$tobool) + (local.get $$y) + (local.get $$sub1) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$cond2) + (local.get $$stride_bytes) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$pixels) + (local.get $$mul) + ) + ) + (local.set $$sub5 + (i32.sub + (i32.const 0) + (local.get $$stride_bytes) + ) + ) + (local.set $$cond8 + (if (result i32) + (local.get $$tobool) + (local.get $$stride_bytes) + (local.get $$sub5) + ) + ) + (local.set $$cmp9 + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp9) + (block + (local.set $$mul10 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (drop + (call $_memcpy + (local.get $$line_buffer) + (local.get $$add$ptr) + (local.get $$mul10) + ) + ) + (return) + ) + ) + (local.set $$cmp11143 + (i32.gt_s + (local.get $$n) + (i32.const 0) + ) + ) + (block $label$break$L5 + (if + (local.get $$cmp11143) + (block + (local.set $$i$0144 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (block $switch + (block $switch-default + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-default + (i32.sub + (local.get $$0) + (i32.const 1) + ) + ) + ) + (block + (local.set $$arrayidx12 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx12) + ) + ) + (local.set $$$sink + (local.get $$1) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx15 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx15) + ) + ) + (local.set $$conv + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$sub16 + (i32.sub + (local.get $$i$0144) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx17 + (i32.add + (local.get $$add$ptr) + (local.get $$sub16) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx17) + ) + ) + (local.set $$conv18 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$sub19 + (i32.sub + (local.get $$conv) + (local.get $$conv18) + ) + ) + (local.set $$conv20 + (i32.and + (local.get $$sub19) + (i32.const 255) + ) + ) + (local.set $$$sink + (local.get $$conv20) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx23 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx23) + ) + ) + (local.set $$conv24 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$sub25 + (i32.sub + (local.get $$i$0144) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx26 + (i32.add + (local.get $$add$ptr) + (local.get $$sub25) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx26) + ) + ) + (local.set $$conv27 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$6 + (i32.shr_u + (local.get $$conv27) + (i32.const 1) + ) + ) + (local.set $$sub28 + (i32.sub + (local.get $$conv24) + (local.get $$6) + ) + ) + (local.set $$conv29 + (i32.and + (local.get $$sub28) + (i32.const 255) + ) + ) + (local.set $$$sink + (local.get $$conv29) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx32 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx32) + ) + ) + (local.set $$conv33 + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + (local.set $$sub34 + (i32.sub + (local.get $$i$0144) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx35 + (i32.add + (local.get $$add$ptr) + (local.get $$sub34) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx35) + ) + ) + (local.set $$conv36 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$call + (call $_stbiw__paeth + (i32.const 0) + (local.get $$conv36) + (i32.const 0) + ) + ) + (local.set $$conv37 + (i32.and + (local.get $$call) + (i32.const 255) + ) + ) + (local.set $$sub38 + (i32.sub + (local.get $$conv33) + (local.get $$conv37) + ) + ) + (local.set $$conv39 + (i32.and + (local.get $$sub38) + (i32.const 255) + ) + ) + (local.set $$$sink + (local.get $$conv39) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx42 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx42) + ) + ) + (local.set $$$sink + (local.get $$9) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$arrayidx45 + (i32.add + (local.get $$add$ptr) + (local.get $$i$0144) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx45) + ) + ) + (local.set $$$sink + (local.get $$10) + ) + (local.set $label + (i32.const 12) + ) + (br $switch) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 12) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$arrayidx13 + (i32.add + (local.get $$line_buffer) + (local.get $$i$0144) + ) + ) + (i32.store8 + (local.get $$arrayidx13) + (local.get $$$sink) + ) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$0144) + (i32.const 1) + ) + ) + (local.set $$exitcond155 + (i32.eq + (local.get $$inc) + (local.get $$n) + ) + ) + (if + (local.get $$exitcond155) + (br $label$break$L5) + (local.set $$i$0144 + (local.get $$inc) + ) + ) + (br $while-in) + ) + ) + ) + ) + ) + (block $switch5 + (block $switch-default24 + (block $switch-case23 + (block $switch-case20 + (block $switch-case17 + (block $switch-case14 + (block $switch-case11 + (block $switch-case8 + (br_table $switch-case8 $switch-case11 $switch-case14 $switch-case17 $switch-case20 $switch-case23 $switch-default24 + (i32.sub + (local.get $$0) + (i32.const 1) + ) + ) + ) + (block + (local.set $$mul49 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp50131 + (i32.gt_s + (local.get $$mul49) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp50131) + ) + (return) + ) + (local.set $$i$1132 + (local.get $$n) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$arrayidx53 + (i32.add + (local.get $$add$ptr) + (local.get $$i$1132) + ) + ) + (local.set $$11 + (i32.load8_s + (local.get $$arrayidx53) + ) + ) + (local.set $$conv54 + (i32.and + (local.get $$11) + (i32.const 255) + ) + ) + (local.set $$sub55 + (i32.sub + (local.get $$i$1132) + (local.get $$n) + ) + ) + (local.set $$arrayidx56 + (i32.add + (local.get $$add$ptr) + (local.get $$sub55) + ) + ) + (local.set $$12 + (i32.load8_s + (local.get $$arrayidx56) + ) + ) + (local.set $$conv57 + (i32.and + (local.get $$12) + (i32.const 255) + ) + ) + (local.set $$sub58 + (i32.sub + (local.get $$conv54) + (local.get $$conv57) + ) + ) + (local.set $$conv59 + (i32.and + (local.get $$sub58) + (i32.const 255) + ) + ) + (local.set $$arrayidx60 + (i32.add + (local.get $$line_buffer) + (local.get $$i$1132) + ) + ) + (i32.store8 + (local.get $$arrayidx60) + (local.get $$conv59) + ) + (local.set $$inc62 + (i32.add + (local.get $$i$1132) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc62) + (local.get $$mul49) + ) + ) + (if + (local.get $$exitcond) + (br $while-out6) + (local.set $$i$1132 + (local.get $$inc62) + ) + ) + (br $while-in7) + ) + ) + (return) + ) + ) + (block + (local.set $$mul66 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp67133 + (i32.gt_s + (local.get $$mul66) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp67133) + ) + (return) + ) + (local.set $$i$2134 + (local.get $$n) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$arrayidx70 + (i32.add + (local.get $$add$ptr) + (local.get $$i$2134) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx70) + ) + ) + (local.set $$conv71 + (i32.and + (local.get $$13) + (i32.const 255) + ) + ) + (local.set $$sub72 + (i32.sub + (local.get $$i$2134) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx73 + (i32.add + (local.get $$add$ptr) + (local.get $$sub72) + ) + ) + (local.set $$14 + (i32.load8_s + (local.get $$arrayidx73) + ) + ) + (local.set $$conv74 + (i32.and + (local.get $$14) + (i32.const 255) + ) + ) + (local.set $$sub75 + (i32.sub + (local.get $$conv71) + (local.get $$conv74) + ) + ) + (local.set $$conv76 + (i32.and + (local.get $$sub75) + (i32.const 255) + ) + ) + (local.set $$arrayidx77 + (i32.add + (local.get $$line_buffer) + (local.get $$i$2134) + ) + ) + (i32.store8 + (local.get $$arrayidx77) + (local.get $$conv76) + ) + (local.set $$inc79 + (i32.add + (local.get $$i$2134) + (i32.const 1) + ) + ) + (local.set $$exitcond150 + (i32.eq + (local.get $$inc79) + (local.get $$mul66) + ) + ) + (if + (local.get $$exitcond150) + (br $while-out9) + (local.set $$i$2134 + (local.get $$inc79) + ) + ) + (br $while-in10) + ) + ) + (return) + ) + ) + (block + (local.set $$mul83 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp84135 + (i32.gt_s + (local.get $$mul83) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp84135) + ) + (return) + ) + (local.set $$i$3136 + (local.get $$n) + ) + (loop $while-in13 + (block $while-out12 + (local.set $$arrayidx87 + (i32.add + (local.get $$add$ptr) + (local.get $$i$3136) + ) + ) + (local.set $$15 + (i32.load8_s + (local.get $$arrayidx87) + ) + ) + (local.set $$conv88 + (i32.and + (local.get $$15) + (i32.const 255) + ) + ) + (local.set $$sub89 + (i32.sub + (local.get $$i$3136) + (local.get $$n) + ) + ) + (local.set $$arrayidx90 + (i32.add + (local.get $$add$ptr) + (local.get $$sub89) + ) + ) + (local.set $$16 + (i32.load8_s + (local.get $$arrayidx90) + ) + ) + (local.set $$conv91 + (i32.and + (local.get $$16) + (i32.const 255) + ) + ) + (local.set $$sub92 + (i32.sub + (local.get $$i$3136) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx93 + (i32.add + (local.get $$add$ptr) + (local.get $$sub92) + ) + ) + (local.set $$17 + (i32.load8_s + (local.get $$arrayidx93) + ) + ) + (local.set $$conv94 + (i32.and + (local.get $$17) + (i32.const 255) + ) + ) + (local.set $$add + (i32.add + (local.get $$conv94) + (local.get $$conv91) + ) + ) + (local.set $$18 + (i32.shr_u + (local.get $$add) + (i32.const 1) + ) + ) + (local.set $$sub96 + (i32.sub + (local.get $$conv88) + (local.get $$18) + ) + ) + (local.set $$conv97 + (i32.and + (local.get $$sub96) + (i32.const 255) + ) + ) + (local.set $$arrayidx98 + (i32.add + (local.get $$line_buffer) + (local.get $$i$3136) + ) + ) + (i32.store8 + (local.get $$arrayidx98) + (local.get $$conv97) + ) + (local.set $$inc100 + (i32.add + (local.get $$i$3136) + (i32.const 1) + ) + ) + (local.set $$exitcond151 + (i32.eq + (local.get $$inc100) + (local.get $$mul83) + ) + ) + (if + (local.get $$exitcond151) + (br $while-out12) + (local.set $$i$3136 + (local.get $$inc100) + ) + ) + (br $while-in13) + ) + ) + (return) + ) + ) + (block + (local.set $$mul104 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp105137 + (i32.gt_s + (local.get $$mul104) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp105137) + ) + (return) + ) + (local.set $$i$4138 + (local.get $$n) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$arrayidx108 + (i32.add + (local.get $$add$ptr) + (local.get $$i$4138) + ) + ) + (local.set $$19 + (i32.load8_s + (local.get $$arrayidx108) + ) + ) + (local.set $$conv109 + (i32.and + (local.get $$19) + (i32.const 255) + ) + ) + (local.set $$sub110 + (i32.sub + (local.get $$i$4138) + (local.get $$n) + ) + ) + (local.set $$arrayidx111 + (i32.add + (local.get $$add$ptr) + (local.get $$sub110) + ) + ) + (local.set $$20 + (i32.load8_s + (local.get $$arrayidx111) + ) + ) + (local.set $$conv112 + (i32.and + (local.get $$20) + (i32.const 255) + ) + ) + (local.set $$sub113 + (i32.sub + (local.get $$i$4138) + (local.get $$cond8) + ) + ) + (local.set $$arrayidx114 + (i32.add + (local.get $$add$ptr) + (local.get $$sub113) + ) + ) + (local.set $$21 + (i32.load8_s + (local.get $$arrayidx114) + ) + ) + (local.set $$conv115 + (i32.and + (local.get $$21) + (i32.const 255) + ) + ) + (local.set $$sub117 + (i32.sub + (local.get $$sub113) + (local.get $$n) + ) + ) + (local.set $$arrayidx118 + (i32.add + (local.get $$add$ptr) + (local.get $$sub117) + ) + ) + (local.set $$22 + (i32.load8_s + (local.get $$arrayidx118) + ) + ) + (local.set $$conv119 + (i32.and + (local.get $$22) + (i32.const 255) + ) + ) + (local.set $$call120 + (call $_stbiw__paeth + (local.get $$conv112) + (local.get $$conv115) + (local.get $$conv119) + ) + ) + (local.set $$conv121 + (i32.and + (local.get $$call120) + (i32.const 255) + ) + ) + (local.set $$sub122 + (i32.sub + (local.get $$conv109) + (local.get $$conv121) + ) + ) + (local.set $$conv123 + (i32.and + (local.get $$sub122) + (i32.const 255) + ) + ) + (local.set $$arrayidx124 + (i32.add + (local.get $$line_buffer) + (local.get $$i$4138) + ) + ) + (i32.store8 + (local.get $$arrayidx124) + (local.get $$conv123) + ) + (local.set $$inc126 + (i32.add + (local.get $$i$4138) + (i32.const 1) + ) + ) + (local.set $$exitcond152 + (i32.eq + (local.get $$inc126) + (local.get $$mul104) + ) + ) + (if + (local.get $$exitcond152) + (br $while-out15) + (local.set $$i$4138 + (local.get $$inc126) + ) + ) + (br $while-in16) + ) + ) + (return) + ) + ) + (block + (local.set $$mul130 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp131139 + (i32.gt_s + (local.get $$mul130) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp131139) + ) + (return) + ) + (local.set $$i$5140 + (local.get $$n) + ) + (loop $while-in19 + (block $while-out18 + (local.set $$arrayidx134 + (i32.add + (local.get $$add$ptr) + (local.get $$i$5140) + ) + ) + (local.set $$23 + (i32.load8_s + (local.get $$arrayidx134) + ) + ) + (local.set $$conv135 + (i32.and + (local.get $$23) + (i32.const 255) + ) + ) + (local.set $$sub136 + (i32.sub + (local.get $$i$5140) + (local.get $$n) + ) + ) + (local.set $$arrayidx137 + (i32.add + (local.get $$add$ptr) + (local.get $$sub136) + ) + ) + (local.set $$24 + (i32.load8_s + (local.get $$arrayidx137) + ) + ) + (local.set $$conv138 + (i32.and + (local.get $$24) + (i32.const 255) + ) + ) + (local.set $$25 + (i32.shr_u + (local.get $$conv138) + (i32.const 1) + ) + ) + (local.set $$sub140 + (i32.sub + (local.get $$conv135) + (local.get $$25) + ) + ) + (local.set $$conv141 + (i32.and + (local.get $$sub140) + (i32.const 255) + ) + ) + (local.set $$arrayidx142 + (i32.add + (local.get $$line_buffer) + (local.get $$i$5140) + ) + ) + (i32.store8 + (local.get $$arrayidx142) + (local.get $$conv141) + ) + (local.set $$inc144 + (i32.add + (local.get $$i$5140) + (i32.const 1) + ) + ) + (local.set $$exitcond153 + (i32.eq + (local.get $$inc144) + (local.get $$mul130) + ) + ) + (if + (local.get $$exitcond153) + (br $while-out18) + (local.set $$i$5140 + (local.get $$inc144) + ) + ) + (br $while-in19) + ) + ) + (return) + ) + ) + (block + (local.set $$mul148 + (i32.mul + (local.get $$n) + (local.get $$width) + ) + ) + (local.set $$cmp149141 + (i32.gt_s + (local.get $$mul148) + (local.get $$n) + ) + ) + (if + (i32.eqz + (local.get $$cmp149141) + ) + (return) + ) + (local.set $$i$6142 + (local.get $$n) + ) + (loop $while-in22 + (block $while-out21 + (local.set $$arrayidx152 + (i32.add + (local.get $$add$ptr) + (local.get $$i$6142) + ) + ) + (local.set $$26 + (i32.load8_s + (local.get $$arrayidx152) + ) + ) + (local.set $$conv153 + (i32.and + (local.get $$26) + (i32.const 255) + ) + ) + (local.set $$sub154 + (i32.sub + (local.get $$i$6142) + (local.get $$n) + ) + ) + (local.set $$arrayidx155 + (i32.add + (local.get $$add$ptr) + (local.get $$sub154) + ) + ) + (local.set $$27 + (i32.load8_s + (local.get $$arrayidx155) + ) + ) + (local.set $$conv156 + (i32.and + (local.get $$27) + (i32.const 255) + ) + ) + (local.set $$call157 + (call $_stbiw__paeth + (local.get $$conv156) + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $$conv158 + (i32.and + (local.get $$call157) + (i32.const 255) + ) + ) + (local.set $$sub159 + (i32.sub + (local.get $$conv153) + (local.get $$conv158) + ) + ) + (local.set $$conv160 + (i32.and + (local.get $$sub159) + (i32.const 255) + ) + ) + (local.set $$arrayidx161 + (i32.add + (local.get $$line_buffer) + (local.get $$i$6142) + ) + ) + (i32.store8 + (local.get $$arrayidx161) + (local.get $$conv160) + ) + (local.set $$inc163 + (i32.add + (local.get $$i$6142) + (i32.const 1) + ) + ) + (local.set $$exitcond154 + (i32.eq + (local.get $$inc163) + (local.get $$mul148) + ) + ) + (if + (local.get $$exitcond154) + (br $while-out21) + (local.set $$i$6142 + (local.get $$inc163) + ) + ) + (br $while-in22) + ) + ) + (return) + ) + ) + (return) + ) + ) + (func $_stbi_zlib_compress (; 528 ;) (param $$data i32) (param $$data_len i32) (param $$out_len i32) (param $$quality i32) (result i32) + (local $$$sink i32) + (local $$$sink209 i32) + (local $$$sink210 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$58 i32) + (local $$59 i32) + (local $$6 i32) + (local $$60 i32) + (local $$61 i32) + (local $$62 i32) + (local $$63 i32) + (local $$64 i32) + (local $$65 i32) + (local $$66 i32) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 i32) + (local $$70 i32) + (local $$71 i32) + (local $$72 i32) + (local $$73 i32) + (local $$74 i32) + (local $$75 i32) + (local $$76 i32) + (local $$77 i32) + (local $$78 i32) + (local $$79 i32) + (local $$8 i32) + (local $$80 i32) + (local $$81 i32) + (local $$82 i32) + (local $$83 i32) + (local $$84 i32) + (local $$85 i32) + (local $$9 i32) + (local $$add$ptr109 i32) + (local $$add$ptr14 i32) + (local $$add$ptr339144 i32) + (local $$add$ptr369 i32) + (local $$add$ptr39 i32) + (local $$add$ptr390 i32) + (local $$add$ptr411 i32) + (local $$add$ptr433 i32) + (local $$add$ptr453 i32) + (local $$add$ptr454 i32) + (local $$add$ptr76 i32) + (local $$add$ptr86146 i32) + (local $$add155 i32) + (local $$add16 i32) + (local $$add164 i32) + (local $$add199 i32) + (local $$add208 i32) + (local $$add226 i32) + (local $$add230 i32) + (local $$add243 i32) + (local $$add255 i32) + (local $$add266 i32) + (local $$add270 i32) + (local $$add280 i32) + (local $$add29 i32) + (local $$add297 i32) + (local $$add301 i32) + (local $$add311 i32) + (local $$add321 i32) + (local $$add328 i32) + (local $$add33 i32) + (local $$add354 i32) + (local $$add357 i32) + (local $$add358 i32) + (local $$add364 i32) + (local $$add371 i32) + (local $$add392 i32) + (local $$add413 i32) + (local $$add435 i32) + (local $$add88 i32) + (local $$and i32) + (local $$and111 i32) + (local $$arrayidx10 i32) + (local $$arrayidx103149 i32) + (local $$arrayidx105 i32) + (local $$arrayidx11 i32) + (local $$arrayidx112 i32) + (local $$arrayidx116152 i32) + (local $$arrayidx123 i32) + (local $$arrayidx15 i32) + (local $$arrayidx156 i32) + (local $$arrayidx216 i32) + (local $$arrayidx219 i32) + (local $$arrayidx231 i32) + (local $$arrayidx245 i32) + (local $$arrayidx248 i32) + (local $$arrayidx26 i32) + (local $$arrayidx28 i32) + (local $$arrayidx290 i32) + (local $$arrayidx335 i32) + (local $$arrayidx355 i32) + (local $$arrayidx370 i32) + (local $$arrayidx384 i32) + (local $$arrayidx386 i32) + (local $$arrayidx391 i32) + (local $$arrayidx405 i32) + (local $$arrayidx407 i32) + (local $$arrayidx41 i32) + (local $$arrayidx412 i32) + (local $$arrayidx427 i32) + (local $$arrayidx429 i32) + (local $$arrayidx434 i32) + (local $$arrayidx44156 i32) + (local $$arrayidx448 i32) + (local $$arrayidx450 i32) + (local $$arrayidx452 i32) + (local $$arrayidx51 i32) + (local $$arrayidx71154 i32) + (local $$arrayidx80 i32) + (local $$arrayidx87147 i32) + (local $$best$0$lcssa i32) + (local $$best$0$lcssa200 i32) + (local $$best$0$lcssa201 i32) + (local $$best$0$pn i32) + (local $$best$0182 i32) + (local $$best$2 i32) + (local $$bestloc$0$lcssa i32) + (local $$bestloc$0$lcssa202 i32) + (local $$bestloc$0$lcssa203 i32) + (local $$bestloc$0183 i32) + (local $$bestloc$2 i32) + (local $$bestloc$6 i32) + (local $$bestloc$6207 i32) + (local $$bitbuf i32) + (local $$bitcount i32) + (local $$blocklen$0172 i32) + (local $$call i32) + (local $$call110 i32) + (local $$call135 i32) + (local $$call196 i32) + (local $$call205 i32) + (local $$call209 i32) + (local $$call227 i32) + (local $$call240 i32) + (local $$call244 i32) + (local $$call256 i32) + (local $$call267 i32) + (local $$call277 i32) + (local $$call281 i32) + (local $$call298 i32) + (local $$call30 i32) + (local $$call302 i32) + (local $$call308 i32) + (local $$call318 i32) + (local $$call322 i32) + (local $$call329 i32) + (local $$call34 i32) + (local $$call40 i32) + (local $$call58 i32) + (local $$cmp i32) + (local $$cmp12 i32) + (local $$cmp121 i32) + (local $$cmp121186 i32) + (local $$cmp128 i32) + (local $$cmp136 i32) + (local $$cmp151 i32) + (local $$cmp153 i32) + (local $$cmp158 i32) + (local $$cmp19 i32) + (local $$cmp190 i32) + (local $$cmp234 i32) + (local $$cmp261 i32) + (local $$cmp287178 i32) + (local $$cmp292 i32) + (local $$cmp347 i32) + (local $$cmp347167 i32) + (local $$cmp351162 i32) + (local $$cmp366 i32) + (local $$cmp374 i32) + (local $$cmp38 i32) + (local $$cmp38191 i32) + (local $$cmp387 i32) + (local $$cmp395 i32) + (local $$cmp408 i32) + (local $$cmp416 i32) + (local $$cmp430 i32) + (local $$cmp438 i32) + (local $$cmp49180 i32) + (local $$cmp53 i32) + (local $$cmp59 i32) + (local $$cmp72 i32) + (local $$cmp92 i32) + (local $$conv i32) + (local $$conv220 i32) + (local $$conv225 i32) + (local $$conv232 i32) + (local $$conv249 i32) + (local $$conv254 i32) + (local $$conv260 i32) + (local $$conv291 i32) + (local $$conv356 i32) + (local $$conv382 i32) + (local $$conv403 i32) + (local $$conv425 i32) + (local $$conv446 i32) + (local $$exitcond i32) + (local $$exitcond195 i32) + (local $$exitcond196 i32) + (local $$exitcond197 i32) + (local $$i$1$lcssa i32) + (local $$i$1192 i32) + (local $$i$2 i32) + (local $$i$3179 i32) + (local $$i$4175 i32) + (local $$i$5163 i32) + (local $$inc i32) + (local $$inc104 i32) + (local $$inc141 i32) + (local $$inc27 i32) + (local $$inc316 i32) + (local $$inc344 i32) + (local $$inc360 i32) + (local $$inc385 i32) + (local $$inc406 i32) + (local $$inc428 i32) + (local $$inc449 i32) + (local $$inc65 i32) + (local $$j$0181 i32) + (local $$j$1187 i32) + (local $$j$2 i32) + (local $$j$3 i32) + (local $$j$4168 i32) + (local $$mul i32) + (local $$mul77 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or198 i32) + (local $$or207 i32) + (local $$or223 i32) + (local $$or242 i32) + (local $$or252 i32) + (local $$or269 i32) + (local $$or279 i32) + (local $$or300 i32) + (local $$or310 i32) + (local $$or32 i32) + (local $$or320 i32) + (local $$out i32) + (local $$rem208 i32) + (local $$rem362 i32) + (local $$rem363 i32) + (local $$retval$0 i32) + (local $$s1$0$lcssa i32) + (local $$s1$0170 i32) + (local $$s1$1$lcssa i32) + (local $$s1$1164 i32) + (local $$s2$0$lcssa i32) + (local $$s2$0171 i32) + (local $$s2$1$lcssa i32) + (local $$s2$1165 i32) + (local $$shl i32) + (local $$shl197 i32) + (local $$shl206 i32) + (local $$shl222 i32) + (local $$shl241 i32) + (local $$shl251 i32) + (local $$shl268 i32) + (local $$shl278 i32) + (local $$shl299 i32) + (local $$shl309 i32) + (local $$shl31 i32) + (local $$shl319 i32) + (local $$shr i32) + (local $$shr423 i32) + (local $$spec$select i32) + (local $$spec$select158 i32) + (local $$spec$select159 i32) + (local $$storemerge i32) + (local $$storemerge177 i32) + (local $$storemerge211 i32) + (local $$storemerge212 i32) + (local $$sub i32) + (local $$sub$ptr$lhs$cast i32) + (local $$sub$ptr$lhs$cast124 i32) + (local $$sub$ptr$lhs$cast148 i32) + (local $$sub$ptr$rhs$cast i32) + (local $$sub$ptr$rhs$cast125 i32) + (local $$sub$ptr$rhs$cast149 i32) + (local $$sub$ptr$sub i32) + (local $$sub$ptr$sub126 i32) + (local $$sub$ptr$sub150 i32) + (local $$sub127 i32) + (local $$sub133 i32) + (local $$sub134 i32) + (local $$sub204 i32) + (local $$sub221 i32) + (local $$sub250 i32) + (local $$sub276 i32) + (local $$sub307 i32) + (local $$sub52 i32) + (local $$sub57 i32) + (local $$tobool i32) + (local $$tobool106 i32) + (local $$tobool113 i32) + (local $$tobool144 i32) + (local $$tobool217 i32) + (local $$tobool246 i32) + (local $$tobool324 i32) + (local $$tobool324176 i32) + (local $$tobool336 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$bitbuf + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$bitcount + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$out + (local.get $sp_a) + ) + (i32.store + (local.get $$bitbuf) + (i32.const 0) + ) + (i32.store + (local.get $$bitcount) + (i32.const 0) + ) + (i32.store + (local.get $$out) + (i32.const 0) + ) + (local.set $$call + (call $_malloc + (i32.const 65536) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$0 + (i32.gt_s + (local.get $$quality) + (i32.const 5) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$0) + (local.get $$quality) + (i32.const 5) + ) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + (local.set $$1 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$1) + (i32.const -4) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arrayidx10) + ) + ) + (local.set $$inc + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx10) + (local.get $$inc) + ) + (local.set $$arrayidx11 + (i32.add + (local.get $$1) + (local.get $$2) + ) + ) + (i32.store8 + (local.get $$arrayidx11) + (i32.const 120) + ) + (local.set $$3 + (i32.load + (local.get $$out) + ) + ) + (local.set $$cmp12 + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp12) + (local.set $label + (i32.const 4) + ) + (block + (local.set $$add$ptr14 + (i32.add + (local.get $$3) + (i32.const -8) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$3) + (i32.const -4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx15) + ) + ) + (local.set $$add16 + (i32.add + (local.get $$4) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load + (local.get $$add$ptr14) + ) + ) + (local.set $$cmp19 + (i32.lt_s + (local.get $$add16) + (local.get $$5) + ) + ) + (if + (i32.eqz + (local.get $$cmp19) + ) + (local.set $label + (i32.const 4) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 4) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx26 + (i32.add + (local.get $$6) + (i32.const -4) + ) + ) + (local.set $$7 + (i32.load + (local.get $$arrayidx26) + ) + ) + (local.set $$inc27 + (i32.add + (local.get $$7) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx26) + (local.get $$inc27) + ) + (local.set $$arrayidx28 + (i32.add + (local.get $$6) + (local.get $$7) + ) + ) + (i32.store8 + (local.get $$arrayidx28) + (i32.const 94) + ) + (local.set $$8 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$8) + ) + ) + (local.set $$9 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or + (i32.or + (local.get $$9) + (local.get $$shl) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or) + ) + (local.set $$add29 + (i32.add + (local.get $$8) + (i32.const 1) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add29) + ) + (local.set $$10 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call30 + (call $_stbiw__zlib_flushf + (local.get $$10) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call30) + ) + (local.set $$11 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl31 + (i32.shl + (i32.const 1) + (local.get $$11) + ) + ) + (local.set $$12 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or32 + (i32.or + (local.get $$12) + (local.get $$shl31) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or32) + ) + (local.set $$add33 + (i32.add + (local.get $$11) + (i32.const 2) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add33) + ) + (local.set $$call34 + (call $_stbiw__zlib_flushf + (local.get $$call30) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call34) + ) + (drop + (call $_memset + (local.get $$call) + (i32.const 0) + (i32.const 65536) + ) + ) + (local.set $$sub + (i32.add + (local.get $$data_len) + (i32.const -3) + ) + ) + (local.set $$cmp38191 + (i32.gt_s + (local.get $$data_len) + (i32.const 3) + ) + ) + (block $label$break$L9 + (if + (local.get $$cmp38191) + (block + (local.set $$sub$ptr$rhs$cast + (local.get $$data) + ) + (local.set $$mul + (i32.shl + (local.get $$spec$select) + (i32.const 1) + ) + ) + (local.set $$mul77 + (i32.shl + (local.get $$spec$select) + (i32.const 2) + ) + ) + (local.set $$sub133 + (i32.add + (local.get $$data_len) + (i32.const -1) + ) + ) + (local.set $$sub$ptr$rhs$cast125 + (local.get $$data) + ) + (local.set $$i$1192 + (i32.const 0) + ) + (loop $label$continue$L11 + (block $label$break$L11 + (local.set $$add$ptr39 + (i32.add + (local.get $$data) + (local.get $$i$1192) + ) + ) + (local.set $$call40 + (call $_stbiw__zhash + (local.get $$add$ptr39) + ) + ) + (local.set $$and + (i32.and + (local.get $$call40) + (i32.const 16383) + ) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$and) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (i32.load + (local.get $$arrayidx41) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$13) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$best$0$lcssa201 + (i32.const 3) + ) + (local.set $$bestloc$0$lcssa203 + (i32.const 0) + ) + (local.set $label + (i32.const 16) + ) + ) + (block + (local.set $$arrayidx44156 + (i32.add + (local.get $$13) + (i32.const -4) + ) + ) + (local.set $$14 + (i32.load + (local.get $$arrayidx44156) + ) + ) + (local.set $$cmp49180 + (i32.gt_s + (local.get $$14) + (i32.const 0) + ) + ) + (if + (local.get $$cmp49180) + (block + (local.set $$sub52 + (i32.add + (local.get $$i$1192) + (i32.const -32768) + ) + ) + (local.set $$sub57 + (i32.sub + (local.get $$data_len) + (local.get $$i$1192) + ) + ) + (local.set $$best$0182 + (i32.const 3) + ) + (local.set $$bestloc$0183 + (i32.const 0) + ) + (local.set $$j$0181 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx51 + (i32.add + (local.get $$13) + (i32.shl + (local.get $$j$0181) + (i32.const 2) + ) + ) + ) + (local.set $$15 + (i32.load + (local.get $$arrayidx51) + ) + ) + (local.set $$sub$ptr$lhs$cast + (local.get $$15) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$sub$ptr$lhs$cast) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (local.set $$cmp53 + (i32.gt_s + (local.get $$sub$ptr$sub) + (local.get $$sub52) + ) + ) + (if + (local.get $$cmp53) + (block + (local.set $$call58 + (call $_stbiw__zlib_countm + (local.get $$15) + (local.get $$add$ptr39) + (local.get $$sub57) + ) + ) + (local.set $$cmp59 + (i32.lt_s + (local.get $$call58) + (local.get $$best$0182) + ) + ) + (local.set $$spec$select158 + (if (result i32) + (local.get $$cmp59) + (local.get $$best$0182) + (local.get $$call58) + ) + ) + (local.set $$spec$select159 + (if (result i32) + (local.get $$cmp59) + (local.get $$bestloc$0183) + (local.get $$15) + ) + ) + (local.set $$best$2 + (local.get $$spec$select158) + ) + (local.set $$bestloc$2 + (local.get $$spec$select159) + ) + ) + (block + (local.set $$best$2 + (local.get $$best$0182) + ) + (local.set $$bestloc$2 + (local.get $$bestloc$0183) + ) + ) + ) + (local.set $$inc65 + (i32.add + (local.get $$j$0181) + (i32.const 1) + ) + ) + (local.set $$exitcond197 + (i32.eq + (local.get $$inc65) + (local.get $$14) + ) + ) + (if + (local.get $$exitcond197) + (block + (local.set $$best$0$lcssa + (local.get $$best$2) + ) + (local.set $$bestloc$0$lcssa + (local.get $$bestloc$2) + ) + (br $while-out) + ) + (block + (local.set $$best$0182 + (local.get $$best$2) + ) + (local.set $$bestloc$0183 + (local.get $$bestloc$2) + ) + (local.set $$j$0181 + (local.get $$inc65) + ) + ) + ) + (br $while-in) + ) + ) + ) + (block + (local.set $$best$0$lcssa + (i32.const 3) + ) + (local.set $$bestloc$0$lcssa + (i32.const 0) + ) + ) + ) + (local.set $$arrayidx71154 + (i32.add + (local.get $$13) + (i32.const -4) + ) + ) + (local.set $$16 + (i32.load + (local.get $$arrayidx71154) + ) + ) + (local.set $$cmp72 + (i32.eq + (local.get $$16) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp72) + (block + (local.set $$add$ptr76 + (i32.add + (local.get $$13) + (i32.shl + (local.get $$spec$select) + (i32.const 2) + ) + ) + ) + (drop + (call $_memmove + (local.get $$13) + (local.get $$add$ptr76) + (local.get $$mul77) + ) + ) + (local.set $$17 + (i32.load + (local.get $$arrayidx41) + ) + ) + (local.set $$arrayidx80 + (i32.add + (local.get $$17) + (i32.const -4) + ) + ) + (i32.store + (local.get $$arrayidx80) + (local.get $$spec$select) + ) + ) + ) + (local.set $$add$ptr86146 + (i32.add + (local.get $$13) + (i32.const -8) + ) + ) + (local.set $$arrayidx87147 + (i32.add + (local.get $$13) + (i32.const -4) + ) + ) + (local.set $$18 + (i32.load + (local.get $$arrayidx87147) + ) + ) + (local.set $$add88 + (i32.add + (local.get $$18) + (i32.const 1) + ) + ) + (local.set $$19 + (i32.load + (local.get $$add$ptr86146) + ) + ) + (local.set $$cmp92 + (i32.lt_s + (local.get $$add88) + (local.get $$19) + ) + ) + (if + (local.get $$cmp92) + (block + (local.set $$best$0$lcssa200 + (local.get $$best$0$lcssa) + ) + (local.set $$bestloc$0$lcssa202 + (local.get $$bestloc$0$lcssa) + ) + ) + (block + (local.set $$best$0$lcssa201 + (local.get $$best$0$lcssa) + ) + (local.set $$bestloc$0$lcssa203 + (local.get $$bestloc$0$lcssa) + ) + (local.set $label + (i32.const 16) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 16) + ) + (block + (local.set $label + (i32.const 0) + ) + (call $_stbiw__sbgrowf + (local.get $$arrayidx41) + (i32.const 4) + ) + (local.set $$best$0$lcssa200 + (local.get $$best$0$lcssa201) + ) + (local.set $$bestloc$0$lcssa202 + (local.get $$bestloc$0$lcssa203) + ) + ) + ) + (local.set $$20 + (i32.load + (local.get $$arrayidx41) + ) + ) + (local.set $$arrayidx103149 + (i32.add + (local.get $$20) + (i32.const -4) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx103149) + ) + ) + (local.set $$inc104 + (i32.add + (local.get $$21) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx103149) + (local.get $$inc104) + ) + (local.set $$arrayidx105 + (i32.add + (local.get $$20) + (i32.shl + (local.get $$21) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx105) + (local.get $$add$ptr39) + ) + (local.set $$tobool106 + (i32.eq + (local.get $$bestloc$0$lcssa202) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$tobool106) + (local.set $label + (i32.const 38) + ) + (block + (local.set $$add$ptr109 + (i32.add + (local.get $$add$ptr39) + (i32.const 1) + ) + ) + (local.set $$call110 + (call $_stbiw__zhash + (local.get $$add$ptr109) + ) + ) + (local.set $$and111 + (i32.and + (local.get $$call110) + (i32.const 16383) + ) + ) + (local.set $$arrayidx112 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$and111) + (i32.const 2) + ) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx112) + ) + ) + (local.set $$tobool113 + (i32.eq + (local.get $$22) + (i32.const 0) + ) + ) + (if + (local.get $$tobool113) + (local.set $$bestloc$6207 + (local.get $$bestloc$0$lcssa202) + ) + (block + (local.set $$arrayidx116152 + (i32.add + (local.get $$22) + (i32.const -4) + ) + ) + (local.set $$23 + (i32.load + (local.get $$arrayidx116152) + ) + ) + (local.set $$sub134 + (i32.sub + (local.get $$sub133) + (local.get $$i$1192) + ) + ) + (local.set $$cmp121186 + (i32.gt_s + (local.get $$23) + (i32.const 0) + ) + ) + (if + (local.get $$cmp121186) + (block + (local.set $$sub127 + (i32.add + (local.get $$i$1192) + (i32.const -32767) + ) + ) + (local.set $$j$1187 + (i32.const 0) + ) + (loop $while-in2 + (block $while-out1 + (local.set $$arrayidx123 + (i32.add + (local.get $$22) + (i32.shl + (local.get $$j$1187) + (i32.const 2) + ) + ) + ) + (local.set $$24 + (i32.load + (local.get $$arrayidx123) + ) + ) + (local.set $$sub$ptr$lhs$cast124 + (local.get $$24) + ) + (local.set $$sub$ptr$sub126 + (i32.sub + (local.get $$sub$ptr$lhs$cast124) + (local.get $$sub$ptr$rhs$cast125) + ) + ) + (local.set $$cmp128 + (i32.gt_s + (local.get $$sub$ptr$sub126) + (local.get $$sub127) + ) + ) + (if + (local.get $$cmp128) + (block + (local.set $$call135 + (call $_stbiw__zlib_countm + (local.get $$24) + (local.get $$add$ptr109) + (local.get $$sub134) + ) + ) + (local.set $$cmp136 + (i32.gt_s + (local.get $$call135) + (local.get $$best$0$lcssa200) + ) + ) + (if + (local.get $$cmp136) + (block + (local.set $$bestloc$6 + (i32.const 0) + ) + (br $while-out1) + ) + ) + ) + ) + (local.set $$inc141 + (i32.add + (local.get $$j$1187) + (i32.const 1) + ) + ) + (local.set $$cmp121 + (i32.lt_s + (local.get $$inc141) + (local.get $$23) + ) + ) + (if + (local.get $$cmp121) + (local.set $$j$1187 + (local.get $$inc141) + ) + (block + (local.set $$bestloc$6 + (local.get $$bestloc$0$lcssa202) + ) + (br $while-out1) + ) + ) + (br $while-in2) + ) + ) + (local.set $$tobool144 + (i32.eq + (local.get $$bestloc$6) + (i32.const 0) + ) + ) + (if + (local.get $$tobool144) + (block + (local.set $label + (i32.const 38) + ) + (br $do-once) + ) + (local.set $$bestloc$6207 + (local.get $$bestloc$6) + ) + ) + ) + (local.set $$bestloc$6207 + (local.get $$bestloc$0$lcssa202) + ) + ) + ) + ) + (local.set $$sub$ptr$lhs$cast148 + (local.get $$add$ptr39) + ) + (local.set $$sub$ptr$rhs$cast149 + (local.get $$bestloc$6207) + ) + (local.set $$sub$ptr$sub150 + (i32.sub + (local.get $$sub$ptr$lhs$cast148) + (local.get $$sub$ptr$rhs$cast149) + ) + ) + (local.set $$cmp151 + (i32.lt_s + (local.get $$sub$ptr$sub150) + (i32.const 32768) + ) + ) + (local.set $$cmp153 + (i32.lt_s + (local.get $$best$0$lcssa200) + (i32.const 259) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp153) + (local.get $$cmp151) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (br $label$break$L11) + ) + (local.set $$j$2 + (i32.const 0) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$add155 + (i32.add + (local.get $$j$2) + (i32.const 1) + ) + ) + (local.set $$arrayidx156 + (i32.add + (i32.const 6544) + (i32.shl + (local.get $$add155) + (i32.const 1) + ) + ) + ) + (local.set $$25 + (i32.load16_s + (local.get $$arrayidx156) + ) + ) + (local.set $$conv + (i32.and + (local.get $$25) + (i32.const 65535) + ) + ) + (local.set $$cmp158 + (i32.lt_s + (local.get $$best$0$lcssa200) + (local.get $$conv) + ) + ) + (if + (local.get $$cmp158) + (br $while-out3) + (local.set $$j$2 + (local.get $$add155) + ) + ) + (br $while-in4) + ) + ) + (local.set $$add164 + (i32.add + (local.get $$j$2) + (i32.const 257) + ) + ) + (local.set $$cmp190 + (i32.lt_u + (local.get $$add164) + (i32.const 280) + ) + ) + (if + (local.get $$cmp190) + (block + (local.set $$call196 + (call $_stbiw__zlib_bitrev + (local.get $$add155) + (i32.const 7) + ) + ) + (local.set $$26 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl197 + (i32.shl + (local.get $$call196) + (local.get $$26) + ) + ) + (local.set $$27 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or198 + (i32.or + (local.get $$27) + (local.get $$shl197) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or198) + ) + (local.set $$add199 + (i32.add + (local.get $$26) + (i32.const 7) + ) + ) + (local.set $$storemerge211 + (local.get $$add199) + ) + ) + (block + (local.set $$sub204 + (i32.add + (local.get $$j$2) + (i32.const 169) + ) + ) + (local.set $$call205 + (call $_stbiw__zlib_bitrev + (local.get $$sub204) + (i32.const 8) + ) + ) + (local.set $$28 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl206 + (i32.shl + (local.get $$call205) + (local.get $$28) + ) + ) + (local.set $$29 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or207 + (i32.or + (local.get $$29) + (local.get $$shl206) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or207) + ) + (local.set $$add208 + (i32.add + (local.get $$28) + (i32.const 8) + ) + ) + (local.set $$storemerge211 + (local.get $$add208) + ) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$storemerge211) + ) + (local.set $$$sink + (i32.load + (local.get $$out) + ) + ) + (local.set $$call209 + (call $_stbiw__zlib_flushf + (local.get $$$sink) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call209) + ) + (local.set $$30 + (i32.add + (local.get $$j$2) + (i32.const -8) + ) + ) + (local.set $$tobool217 + (i32.lt_u + (local.get $$30) + (i32.const 20) + ) + ) + (if + (local.get $$tobool217) + (block + (local.set $$arrayidx216 + (i32.add + (i32.const 6608) + (local.get $$j$2) + ) + ) + (local.set $$arrayidx219 + (i32.add + (i32.const 6544) + (i32.shl + (local.get $$j$2) + (i32.const 1) + ) + ) + ) + (local.set $$31 + (i32.load16_s + (local.get $$arrayidx219) + ) + ) + (local.set $$conv220 + (i32.and + (local.get $$31) + (i32.const 65535) + ) + ) + (local.set $$sub221 + (i32.sub + (local.get $$best$0$lcssa200) + (local.get $$conv220) + ) + ) + (local.set $$32 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl222 + (i32.shl + (local.get $$sub221) + (local.get $$32) + ) + ) + (local.set $$33 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or223 + (i32.or + (local.get $$shl222) + (local.get $$33) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or223) + ) + (local.set $$34 + (i32.load8_s + (local.get $$arrayidx216) + ) + ) + (local.set $$conv225 + (i32.and + (local.get $$34) + (i32.const 255) + ) + ) + (local.set $$add226 + (i32.add + (local.get $$32) + (local.get $$conv225) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add226) + ) + (local.set $$35 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call227 + (call $_stbiw__zlib_flushf + (local.get $$35) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call227) + ) + ) + ) + (local.set $$j$3 + (i32.const 0) + ) + (loop $while-in6 + (block $while-out5 + (local.set $$add230 + (i32.add + (local.get $$j$3) + (i32.const 1) + ) + ) + (local.set $$arrayidx231 + (i32.add + (i32.const 6640) + (i32.shl + (local.get $$add230) + (i32.const 1) + ) + ) + ) + (local.set $$36 + (i32.load16_s + (local.get $$arrayidx231) + ) + ) + (local.set $$conv232 + (i32.and + (local.get $$36) + (i32.const 65535) + ) + ) + (local.set $$cmp234 + (i32.lt_s + (local.get $$sub$ptr$sub150) + (local.get $$conv232) + ) + ) + (if + (local.get $$cmp234) + (br $while-out5) + (local.set $$j$3 + (local.get $$add230) + ) + ) + (br $while-in6) + ) + ) + (local.set $$call240 + (call $_stbiw__zlib_bitrev + (local.get $$j$3) + (i32.const 5) + ) + ) + (local.set $$37 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl241 + (i32.shl + (local.get $$call240) + (local.get $$37) + ) + ) + (local.set $$38 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or242 + (i32.or + (local.get $$38) + (local.get $$shl241) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or242) + ) + (local.set $$add243 + (i32.add + (local.get $$37) + (i32.const 5) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add243) + ) + (local.set $$39 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call244 + (call $_stbiw__zlib_flushf + (local.get $$39) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call244) + ) + (local.set $$40 + (i32.add + (local.get $$j$3) + (i32.const -4) + ) + ) + (local.set $$tobool246 + (i32.lt_u + (local.get $$40) + (i32.const 26) + ) + ) + (if + (local.get $$tobool246) + (block + (local.set $$arrayidx245 + (i32.add + (i32.const 6704) + (local.get $$j$3) + ) + ) + (local.set $$arrayidx248 + (i32.add + (i32.const 6640) + (i32.shl + (local.get $$j$3) + (i32.const 1) + ) + ) + ) + (local.set $$41 + (i32.load16_s + (local.get $$arrayidx248) + ) + ) + (local.set $$conv249 + (i32.and + (local.get $$41) + (i32.const 65535) + ) + ) + (local.set $$sub250 + (i32.sub + (local.get $$sub$ptr$sub150) + (local.get $$conv249) + ) + ) + (local.set $$42 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl251 + (i32.shl + (local.get $$sub250) + (local.get $$42) + ) + ) + (local.set $$43 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or252 + (i32.or + (local.get $$shl251) + (local.get $$43) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or252) + ) + (local.set $$44 + (i32.load8_s + (local.get $$arrayidx245) + ) + ) + (local.set $$conv254 + (i32.and + (local.get $$44) + (i32.const 255) + ) + ) + (local.set $$add255 + (i32.add + (local.get $$42) + (local.get $$conv254) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add255) + ) + (local.set $$call256 + (call $_stbiw__zlib_flushf + (local.get $$call244) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call256) + ) + (local.set $$best$0$pn + (local.get $$best$0$lcssa200) + ) + ) + (local.set $$best$0$pn + (local.get $$best$0$lcssa200) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 38) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$45 + (i32.load8_s + (local.get $$add$ptr39) + ) + ) + (local.set $$conv260 + (i32.and + (local.get $$45) + (i32.const 255) + ) + ) + (local.set $$cmp261 + (i32.lt_s + (i32.and + (local.get $$45) + (i32.const 255) + ) + (i32.const 144) + ) + ) + (if + (local.get $$cmp261) + (block + (local.set $$add266 + (i32.add + (local.get $$conv260) + (i32.const 48) + ) + ) + (local.set $$call267 + (call $_stbiw__zlib_bitrev + (local.get $$add266) + (i32.const 8) + ) + ) + (local.set $$46 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl268 + (i32.shl + (local.get $$call267) + (local.get $$46) + ) + ) + (local.set $$47 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or269 + (i32.or + (local.get $$47) + (local.get $$shl268) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or269) + ) + (local.set $$add270 + (i32.add + (local.get $$46) + (i32.const 8) + ) + ) + (local.set $$storemerge212 + (local.get $$add270) + ) + ) + (block + (local.set $$sub276 + (i32.or + (local.get $$conv260) + (i32.const 256) + ) + ) + (local.set $$call277 + (call $_stbiw__zlib_bitrev + (local.get $$sub276) + (i32.const 9) + ) + ) + (local.set $$48 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl278 + (i32.shl + (local.get $$call277) + (local.get $$48) + ) + ) + (local.set $$49 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or279 + (i32.or + (local.get $$49) + (local.get $$shl278) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or279) + ) + (local.set $$add280 + (i32.add + (local.get $$48) + (i32.const 9) + ) + ) + (local.set $$storemerge212 + (local.get $$add280) + ) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$storemerge212) + ) + (local.set $$$sink209 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call281 + (call $_stbiw__zlib_flushf + (local.get $$$sink209) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call281) + ) + (local.set $$best$0$pn + (i32.const 1) + ) + ) + ) + (local.set $$i$2 + (i32.add + (local.get $$best$0$pn) + (local.get $$i$1192) + ) + ) + (local.set $$cmp38 + (i32.lt_s + (local.get $$i$2) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp38) + (local.set $$i$1192 + (local.get $$i$2) + ) + (block + (local.set $$i$1$lcssa + (local.get $$i$2) + ) + (br $label$break$L9) + ) + ) + (br $label$continue$L11) + ) + ) + (call $___assert_fail + (i32.const 16201) + (i32.const 16150) + (i32.const 922) + (i32.const 16227) + ) + ) + (local.set $$i$1$lcssa + (i32.const 0) + ) + ) + ) + (local.set $$cmp287178 + (i32.lt_s + (local.get $$i$1$lcssa) + (local.get $$data_len) + ) + ) + (if + (local.get $$cmp287178) + (block + (local.set $$i$3179 + (local.get $$i$1$lcssa) + ) + (loop $while-in8 + (block $while-out7 + (local.set $$arrayidx290 + (i32.add + (local.get $$data) + (local.get $$i$3179) + ) + ) + (local.set $$50 + (i32.load8_s + (local.get $$arrayidx290) + ) + ) + (local.set $$conv291 + (i32.and + (local.get $$50) + (i32.const 255) + ) + ) + (local.set $$cmp292 + (i32.lt_s + (i32.and + (local.get $$50) + (i32.const 255) + ) + (i32.const 144) + ) + ) + (if + (local.get $$cmp292) + (block + (local.set $$add297 + (i32.add + (local.get $$conv291) + (i32.const 48) + ) + ) + (local.set $$call298 + (call $_stbiw__zlib_bitrev + (local.get $$add297) + (i32.const 8) + ) + ) + (local.set $$51 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl299 + (i32.shl + (local.get $$call298) + (local.get $$51) + ) + ) + (local.set $$52 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or300 + (i32.or + (local.get $$52) + (local.get $$shl299) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or300) + ) + (local.set $$add301 + (i32.add + (local.get $$51) + (i32.const 8) + ) + ) + (local.set $$storemerge + (local.get $$add301) + ) + ) + (block + (local.set $$sub307 + (i32.or + (local.get $$conv291) + (i32.const 256) + ) + ) + (local.set $$call308 + (call $_stbiw__zlib_bitrev + (local.get $$sub307) + (i32.const 9) + ) + ) + (local.set $$53 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl309 + (i32.shl + (local.get $$call308) + (local.get $$53) + ) + ) + (local.set $$54 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or310 + (i32.or + (local.get $$54) + (local.get $$shl309) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or310) + ) + (local.set $$add311 + (i32.add + (local.get $$53) + (i32.const 9) + ) + ) + (local.set $$storemerge + (local.get $$add311) + ) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$storemerge) + ) + (local.set $$$sink210 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call302 + (call $_stbiw__zlib_flushf + (local.get $$$sink210) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call302) + ) + (local.set $$inc316 + (i32.add + (local.get $$i$3179) + (i32.const 1) + ) + ) + (local.set $$exitcond196 + (i32.eq + (local.get $$inc316) + (local.get $$data_len) + ) + ) + (if + (local.get $$exitcond196) + (br $while-out7) + (local.set $$i$3179 + (local.get $$inc316) + ) + ) + (br $while-in8) + ) + ) + ) + ) + (local.set $$call318 + (call $_stbiw__zlib_bitrev + (i32.const 0) + (i32.const 7) + ) + ) + (local.set $$55 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$shl319 + (i32.shl + (local.get $$call318) + (local.get $$55) + ) + ) + (local.set $$56 + (i32.load + (local.get $$bitbuf) + ) + ) + (local.set $$or320 + (i32.or + (local.get $$56) + (local.get $$shl319) + ) + ) + (i32.store + (local.get $$bitbuf) + (local.get $$or320) + ) + (local.set $$add321 + (i32.add + (local.get $$55) + (i32.const 7) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add321) + ) + (local.set $$57 + (i32.load + (local.get $$out) + ) + ) + (local.set $$call322 + (call $_stbiw__zlib_flushf + (local.get $$57) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call322) + ) + (local.set $$58 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$tobool324176 + (i32.eq + (local.get $$58) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool324176) + ) + (block + (local.set $$59 + (local.get $$58) + ) + (local.set $$storemerge177 + (local.get $$call322) + ) + (loop $while-in10 + (block $while-out9 + (local.set $$add328 + (i32.add + (local.get $$59) + (i32.const 1) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$add328) + ) + (local.set $$call329 + (call $_stbiw__zlib_flushf + (local.get $$storemerge177) + (local.get $$bitbuf) + (local.get $$bitcount) + ) + ) + (i32.store + (local.get $$out) + (local.get $$call329) + ) + (local.set $$60 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$tobool324 + (i32.eq + (local.get $$60) + (i32.const 0) + ) + ) + (if + (local.get $$tobool324) + (br $while-out9) + (block + (local.set $$59 + (local.get $$60) + ) + (local.set $$storemerge177 + (local.get $$call329) + ) + ) + ) + (br $while-in10) + ) + ) + ) + ) + (local.set $$i$4175 + (i32.const 0) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$arrayidx335 + (i32.add + (local.get $$call) + (i32.shl + (local.get $$i$4175) + (i32.const 2) + ) + ) + ) + (local.set $$61 + (i32.load + (local.get $$arrayidx335) + ) + ) + (local.set $$tobool336 + (i32.eq + (local.get $$61) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool336) + ) + (block + (local.set $$add$ptr339144 + (i32.add + (local.get $$61) + (i32.const -8) + ) + ) + (call $_free + (local.get $$add$ptr339144) + ) + ) + ) + (local.set $$inc344 + (i32.add + (local.get $$i$4175) + (i32.const 1) + ) + ) + (local.set $$exitcond195 + (i32.eq + (local.get $$inc344) + (i32.const 16384) + ) + ) + (if + (local.get $$exitcond195) + (br $while-out11) + (local.set $$i$4175 + (local.get $$inc344) + ) + ) + (br $while-in12) + ) + ) + (call $_free + (local.get $$call) + ) + (local.set $$cmp347167 + (i32.gt_s + (local.get $$data_len) + (i32.const 0) + ) + ) + (if + (local.get $$cmp347167) + (block + (local.set $$rem208 + (i32.and + (i32.rem_u + (local.get $$data_len) + (i32.const 5552) + ) + (i32.const -1) + ) + ) + (local.set $$blocklen$0172 + (local.get $$rem208) + ) + (local.set $$j$4168 + (i32.const 0) + ) + (local.set $$s1$0170 + (i32.const 1) + ) + (local.set $$s2$0171 + (i32.const 0) + ) + (loop $while-in14 + (block $while-out13 + (local.set $$cmp351162 + (i32.eq + (local.get $$blocklen$0172) + (i32.const 0) + ) + ) + (if + (local.get $$cmp351162) + (block + (local.set $$s1$1$lcssa + (local.get $$s1$0170) + ) + (local.set $$s2$1$lcssa + (local.get $$s2$0171) + ) + ) + (block + (local.set $$i$5163 + (i32.const 0) + ) + (local.set $$s1$1164 + (local.get $$s1$0170) + ) + (local.set $$s2$1165 + (local.get $$s2$0171) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$add354 + (i32.add + (local.get $$i$5163) + (local.get $$j$4168) + ) + ) + (local.set $$arrayidx355 + (i32.add + (local.get $$data) + (local.get $$add354) + ) + ) + (local.set $$62 + (i32.load8_s + (local.get $$arrayidx355) + ) + ) + (local.set $$conv356 + (i32.and + (local.get $$62) + (i32.const 255) + ) + ) + (local.set $$add357 + (i32.add + (local.get $$s1$1164) + (local.get $$conv356) + ) + ) + (local.set $$add358 + (i32.add + (local.get $$add357) + (local.get $$s2$1165) + ) + ) + (local.set $$inc360 + (i32.add + (local.get $$i$5163) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc360) + (local.get $$blocklen$0172) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$s1$1$lcssa + (local.get $$add357) + ) + (local.set $$s2$1$lcssa + (local.get $$add358) + ) + (br $while-out15) + ) + (block + (local.set $$i$5163 + (local.get $$inc360) + ) + (local.set $$s1$1164 + (local.get $$add357) + ) + (local.set $$s2$1165 + (local.get $$add358) + ) + ) + ) + (br $while-in16) + ) + ) + ) + ) + (local.set $$rem362 + (i32.and + (i32.rem_u + (local.get $$s1$1$lcssa) + (i32.const 65521) + ) + (i32.const -1) + ) + ) + (local.set $$rem363 + (i32.and + (i32.rem_u + (local.get $$s2$1$lcssa) + (i32.const 65521) + ) + (i32.const -1) + ) + ) + (local.set $$add364 + (i32.add + (local.get $$blocklen$0172) + (local.get $$j$4168) + ) + ) + (local.set $$cmp347 + (i32.lt_s + (local.get $$add364) + (local.get $$data_len) + ) + ) + (if + (local.get $$cmp347) + (block + (local.set $$blocklen$0172 + (i32.const 5552) + ) + (local.set $$j$4168 + (local.get $$add364) + ) + (local.set $$s1$0170 + (local.get $$rem362) + ) + (local.set $$s2$0171 + (local.get $$rem363) + ) + ) + (block + (local.set $$s1$0$lcssa + (local.get $$rem362) + ) + (local.set $$s2$0$lcssa + (local.get $$rem363) + ) + (br $while-out13) + ) + ) + (br $while-in14) + ) + ) + ) + (block + (local.set $$s1$0$lcssa + (i32.const 1) + ) + (local.set $$s2$0$lcssa + (i32.const 0) + ) + ) + ) + (local.set $$63 + (i32.load + (local.get $$out) + ) + ) + (local.set $$cmp366 + (i32.eq + (local.get $$63) + (i32.const 0) + ) + ) + (if + (local.get $$cmp366) + (local.set $label + (i32.const 64) + ) + (block + (local.set $$add$ptr369 + (i32.add + (local.get $$63) + (i32.const -8) + ) + ) + (local.set $$arrayidx370 + (i32.add + (local.get $$63) + (i32.const -4) + ) + ) + (local.set $$64 + (i32.load + (local.get $$arrayidx370) + ) + ) + (local.set $$add371 + (i32.add + (local.get $$64) + (i32.const 1) + ) + ) + (local.set $$65 + (i32.load + (local.get $$add$ptr369) + ) + ) + (local.set $$cmp374 + (i32.lt_s + (local.get $$add371) + (local.get $$65) + ) + ) + (if + (i32.eqz + (local.get $$cmp374) + ) + (local.set $label + (i32.const 64) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 64) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$s2$0$lcssa) + (i32.const 8) + ) + ) + (local.set $$conv382 + (i32.and + (local.get $$shr) + (i32.const 255) + ) + ) + (local.set $$66 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx384 + (i32.add + (local.get $$66) + (i32.const -4) + ) + ) + (local.set $$67 + (i32.load + (local.get $$arrayidx384) + ) + ) + (local.set $$inc385 + (i32.add + (local.get $$67) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx384) + (local.get $$inc385) + ) + (local.set $$arrayidx386 + (i32.add + (local.get $$66) + (local.get $$67) + ) + ) + (i32.store8 + (local.get $$arrayidx386) + (local.get $$conv382) + ) + (local.set $$68 + (i32.load + (local.get $$out) + ) + ) + (local.set $$cmp387 + (i32.eq + (local.get $$68) + (i32.const 0) + ) + ) + (if + (local.get $$cmp387) + (local.set $label + (i32.const 67) + ) + (block + (local.set $$add$ptr390 + (i32.add + (local.get $$68) + (i32.const -8) + ) + ) + (local.set $$arrayidx391 + (i32.add + (local.get $$68) + (i32.const -4) + ) + ) + (local.set $$69 + (i32.load + (local.get $$arrayidx391) + ) + ) + (local.set $$add392 + (i32.add + (local.get $$69) + (i32.const 1) + ) + ) + (local.set $$70 + (i32.load + (local.get $$add$ptr390) + ) + ) + (local.set $$cmp395 + (i32.lt_s + (local.get $$add392) + (local.get $$70) + ) + ) + (if + (i32.eqz + (local.get $$cmp395) + ) + (local.set $label + (i32.const 67) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 67) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + ) + (local.set $$conv403 + (i32.and + (local.get $$s2$0$lcssa) + (i32.const 255) + ) + ) + (local.set $$71 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx405 + (i32.add + (local.get $$71) + (i32.const -4) + ) + ) + (local.set $$72 + (i32.load + (local.get $$arrayidx405) + ) + ) + (local.set $$inc406 + (i32.add + (local.get $$72) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx405) + (local.get $$inc406) + ) + (local.set $$arrayidx407 + (i32.add + (local.get $$71) + (local.get $$72) + ) + ) + (i32.store8 + (local.get $$arrayidx407) + (local.get $$conv403) + ) + (local.set $$73 + (i32.load + (local.get $$out) + ) + ) + (local.set $$cmp408 + (i32.eq + (local.get $$73) + (i32.const 0) + ) + ) + (if + (local.get $$cmp408) + (local.set $label + (i32.const 70) + ) + (block + (local.set $$add$ptr411 + (i32.add + (local.get $$73) + (i32.const -8) + ) + ) + (local.set $$arrayidx412 + (i32.add + (local.get $$73) + (i32.const -4) + ) + ) + (local.set $$74 + (i32.load + (local.get $$arrayidx412) + ) + ) + (local.set $$add413 + (i32.add + (local.get $$74) + (i32.const 1) + ) + ) + (local.set $$75 + (i32.load + (local.get $$add$ptr411) + ) + ) + (local.set $$cmp416 + (i32.lt_s + (local.get $$add413) + (local.get $$75) + ) + ) + (if + (i32.eqz + (local.get $$cmp416) + ) + (local.set $label + (i32.const 70) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 70) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + ) + (local.set $$shr423 + (i32.shr_u + (local.get $$s1$0$lcssa) + (i32.const 8) + ) + ) + (local.set $$conv425 + (i32.and + (local.get $$shr423) + (i32.const 255) + ) + ) + (local.set $$76 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx427 + (i32.add + (local.get $$76) + (i32.const -4) + ) + ) + (local.set $$77 + (i32.load + (local.get $$arrayidx427) + ) + ) + (local.set $$inc428 + (i32.add + (local.get $$77) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx427) + (local.get $$inc428) + ) + (local.set $$arrayidx429 + (i32.add + (local.get $$76) + (local.get $$77) + ) + ) + (i32.store8 + (local.get $$arrayidx429) + (local.get $$conv425) + ) + (local.set $$78 + (i32.load + (local.get $$out) + ) + ) + (local.set $$cmp430 + (i32.eq + (local.get $$78) + (i32.const 0) + ) + ) + (if + (local.get $$cmp430) + (local.set $label + (i32.const 73) + ) + (block + (local.set $$add$ptr433 + (i32.add + (local.get $$78) + (i32.const -8) + ) + ) + (local.set $$arrayidx434 + (i32.add + (local.get $$78) + (i32.const -4) + ) + ) + (local.set $$79 + (i32.load + (local.get $$arrayidx434) + ) + ) + (local.set $$add435 + (i32.add + (local.get $$79) + (i32.const 1) + ) + ) + (local.set $$80 + (i32.load + (local.get $$add$ptr433) + ) + ) + (local.set $$cmp438 + (i32.lt_s + (local.get $$add435) + (local.get $$80) + ) + ) + (if + (i32.eqz + (local.get $$cmp438) + ) + (local.set $label + (i32.const 73) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 73) + ) + (call $_stbiw__sbgrowf + (local.get $$out) + (i32.const 1) + ) + ) + (local.set $$conv446 + (i32.and + (local.get $$s1$0$lcssa) + (i32.const 255) + ) + ) + (local.set $$81 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx448 + (i32.add + (local.get $$81) + (i32.const -4) + ) + ) + (local.set $$82 + (i32.load + (local.get $$arrayidx448) + ) + ) + (local.set $$inc449 + (i32.add + (local.get $$82) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx448) + (local.get $$inc449) + ) + (local.set $$arrayidx450 + (i32.add + (local.get $$81) + (local.get $$82) + ) + ) + (i32.store8 + (local.get $$arrayidx450) + (local.get $$conv446) + ) + (local.set $$83 + (i32.load + (local.get $$out) + ) + ) + (local.set $$arrayidx452 + (i32.add + (local.get $$83) + (i32.const -4) + ) + ) + (local.set $$84 + (i32.load + (local.get $$arrayidx452) + ) + ) + (i32.store + (local.get $$out_len) + (local.get $$84) + ) + (local.set $$add$ptr453 + (i32.add + (local.get $$83) + (i32.const -8) + ) + ) + (drop + (call $_memmove + (local.get $$add$ptr453) + (local.get $$83) + (local.get $$84) + ) + ) + (local.set $$85 + (i32.load + (local.get $$out) + ) + ) + (local.set $$add$ptr454 + (i32.add + (local.get $$85) + (i32.const -8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr454) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_stbiw__wpcrc (; 529 ;) (param $$data i32) (param $$len i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr1 i32) + (local $$add$ptr13 i32) + (local $$arrayidx12 i32) + (local $$arrayidx5 i32) + (local $$arrayidx9 i32) + (local $$call i32) + (local $$conv i32) + (local $$conv11 i32) + (local $$conv4 i32) + (local $$conv8 i32) + (local $$idx$neg i32) + (local $$shr i32) + (local $$shr2 i32) + (local $$shr6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$data) + ) + ) + (local.set $$idx$neg + (i32.sub + (i32.const 0) + (local.get $$len) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$0) + (local.get $$idx$neg) + ) + ) + (local.set $$add$ptr1 + (i32.add + (local.get $$add$ptr) + (i32.const -4) + ) + ) + (local.set $$add + (i32.add + (local.get $$len) + (i32.const 4) + ) + ) + (local.set $$call + (call $_stbiw__crc32 + (local.get $$add$ptr1) + (local.get $$add) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$call) + (i32.const 24) + ) + ) + (local.set $$conv + (i32.and + (local.get $$shr) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$0) + (local.get $$conv) + ) + (local.set $$shr2 + (i32.shr_u + (local.get $$call) + (i32.const 16) + ) + ) + (local.set $$conv4 + (i32.and + (local.get $$shr2) + (i32.const 255) + ) + ) + (local.set $$1 + (i32.load + (local.get $$data) + ) + ) + (local.set $$arrayidx5 + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$arrayidx5) + (local.get $$conv4) + ) + (local.set $$shr6 + (i32.shr_u + (local.get $$call) + (i32.const 8) + ) + ) + (local.set $$conv8 + (i32.and + (local.get $$shr6) + (i32.const 255) + ) + ) + (local.set $$2 + (i32.load + (local.get $$data) + ) + ) + (local.set $$arrayidx9 + (i32.add + (local.get $$2) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$arrayidx9) + (local.get $$conv8) + ) + (local.set $$conv11 + (i32.and + (local.get $$call) + (i32.const 255) + ) + ) + (local.set $$3 + (i32.load + (local.get $$data) + ) + ) + (local.set $$arrayidx12 + (i32.add + (local.get $$3) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$arrayidx12) + (local.get $$conv11) + ) + (local.set $$4 + (i32.load + (local.get $$data) + ) + ) + (local.set $$add$ptr13 + (i32.add + (local.get $$4) + (i32.const 4) + ) + ) + (i32.store + (local.get $$data) + (local.get $$add$ptr13) + ) + (return) + ) + (func $_stbiw__crc32 (; 530 ;) (param $$buffer i32) (param $$len i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$and i32) + (local $$arrayidx i32) + (local $$arrayidx1 i32) + (local $$cmp6 i32) + (local $$conv i32) + (local $$crc$0$lcssa i32) + (local $$crc$07 i32) + (local $$exitcond i32) + (local $$i$08 i32) + (local $$inc i32) + (local $$phitmp i32) + (local $$shr i32) + (local $$xor i32) + (local $$xor2 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp6 + (i32.gt_s + (local.get $$len) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp6) + ) + (block + (local.set $$crc$0$lcssa + (i32.const 0) + ) + (return + (local.get $$crc$0$lcssa) + ) + ) + ) + (local.set $$crc$07 + (i32.const -1) + ) + (local.set $$i$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$shr + (i32.shr_u + (local.get $$crc$07) + (i32.const 8) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$buffer) + (local.get $$i$08) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$and + (i32.and + (local.get $$crc$07) + (i32.const 255) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$and) + (local.get $$conv) + ) + ) + (local.set $$arrayidx1 + (i32.add + (i32.const 5520) + (i32.shl + (local.get $$xor) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx1) + ) + ) + (local.set $$xor2 + (i32.xor + (local.get $$1) + (local.get $$shr) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$08) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$len) + ) + ) + (if + (local.get $$exitcond) + (br $while-out) + (block + (local.set $$crc$07 + (local.get $$xor2) + ) + (local.set $$i$08 + (local.get $$inc) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$phitmp + (i32.xor + (local.get $$xor2) + (i32.const -1) + ) + ) + (local.set $$crc$0$lcssa + (local.get $$phitmp) + ) + (return + (local.get $$crc$0$lcssa) + ) + ) + (func $_stbiw__sbgrowf (; 531 ;) (param $$arr i32) (param $$itemsize i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr15 i32) + (local $$add$ptr4 i32) + (local $$add9 i32) + (local $$arrayidx14 i32) + (local $$call i32) + (local $$cond i32) + (local $$mul i32) + (local $$mul8 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool12 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$arr) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $$cond + (i32.const 2) + ) + (block + (local.set $$add$ptr + (i32.add + (local.get $$0) + (i32.const -8) + ) + ) + (local.set $$1 + (i32.load + (local.get $$add$ptr) + ) + ) + (local.set $$mul + (i32.shl + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$add + (i32.or + (local.get $$mul) + (i32.const 1) + ) + ) + (local.set $$cond + (local.get $$add) + ) + ) + ) + (local.set $$add$ptr4 + (i32.add + (local.get $$0) + (i32.const -8) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool) + (i32.const 0) + (local.get $$add$ptr4) + ) + ) + (local.set $$mul8 + (i32.mul + (local.get $$cond) + (local.get $$itemsize) + ) + ) + (local.set $$add9 + (i32.add + (local.get $$mul8) + (i32.const 8) + ) + ) + (local.set $$call + (call $_realloc + (local.get $$spec$select) + (local.get $$add9) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (call $___assert_fail + (i32.const 16246) + (i32.const 16150) + (i32.const 793) + (i32.const 16248) + ) + ) + (local.set $$2 + (i32.load + (local.get $$arr) + ) + ) + (local.set $$tobool12 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool12) + ) + (block + (local.set $$add$ptr15 + (i32.add + (local.get $$call) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arr) + (local.get $$add$ptr15) + ) + (i32.store + (local.get $$call) + (local.get $$cond) + ) + (return) + ) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$call) + (i32.const 4) + ) + ) + (i32.store + (local.get $$arrayidx14) + (i32.const 0) + ) + (local.set $$add$ptr15 + (i32.add + (local.get $$call) + (i32.const 8) + ) + ) + (i32.store + (local.get $$arr) + (local.get $$add$ptr15) + ) + (i32.store + (local.get $$call) + (local.get $$cond) + ) + (return) + ) + (func $_stbiw__zlib_flushf (; 532 ;) (param $$data i32) (param $$bitbuffer i32) (param $$bitcount i32) (result i32) + (local $$$lcssa i32) + (local $$$pr i32) + (local $$$pr3 i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$arrayidx i32) + (local $$arrayidx6 i32) + (local $$arrayidx7 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp4 i32) + (local $$cmp5 i32) + (local $$conv i32) + (local $$data$addr i32) + (local $$inc i32) + (local $$shr i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$data$addr + (local.get $sp_a) + ) + (i32.store + (local.get $$data$addr) + (local.get $$data) + ) + (local.set $$$pr + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$cmp5 + (i32.gt_s + (local.get $$$pr) + (i32.const 7) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$$lcssa + (local.get $$data) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$$lcssa) + ) + ) + ) + (local.set $$0 + (local.get $$data) + ) + (loop $while-in + (block $while-out + (local.set $$cmp1 + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp1) + (local.set $label + (i32.const 5) + ) + (block + (local.set $$add$ptr + (i32.add + (local.get $$0) + (i32.const -8) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$0) + (i32.const -4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$add + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load + (local.get $$add$ptr) + ) + ) + (local.set $$cmp4 + (i32.lt_s + (local.get $$add) + (local.get $$2) + ) + ) + (if + (i32.eqz + (local.get $$cmp4) + ) + (local.set $label + (i32.const 5) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (block + (local.set $label + (i32.const 0) + ) + (call $_stbiw__sbgrowf + (local.get $$data$addr) + (i32.const 1) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$bitbuffer) + ) + ) + (local.set $$conv + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$4 + (i32.load + (local.get $$data$addr) + ) + ) + (local.set $$arrayidx6 + (i32.add + (local.get $$4) + (i32.const -4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$arrayidx6) + ) + ) + (local.set $$inc + (i32.add + (local.get $$5) + (i32.const 1) + ) + ) + (i32.store + (local.get $$arrayidx6) + (local.get $$inc) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$4) + (local.get $$5) + ) + ) + (i32.store8 + (local.get $$arrayidx7) + (local.get $$conv) + ) + (local.set $$6 + (i32.load + (local.get $$bitbuffer) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$6) + (i32.const 8) + ) + ) + (i32.store + (local.get $$bitbuffer) + (local.get $$shr) + ) + (local.set $$7 + (i32.load + (local.get $$bitcount) + ) + ) + (local.set $$sub + (i32.add + (local.get $$7) + (i32.const -8) + ) + ) + (i32.store + (local.get $$bitcount) + (local.get $$sub) + ) + (local.set $$$pr3 + (i32.load + (local.get $$data$addr) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$7) + (i32.const 15) + ) + ) + (if + (local.get $$cmp) + (local.set $$0 + (local.get $$$pr3) + ) + (block + (local.set $$$lcssa + (local.get $$$pr3) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$$lcssa) + ) + ) + (func $_stbiw__zhash (; 533 ;) (param $$data i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add i32) + (local $$add12 i32) + (local $$add16 i32) + (local $$add6 i32) + (local $$add8 i32) + (local $$arrayidx1 i32) + (local $$arrayidx3 i32) + (local $$conv i32) + (local $$conv2 i32) + (local $$conv4 i32) + (local $$shl i32) + (local $$shl13 i32) + (local $$shl5 i32) + (local $$shl7 i32) + (local $$shl9 i32) + (local $$shr i32) + (local $$shr11 i32) + (local $$shr15 i32) + (local $$xor i32) + (local $$xor10 i32) + (local $$xor14 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$data) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$arrayidx1 + (i32.add + (local.get $$data) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$conv2 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv2) + (i32.const 8) + ) + ) + (local.set $$add + (i32.or + (local.get $$shl) + (local.get $$conv) + ) + ) + (local.set $$arrayidx3 + (i32.add + (local.get $$data) + (i32.const 2) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx3) + ) + ) + (local.set $$conv4 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$shl5 + (i32.shl + (local.get $$conv4) + (i32.const 16) + ) + ) + (local.set $$add6 + (i32.or + (local.get $$add) + (local.get $$shl5) + ) + ) + (local.set $$shl7 + (i32.shl + (local.get $$add6) + (i32.const 3) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$shl7) + (local.get $$add6) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$xor) + (i32.const 5) + ) + ) + (local.set $$add8 + (i32.add + (local.get $$shr) + (local.get $$xor) + ) + ) + (local.set $$shl9 + (i32.shl + (local.get $$add8) + (i32.const 4) + ) + ) + (local.set $$xor10 + (i32.xor + (local.get $$shl9) + (local.get $$add8) + ) + ) + (local.set $$shr11 + (i32.shr_u + (local.get $$xor10) + (i32.const 17) + ) + ) + (local.set $$add12 + (i32.add + (local.get $$shr11) + (local.get $$xor10) + ) + ) + (local.set $$shl13 + (i32.shl + (local.get $$add12) + (i32.const 25) + ) + ) + (local.set $$xor14 + (i32.xor + (local.get $$shl13) + (local.get $$add12) + ) + ) + (local.set $$shr15 + (i32.shr_u + (local.get $$xor14) + (i32.const 6) + ) + ) + (local.set $$add16 + (i32.add + (local.get $$shr15) + (local.get $$xor14) + ) + ) + (return + (local.get $$add16) + ) + ) + (func $_stbiw__zlib_countm (; 534 ;) (param $$a i32) (param $$b i32) (param $$limit i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$arrayidx i32) + (local $$arrayidx2 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp4 i32) + (local $$cmp7 i32) + (local $$i$0$lcssa i32) + (local $$i$08 i32) + (local $$inc i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp7 + (i32.gt_s + (local.get $$limit) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp7) + ) + (block + (local.set $$i$0$lcssa + (i32.const 0) + ) + (return + (local.get $$i$0$lcssa) + ) + ) + ) + (local.set $$i$08 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$a) + (local.get $$i$08) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx2 + (i32.add + (local.get $$b) + (local.get $$i$08) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx2) + ) + ) + (local.set $$cmp4 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp4) + ) + (block + (local.set $$i$0$lcssa + (local.get $$i$08) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$08) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$limit) + ) + ) + (local.set $$cmp1 + (i32.lt_u + (local.get $$inc) + (i32.const 258) + ) + ) + (local.set $$2 + (i32.and + (local.get $$cmp) + (local.get $$cmp1) + ) + ) + (if + (local.get $$2) + (local.set $$i$08 + (local.get $$inc) + ) + (block + (local.set $$i$0$lcssa + (local.get $$inc) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (return + (local.get $$i$0$lcssa) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_stbiw__zlib_bitrev (; 535 ;) (param $$code i32) (param $$codebits i32) (result i32) + (local $$and i32) + (local $$code$addr$04 i32) + (local $$codebits$addr$05 i32) + (local $$dec i32) + (local $$or i32) + (local $$res$0$lcssa i32) + (local $$res$06 i32) + (local $$shl i32) + (local $$shr i32) + (local $$tobool i32) + (local $$tobool3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool3 + (i32.eq + (local.get $$codebits) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3) + (block + (local.set $$res$0$lcssa + (i32.const 0) + ) + (return + (local.get $$res$0$lcssa) + ) + ) + ) + (local.set $$code$addr$04 + (local.get $$code) + ) + (local.set $$codebits$addr$05 + (local.get $$codebits) + ) + (local.set $$res$06 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$dec + (i32.add + (local.get $$codebits$addr$05) + (i32.const -1) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$res$06) + (i32.const 1) + ) + ) + (local.set $$and + (i32.and + (local.get $$code$addr$04) + (i32.const 1) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl) + (local.get $$and) + ) + ) + (local.set $$shr + (i32.shr_s + (local.get $$code$addr$04) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$dec) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$res$0$lcssa + (local.get $$or) + ) + (br $while-out) + ) + (block + (local.set $$code$addr$04 + (local.get $$shr) + ) + (local.set $$codebits$addr$05 + (local.get $$dec) + ) + (local.set $$res$06 + (local.get $$or) + ) + ) + ) + (br $while-in) + ) + ) + (return + (local.get $$res$0$lcssa) + ) + ) + (func $_stbiw__paeth (; 536 ;) (param $$a i32) (param $$b i32) (param $$c i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add i32) + (local $$and i32) + (local $$and10 i32) + (local $$cmp i32) + (local $$cmp6 i32) + (local $$cmp7 i32) + (local $$ispos i32) + (local $$ispos16 i32) + (local $$ispos18 i32) + (local $$neg i32) + (local $$neg17 i32) + (local $$neg19 i32) + (local $$or$cond i32) + (local $$retval$0 i32) + (local $$retval$0$in i32) + (local $$spec$select i32) + (local $$sub i32) + (local $$sub1 i32) + (local $$sub2 i32) + (local $$sub4 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$add + (i32.add + (local.get $$b) + (local.get $$a) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$add) + (local.get $$c) + ) + ) + (local.set $$sub1 + (i32.sub + (local.get $$sub) + (local.get $$a) + ) + ) + (local.set $$ispos + (i32.gt_s + (local.get $$sub1) + (i32.const -1) + ) + ) + (local.set $$neg + (i32.sub + (i32.const 0) + (local.get $$sub1) + ) + ) + (local.set $$0 + (if (result i32) + (local.get $$ispos) + (local.get $$sub1) + (local.get $$neg) + ) + ) + (local.set $$sub2 + (i32.sub + (local.get $$sub) + (local.get $$b) + ) + ) + (local.set $$ispos16 + (i32.gt_s + (local.get $$sub2) + (i32.const -1) + ) + ) + (local.set $$neg17 + (i32.sub + (i32.const 0) + (local.get $$sub2) + ) + ) + (local.set $$1 + (if (result i32) + (local.get $$ispos16) + (local.get $$sub2) + (local.get $$neg17) + ) + ) + (local.set $$sub4 + (i32.sub + (local.get $$sub) + (local.get $$c) + ) + ) + (local.set $$ispos18 + (i32.gt_s + (local.get $$sub4) + (i32.const -1) + ) + ) + (local.set $$neg19 + (i32.sub + (i32.const 0) + (local.get $$sub4) + ) + ) + (local.set $$2 + (if (result i32) + (local.get $$ispos18) + (local.get $$sub4) + (local.get $$neg19) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$cmp6 + (i32.gt_s + (local.get $$0) + (local.get $$2) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$cmp6) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$cmp7 + (i32.gt_s + (local.get $$1) + (local.get $$2) + ) + ) + (local.set $$and10 + (i32.and + (local.get $$b) + (i32.const 255) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp7) + (local.get $$c) + (local.get $$and10) + ) + ) + (local.set $$retval$0$in + (local.get $$spec$select) + ) + (local.set $$retval$0 + (i32.and + (local.get $$retval$0$in) + (i32.const 255) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$and + (i32.and + (local.get $$a) + (i32.const 255) + ) + ) + (local.set $$retval$0$in + (local.get $$and) + ) + (local.set $$retval$0 + (i32.and + (local.get $$retval$0$in) + (i32.const 255) + ) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_GetExtension (; 537 ;) (param $$fileName i32) (result i32) + (local $$add$ptr i32) + (local $$call i32) + (local $$cmp i32) + (local $$or$cond i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strrchr + (local.get $$fileName) + (i32.const 46) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (local.get $$fileName) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$tobool) + (local.get $$cmp) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$retval$0 + (if (result i32) + (local.get $$or$cond) + (i32.const 0) + (local.get $$add$ptr) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_TextSplit (; 538 ;) (param $$text i32) (param $$delimiter i32) (param $$count i32) (result i32) + (local $$0 i32) + (local $$add$ptr14 i32) + (local $$arrayidx i32) + (local $$arrayidx15 i32) + (local $$arrayidx2 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp10 i32) + (local $$cmp16 i32) + (local $$cmp4 i32) + (local $$counter$014 i32) + (local $$counter$1 i32) + (local $$counter$3 i32) + (local $$i$015 i32) + (local $$inc i32) + (local $$inc21 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (drop + (call $_memset + (i32.const 21808) + (i32.const 0) + (i32.const 1024) + ) + ) + (i32.store + (i32.const 22832) + (i32.const 21808) + ) + (local.set $$cmp + (i32.eq + (local.get $$text) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp) + (local.set $$counter$3 + (i32.const 0) + ) + (block + (local.set $$counter$014 + (i32.const 1) + ) + (local.set $$i$015 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx + (i32.add + (local.get $$text) + (local.get $$i$015) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$arrayidx2 + (i32.add + (i32.const 21808) + (local.get $$i$015) + ) + ) + (i32.store8 + (local.get $$arrayidx2) + (local.get $$0) + ) + (local.set $$cmp4 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$counter$3 + (local.get $$counter$014) + ) + (br $label$break$L1) + ) + ) + (local.set $$cmp10 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$delimiter) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp10) + (block + (i32.store8 + (local.get $$arrayidx2) + (i32.const 0) + ) + (local.set $$add$ptr14 + (i32.add + (local.get $$arrayidx2) + (i32.const 1) + ) + ) + (local.set $$arrayidx15 + (i32.add + (i32.const 22832) + (i32.shl + (local.get $$counter$014) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx15) + (local.get $$add$ptr14) + ) + (local.set $$inc + (i32.add + (local.get $$counter$014) + (i32.const 1) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$inc) + (i32.const 128) + ) + ) + (if + (local.get $$cmp16) + (block + (local.set $$counter$3 + (i32.const 128) + ) + (br $label$break$L1) + ) + (local.set $$counter$1 + (local.get $$inc) + ) + ) + ) + (local.set $$counter$1 + (local.get $$counter$014) + ) + ) + (local.set $$inc21 + (i32.add + (local.get $$i$015) + (i32.const 1) + ) + ) + (local.set $$cmp1 + (i32.lt_u + (local.get $$inc21) + (i32.const 1024) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$counter$014 + (local.get $$counter$1) + ) + (local.set $$i$015 + (local.get $$inc21) + ) + ) + (block + (local.set $$counter$3 + (local.get $$counter$1) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + ) + ) + (i32.store + (local.get $$count) + (local.get $$counter$3) + ) + (return + (i32.const 22832) + ) + ) + (func $_CloseWindow (; 539 ;) + (local $$0 i32) + (local $$1 i32) + (local $$tobool i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load8_s + (i32.const 29935) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (drop + (call $_GifEnd) + ) + (i32.store8 + (i32.const 29935) + (i32.const 0) + ) + ) + ) + (call $_UnloadFontDefault) + (call $_rlglClose) + (local.set $$1 + (i32.load + (i32.const 29124) + ) + ) + (call $_glfwDestroyWindow + (local.get $$1) + ) + (call $_glfwTerminate) + (call $_TraceLog + (i32.const 3) + (i32.const 16510) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_UnloadFontDefault (; 540 ;) + (local $$$byval_copy i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$cmp i32) + (local $$cmp4 i32) + (local $$i$05 i32) + (local $$image i32) + (local $$image$byval_copy i32) + (local $$inc i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $$image$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 20) + ) + ) + (local.set $$$byval_copy + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29156) + ) + ) + (local.set $$cmp4 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$i$05 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$3 + (i32.load + (i32.const 29184) + ) + ) + (local.set $$image + (i32.add + (i32.add + (local.get $$3) + (i32.mul + (local.get $$i$05) + (i32.const 36) + ) + ) + (i32.const 16) + ) + ) + (i64.store align=4 + (local.get $$image$byval_copy) + (i64.load align=4 + (local.get $$image) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$image$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$image) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$image$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$image) + (i32.const 16) + ) + ) + ) + (call $_UnloadImage + (local.get $$image$byval_copy) + ) + (local.set $$inc + (i32.add + (local.get $$i$05) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29156) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$4) + ) + ) + (if + (local.get $$cmp) + (local.set $$i$05 + (local.get $$inc) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + ) + ) + (i64.store align=4 + (local.get $$$byval_copy) + (i64.load align=4 + (i32.const 29160) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29160) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (i32.const 29160) + (i32.const 16) + ) + ) + ) + (call $_UnloadTexture + (local.get $$$byval_copy) + ) + (local.set $$1 + (i32.load + (i32.const 29184) + ) + ) + (call $_free + (local.get $$1) + ) + (local.set $$2 + (i32.load + (i32.const 29180) + ) + ) + (call $_free + (local.get $$2) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_UnloadTexture (; 541 ;) (param $$texture i32) + (local $$0 i32) + (local $$cmp i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$texture) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_rlDeleteTextures + (local.get $$0) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 16537) + (local.get $$vararg_buffer) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_BeginDrawing (; 542 ;) + (local $$0 f64) + (local $$call f64) + (local $$screenScaling$byval_copy i32) + (local $$sub f64) + (local $$tmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (local.set $$screenScaling$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (local.set $$call + (call $_GetTime) + ) + (local.set $$0 + (f64.load + (i32.const 28840) + ) + ) + (local.set $$sub + (f64.sub + (local.get $$call) + (local.get $$0) + ) + ) + (f64.store + (i32.const 28856) + (local.get $$sub) + ) + (f64.store + (i32.const 28840) + (local.get $$call) + ) + (call $_rlLoadIdentity) + (i64.store align=4 + (local.get $$screenScaling$byval_copy) + (i64.load align=4 + (i32.const 29188) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 24) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 32) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 40) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 40) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 48) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 48) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$screenScaling$byval_copy) + (i32.const 56) + ) + (i64.load align=4 + (i32.add + (i32.const 29188) + (i32.const 56) + ) + ) + ) + (call $_MatrixToFloatV + (local.get $$tmp) + (local.get $$screenScaling$byval_copy) + ) + (call $_rlMultMatrixf + (local.get $$tmp) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_EndDrawing (; 543 ;) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$$compoundliteral7 i32) + (local $$$compoundliteral7$byval_copy i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 f64) + (local $$11 f64) + (local $$12 f64) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 f64) + (local $$a i32) + (local $$a11 i32) + (local $$add f64) + (local $$add21 f64) + (local $$b i32) + (local $$b10 i32) + (local $$call i32) + (local $$call14 f64) + (local $$call19 f64) + (local $$cmp i32) + (local $$cmp16 i32) + (local $$cmp4 i32) + (local $$conv f32) + (local $$div i32) + (local $$g i32) + (local $$g9 i32) + (local $$inc i32) + (local $$mul f32) + (local $$rem i32) + (local $$rem3 i32) + (local $$sub i32) + (local $$sub15 f64) + (local $$sub18 f64) + (local $$sub20 f64) + (local $$sub6 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$$compoundliteral7$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 12) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral + (i32.add + (local.get $sp_a) + (i32.const 4) + ) + ) + (local.set $$$compoundliteral7 + (local.get $sp_a) + ) + (call $_rlglDraw) + (local.set $$0 + (i32.load8_s + (i32.const 29935) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$1 + (i32.load + (i32.const 29296) + ) + ) + (local.set $$inc + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (i32.store + (i32.const 29296) + (local.get $$inc) + ) + (local.set $$rem + (i32.and + (i32.rem_s + (local.get $$inc) + (i32.const 10) + ) + (i32.const -1) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$rem) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$2 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$call + (call $_rlReadScreenPixels + (local.get $$2) + (local.get $$3) + ) + ) + (local.set $$4 + (i32.load + (i32.const 29144) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29148) + ) + ) + (drop + (call $_GifWriteFrame + (local.get $$call) + (local.get $$4) + (local.get $$5) + (i32.const 10) + (i32.const 8) + (i32.const 0) + ) + ) + (call $_free + (local.get $$call) + ) + ) + ) + (local.set $$6 + (i32.load + (i32.const 29296) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$6) + (i32.const 15) + ) + (i32.const -1) + ) + ) + (local.set $$rem3 + (i32.and + (i32.rem_s + (local.get $$div) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp4 + (i32.eq + (local.get $$rem3) + (i32.const 1) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$7 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$sub + (i32.add + (local.get $$7) + (i32.const -20) + ) + ) + (i32.store8 + (local.get $$$compoundliteral) + (i32.const -26) + ) + (local.set $$g + (i32.add + (local.get $$$compoundliteral) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g) + (i32.const 41) + ) + (local.set $$b + (i32.add + (local.get $$$compoundliteral) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b) + (i32.const 55) + ) + (local.set $$a + (i32.add + (local.get $$$compoundliteral) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral) + ) + ) + (call $_DrawCircle + (i32.const 30) + (local.get $$sub) + (f32.const 10) + (local.get $$$compoundliteral$byval_copy) + ) + (local.set $$8 + (i32.load + (i32.const 29148) + ) + ) + (local.set $$sub6 + (i32.add + (local.get $$8) + (i32.const -25) + ) + ) + (i32.store8 + (local.get $$$compoundliteral7) + (i32.const -66) + ) + (local.set $$g9 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$g9) + (i32.const 33) + ) + (local.set $$b10 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$b10) + (i32.const 55) + ) + (local.set $$a11 + (i32.add + (local.get $$$compoundliteral7) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$a11) + (i32.const -1) + ) + (i32.store align=1 + (local.get $$$compoundliteral7$byval_copy) + (i32.load align=1 + (local.get $$$compoundliteral7) + ) + ) + (call $_DrawText + (i32.const 16587) + (i32.const 50) + (local.get $$sub6) + (i32.const 10) + (local.get $$$compoundliteral7$byval_copy) + ) + ) + ) + (call $_rlglDraw) + ) + ) + (call $_SwapBuffers) + (call $_PollInputEvents) + (local.set $$call14 + (call $_GetTime) + ) + (local.set $$9 + (f64.load + (i32.const 28840) + ) + ) + (local.set $$sub15 + (f64.sub + (local.get $$call14) + (local.get $$9) + ) + ) + (f64.store + (i32.const 28840) + (local.get $$call14) + ) + (local.set $$10 + (f64.load + (i32.const 28856) + ) + ) + (local.set $$add + (f64.add + (local.get $$sub15) + (local.get $$10) + ) + ) + (f64.store + (i32.const 28848) + (local.get $$add) + ) + (local.set $$cmp16 + (f64.lt + (local.get $$add) + (f64.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp16) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$sub18 + (f64.sub + (f64.const 0) + (local.get $$add) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$sub18) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$conv) + (f32.const 1e3) + ) + ) + (call $_Wait + (local.get $$mul) + ) + (local.set $$call19 + (call $_GetTime) + ) + (local.set $$11 + (f64.load + (i32.const 28840) + ) + ) + (local.set $$sub20 + (f64.sub + (local.get $$call19) + (local.get $$11) + ) + ) + (f64.store + (i32.const 28840) + (local.get $$call19) + ) + (local.set $$12 + (f64.load + (i32.const 28848) + ) + ) + (local.set $$add21 + (f64.add + (local.get $$sub20) + (local.get $$12) + ) + ) + (f64.store + (i32.const 28848) + (local.get $$add21) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_DrawCircle (; 544 ;) (param $$centerX i32) (param $$centerY i32) (param $$radius f32) (param $$color i32) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$color$byval_copy i32) + (local $$conv f32) + (local $$conv1 f32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$color$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral + (local.get $sp_a) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$centerX) + ) + ) + (f32.store + (local.get $$$compoundliteral) + (local.get $$conv) + ) + (local.set $$y + (i32.add + (local.get $$$compoundliteral) + (i32.const 4) + ) + ) + (local.set $$conv1 + (f32.convert_i32_s + (local.get $$centerY) + ) + ) + (f32.store + (local.get $$y) + (local.get $$conv1) + ) + (i64.store align=4 + (local.get $$$compoundliteral$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral) + ) + ) + (i32.store align=1 + (local.get $$color$byval_copy) + (i32.load align=1 + (local.get $$color) + ) + ) + (call $_DrawCircleV + (local.get $$$compoundliteral$byval_copy) + (local.get $$radius) + (local.get $$color$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_DrawText (; 545 ;) (param $$text i32) (param $$posX i32) (param $$posY i32) (param $$fontSize i32) (param $$color i32) + (local $$0 i32) + (local $$1 i32) + (local $$agg$tmp i32) + (local $$agg$tmp$byval_copy i32) + (local $$cmp i32) + (local $$color$byval_copy i32) + (local $$conv f32) + (local $$conv1 f32) + (local $$conv5 f32) + (local $$conv6 f32) + (local $$div i32) + (local $$id i32) + (local $$position i32) + (local $$position$byval_copy i32) + (local $$spec$select i32) + (local $$tmp i32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$color$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$position$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 120) + ) + ) + (local.set $$agg$tmp$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 84) + ) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$position + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$agg$tmp + (local.get $sp_a) + ) + (call $_GetFontDefault + (local.get $$tmp) + ) + (local.set $$id + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + (local.set $$0 + (i32.load + (local.get $$id) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$posX) + ) + ) + (f32.store + (local.get $$position) + (local.get $$conv) + ) + (local.set $$y + (i32.add + (local.get $$position) + (i32.const 4) + ) + ) + (local.set $$conv1 + (f32.convert_i32_s + (local.get $$posY) + ) + ) + (f32.store + (local.get $$y) + (local.get $$conv1) + ) + (local.set $$1 + (i32.gt_s + (local.get $$fontSize) + (i32.const 10) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$1) + (local.get $$fontSize) + (i32.const 10) + ) + ) + (local.set $$div + (i32.and + (i32.div_u + (local.get $$spec$select) + (i32.const 10) + ) + (i32.const -1) + ) + ) + (call $_GetFontDefault + (local.get $$agg$tmp) + ) + (local.set $$conv5 + (f32.convert_i32_s + (local.get $$spec$select) + ) + ) + (local.set $$conv6 + (f32.convert_i32_s + (local.get $$div) + ) + ) + (i64.store align=4 + (local.get $$agg$tmp$byval_copy) + (i64.load align=4 + (local.get $$agg$tmp) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$tmp$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$agg$tmp) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$tmp$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$agg$tmp) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$tmp$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$agg$tmp) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (local.get $$agg$tmp$byval_copy) + (i32.const 32) + ) + (i32.load + (i32.add + (local.get $$agg$tmp) + (i32.const 32) + ) + ) + ) + (i64.store align=4 + (local.get $$position$byval_copy) + (i64.load align=4 + (local.get $$position) + ) + ) + (i32.store align=1 + (local.get $$color$byval_copy) + (i32.load align=1 + (local.get $$color) + ) + ) + (call $_DrawTextEx + (local.get $$agg$tmp$byval_copy) + (local.get $$text) + (local.get $$position$byval_copy) + (local.get $$conv5) + (local.get $$conv6) + (local.get $$color$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_SwapBuffers (; 546 ;) + (local $$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29124) + ) + ) + (call $_glfwSwapBuffers + (local.get $$0) + ) + (return) + ) + (func $_PollInputEvents (; 547 ;) + (local $$0 i32) + (local $$1 f64) + (local $$2 f64) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$call i32) + (local $$call17 i32) + (local $$call38 i32) + (local $$cmp15 i32) + (local $$cmp20 i32) + (local $$cmp2041 i32) + (local $$cmp22 i32) + (local $$cmp39 i32) + (local $$cmp43 i32) + (local $$cmp4337 i32) + (local $$cmp46 i32) + (local $$cmp66 i32) + (local $$cmp6639 i32) + (local $$cmp69 i32) + (local $$conv f32) + (local $$conv1 f32) + (local $$gamepadState i32) + (local $$i18$042 i32) + (local $$inc62 i32) + (local $$inc81 i32) + (local $$inc86 i32) + (local $$j$038 i32) + (local $$j64$040 i32) + (local $$mouseX i32) + (local $$mouseY i32) + (local $$numAxes i32) + (local $$numButtons i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1456) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1456) + ) + ) + (local.set $$mouseX + (i32.add + (local.get $sp_a) + (i32.const 1440) + ) + ) + (local.set $$mouseY + (i32.add + (local.get $sp_a) + (i32.const 1432) + ) + ) + (local.set $$gamepadState + (local.get $sp_a) + ) + (call $_UpdateGestures) + (i32.store + (i32.const 29288) + (i32.const 0) + ) + (local.set $$0 + (i32.load + (i32.const 29124) + ) + ) + (call $_glfwGetCursorPos + (local.get $$0) + (local.get $$mouseX) + (local.get $$mouseY) + ) + (local.set $$1 + (f64.load + (local.get $$mouseX) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$1) + ) + ) + (f32.store + (i32.const 29128) + (local.get $$conv) + ) + (local.set $$2 + (f64.load + (local.get $$mouseY) + ) + ) + (local.set $$conv1 + (f32.demote_f64 + (local.get $$2) + ) + ) + (f32.store + (i32.const 29132) + (local.get $$conv1) + ) + (i32.store16 align=1 + (i32.const 29932) + (i32.load16_s align=1 + (i32.const 29929) + ) + ) + (i32.store8 + (i32.add + (i32.const 29932) + (i32.const 2) + ) + (i32.load8_s + (i32.add + (i32.const 29929) + (i32.const 2) + ) + ) + ) + (i32.store + (i32.const 29284) + (i32.const 0) + ) + (local.set $$call + (call $_emscripten_sample_gamepad_data) + ) + (local.set $$cmp15 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp15) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$call17 + (call $_emscripten_get_num_gamepads) + ) + (local.set $$cmp2041 + (i32.gt_s + (local.get $$call17) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp2041) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$numButtons + (i32.add + (local.get $$gamepadState) + (i32.const 12) + ) + ) + (local.set $$numAxes + (i32.add + (local.get $$gamepadState) + (i32.const 8) + ) + ) + (local.set $$i18$042 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$call38 + (call $_emscripten_get_gamepad_status + (local.get $$i18$042) + (local.get $$gamepadState) + ) + ) + (local.set $$cmp39 + (i32.eq + (local.get $$call38) + (i32.const 0) + ) + ) + (if + (local.get $$cmp39) + (block + (local.set $$3 + (i32.load + (local.get $$numButtons) + ) + ) + (local.set $$cmp4337 + (i32.gt_s + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4337) + (block + (local.set $$4 + (i32.load + (local.get $$numButtons) + ) + ) + (local.set $$j$038 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$inc62 + (i32.add + (local.get $$j$038) + (i32.const 1) + ) + ) + (local.set $$cmp43 + (i32.lt_s + (local.get $$inc62) + (local.get $$4) + ) + ) + (local.set $$cmp46 + (i32.lt_u + (local.get $$inc62) + (i32.const 32) + ) + ) + (local.set $$7 + (i32.and + (local.get $$cmp46) + (local.get $$cmp43) + ) + ) + (if + (local.get $$7) + (local.set $$j$038 + (local.get $$inc62) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + ) + ) + (local.set $$5 + (i32.load + (local.get $$numAxes) + ) + ) + (local.set $$cmp6639 + (i32.gt_s + (local.get $$5) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6639) + (block + (local.set $$6 + (i32.load + (local.get $$numAxes) + ) + ) + (local.set $$j64$040 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$inc81 + (i32.add + (local.get $$j64$040) + (i32.const 1) + ) + ) + (local.set $$cmp66 + (i32.lt_s + (local.get $$inc81) + (local.get $$6) + ) + ) + (local.set $$cmp69 + (i32.lt_u + (local.get $$inc81) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.and + (local.get $$cmp69) + (local.get $$cmp66) + ) + ) + (if + (local.get $$8) + (local.set $$j64$040 + (local.get $$inc81) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + ) + ) + ) + ) + (local.set $$inc86 + (i32.add + (local.get $$i18$042) + (i32.const 1) + ) + ) + (local.set $$cmp20 + (i32.lt_s + (local.get $$inc86) + (local.get $$call17) + ) + ) + (local.set $$cmp22 + (i32.lt_u + (local.get $$inc86) + (i32.const 4) + ) + ) + (local.set $$9 + (i32.and + (local.get $$cmp20) + (local.get $$cmp22) + ) + ) + (if + (local.get $$9) + (local.set $$i18$042 + (local.get $$inc86) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_Wait (; 548 ;) (param $$ms f32) + (local $$call i32) + (local $$cmp i32) + (local $$conv i32) + (local $$conv1 f32) + (local $$conv3 i32) + (local $$div f32) + (local $$mul i32) + (local $$mul2 f32) + (local $$req i32) + (local $$sub f32) + (local $$tv_nsec i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$req + (local.get $sp_a) + ) + (local.set $$div + (f32.div + (local.get $$ms) + (f32.const 1e3) + ) + ) + (local.set $$conv + (i32.trunc_f32_s + (local.get $$div) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$conv) + (i32.const 1000) + ) + ) + (local.set $$conv1 + (f32.convert_i32_s + (local.get $$mul) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$ms) + (local.get $$conv1) + ) + ) + (i32.store + (local.get $$req) + (local.get $$conv) + ) + (local.set $$mul2 + (f32.mul + (local.get $$sub) + (f32.const 1e6) + ) + ) + (local.set $$conv3 + (i32.trunc_f32_s + (local.get $$mul2) + ) + ) + (local.set $$tv_nsec + (i32.add + (local.get $$req) + (i32.const 4) + ) + ) + (i32.store + (local.get $$tv_nsec) + (local.get $$conv3) + ) + (loop $while-in + (block $while-out + (local.set $$call + (call $_nanosleep + (local.get $$req) + (local.get $$req) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$call) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GetGamepadButton (; 549 ;) (param $$button i32) (result i32) + (local $$btn$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (block $switch + (block $switch-default + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (block $switch-case10 + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-case5 $switch-case6 $switch-case7 $switch-case8 $switch-case9 $switch-case10 $switch-case11 $switch-case12 $switch-case13 $switch-case14 $switch-default + (i32.sub + (local.get $$button) + (i32.const 0) + ) + ) + ) + (block + (local.set $$btn$0 + (i32.const 7) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 6) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 8) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 5) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 9) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 11) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 10) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 12) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 13) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 15) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 16) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 17) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 1) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 3) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 4) + ) + (br $switch) + ) + ) + (block + (local.set $$btn$0 + (i32.const 2) + ) + (br $switch) + ) + ) + (local.set $$btn$0 + (i32.const 0) + ) + ) + (return + (local.get $$btn$0) + ) + ) + (func $_GetGamepadAxis (; 550 ;) (param $$axis i32) (result i32) + (local $$spec$select i32) + (local $$switch i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$switch + (i32.lt_u + (local.get $$axis) + (i32.const 4) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$switch) + (i32.const 3) + (i32.const 0) + ) + ) + (return + (local.get $$spec$select) + ) + ) + (func $_GetFontDefault (; 551 ;) (param $$agg$result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (i64.store align=4 + (local.get $$agg$result) + (i64.load align=4 + (i32.const 29152) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29152) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (i32.const 29152) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (i32.const 29152) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (local.get $$agg$result) + (i32.const 32) + ) + (i32.load + (i32.add + (i32.const 29152) + (i32.const 32) + ) + ) + ) + (return) + ) + (func $_DrawTextEx (; 552 ;) (param $$font i32) (param $$text i32) (param $$position i32) (param $$fontSize f32) (param $$spacing f32) (param $$tint i32) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$0 i32) + (local $$1 f32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 f32) + (local $$14 i32) + (local $$2 f32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 f32) + (local $$9 f32) + (local $$add i32) + (local $$add14 i32) + (local $$add21 f32) + (local $$add25 f32) + (local $$add28 f32) + (local $$add33 f32) + (local $$add55 f32) + (local $$add56 f32) + (local $$add63 f32) + (local $$add64 f32) + (local $$advanceX i32) + (local $$arrayidx i32) + (local $$arrayidx42 i32) + (local $$arrayidx42$byval_copy i32) + (local $$call i32) + (local $$call2 i32) + (local $$call3 i32) + (local $$chars i32) + (local $$chars46 i32) + (local $$cmp i32) + (local $$cmp33 i32) + (local $$cmp48 i32) + (local $$codepointByteCount i32) + (local $$conv f32) + (local $$conv12 f32) + (local $$conv13 i32) + (local $$conv23 f32) + (local $$conv27 f32) + (local $$conv31 f32) + (local $$conv61 f32) + (local $$div f32) + (local $$div11 i32) + (local $$font$byval_copy i32) + (local $$height i32) + (local $$height39 i32) + (local $$i$034 i32) + (local $$inc i32) + (local $$mul f32) + (local $$mul24 f32) + (local $$mul32 f32) + (local $$mul36 f32) + (local $$mul40 f32) + (local $$mul54 f32) + (local $$mul62 f32) + (local $$offsetX i32) + (local $$offsetY i32) + (local $$rec i32) + (local $$rec$byval_copy i32) + (local $$recs i32) + (local $$recs51 i32) + (local $$textOffsetX$035 f32) + (local $$textOffsetX$1 f32) + (local $$textOffsetY$037 i32) + (local $$textOffsetY$1 i32) + (local $$texture i32) + (local $$texture$byval_copy i32) + (local $$tint$byval_copy i32) + (local $$width i32) + (local $$width35 i32) + (local $$width53 i32) + (local $$y i32) + (local $$y26 i32) + (local $$y44 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $$tint$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 128) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 120) + ) + ) + (local.set $$rec$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 104) + ) + ) + (local.set $$arrayidx42$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 88) + ) + ) + (local.set $$texture$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 64) + ) + ) + (local.set $$font$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 28) + ) + ) + (local.set $$codepointByteCount + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$rec + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral + (local.get $sp_a) + ) + (local.set $$call + (call $_strlen + (local.get $$text) + ) + ) + (local.set $$0 + (i32.load + (local.get $$font) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$0) + ) + ) + (local.set $$div + (f32.div + (local.get $$fontSize) + (local.get $$conv) + ) + ) + (local.set $$cmp33 + (i32.gt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp33) + ) + (block + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$1 + (f32.load + (local.get $$position) + ) + ) + (local.set $$chars + (i32.add + (local.get $$font) + (i32.const 32) + ) + ) + (local.set $$y + (i32.add + (local.get $$rec) + (i32.const 4) + ) + ) + (local.set $$y26 + (i32.add + (local.get $$position) + (i32.const 4) + ) + ) + (local.set $$2 + (f32.load + (local.get $$y26) + ) + ) + (local.set $$width + (i32.add + (local.get $$rec) + (i32.const 8) + ) + ) + (local.set $$recs + (i32.add + (local.get $$font) + (i32.const 28) + ) + ) + (local.set $$height + (i32.add + (local.get $$rec) + (i32.const 12) + ) + ) + (local.set $$texture + (i32.add + (local.get $$font) + (i32.const 8) + ) + ) + (local.set $$y44 + (i32.add + (local.get $$$compoundliteral) + (i32.const 4) + ) + ) + (local.set $$chars46 + (i32.add + (local.get $$font) + (i32.const 32) + ) + ) + (local.set $$recs51 + (i32.add + (local.get $$font) + (i32.const 28) + ) + ) + (local.set $$i$034 + (i32.const 0) + ) + (local.set $$textOffsetX$035 + (f32.const 0) + ) + (local.set $$textOffsetY$037 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (i32.store + (local.get $$codepointByteCount) + (i32.const 0) + ) + (local.set $$arrayidx + (i32.add + (local.get $$text) + (local.get $$i$034) + ) + ) + (local.set $$call2 + (call $_GetNextCodepoint + (local.get $$arrayidx) + (local.get $$codepointByteCount) + ) + ) + (i64.store align=4 + (local.get $$font$byval_copy) + (i64.load align=4 + (local.get $$font) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$font$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$font) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$font$byval_copy) + (i32.const 16) + ) + (i64.load align=4 + (i32.add + (local.get $$font) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$font$byval_copy) + (i32.const 24) + ) + (i64.load align=4 + (i32.add + (local.get $$font) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (local.get $$font$byval_copy) + (i32.const 32) + ) + (i32.load + (i32.add + (local.get $$font) + (i32.const 32) + ) + ) + ) + (local.set $$call3 + (call $_GetGlyphIndex + (local.get $$font$byval_copy) + (local.get $$call2) + ) + ) + (block $switch + (block $switch-default + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case1 $switch-case0 $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-case2 $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-case $switch-default + (i32.sub + (local.get $$call2) + (i32.const 9) + ) + ) + ) + (block + (i32.store + (local.get $$codepointByteCount) + (i32.const 1) + ) + (local.set $label + (i32.const 7) + ) + (br $switch) + ) + ) + (block + (local.set $$3 + (i32.load + (local.get $$font) + ) + ) + (local.set $$div11 + (i32.and + (i32.div_s + (local.get $$3) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$add + (i32.add + (local.get $$div11) + (local.get $$3) + ) + ) + (local.set $$conv12 + (f32.convert_i32_s + (local.get $$add) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$div) + (local.get $$conv12) + ) + ) + (local.set $$conv13 + (i32.trunc_f32_s + (local.get $$mul) + ) + ) + (local.set $$add14 + (i32.add + (local.get $$textOffsetY$037) + (local.get $$conv13) + ) + ) + (local.set $$textOffsetX$1 + (f32.const 0) + ) + (local.set $$textOffsetY$1 + (local.get $$add14) + ) + (br $switch) + ) + ) + ) + (block + (local.set $label + (i32.const 8) + ) + (br $switch) + ) + ) + (local.set $label + (i32.const 7) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 7) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$add21 + (f32.add + (local.get $$textOffsetX$035) + (local.get $$1) + ) + ) + (local.set $$4 + (i32.load + (local.get $$chars) + ) + ) + (local.set $$offsetX + (i32.add + (i32.add + (local.get $$4) + (i32.mul + (local.get $$call3) + (i32.const 36) + ) + ) + (i32.const 4) + ) + ) + (local.set $$5 + (i32.load + (local.get $$offsetX) + ) + ) + (local.set $$conv23 + (f32.convert_i32_s + (local.get $$5) + ) + ) + (local.set $$mul24 + (f32.mul + (local.get $$div) + (local.get $$conv23) + ) + ) + (local.set $$add25 + (f32.add + (local.get $$add21) + (local.get $$mul24) + ) + ) + (f32.store + (local.get $$rec) + (local.get $$add25) + ) + (local.set $$conv27 + (f32.convert_i32_s + (local.get $$textOffsetY$037) + ) + ) + (local.set $$add28 + (f32.add + (local.get $$2) + (local.get $$conv27) + ) + ) + (local.set $$offsetY + (i32.add + (i32.add + (local.get $$4) + (i32.mul + (local.get $$call3) + (i32.const 36) + ) + ) + (i32.const 8) + ) + ) + (local.set $$6 + (i32.load + (local.get $$offsetY) + ) + ) + (local.set $$conv31 + (f32.convert_i32_s + (local.get $$6) + ) + ) + (local.set $$mul32 + (f32.mul + (local.get $$div) + (local.get $$conv31) + ) + ) + (local.set $$add33 + (f32.add + (local.get $$add28) + (local.get $$mul32) + ) + ) + (f32.store + (local.get $$y) + (local.get $$add33) + ) + (local.set $$7 + (i32.load + (local.get $$recs) + ) + ) + (local.set $$width35 + (i32.add + (i32.add + (local.get $$7) + (i32.shl + (local.get $$call3) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$8 + (f32.load + (local.get $$width35) + ) + ) + (local.set $$mul36 + (f32.mul + (local.get $$div) + (local.get $$8) + ) + ) + (f32.store + (local.get $$width) + (local.get $$mul36) + ) + (local.set $$height39 + (i32.add + (i32.add + (local.get $$7) + (i32.shl + (local.get $$call3) + (i32.const 4) + ) + ) + (i32.const 12) + ) + ) + (local.set $$9 + (f32.load + (local.get $$height39) + ) + ) + (local.set $$mul40 + (f32.mul + (local.get $$div) + (local.get $$9) + ) + ) + (f32.store + (local.get $$height) + (local.get $$mul40) + ) + (local.set $$arrayidx42 + (i32.add + (local.get $$7) + (i32.shl + (local.get $$call3) + (i32.const 4) + ) + ) + ) + (f32.store + (local.get $$$compoundliteral) + (f32.const 0) + ) + (f32.store + (local.get $$y44) + (f32.const 0) + ) + (i64.store align=4 + (local.get $$texture$byval_copy) + (i64.load align=4 + (local.get $$texture) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$texture$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$texture) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$texture$byval_copy) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$texture) + (i32.const 16) + ) + ) + ) + (i64.store align=4 + (local.get $$arrayidx42$byval_copy) + (i64.load align=4 + (local.get $$arrayidx42) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$arrayidx42$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$arrayidx42) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (local.get $$rec$byval_copy) + (i64.load align=4 + (local.get $$rec) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$rec$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$rec) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (local.get $$$compoundliteral$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral) + ) + ) + (i32.store align=1 + (local.get $$tint$byval_copy) + (i32.load align=1 + (local.get $$tint) + ) + ) + (call $_DrawTexturePro + (local.get $$texture$byval_copy) + (local.get $$arrayidx42$byval_copy) + (local.get $$rec$byval_copy) + (local.get $$$compoundliteral$byval_copy) + (f32.const 0) + (local.get $$tint$byval_copy) + ) + (local.set $label + (i32.const 8) + ) + ) + ) + (block $do-once + (if + (i32.eq + (local.get $label) + (i32.const 8) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$10 + (i32.load + (local.get $$chars46) + ) + ) + (local.set $$advanceX + (i32.add + (i32.add + (local.get $$10) + (i32.mul + (local.get $$call3) + (i32.const 36) + ) + ) + (i32.const 12) + ) + ) + (local.set $$11 + (i32.load + (local.get $$advanceX) + ) + ) + (local.set $$cmp48 + (i32.eq + (local.get $$11) + (i32.const 0) + ) + ) + (if + (local.get $$cmp48) + (block + (local.set $$12 + (i32.load + (local.get $$recs51) + ) + ) + (local.set $$width53 + (i32.add + (i32.add + (local.get $$12) + (i32.shl + (local.get $$call3) + (i32.const 4) + ) + ) + (i32.const 8) + ) + ) + (local.set $$13 + (f32.load + (local.get $$width53) + ) + ) + (local.set $$mul54 + (f32.mul + (local.get $$div) + (local.get $$13) + ) + ) + (local.set $$add55 + (f32.add + (local.get $$mul54) + (local.get $$spacing) + ) + ) + (local.set $$add56 + (f32.add + (local.get $$textOffsetX$035) + (local.get $$add55) + ) + ) + (local.set $$textOffsetX$1 + (local.get $$add56) + ) + (local.set $$textOffsetY$1 + (local.get $$textOffsetY$037) + ) + (br $do-once) + ) + (block + (local.set $$conv61 + (f32.convert_i32_s + (local.get $$11) + ) + ) + (local.set $$mul62 + (f32.mul + (local.get $$div) + (local.get $$conv61) + ) + ) + (local.set $$add63 + (f32.add + (local.get $$mul62) + (local.get $$spacing) + ) + ) + (local.set $$add64 + (f32.add + (local.get $$textOffsetX$035) + (local.get $$add63) + ) + ) + (local.set $$textOffsetX$1 + (local.get $$add64) + ) + (local.set $$textOffsetY$1 + (local.get $$textOffsetY$037) + ) + (br $do-once) + ) + ) + ) + ) + ) + (local.set $$14 + (i32.load + (local.get $$codepointByteCount) + ) + ) + (local.set $$inc + (i32.add + (local.get $$14) + (local.get $$i$034) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$call) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$i$034 + (local.get $$inc) + ) + (local.set $$textOffsetX$035 + (local.get $$textOffsetX$1) + ) + (local.set $$textOffsetY$037 + (local.get $$textOffsetY$1) + ) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GetNextCodepoint (; 553 ;) (param $$text i32) (param $$bytesProcessed i32) (result i32) + (local $$$mask i32) + (local $$$mask70 i32) + (local $$$mask71 i32) + (local $$$mask72 i32) + (local $$$mask73 i32) + (local $$$mask74 i32) + (local $$$off i32) + (local $$$off88 i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$and162 i32) + (local $$and165 i32) + (local $$and169 i32) + (local $$and173 i32) + (local $$and20 i32) + (local $$and22 i32) + (local $$and22$sink i32) + (local $$and25 i32) + (local $$and78 i32) + (local $$and81 i32) + (local $$and85 i32) + (local $$and93 i32) + (local $$arrayidx102 i32) + (local $$arrayidx114 i32) + (local $$arrayidx125 i32) + (local $$arrayidx30 i32) + (local $$arrayidx41 i32) + (local $$arrayidx7 i32) + (local $$cmp i32) + (local $$cmp105 i32) + (local $$cmp110 i32) + (local $$cmp116 i32) + (local $$cmp12 i32) + (local $$cmp121 i32) + (local $$cmp127 i32) + (local $$cmp132 i32) + (local $$cmp151 i32) + (local $$cmp155 i32) + (local $$cmp159 i32) + (local $$cmp185 i32) + (local $$cmp26 i32) + (local $$cmp32 i32) + (local $$cmp37 i32) + (local $$cmp4 i32) + (local $$cmp43 i32) + (local $$cmp48 i32) + (local $$cmp67 i32) + (local $$cmp71 i32) + (local $$cmp75 i32) + (local $$cmp9 i32) + (local $$cmp94 i32) + (local $$cmp97 i32) + (local $$conv i32) + (local $$conv104 i32) + (local $$conv115 i32) + (local $$conv126 i32) + (local $$conv3 i32) + (local $$conv31 i32) + (local $$conv42 i32) + (local $$conv8 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond75 i32) + (local $$or$cond76 i32) + (local $$or$cond78 i32) + (local $$or$cond79 i32) + (local $$or$cond80 i32) + (local $$or$cond81 i32) + (local $$or$cond83 i32) + (local $$or$cond87 i32) + (local $$or167 i32) + (local $$or171 i32) + (local $$or83 i32) + (local $$retval$3 i32) + (local $$shl i32) + (local $$shl$sink i32) + (local $$shl163 i32) + (local $$shl166 i32) + (local $$shl170 i32) + (local $$shl79 i32) + (local $$shl82 i32) + (local $$spec$select i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$text) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (i32.store + (local.get $$bytesProcessed) + (i32.const 1) + ) + (local.set $$cmp + (i32.gt_s + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$1 + (i32.load8_s + (local.get $$text) + ) + ) + (local.set $$conv3 + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$retval$3 + (local.get $$conv3) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$and + (i32.and + (local.get $$conv) + (i32.const 224) + ) + ) + (local.set $$cmp4 + (i32.eq + (local.get $$and) + (i32.const 192) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$arrayidx7 + (i32.add + (local.get $$text) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx7) + ) + ) + (local.set $$conv8 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$cmp9 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask74 + (i32.and + (local.get $$conv8) + (i32.const 192) + ) + ) + (local.set $$cmp12 + (i32.eq + (local.get $$$mask74) + (i32.const 128) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp9) + (local.get $$cmp12) + ) + ) + (if + (i32.eqz + (local.get $$or$cond) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 2) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$$off + (i32.shr_s + (i32.shl + (i32.add + (local.get $$0) + (i32.const 62) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$3 + (i32.lt_s + (i32.and + (local.get $$$off) + (i32.const 255) + ) + (i32.const 30) + ) + ) + (if + (i32.eqz + (local.get $$3) + ) + (block + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$and20 + (i32.shl + (local.get $$conv) + (i32.const 6) + ) + ) + (local.set $$shl + (i32.and + (local.get $$and20) + (i32.const 1984) + ) + ) + (local.set $$and22 + (i32.and + (local.get $$conv8) + (i32.const 63) + ) + ) + (local.set $$$sink + (i32.const 2) + ) + (local.set $$and22$sink + (local.get $$and22) + ) + (local.set $$shl$sink + (local.get $$shl) + ) + (local.set $$or + (i32.or + (local.get $$and22$sink) + (local.get $$shl$sink) + ) + ) + (i32.store + (local.get $$bytesProcessed) + (local.get $$$sink) + ) + (local.set $$cmp185 + (i32.gt_s + (local.get $$or) + (i32.const 1114111) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp185) + (i32.const 63) + (local.get $$or) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + (local.set $$and25 + (i32.and + (local.get $$conv) + (i32.const 240) + ) + ) + (local.set $$cmp26 + (i32.eq + (local.get $$and25) + (i32.const 224) + ) + ) + (if + (local.get $$cmp26) + (block + (local.set $$arrayidx30 + (i32.add + (local.get $$text) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx30) + ) + ) + (local.set $$conv31 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$cmp32 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask72 + (i32.and + (local.get $$conv31) + (i32.const 192) + ) + ) + (local.set $$cmp37 + (i32.eq + (local.get $$$mask72) + (i32.const 128) + ) + ) + (local.set $$or$cond75 + (i32.and + (local.get $$cmp32) + (local.get $$cmp37) + ) + ) + (if + (i32.eqz + (local.get $$or$cond75) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 2) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$arrayidx41 + (i32.add + (local.get $$text) + (i32.const 2) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx41) + ) + ) + (local.set $$conv42 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$cmp43 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask73 + (i32.and + (local.get $$conv42) + (i32.const 192) + ) + ) + (local.set $$cmp48 + (i32.eq + (local.get $$$mask73) + (i32.const 128) + ) + ) + (local.set $$or$cond76 + (i32.and + (local.get $$cmp43) + (local.get $$cmp48) + ) + ) + (if + (i32.eqz + (local.get $$or$cond76) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 3) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -32) + ) + ) + ) + (block + (local.set $$6 + (i32.and + (local.get $$4) + (i32.const -32) + ) + ) + (local.set $$7 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -96) + ) + ) + (if + (local.get $$7) + (local.set $label + (i32.const 18) + ) + (local.set $label + (i32.const 16) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp67 + (i32.lt_s + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp71 + (i32.lt_s + (i32.and + (local.get $$4) + (i32.const 255) + ) + (i32.const 160) + ) + ) + (local.set $$or$cond78 + (i32.and + (local.get $$cmp67) + (local.get $$cmp71) + ) + ) + (if + (local.get $$or$cond78) + (local.set $label + (i32.const 18) + ) + (local.set $label + (i32.const 16) + ) + ) + (br $switch) + ) + ) + (block + (local.set $$cmp75 + (i32.gt_s + (i32.and + (local.get $$0) + (i32.const 255) + ) + (i32.const 223) + ) + ) + (if + (local.get $$cmp75) + (local.set $label + (i32.const 18) + ) + (block + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 16) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 2) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 18) + ) + (block + (local.set $$and78 + (i32.shl + (local.get $$conv) + (i32.const 12) + ) + ) + (local.set $$shl79 + (i32.and + (local.get $$and78) + (i32.const 61440) + ) + ) + (local.set $$and81 + (i32.shl + (local.get $$conv31) + (i32.const 6) + ) + ) + (local.set $$shl82 + (i32.and + (local.get $$and81) + (i32.const 4032) + ) + ) + (local.set $$or83 + (i32.or + (local.get $$shl82) + (local.get $$shl79) + ) + ) + (local.set $$and85 + (i32.and + (local.get $$conv42) + (i32.const 63) + ) + ) + (local.set $$$sink + (i32.const 3) + ) + (local.set $$and22$sink + (local.get $$or83) + ) + (local.set $$shl$sink + (local.get $$and85) + ) + (local.set $$or + (i32.or + (local.get $$and22$sink) + (local.get $$shl$sink) + ) + ) + (i32.store + (local.get $$bytesProcessed) + (local.get $$$sink) + ) + (local.set $$cmp185 + (i32.gt_s + (local.get $$or) + (i32.const 1114111) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp185) + (i32.const 63) + (local.get $$or) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + ) + ) + ) + (local.set $$and93 + (i32.and + (local.get $$conv) + (i32.const 248) + ) + ) + (local.set $$cmp94 + (i32.ne + (local.get $$and93) + (i32.const 240) + ) + ) + (local.set $$cmp97 + (i32.gt_s + (i32.and + (local.get $$0) + (i32.const 255) + ) + (i32.const 244) + ) + ) + (local.set $$or$cond87 + (i32.or + (local.get $$cmp97) + (local.get $$cmp94) + ) + ) + (if + (local.get $$or$cond87) + (block + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$arrayidx102 + (i32.add + (local.get $$text) + (i32.const 1) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx102) + ) + ) + (local.set $$conv104 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$cmp105 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask + (i32.and + (local.get $$conv104) + (i32.const 192) + ) + ) + (local.set $$cmp110 + (i32.eq + (local.get $$$mask) + (i32.const 128) + ) + ) + (local.set $$or$cond79 + (i32.and + (local.get $$cmp105) + (local.get $$cmp110) + ) + ) + (if + (i32.eqz + (local.get $$or$cond79) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 2) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$arrayidx114 + (i32.add + (local.get $$text) + (i32.const 2) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx114) + ) + ) + (local.set $$conv115 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$cmp116 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask70 + (i32.and + (local.get $$conv115) + (i32.const 192) + ) + ) + (local.set $$cmp121 + (i32.eq + (local.get $$$mask70) + (i32.const 128) + ) + ) + (local.set $$or$cond80 + (i32.and + (local.get $$cmp116) + (local.get $$cmp121) + ) + ) + (if + (i32.eqz + (local.get $$or$cond80) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 3) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (local.set $$arrayidx125 + (i32.add + (local.get $$text) + (i32.const 3) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx125) + ) + ) + (local.set $$conv126 + (i32.and + (local.get $$10) + (i32.const 255) + ) + ) + (local.set $$cmp127 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$10) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$$mask71 + (i32.and + (local.get $$conv126) + (i32.const 192) + ) + ) + (local.set $$cmp132 + (i32.eq + (local.get $$$mask71) + (i32.const 128) + ) + ) + (local.set $$or$cond81 + (i32.and + (local.get $$cmp127) + (local.get $$cmp132) + ) + ) + (if + (i32.eqz + (local.get $$or$cond81) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 4) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + (block $switch1 + (block $switch-default4 + (block $switch-case3 + (block $switch-case2 + (br_table $switch-case2 $switch-default4 $switch-default4 $switch-default4 $switch-case3 $switch-default4 + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const -16) + ) + ) + ) + (block + (local.set $$$off88 + (i32.shr_s + (i32.shl + (i32.add + (local.get $$8) + (i32.const 112) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$11 + (i32.lt_s + (i32.and + (local.get $$$off88) + (i32.const 255) + ) + (i32.const 48) + ) + ) + (if + (local.get $$11) + (local.set $label + (i32.const 31) + ) + (local.set $label + (i32.const 29) + ) + ) + (br $switch1) + ) + ) + (block + (local.set $$cmp151 + (i32.lt_s + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp155 + (i32.lt_s + (i32.and + (local.get $$8) + (i32.const 255) + ) + (i32.const 144) + ) + ) + (local.set $$or$cond83 + (i32.and + (local.get $$cmp151) + (local.get $$cmp155) + ) + ) + (if + (local.get $$or$cond83) + (local.set $label + (i32.const 31) + ) + (local.set $label + (i32.const 29) + ) + ) + (br $switch1) + ) + ) + (block + (local.set $$cmp159 + (i32.gt_s + (i32.and + (local.get $$0) + (i32.const 255) + ) + (i32.const 239) + ) + ) + (if + (local.get $$cmp159) + (local.set $label + (i32.const 31) + ) + (block + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 29) + ) + (block + (i32.store + (local.get $$bytesProcessed) + (i32.const 2) + ) + (local.set $$retval$3 + (i32.const 63) + ) + (return + (local.get $$retval$3) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 31) + ) + (block + (local.set $$and162 + (i32.shl + (local.get $$conv) + (i32.const 18) + ) + ) + (local.set $$shl163 + (i32.and + (local.get $$and162) + (i32.const 1835008) + ) + ) + (local.set $$and165 + (i32.shl + (local.get $$conv104) + (i32.const 12) + ) + ) + (local.set $$shl166 + (i32.and + (local.get $$and165) + (i32.const 258048) + ) + ) + (local.set $$or167 + (i32.or + (local.get $$shl166) + (local.get $$shl163) + ) + ) + (local.set $$and169 + (i32.shl + (local.get $$conv115) + (i32.const 6) + ) + ) + (local.set $$shl170 + (i32.and + (local.get $$and169) + (i32.const 4032) + ) + ) + (local.set $$or171 + (i32.or + (local.get $$or167) + (local.get $$shl170) + ) + ) + (local.set $$and173 + (i32.and + (local.get $$conv126) + (i32.const 63) + ) + ) + (local.set $$$sink + (i32.const 4) + ) + (local.set $$and22$sink + (local.get $$or171) + ) + (local.set $$shl$sink + (local.get $$and173) + ) + (local.set $$or + (i32.or + (local.get $$and22$sink) + (local.get $$shl$sink) + ) + ) + (i32.store + (local.get $$bytesProcessed) + (local.get $$$sink) + ) + (local.set $$cmp185 + (i32.gt_s + (local.get $$or) + (i32.const 1114111) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp185) + (i32.const 63) + (local.get $$or) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_GetGlyphIndex (; 554 ;) (param $$font i32) (param $$codepoint i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$chars i32) + (local $$charsCount i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp5 i32) + (local $$i$06 i32) + (local $$inc i32) + (local $$index$0 i32) + (local $$value i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$charsCount + (i32.add + (local.get $$font) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$charsCount) + ) + ) + (local.set $$cmp5 + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$index$0 + (i32.const 63) + ) + (return + (local.get $$index$0) + ) + ) + ) + (local.set $$chars + (i32.add + (local.get $$font) + (i32.const 32) + ) + ) + (local.set $$1 + (i32.load + (local.get $$chars) + ) + ) + (local.set $$2 + (i32.load + (local.get $$charsCount) + ) + ) + (local.set $$i$06 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$value + (i32.add + (local.get $$1) + (i32.mul + (local.get $$i$06) + (i32.const 36) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$value) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$3) + (local.get $$codepoint) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$index$0 + (local.get $$i$06) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + ) + (local.set $$inc + (i32.add + (local.get $$i$06) + (i32.const 1) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$inc) + (local.get $$2) + ) + ) + (if + (local.get $$cmp) + (local.set $$i$06 + (local.get $$inc) + ) + (block + (local.set $$index$0 + (i32.const 63) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (return + (local.get $$index$0) + ) + ) + (return + (i32.const 0) + ) + ) + (func $_DrawTexturePro (; 555 ;) (param $$texture i32) (param $$sourceRec i32) (param $$destRec i32) (param $$origin i32) (param $$rotation f32) (param $$tint i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 f32) + (local $$15 f32) + (local $$16 f32) + (local $$17 f32) + (local $$18 f32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$21 f32) + (local $$22 f32) + (local $$23 f32) + (local $$24 f32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 f32) + (local $$3 f32) + (local $$30 f32) + (local $$4 f32) + (local $$5 f32) + (local $$6 f32) + (local $$7 f32) + (local $$8 f32) + (local $$9 f32) + (local $$a i32) + (local $$add f32) + (local $$add35 f32) + (local $$add39 f32) + (local $$add46 f32) + (local $$add56 f32) + (local $$add61 f32) + (local $$add65 f32) + (local $$add79 f32) + (local $$b i32) + (local $$cmp i32) + (local $$cmp10 i32) + (local $$cmp5 i32) + (local $$conv f32) + (local $$conv3 f32) + (local $$div f32) + (local $$div25 f32) + (local $$div27 f32) + (local $$div29 f32) + (local $$div36 f32) + (local $$div40 f32) + (local $$div43 f32) + (local $$div47 f32) + (local $$div53 f32) + (local $$div57 f32) + (local $$div62 f32) + (local $$div66 f32) + (local $$div73 f32) + (local $$div75 f32) + (local $$div80 f32) + (local $$div82 f32) + (local $$flipX$0$off0 i32) + (local $$g i32) + (local $$height2 i32) + (local $$height49 i32) + (local $$height4920 i32) + (local $$height9 i32) + (local $$mul f32) + (local $$sub f32) + (local $$sub18 f32) + (local $$sub20 f32) + (local $$width1 i32) + (local $$width4 i32) + (local $$width68 i32) + (local $$width6821 i32) + (local $$y i32) + (local $$y16 i32) + (local $$y19 i32) + (local $$y24 i32) + (local $$y28 i32) + (local $$y37 i32) + (local $$y54 i32) + (local $$y63 i32) + (local $$y74 i32) + (local $$y81 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$texture) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (return) + ) + (local.set $$width1 + (i32.add + (local.get $$texture) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$width1) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$1) + ) + ) + (local.set $$height2 + (i32.add + (local.get $$texture) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$height2) + ) + ) + (local.set $$conv3 + (f32.convert_i32_s + (local.get $$2) + ) + ) + (local.set $$width4 + (i32.add + (local.get $$sourceRec) + (i32.const 8) + ) + ) + (local.set $$3 + (f32.load + (local.get $$width4) + ) + ) + (local.set $$cmp5 + (f32.lt + (local.get $$3) + (f32.const 0) + ) + ) + (if + (local.get $$cmp5) + (block + (local.set $$mul + (f32.neg + (local.get $$3) + ) + ) + (f32.store + (local.get $$width4) + (local.get $$mul) + ) + (local.set $$flipX$0$off0 + (i32.const 1) + ) + ) + (local.set $$flipX$0$off0 + (i32.const 0) + ) + ) + (local.set $$height9 + (i32.add + (local.get $$sourceRec) + (i32.const 12) + ) + ) + (local.set $$4 + (f32.load + (local.get $$height9) + ) + ) + (local.set $$cmp10 + (f32.lt + (local.get $$4) + (f32.const 0) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$y + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$5 + (f32.load + (local.get $$y) + ) + ) + (local.set $$sub + (f32.sub + (local.get $$5) + (local.get $$4) + ) + ) + (f32.store + (local.get $$y) + (local.get $$sub) + ) + ) + ) + (call $_rlEnableTexture + (local.get $$0) + ) + (call $_rlPushMatrix) + (local.set $$6 + (f32.load + (local.get $$destRec) + ) + ) + (local.set $$y16 + (i32.add + (local.get $$destRec) + (i32.const 4) + ) + ) + (local.set $$7 + (f32.load + (local.get $$y16) + ) + ) + (call $_rlTranslatef + (local.get $$6) + (local.get $$7) + (f32.const 0) + ) + (call $_rlRotatef + (local.get $$rotation) + (f32.const 0) + (f32.const 0) + (f32.const 1) + ) + (local.set $$8 + (f32.load + (local.get $$origin) + ) + ) + (local.set $$sub18 + (f32.neg + (local.get $$8) + ) + ) + (local.set $$y19 + (i32.add + (local.get $$origin) + (i32.const 4) + ) + ) + (local.set $$9 + (f32.load + (local.get $$y19) + ) + ) + (local.set $$sub20 + (f32.neg + (local.get $$9) + ) + ) + (call $_rlTranslatef + (local.get $$sub18) + (local.get $$sub20) + (f32.const 0) + ) + (call $_rlBegin + (i32.const 7) + ) + (local.set $$10 + (i32.load8_s + (local.get $$tint) + ) + ) + (local.set $$g + (i32.add + (local.get $$tint) + (i32.const 1) + ) + ) + (local.set $$11 + (i32.load8_s + (local.get $$g) + ) + ) + (local.set $$b + (i32.add + (local.get $$tint) + (i32.const 2) + ) + ) + (local.set $$12 + (i32.load8_s + (local.get $$b) + ) + ) + (local.set $$a + (i32.add + (local.get $$tint) + (i32.const 3) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$a) + ) + ) + (call $_rlColor4ub + (local.get $$10) + (local.get $$11) + (local.get $$12) + (local.get $$13) + ) + (local.set $$14 + (f32.load + (local.get $$sourceRec) + ) + ) + (if + (local.get $$flipX$0$off0) + (block + (local.set $$15 + (f32.load + (local.get $$width4) + ) + ) + (local.set $$add + (f32.add + (local.get $$14) + (local.get $$15) + ) + ) + (local.set $$div + (f32.div + (local.get $$add) + (local.get $$conv) + ) + ) + (local.set $$y24 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$16 + (f32.load + (local.get $$y24) + ) + ) + (local.set $$div25 + (f32.div + (local.get $$16) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div) + (local.get $$div25) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (local.set $$17 + (f32.load + (local.get $$width4) + ) + ) + (local.set $$add35 + (f32.add + (local.get $$14) + (local.get $$17) + ) + ) + (local.set $$div36 + (f32.div + (local.get $$add35) + (local.get $$conv) + ) + ) + (local.set $$y37 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$18 + (f32.load + (local.get $$y37) + ) + ) + (local.set $$add39 + (f32.add + (local.get $$4) + (local.get $$18) + ) + ) + (local.set $$div40 + (f32.div + (local.get $$add39) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div36) + (local.get $$div40) + ) + (local.set $$height4920 + (i32.add + (local.get $$destRec) + (i32.const 12) + ) + ) + (local.set $$19 + (f32.load + (local.get $$height4920) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.get $$19) + ) + (local.set $$div53 + (f32.div + (local.get $$14) + (local.get $$conv) + ) + ) + (local.set $$y54 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$20 + (f32.load + (local.get $$y54) + ) + ) + (local.set $$add56 + (f32.add + (local.get $$4) + (local.get $$20) + ) + ) + (local.set $$div57 + (f32.div + (local.get $$add56) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div53) + (local.get $$div57) + ) + (local.set $$width6821 + (i32.add + (local.get $$destRec) + (i32.const 8) + ) + ) + (local.set $$21 + (f32.load + (local.get $$width6821) + ) + ) + (call $_rlVertex2f + (local.get $$21) + (local.get $$19) + ) + (local.set $$div73 + (f32.div + (local.get $$14) + (local.get $$conv) + ) + ) + (local.set $$y74 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$22 + (f32.load + (local.get $$y74) + ) + ) + (local.set $$div75 + (f32.div + (local.get $$22) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div73) + (local.get $$div75) + ) + (local.set $$30 + (local.get $$21) + ) + ) + (block + (local.set $$div27 + (f32.div + (local.get $$14) + (local.get $$conv) + ) + ) + (local.set $$y28 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$23 + (f32.load + (local.get $$y28) + ) + ) + (local.set $$div29 + (f32.div + (local.get $$23) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div27) + (local.get $$div29) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (local.set $$div43 + (f32.div + (local.get $$14) + (local.get $$conv) + ) + ) + (local.set $$add46 + (f32.add + (local.get $$4) + (local.get $$23) + ) + ) + (local.set $$div47 + (f32.div + (local.get $$add46) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div43) + (local.get $$div47) + ) + (local.set $$height49 + (i32.add + (local.get $$destRec) + (i32.const 12) + ) + ) + (local.set $$24 + (f32.load + (local.get $$height49) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.get $$24) + ) + (local.set $$25 + (f32.load + (local.get $$width4) + ) + ) + (local.set $$add61 + (f32.add + (local.get $$14) + (local.get $$25) + ) + ) + (local.set $$div62 + (f32.div + (local.get $$add61) + (local.get $$conv) + ) + ) + (local.set $$y63 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$26 + (f32.load + (local.get $$y63) + ) + ) + (local.set $$add65 + (f32.add + (local.get $$4) + (local.get $$26) + ) + ) + (local.set $$div66 + (f32.div + (local.get $$add65) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div62) + (local.get $$div66) + ) + (local.set $$width68 + (i32.add + (local.get $$destRec) + (i32.const 8) + ) + ) + (local.set $$27 + (f32.load + (local.get $$width68) + ) + ) + (call $_rlVertex2f + (local.get $$27) + (local.get $$24) + ) + (local.set $$28 + (f32.load + (local.get $$width4) + ) + ) + (local.set $$add79 + (f32.add + (local.get $$14) + (local.get $$28) + ) + ) + (local.set $$div80 + (f32.div + (local.get $$add79) + (local.get $$conv) + ) + ) + (local.set $$y81 + (i32.add + (local.get $$sourceRec) + (i32.const 4) + ) + ) + (local.set $$29 + (f32.load + (local.get $$y81) + ) + ) + (local.set $$div82 + (f32.div + (local.get $$29) + (local.get $$conv3) + ) + ) + (call $_rlTexCoord2f + (local.get $$div80) + (local.get $$div82) + ) + (local.set $$30 + (local.get $$27) + ) + ) + ) + (call $_rlVertex2f + (local.get $$30) + (f32.const 0) + ) + (call $_rlEnd) + (call $_rlPopMatrix) + (call $_rlDisableTexture) + (return) + ) + (func $_DrawCircleV (; 556 ;) (param $$center i32) (param $$radius f32) (param $$color i32) + (local $$center$byval_copy i32) + (local $$color$byval_copy i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$color$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$center$byval_copy + (local.get $sp_a) + ) + (i64.store align=4 + (local.get $$center$byval_copy) + (i64.load align=4 + (local.get $$center) + ) + ) + (i32.store align=1 + (local.get $$color$byval_copy) + (i32.load align=1 + (local.get $$color) + ) + ) + (call $_DrawCircleSector + (local.get $$center$byval_copy) + (local.get $$radius) + (i32.const 0) + (i32.const 360) + (i32.const 36) + (local.get $$color$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_DrawCircleSector (; 557 ;) (param $$center i32) (param $$radius f32) (param $$startAngle i32) (param $$endAngle i32) (param $$segments i32) (param $$color i32) + (local $$0 f32) + (local $$1 i32) + (local $$10 f32) + (local $$11 i32) + (local $$12 f32) + (local $$13 i32) + (local $$14 f32) + (local $$15 f32) + (local $$16 i32) + (local $$17 f32) + (local $$18 f32) + (local $$19 f32) + (local $$2 i32) + (local $$20 f32) + (local $$21 i32) + (local $$22 f32) + (local $$23 f32) + (local $$24 i32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 f32) + (local $$29 i32) + (local $$3 i32) + (local $$30 f32) + (local $$31 i32) + (local $$32 f32) + (local $$33 f32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 f32) + (local $$39 i32) + (local $$4 i32) + (local $$40 f32) + (local $$41 i32) + (local $$42 f32) + (local $$43 f32) + (local $$44 f32) + (local $$45 i32) + (local $$46 f32) + (local $$47 f32) + (local $$48 i32) + (local $$49 f32) + (local $$5 i32) + (local $$50 f32) + (local $$51 f32) + (local $$52 f32) + (local $$53 i32) + (local $$54 f32) + (local $$55 f32) + (local $$56 i32) + (local $$57 f32) + (local $$58 f32) + (local $$59 f32) + (local $$6 f32) + (local $$60 f32) + (local $$61 i32) + (local $$62 f32) + (local $$63 i32) + (local $$7 f32) + (local $$8 f32) + (local $$9 i32) + (local $$a i32) + (local $$a86 i32) + (local $$add f32) + (local $$add101 f32) + (local $$add105 f32) + (local $$add106 f32) + (local $$add109 f32) + (local $$add113 f32) + (local $$add116 f32) + (local $$add121 f32) + (local $$add122 f32) + (local $$add42 f32) + (local $$add46 f32) + (local $$add47 f32) + (local $$add50 f32) + (local $$add54 f32) + (local $$add57 f32) + (local $$add62 f32) + (local $$add63 f32) + (local $$add70 f32) + (local $$add73 f32) + (local $$add79 f32) + (local $$add95 f32) + (local $$angle$0$lcssa f32) + (local $$angle$049 f32) + (local $$b i32) + (local $$b85 i32) + (local $$call f32) + (local $$call24 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp12 i32) + (local $$cmp2948 i32) + (local $$cmp4 i32) + (local $$conv f32) + (local $$conv107 f32) + (local $$conv11 i32) + (local $$conv110 f32) + (local $$conv123 f32) + (local $$conv125 f32) + (local $$conv18 f32) + (local $$conv19 f32) + (local $$conv21 f32) + (local $$conv31 f32) + (local $$conv33 f32) + (local $$conv35 f32) + (local $$conv37 f32) + (local $$conv48 f32) + (local $$conv51 f32) + (local $$conv64 f32) + (local $$conv66 f32) + (local $$conv87 f32) + (local $$conv89 f32) + (local $$conv93 f32) + (local $$conv96 f32) + (local $$div f32) + (local $$div10 f32) + (local $$div108 f32) + (local $$div111 f32) + (local $$div124 f32) + (local $$div126 f32) + (local $$div20 f32) + (local $$div23 i32) + (local $$div28 i32) + (local $$div32 f32) + (local $$div34 f32) + (local $$div36 f32) + (local $$div38 f32) + (local $$div49 f32) + (local $$div52 f32) + (local $$div65 f32) + (local $$div67 f32) + (local $$div8 f32) + (local $$div88 f32) + (local $$div90 f32) + (local $$div94 f32) + (local $$div97 f32) + (local $$exitcond i32) + (local $$g i32) + (local $$g84 i32) + (local $$i$050 i32) + (local $$inc i32) + (local $$mul f32) + (local $$mul100 f32) + (local $$mul104 f32) + (local $$mul114 f32) + (local $$mul115 f32) + (local $$mul120 f32) + (local $$mul40 f32) + (local $$mul41 f32) + (local $$mul45 f32) + (local $$mul55 f32) + (local $$mul56 f32) + (local $$mul61 f32) + (local $$mul69 f32) + (local $$mul71 f32) + (local $$mul72 f32) + (local $$mul78 f32) + (local $$mul9 f32) + (local $$mul99 f32) + (local $$pow2 f32) + (local $$radius$addr$0 f32) + (local $$rem46 i32) + (local $$segments$addr$0 i32) + (local $$spec$select i32) + (local $$spec$select47 i32) + (local $$spec$store$select i32) + (local $$sub f32) + (local $$sub17 i32) + (local $$sub6 f32) + (local $$sub7 i32) + (local $$tmp27 i32) + (local $$tobool i32) + (local $$y i32) + (local $$y92 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$tmp27 + (local.get $sp_a) + ) + (local.set $$cmp + (i32.eqz + (f32.le + (local.get $$radius) + (f32.const 0) + ) + ) + ) + (local.set $$radius$addr$0 + (if (result f32) + (local.get $$cmp) + (local.get $$radius) + (f32.const 0.10000000149011612) + ) + ) + (local.set $$cmp1 + (i32.lt_s + (local.get $$endAngle) + (local.get $$startAngle) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp1) + (local.get $$startAngle) + (local.get $$endAngle) + ) + ) + (local.set $$spec$select47 + (if (result i32) + (local.get $$cmp1) + (local.get $$endAngle) + (local.get $$startAngle) + ) + ) + (local.set $$cmp4 + (i32.lt_s + (local.get $$segments) + (i32.const 4) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$div + (f32.div + (f32.const 0.5) + (local.get $$radius$addr$0) + ) + ) + (local.set $$sub + (f32.sub + (f32.const 1) + (local.get $$div) + ) + ) + (local.set $$pow2 + (f32.mul + (local.get $$sub) + (local.get $$sub) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$pow2) + (f32.const 2) + ) + ) + (local.set $$sub6 + (f32.add + (local.get $$mul) + (f32.const -1) + ) + ) + (local.set $$call + (call $_acosf + (local.get $$sub6) + ) + ) + (local.set $$sub7 + (i32.sub + (local.get $$spec$select) + (local.get $$spec$select47) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$sub7) + ) + ) + (local.set $$div8 + (f32.div + (f32.const 6.2831854820251465) + (local.get $$call) + ) + ) + (local.set $$0 + (f32.ceil + (local.get $$div8) + ) + ) + (local.set $$mul9 + (f32.mul + (local.get $$0) + (local.get $$conv) + ) + ) + (local.set $$div10 + (f32.div + (local.get $$mul9) + (f32.const 360) + ) + ) + (local.set $$conv11 + (i32.trunc_f32_s + (local.get $$div10) + ) + ) + (local.set $$cmp12 + (i32.lt_s + (local.get $$conv11) + (i32.const 1) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$cmp12) + (i32.const 4) + (local.get $$conv11) + ) + ) + (local.set $$segments$addr$0 + (local.get $$spec$store$select) + ) + ) + (local.set $$segments$addr$0 + (local.get $$segments) + ) + ) + (local.set $$sub17 + (i32.sub + (local.get $$spec$select) + (local.get $$spec$select47) + ) + ) + (local.set $$conv18 + (f32.convert_i32_s + (local.get $$sub17) + ) + ) + (local.set $$conv19 + (f32.convert_i32_s + (local.get $$segments$addr$0) + ) + ) + (local.set $$div20 + (f32.div + (local.get $$conv18) + (local.get $$conv19) + ) + ) + (local.set $$conv21 + (f32.convert_i32_s + (local.get $$spec$select47) + ) + ) + (local.set $$div23 + (i32.shl + (local.get $$segments$addr$0) + (i32.const 1) + ) + ) + (local.set $$call24 + (call $_rlCheckBufferLimit + (local.get $$div23) + ) + ) + (if + (local.get $$call24) + (call $_rlglDraw) + ) + (call $_GetShapesTexture + (local.get $$tmp27) + ) + (local.set $$1 + (i32.load + (local.get $$tmp27) + ) + ) + (call $_rlEnableTexture + (local.get $$1) + ) + (call $_rlBegin + (i32.const 7) + ) + (local.set $$div28 + (i32.and + (i32.div_s + (local.get $$segments$addr$0) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.set $$cmp2948 + (i32.gt_s + (local.get $$segments$addr$0) + (i32.const 1) + ) + ) + (if + (local.get $$cmp2948) + (block + (local.set $$2 + (i32.load8_s + (local.get $$color) + ) + ) + (local.set $$g + (i32.add + (local.get $$color) + (i32.const 1) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$g) + ) + ) + (local.set $$b + (i32.add + (local.get $$color) + (i32.const 2) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$b) + ) + ) + (local.set $$a + (i32.add + (local.get $$color) + (i32.const 3) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$a) + ) + ) + (local.set $$6 + (f32.load + (local.get $$center) + ) + ) + (local.set $$y + (i32.add + (local.get $$center) + (i32.const 4) + ) + ) + (local.set $$7 + (f32.load + (local.get $$y) + ) + ) + (local.set $$mul69 + (f32.mul + (local.get $$div20) + (f32.const 2) + ) + ) + (local.set $$angle$049 + (local.get $$conv21) + ) + (local.set $$i$050 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (call $_rlColor4ub + (local.get $$2) + (local.get $$3) + (local.get $$4) + (local.get $$5) + ) + (local.set $$8 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$9 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv31 + (f32.convert_i32_s + (local.get $$9) + ) + ) + (local.set $$div32 + (f32.div + (local.get $$8) + (local.get $$conv31) + ) + ) + (local.set $$10 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$11 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv33 + (f32.convert_i32_s + (local.get $$11) + ) + ) + (local.set $$div34 + (f32.div + (local.get $$10) + (local.get $$conv33) + ) + ) + (call $_rlTexCoord2f + (local.get $$div32) + (local.get $$div34) + ) + (call $_rlVertex2f + (local.get $$6) + (local.get $$7) + ) + (local.set $$12 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$13 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv35 + (f32.convert_i32_s + (local.get $$13) + ) + ) + (local.set $$div36 + (f32.div + (local.get $$12) + (local.get $$conv35) + ) + ) + (local.set $$14 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$15 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add + (f32.add + (local.get $$14) + (local.get $$15) + ) + ) + (local.set $$16 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv37 + (f32.convert_i32_s + (local.get $$16) + ) + ) + (local.set $$div38 + (f32.div + (local.get $$add) + (local.get $$conv37) + ) + ) + (call $_rlTexCoord2f + (local.get $$div36) + (local.get $$div38) + ) + (local.set $$mul40 + (f32.mul + (local.get $$angle$049) + (f32.const 0.01745329238474369) + ) + ) + (local.set $$17 + (call $_sinf + (local.get $$mul40) + ) + ) + (local.set $$mul41 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$17) + ) + ) + (local.set $$add42 + (f32.add + (local.get $$mul41) + (local.get $$6) + ) + ) + (local.set $$18 + (call $_cosf + (local.get $$mul40) + ) + ) + (local.set $$mul45 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$18) + ) + ) + (local.set $$add46 + (f32.add + (local.get $$mul45) + (local.get $$7) + ) + ) + (call $_rlVertex2f + (local.get $$add42) + (local.get $$add46) + ) + (local.set $$19 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$20 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add47 + (f32.add + (local.get $$19) + (local.get $$20) + ) + ) + (local.set $$21 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv48 + (f32.convert_i32_s + (local.get $$21) + ) + ) + (local.set $$div49 + (f32.div + (local.get $$add47) + (local.get $$conv48) + ) + ) + (local.set $$22 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$23 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add50 + (f32.add + (local.get $$22) + (local.get $$23) + ) + ) + (local.set $$24 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv51 + (f32.convert_i32_s + (local.get $$24) + ) + ) + (local.set $$div52 + (f32.div + (local.get $$add50) + (local.get $$conv51) + ) + ) + (call $_rlTexCoord2f + (local.get $$div49) + (local.get $$div52) + ) + (local.set $$add54 + (f32.add + (local.get $$div20) + (local.get $$angle$049) + ) + ) + (local.set $$mul55 + (f32.mul + (local.get $$add54) + (f32.const 0.01745329238474369) + ) + ) + (local.set $$25 + (call $_sinf + (local.get $$mul55) + ) + ) + (local.set $$mul56 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$25) + ) + ) + (local.set $$add57 + (f32.add + (local.get $$mul56) + (local.get $$6) + ) + ) + (local.set $$26 + (call $_cosf + (local.get $$mul55) + ) + ) + (local.set $$mul61 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$26) + ) + ) + (local.set $$add62 + (f32.add + (local.get $$mul61) + (local.get $$7) + ) + ) + (call $_rlVertex2f + (local.get $$add57) + (local.get $$add62) + ) + (local.set $$27 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$28 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add63 + (f32.add + (local.get $$27) + (local.get $$28) + ) + ) + (local.set $$29 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv64 + (f32.convert_i32_s + (local.get $$29) + ) + ) + (local.set $$div65 + (f32.div + (local.get $$add63) + (local.get $$conv64) + ) + ) + (local.set $$30 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$31 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv66 + (f32.convert_i32_s + (local.get $$31) + ) + ) + (local.set $$div67 + (f32.div + (local.get $$30) + (local.get $$conv66) + ) + ) + (call $_rlTexCoord2f + (local.get $$div65) + (local.get $$div67) + ) + (local.set $$add70 + (f32.add + (local.get $$mul69) + (local.get $$angle$049) + ) + ) + (local.set $$mul71 + (f32.mul + (local.get $$add70) + (f32.const 0.01745329238474369) + ) + ) + (local.set $$32 + (call $_sinf + (local.get $$mul71) + ) + ) + (local.set $$mul72 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$32) + ) + ) + (local.set $$add73 + (f32.add + (local.get $$mul72) + (local.get $$6) + ) + ) + (local.set $$33 + (call $_cosf + (local.get $$mul71) + ) + ) + (local.set $$mul78 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$33) + ) + ) + (local.set $$add79 + (f32.add + (local.get $$mul78) + (local.get $$7) + ) + ) + (call $_rlVertex2f + (local.get $$add73) + (local.get $$add79) + ) + (local.set $$inc + (i32.add + (local.get $$i$050) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$inc) + (local.get $$div28) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$angle$0$lcssa + (local.get $$add70) + ) + (br $while-out) + ) + (block + (local.set $$angle$049 + (local.get $$add70) + ) + (local.set $$i$050 + (local.get $$inc) + ) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $$angle$0$lcssa + (local.get $$conv21) + ) + ) + (local.set $$rem46 + (i32.and + (local.get $$segments$addr$0) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$rem46) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (call $_rlEnd) + (call $_rlDisableTexture) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (local.set $$34 + (i32.load8_s + (local.get $$color) + ) + ) + (local.set $$g84 + (i32.add + (local.get $$color) + (i32.const 1) + ) + ) + (local.set $$35 + (i32.load8_s + (local.get $$g84) + ) + ) + (local.set $$b85 + (i32.add + (local.get $$color) + (i32.const 2) + ) + ) + (local.set $$36 + (i32.load8_s + (local.get $$b85) + ) + ) + (local.set $$a86 + (i32.add + (local.get $$color) + (i32.const 3) + ) + ) + (local.set $$37 + (i32.load8_s + (local.get $$a86) + ) + ) + (call $_rlColor4ub + (local.get $$34) + (local.get $$35) + (local.get $$36) + (local.get $$37) + ) + (local.set $$38 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$39 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv87 + (f32.convert_i32_s + (local.get $$39) + ) + ) + (local.set $$div88 + (f32.div + (local.get $$38) + (local.get $$conv87) + ) + ) + (local.set $$40 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$41 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv89 + (f32.convert_i32_s + (local.get $$41) + ) + ) + (local.set $$div90 + (f32.div + (local.get $$40) + (local.get $$conv89) + ) + ) + (call $_rlTexCoord2f + (local.get $$div88) + (local.get $$div90) + ) + (local.set $$42 + (f32.load + (local.get $$center) + ) + ) + (local.set $$y92 + (i32.add + (local.get $$center) + (i32.const 4) + ) + ) + (local.set $$43 + (f32.load + (local.get $$y92) + ) + ) + (call $_rlVertex2f + (local.get $$42) + (local.get $$43) + ) + (local.set $$44 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$45 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv93 + (f32.convert_i32_s + (local.get $$45) + ) + ) + (local.set $$div94 + (f32.div + (local.get $$44) + (local.get $$conv93) + ) + ) + (local.set $$46 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$47 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add95 + (f32.add + (local.get $$46) + (local.get $$47) + ) + ) + (local.set $$48 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv96 + (f32.convert_i32_s + (local.get $$48) + ) + ) + (local.set $$div97 + (f32.div + (local.get $$add95) + (local.get $$conv96) + ) + ) + (call $_rlTexCoord2f + (local.get $$div94) + (local.get $$div97) + ) + (local.set $$mul99 + (f32.mul + (local.get $$angle$0$lcssa) + (f32.const 0.01745329238474369) + ) + ) + (local.set $$49 + (call $_sinf + (local.get $$mul99) + ) + ) + (local.set $$mul100 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$49) + ) + ) + (local.set $$add101 + (f32.add + (local.get $$mul100) + (local.get $$42) + ) + ) + (local.set $$50 + (call $_cosf + (local.get $$mul99) + ) + ) + (local.set $$mul104 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$50) + ) + ) + (local.set $$add105 + (f32.add + (local.get $$mul104) + (local.get $$43) + ) + ) + (call $_rlVertex2f + (local.get $$add101) + (local.get $$add105) + ) + (local.set $$51 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$52 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add106 + (f32.add + (local.get $$51) + (local.get $$52) + ) + ) + (local.set $$53 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv107 + (f32.convert_i32_s + (local.get $$53) + ) + ) + (local.set $$div108 + (f32.div + (local.get $$add106) + (local.get $$conv107) + ) + ) + (local.set $$54 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$55 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add109 + (f32.add + (local.get $$54) + (local.get $$55) + ) + ) + (local.set $$56 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv110 + (f32.convert_i32_s + (local.get $$56) + ) + ) + (local.set $$div111 + (f32.div + (local.get $$add109) + (local.get $$conv110) + ) + ) + (call $_rlTexCoord2f + (local.get $$div108) + (local.get $$div111) + ) + (local.set $$add113 + (f32.add + (local.get $$div20) + (local.get $$angle$0$lcssa) + ) + ) + (local.set $$mul114 + (f32.mul + (local.get $$add113) + (f32.const 0.01745329238474369) + ) + ) + (local.set $$57 + (call $_sinf + (local.get $$mul114) + ) + ) + (local.set $$mul115 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$57) + ) + ) + (local.set $$add116 + (f32.add + (local.get $$mul115) + (local.get $$42) + ) + ) + (local.set $$58 + (call $_cosf + (local.get $$mul114) + ) + ) + (local.set $$mul120 + (f32.mul + (local.get $$radius$addr$0) + (local.get $$58) + ) + ) + (local.set $$add121 + (f32.add + (local.get $$mul120) + (local.get $$43) + ) + ) + (call $_rlVertex2f + (local.get $$add116) + (local.get $$add121) + ) + (local.set $$59 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$60 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add122 + (f32.add + (local.get $$59) + (local.get $$60) + ) + ) + (local.set $$61 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv123 + (f32.convert_i32_s + (local.get $$61) + ) + ) + (local.set $$div124 + (f32.div + (local.get $$add122) + (local.get $$conv123) + ) + ) + (local.set $$62 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$63 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv125 + (f32.convert_i32_s + (local.get $$63) + ) + ) + (local.set $$div126 + (f32.div + (local.get $$62) + (local.get $$conv125) + ) + ) + (call $_rlTexCoord2f + (local.get $$div124) + (local.get $$div126) + ) + (call $_rlVertex2f + (local.get $$42) + (local.get $$43) + ) + (call $_rlEnd) + (call $_rlDisableTexture) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_GetShapesTexture (; 558 ;) (param $$agg$result i32) + (local $$0 i32) + (local $$1 i32) + (local $$add f32) + (local $$add4 f32) + (local $$cmp i32) + (local $$rec$sroa$0$0$$sroa_idx i32) + (local $$rec$sroa$0$0$copyload f32) + (local $$rec$sroa$4$0$$sroa_idx2 i32) + (local $$rec$sroa$4$0$copyload f32) + (local $$rec$sroa$5$0$$sroa_idx4 i32) + (local $$rec$sroa$5$0$copyload f32) + (local $$rec$sroa$6$0$$sroa_idx6 i32) + (local $$rec$sroa$6$0$copyload f32) + (local $$recs i32) + (local $$sub f32) + (local $$sub7 f32) + (local $$texture i32) + (local $$tmp i32) + (local $$tmp1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 80) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 80) + ) + ) + (local.set $$tmp + (i32.add + (local.get $sp_a) + (i32.const 36) + ) + ) + (local.set $$tmp1 + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (i32.const 29304) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (i64.store align=4 + (local.get $$agg$result) + (i64.load align=4 + (i32.const 29304) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29304) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + (i32.load + (i32.add + (i32.const 29304) + (i32.const 16) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + ) + (call $_GetFontDefault + (local.get $$tmp) + ) + (local.set $$texture + (i32.add + (local.get $$tmp) + (i32.const 8) + ) + ) + (i64.store align=4 + (i32.const 29304) + (i64.load align=4 + (local.get $$texture) + ) + ) + (i64.store align=4 + (i32.add + (i32.const 29304) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$texture) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (i32.const 29304) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $$texture) + (i32.const 16) + ) + ) + ) + (call $_GetFontDefault + (local.get $$tmp1) + ) + (local.set $$recs + (i32.add + (local.get $$tmp1) + (i32.const 28) + ) + ) + (local.set $$1 + (i32.load + (local.get $$recs) + ) + ) + (local.set $$rec$sroa$0$0$$sroa_idx + (i32.add + (local.get $$1) + (i32.const 1520) + ) + ) + (local.set $$rec$sroa$0$0$copyload + (f32.load + (local.get $$rec$sroa$0$0$$sroa_idx) + ) + ) + (local.set $$rec$sroa$4$0$$sroa_idx2 + (i32.add + (local.get $$1) + (i32.const 1524) + ) + ) + (local.set $$rec$sroa$4$0$copyload + (f32.load + (local.get $$rec$sroa$4$0$$sroa_idx2) + ) + ) + (local.set $$rec$sroa$5$0$$sroa_idx4 + (i32.add + (local.get $$1) + (i32.const 1528) + ) + ) + (local.set $$rec$sroa$5$0$copyload + (f32.load + (local.get $$rec$sroa$5$0$$sroa_idx4) + ) + ) + (local.set $$rec$sroa$6$0$$sroa_idx6 + (i32.add + (local.get $$1) + (i32.const 1532) + ) + ) + (local.set $$rec$sroa$6$0$copyload + (f32.load + (local.get $$rec$sroa$6$0$$sroa_idx6) + ) + ) + (local.set $$add + (f32.add + (local.get $$rec$sroa$0$0$copyload) + (f32.const 1) + ) + ) + (local.set $$add4 + (f32.add + (local.get $$rec$sroa$4$0$copyload) + (f32.const 1) + ) + ) + (local.set $$sub + (f32.add + (local.get $$rec$sroa$5$0$copyload) + (f32.const -2) + ) + ) + (local.set $$sub7 + (f32.add + (local.get $$rec$sroa$6$0$copyload) + (f32.const -2) + ) + ) + (f32.store + (i32.const 29900) + (local.get $$add) + ) + (f32.store + (i32.const 29904) + (local.get $$add4) + ) + (f32.store + (i32.const 29908) + (local.get $$sub) + ) + (f32.store + (i32.const 29912) + (local.get $$sub7) + ) + (i64.store align=4 + (local.get $$agg$result) + (i64.load align=4 + (i32.const 29304) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$agg$result) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29304) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $$agg$result) + (i32.const 16) + ) + (i32.load + (i32.add + (i32.const 29304) + (i32.const 16) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_Fade (; 559 ;) (param $$agg$result i32) (param $$color i32) (param $$alpha f32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$a i32) + (local $$alpha$addr$0 f32) + (local $$b i32) + (local $$b6 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$conv i32) + (local $$g i32) + (local $$g5 i32) + (local $$mul f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (f32.lt + (local.get $$alpha) + (f32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$alpha$addr$0 + (f32.const 0) + ) + (block + (local.set $$cmp1 + (f32.gt + (local.get $$alpha) + (f32.const 1) + ) + ) + (if + (local.get $$cmp1) + (local.set $$alpha$addr$0 + (f32.const 1) + ) + (local.set $$alpha$addr$0 + (local.get $$alpha) + ) + ) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$color) + ) + ) + (i32.store8 + (local.get $$agg$result) + (local.get $$0) + ) + (local.set $$g + (i32.add + (local.get $$agg$result) + (i32.const 1) + ) + ) + (local.set $$g5 + (i32.add + (local.get $$color) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$g5) + ) + ) + (i32.store8 + (local.get $$g) + (local.get $$1) + ) + (local.set $$b + (i32.add + (local.get $$agg$result) + (i32.const 2) + ) + ) + (local.set $$b6 + (i32.add + (local.get $$color) + (i32.const 2) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$b6) + ) + ) + (i32.store8 + (local.get $$b) + (local.get $$2) + ) + (local.set $$a + (i32.add + (local.get $$agg$result) + (i32.const 3) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$alpha$addr$0) + (f32.const 255) + ) + ) + (local.set $$conv + (i32.and + (i32.trunc_f32_s + (local.get $$mul) + ) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$a) + (local.get $$conv) + ) + (return) + ) + (func $_IsFileDropped (; 560 ;) (result i32) + (local $$0 i32) + (local $$cmp i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 29280) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const 0) + ) + ) + (return + (local.get $$cmp) + ) + ) + (func $_DrawRectangle (; 561 ;) (param $$posX i32) (param $$posY i32) (param $$width i32) (param $$height i32) (param $$color i32) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$$compoundliteral2 i32) + (local $$$compoundliteral2$byval_copy i32) + (local $$color$byval_copy i32) + (local $$conv f32) + (local $$conv1 f32) + (local $$conv4 f32) + (local $$conv6 f32) + (local $$y i32) + (local $$y5 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $$color$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$$compoundliteral2$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$$compoundliteral + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral2 + (local.get $sp_a) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$posX) + ) + ) + (f32.store + (local.get $$$compoundliteral) + (local.get $$conv) + ) + (local.set $$y + (i32.add + (local.get $$$compoundliteral) + (i32.const 4) + ) + ) + (local.set $$conv1 + (f32.convert_i32_s + (local.get $$posY) + ) + ) + (f32.store + (local.get $$y) + (local.get $$conv1) + ) + (local.set $$conv4 + (f32.convert_i32_s + (local.get $$width) + ) + ) + (f32.store + (local.get $$$compoundliteral2) + (local.get $$conv4) + ) + (local.set $$y5 + (i32.add + (local.get $$$compoundliteral2) + (i32.const 4) + ) + ) + (local.set $$conv6 + (f32.convert_i32_s + (local.get $$height) + ) + ) + (f32.store + (local.get $$y5) + (local.get $$conv6) + ) + (i64.store align=4 + (local.get $$$compoundliteral$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral) + ) + ) + (i64.store align=4 + (local.get $$$compoundliteral2$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral2) + ) + ) + (i32.store align=1 + (local.get $$color$byval_copy) + (i32.load align=1 + (local.get $$color) + ) + ) + (call $_DrawRectangleV + (local.get $$$compoundliteral$byval_copy) + (local.get $$$compoundliteral2$byval_copy) + (local.get $$color$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_DrawRectangleV (; 562 ;) (param $$position i32) (param $$size i32) (param $$color i32) + (local $$$compoundliteral i32) + (local $$$compoundliteral$byval_copy i32) + (local $$$compoundliteral5 i32) + (local $$$compoundliteral5$byval_copy i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$color$byval_copy i32) + (local $$height i32) + (local $$width i32) + (local $$y i32) + (local $$y2 i32) + (local $$y4 i32) + (local $$y7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$color$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$$compoundliteral5$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$$compoundliteral$byval_copy + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$$compoundliteral + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$$compoundliteral5 + (local.get $sp_a) + ) + (local.set $$0 + (i32.load + (local.get $$position) + ) + ) + (i32.store + (local.get $$$compoundliteral) + (local.get $$0) + ) + (local.set $$y + (i32.add + (local.get $$$compoundliteral) + (i32.const 4) + ) + ) + (local.set $$y2 + (i32.add + (local.get $$position) + (i32.const 4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$y2) + ) + ) + (i32.store + (local.get $$y) + (local.get $$1) + ) + (local.set $$width + (i32.add + (local.get $$$compoundliteral) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$size) + ) + ) + (i32.store + (local.get $$width) + (local.get $$2) + ) + (local.set $$height + (i32.add + (local.get $$$compoundliteral) + (i32.const 12) + ) + ) + (local.set $$y4 + (i32.add + (local.get $$size) + (i32.const 4) + ) + ) + (local.set $$3 + (i32.load + (local.get $$y4) + ) + ) + (i32.store + (local.get $$height) + (local.get $$3) + ) + (f32.store + (local.get $$$compoundliteral5) + (f32.const 0) + ) + (local.set $$y7 + (i32.add + (local.get $$$compoundliteral5) + (i32.const 4) + ) + ) + (f32.store + (local.get $$y7) + (f32.const 0) + ) + (i64.store align=4 + (local.get $$$compoundliteral$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$$compoundliteral$byval_copy) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (local.get $$$compoundliteral) + (i32.const 8) + ) + ) + ) + (i64.store align=4 + (local.get $$$compoundliteral5$byval_copy) + (i64.load align=4 + (local.get $$$compoundliteral5) + ) + ) + (i32.store align=1 + (local.get $$color$byval_copy) + (i32.load align=1 + (local.get $$color) + ) + ) + (call $_DrawRectanglePro + (local.get $$$compoundliteral$byval_copy) + (local.get $$$compoundliteral5$byval_copy) + (f32.const 0) + (local.get $$color$byval_copy) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_DrawRectanglePro (; 563 ;) (param $$rec i32) (param $$origin i32) (param $$rotation f32) (param $$color i32) + (local $$0 i32) + (local $$1 f32) + (local $$10 i32) + (local $$11 f32) + (local $$12 i32) + (local $$13 f32) + (local $$14 i32) + (local $$15 f32) + (local $$16 f32) + (local $$17 i32) + (local $$18 f32) + (local $$19 f32) + (local $$2 f32) + (local $$20 f32) + (local $$21 i32) + (local $$22 f32) + (local $$23 f32) + (local $$24 i32) + (local $$25 f32) + (local $$26 f32) + (local $$27 f32) + (local $$28 i32) + (local $$29 f32) + (local $$3 f32) + (local $$30 i32) + (local $$4 f32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 f32) + (local $$a i32) + (local $$add f32) + (local $$add10 f32) + (local $$add13 f32) + (local $$add17 f32) + (local $$b i32) + (local $$conv f32) + (local $$conv11 f32) + (local $$conv14 f32) + (local $$conv18 f32) + (local $$conv20 f32) + (local $$conv4 f32) + (local $$conv6 f32) + (local $$conv8 f32) + (local $$div f32) + (local $$div12 f32) + (local $$div15 f32) + (local $$div19 f32) + (local $$div21 f32) + (local $$div5 f32) + (local $$div7 f32) + (local $$div9 f32) + (local $$g i32) + (local $$height i32) + (local $$sub f32) + (local $$sub3 f32) + (local $$tmp i32) + (local $$width i32) + (local $$y i32) + (local $$y2 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$tmp + (local.get $sp_a) + ) + (call $_GetShapesTexture + (local.get $$tmp) + ) + (local.set $$0 + (i32.load + (local.get $$tmp) + ) + ) + (call $_rlEnableTexture + (local.get $$0) + ) + (call $_rlPushMatrix) + (local.set $$1 + (f32.load + (local.get $$rec) + ) + ) + (local.set $$y + (i32.add + (local.get $$rec) + (i32.const 4) + ) + ) + (local.set $$2 + (f32.load + (local.get $$y) + ) + ) + (call $_rlTranslatef + (local.get $$1) + (local.get $$2) + (f32.const 0) + ) + (call $_rlRotatef + (local.get $$rotation) + (f32.const 0) + (f32.const 0) + (f32.const 1) + ) + (local.set $$3 + (f32.load + (local.get $$origin) + ) + ) + (local.set $$sub + (f32.neg + (local.get $$3) + ) + ) + (local.set $$y2 + (i32.add + (local.get $$origin) + (i32.const 4) + ) + ) + (local.set $$4 + (f32.load + (local.get $$y2) + ) + ) + (local.set $$sub3 + (f32.neg + (local.get $$4) + ) + ) + (call $_rlTranslatef + (local.get $$sub) + (local.get $$sub3) + (f32.const 0) + ) + (call $_rlBegin + (i32.const 7) + ) + (local.set $$5 + (i32.load8_s + (local.get $$color) + ) + ) + (local.set $$g + (i32.add + (local.get $$color) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$g) + ) + ) + (local.set $$b + (i32.add + (local.get $$color) + (i32.const 2) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$b) + ) + ) + (local.set $$a + (i32.add + (local.get $$color) + (i32.const 3) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$a) + ) + ) + (call $_rlColor4ub + (local.get $$5) + (local.get $$6) + (local.get $$7) + (local.get $$8) + ) + (local.set $$9 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$10 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv + (f32.convert_i32_s + (local.get $$10) + ) + ) + (local.set $$div + (f32.div + (local.get $$9) + (local.get $$conv) + ) + ) + (local.set $$11 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$12 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv4 + (f32.convert_i32_s + (local.get $$12) + ) + ) + (local.set $$div5 + (f32.div + (local.get $$11) + (local.get $$conv4) + ) + ) + (call $_rlTexCoord2f + (local.get $$div) + (local.get $$div5) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (local.set $$13 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$14 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv6 + (f32.convert_i32_s + (local.get $$14) + ) + ) + (local.set $$div7 + (f32.div + (local.get $$13) + (local.get $$conv6) + ) + ) + (local.set $$15 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$16 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add + (f32.add + (local.get $$15) + (local.get $$16) + ) + ) + (local.set $$17 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv8 + (f32.convert_i32_s + (local.get $$17) + ) + ) + (local.set $$div9 + (f32.div + (local.get $$add) + (local.get $$conv8) + ) + ) + (call $_rlTexCoord2f + (local.get $$div7) + (local.get $$div9) + ) + (local.set $$height + (i32.add + (local.get $$rec) + (i32.const 12) + ) + ) + (local.set $$18 + (f32.load + (local.get $$height) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.get $$18) + ) + (local.set $$19 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$20 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add10 + (f32.add + (local.get $$19) + (local.get $$20) + ) + ) + (local.set $$21 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv11 + (f32.convert_i32_s + (local.get $$21) + ) + ) + (local.set $$div12 + (f32.div + (local.get $$add10) + (local.get $$conv11) + ) + ) + (local.set $$22 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$23 + (f32.load + (i32.const 29912) + ) + ) + (local.set $$add13 + (f32.add + (local.get $$22) + (local.get $$23) + ) + ) + (local.set $$24 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv14 + (f32.convert_i32_s + (local.get $$24) + ) + ) + (local.set $$div15 + (f32.div + (local.get $$add13) + (local.get $$conv14) + ) + ) + (call $_rlTexCoord2f + (local.get $$div12) + (local.get $$div15) + ) + (local.set $$width + (i32.add + (local.get $$rec) + (i32.const 8) + ) + ) + (local.set $$25 + (f32.load + (local.get $$width) + ) + ) + (call $_rlVertex2f + (local.get $$25) + (local.get $$18) + ) + (local.set $$26 + (f32.load + (i32.const 29900) + ) + ) + (local.set $$27 + (f32.load + (i32.const 29908) + ) + ) + (local.set $$add17 + (f32.add + (local.get $$26) + (local.get $$27) + ) + ) + (local.set $$28 + (i32.load + (i32.const 29308) + ) + ) + (local.set $$conv18 + (f32.convert_i32_s + (local.get $$28) + ) + ) + (local.set $$div19 + (f32.div + (local.get $$add17) + (local.get $$conv18) + ) + ) + (local.set $$29 + (f32.load + (i32.const 29904) + ) + ) + (local.set $$30 + (i32.load + (i32.const 29312) + ) + ) + (local.set $$conv20 + (f32.convert_i32_s + (local.get $$30) + ) + ) + (local.set $$div21 + (f32.div + (local.get $$29) + (local.get $$conv20) + ) + ) + (call $_rlTexCoord2f + (local.get $$div19) + (local.get $$div21) + ) + (call $_rlVertex2f + (local.get $$25) + (f32.const 0) + ) + (call $_rlEnd) + (call $_rlPopMatrix) + (call $_rlDisableTexture) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $___stdio_close (; 564 ;) (param $$f i32) (result i32) + (local $$0 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call2 i32) + (local $$fd i32) + (local $$vararg_buffer i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$fd + (i32.add + (local.get $$f) + (i32.const 60) + ) + ) + (local.set $$0 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$call + (call $_dummy_731 + (local.get $$0) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$call) + ) + (local.set $$call1 + (call $___syscall6 + (i32.const 6) + (local.get $$vararg_buffer) + ) + ) + (local.set $$call2 + (call $___syscall_ret + (local.get $$call1) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$call2) + ) + ) + (func $___stdio_write (; 565 ;) (param $$f i32) (param $$buf i32) (param $$len i32) (result i32) + (local $$$pr i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr33 i32) + (local $$buf8 i32) + (local $$buf_size i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp13 i32) + (local $$cmp18 i32) + (local $$cmp25 i32) + (local $$cnt$0 i32) + (local $$dec i32) + (local $$fd i32) + (local $$incdec$ptr i32) + (local $$iov$0 i32) + (local $$iov$1 i32) + (local $$iov_base2 i32) + (local $$iov_len i32) + (local $$iov_len20 i32) + (local $$iov_len24 i32) + (local $$iov_len3 i32) + (local $$iov_len37 i32) + (local $$iovcnt$0 i32) + (local $$iovcnt$1 i32) + (local $$iovs i32) + (local $$num i32) + (local $$or i32) + (local $$rem$0 i32) + (local $$retval$1$ph i32) + (local $$sub i32) + (local $$sub$ptr$sub i32) + (local $$sub22 i32) + (local $$sub29 i32) + (local $$sub38 i32) + (local $$tobool i32) + (local $$wbase i32) + (local $$wend i32) + (local $$wend15 i32) + (local $$wpos i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$iovs + (local.get $sp_a) + ) + (local.set $$num + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$wbase + (i32.add + (local.get $$f) + (i32.const 28) + ) + ) + (local.set $$0 + (i32.load + (local.get $$wbase) + ) + ) + (i32.store + (local.get $$iovs) + (local.get $$0) + ) + (local.set $$iov_len + (i32.add + (local.get $$iovs) + (i32.const 4) + ) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$1) + (local.get $$0) + ) + ) + (i32.store + (local.get $$iov_len) + (local.get $$sub$ptr$sub) + ) + (local.set $$iov_base2 + (i32.add + (local.get $$iovs) + (i32.const 8) + ) + ) + (i32.store + (local.get $$iov_base2) + (local.get $$buf) + ) + (local.set $$iov_len3 + (i32.add + (local.get $$iovs) + (i32.const 12) + ) + ) + (i32.store + (local.get $$iov_len3) + (local.get $$len) + ) + (local.set $$add + (i32.add + (local.get $$sub$ptr$sub) + (local.get $$len) + ) + ) + (local.set $$fd + (i32.add + (local.get $$f) + (i32.const 60) + ) + ) + (local.set $$iov$0 + (local.get $$iovs) + ) + (local.set $$iovcnt$0 + (i32.const 2) + ) + (local.set $$rem$0 + (local.get $$add) + ) + (loop $while-in + (block $while-out + (local.set $$2 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$call + (call $___wasi_fd_write + (local.get $$2) + (local.get $$iov$0) + (local.get $$iovcnt$0) + (local.get $$num) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$call) + (i32.const 16) + ) + (i32.const 16) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$$pr + (i32.load + (local.get $$num) + ) + ) + (local.set $$3 + (local.get $$$pr) + ) + ) + (block + (i32.store + (local.get $$num) + (i32.const -1) + ) + (local.set $$3 + (i32.const -1) + ) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$rem$0) + (local.get $$3) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $label + (i32.const 6) + ) + (br $while-out) + ) + ) + (local.set $$cmp13 + (i32.lt_s + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp13) + (block + (local.set $label + (i32.const 8) + ) + (br $while-out) + ) + ) + (local.set $$sub22 + (i32.sub + (local.get $$rem$0) + (local.get $$3) + ) + ) + (local.set $$iov_len24 + (i32.add + (local.get $$iov$0) + (i32.const 4) + ) + ) + (local.set $$9 + (i32.load + (local.get $$iov_len24) + ) + ) + (local.set $$cmp25 + (i32.gt_u + (local.get $$3) + (local.get $$9) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$iov$0) + (i32.const 8) + ) + ) + (local.set $$iov$1 + (if (result i32) + (local.get $$cmp25) + (local.get $$incdec$ptr) + (local.get $$iov$0) + ) + ) + (local.set $$dec + (i32.shr_s + (i32.shl + (local.get $$cmp25) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (local.set $$iovcnt$1 + (i32.add + (local.get $$iovcnt$0) + (local.get $$dec) + ) + ) + (local.set $$sub29 + (if (result i32) + (local.get $$cmp25) + (local.get $$9) + (i32.const 0) + ) + ) + (local.set $$cnt$0 + (i32.sub + (local.get $$3) + (local.get $$sub29) + ) + ) + (local.set $$10 + (i32.load + (local.get $$iov$1) + ) + ) + (local.set $$add$ptr33 + (i32.add + (local.get $$10) + (local.get $$cnt$0) + ) + ) + (i32.store + (local.get $$iov$1) + (local.get $$add$ptr33) + ) + (local.set $$iov_len37 + (i32.add + (local.get $$iov$1) + (i32.const 4) + ) + ) + (local.set $$11 + (i32.load + (local.get $$iov_len37) + ) + ) + (local.set $$sub38 + (i32.sub + (local.get $$11) + (local.get $$cnt$0) + ) + ) + (i32.store + (local.get $$iov_len37) + (local.get $$sub38) + ) + (local.set $$iov$0 + (local.get $$iov$1) + ) + (local.set $$iovcnt$0 + (local.get $$iovcnt$1) + ) + (local.set $$rem$0 + (local.get $$sub22) + ) + (br $while-in) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (block + (local.set $$buf8 + (i32.add + (local.get $$f) + (i32.const 44) + ) + ) + (local.set $$4 + (i32.load + (local.get $$buf8) + ) + ) + (local.set $$buf_size + (i32.add + (local.get $$f) + (i32.const 48) + ) + ) + (local.set $$5 + (i32.load + (local.get $$buf_size) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$4) + (local.get $$5) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend) + (local.get $$add$ptr) + ) + (local.set $$6 + (local.get $$4) + ) + (i32.store + (local.get $$wbase) + (local.get $$6) + ) + (i32.store + (local.get $$wpos) + (local.get $$6) + ) + (local.set $$retval$1$ph + (local.get $$len) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 8) + ) + (block + (local.set $$wend15 + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend15) + (i32.const 0) + ) + (i32.store + (local.get $$wbase) + (i32.const 0) + ) + (i32.store + (local.get $$wpos) + (i32.const 0) + ) + (local.set $$7 + (i32.load + (local.get $$f) + ) + ) + (local.set $$or + (i32.or + (local.get $$7) + (i32.const 32) + ) + ) + (i32.store + (local.get $$f) + (local.get $$or) + ) + (local.set $$cmp18 + (i32.eq + (local.get $$iovcnt$0) + (i32.const 2) + ) + ) + (if + (local.get $$cmp18) + (local.set $$retval$1$ph + (i32.const 0) + ) + (block + (local.set $$iov_len20 + (i32.add + (local.get $$iov$0) + (i32.const 4) + ) + ) + (local.set $$8 + (i32.load + (local.get $$iov_len20) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$len) + (local.get $$8) + ) + ) + (local.set $$retval$1$ph + (local.get $$sub) + ) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$1$ph) + ) + ) + (func $___stdio_seek (; 566 ;) (param $$f i32) (param $$off i64) (param $$whence i32) (result i64) + (local $$$pre i64) + (local $$0 i32) + (local $$1 i64) + (local $$2 i32) + (local $$3 i64) + (local $$call i32) + (local $$call2 i32) + (local $$cmp i32) + (local $$conv i32) + (local $$conv1 i32) + (local $$fd i32) + (local $$ret i32) + (local $$vararg_buffer i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr3 i32) + (local $$vararg_ptr4 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$vararg_buffer + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$ret + (local.get $sp_a) + ) + (local.set $$fd + (i32.add + (local.get $$f) + (i32.const 60) + ) + ) + (local.set $$0 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$1 + (i64.shr_u + (local.get $$off) + (i64.const 32) + ) + ) + (local.set $$conv + (i32.wrap_i64 + (local.get $$1) + ) + ) + (local.set $$conv1 + (i32.wrap_i64 + (local.get $$off) + ) + ) + (local.set $$2 + (local.get $$ret) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$0) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$conv) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (local.get $$conv1) + ) + (local.set $$vararg_ptr3 + (i32.add + (local.get $$vararg_buffer) + (i32.const 12) + ) + ) + (i32.store + (local.get $$vararg_ptr3) + (local.get $$2) + ) + (local.set $$vararg_ptr4 + (i32.add + (local.get $$vararg_buffer) + (i32.const 16) + ) + ) + (i32.store + (local.get $$vararg_ptr4) + (local.get $$whence) + ) + (local.set $$call + (call $___syscall140 + (i32.const 140) + (local.get $$vararg_buffer) + ) + ) + (local.set $$call2 + (call $___syscall_ret + (local.get $$call) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$call2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (i64.store + (local.get $$ret) + (i64.const -1) + ) + (local.set $$3 + (i64.const -1) + ) + ) + (block + (local.set $$$pre + (i64.load + (local.get $$ret) + ) + ) + (local.set $$3 + (local.get $$$pre) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$3) + ) + ) + (func $___syscall_ret (; 567 ;) (param $$r i32) (result i32) + (local $$call i32) + (local $$cmp i32) + (local $$retval$0 i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$r) + (i32.const -4096) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$sub + (i32.sub + (i32.const 0) + (local.get $$r) + ) + ) + (local.set $$call + (call $___errno_location) + ) + (i32.store + (local.get $$call) + (local.get $$sub) + ) + (local.set $$retval$0 + (i32.const -1) + ) + ) + (local.set $$retval$0 + (local.get $$r) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___errno_location (; 568 ;) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (i32.const 29388) + ) + ) + (func $_dummy_731 (; 569 ;) (param $$fd i32) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (local.get $$fd) + ) + ) + (func $___stdio_read (; 570 ;) (param $$f i32) (param $$buf i32) (param $$len i32) (result i32) + (local $$$cast i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$add$ptr i32) + (local $$and i32) + (local $$arrayidx21 i32) + (local $$arrayinit$element i32) + (local $$buf3 i32) + (local $$buf_size i32) + (local $$call i32) + (local $$call6 i32) + (local $$cmp i32) + (local $$cmp8 i32) + (local $$fd i32) + (local $$incdec$ptr i32) + (local $$iov i32) + (local $$iov_len i32) + (local $$iov_len4 i32) + (local $$lnot$ext i32) + (local $$or i32) + (local $$rend i32) + (local $$retval$0 i32) + (local $$rpos i32) + (local $$sub i32) + (local $$sub13 i32) + (local $$sub20 i32) + (local $$tobool i32) + (local $$tobool17 i32) + (local $$vararg_buffer i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr2 i32) + (local $$xor i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$vararg_buffer + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$iov + (local.get $sp_a) + ) + (i32.store + (local.get $$iov) + (local.get $$buf) + ) + (local.set $$iov_len + (i32.add + (local.get $$iov) + (i32.const 4) + ) + ) + (local.set $$buf_size + (i32.add + (local.get $$f) + (i32.const 48) + ) + ) + (local.set $$0 + (i32.load + (local.get $$buf_size) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$lnot$ext + (i32.and + (local.get $$tobool) + (i32.const 1) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$len) + (local.get $$lnot$ext) + ) + ) + (i32.store + (local.get $$iov_len) + (local.get $$sub) + ) + (local.set $$arrayinit$element + (i32.add + (local.get $$iov) + (i32.const 8) + ) + ) + (local.set $$buf3 + (i32.add + (local.get $$f) + (i32.const 44) + ) + ) + (local.set $$1 + (i32.load + (local.get $$buf3) + ) + ) + (i32.store + (local.get $$arrayinit$element) + (local.get $$1) + ) + (local.set $$iov_len4 + (i32.add + (local.get $$iov) + (i32.const 12) + ) + ) + (i32.store + (local.get $$iov_len4) + (local.get $$0) + ) + (local.set $$fd + (i32.add + (local.get $$f) + (i32.const 60) + ) + ) + (local.set $$2 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$3 + (local.get $$iov) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$2) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$3) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (i32.const 2) + ) + (local.set $$call + (call $___syscall145 + (i32.const 145) + (local.get $$vararg_buffer) + ) + ) + (local.set $$call6 + (call $___syscall_ret + (local.get $$call) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$call6) + (i32.const 1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$and + (i32.and + (local.get $$call6) + (i32.const 48) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$and) + (i32.const 16) + ) + ) + (local.set $$4 + (i32.load + (local.get $$f) + ) + ) + (local.set $$or + (i32.or + (local.get $$4) + (local.get $$xor) + ) + ) + (i32.store + (local.get $$f) + (local.get $$or) + ) + (local.set $$retval$0 + (local.get $$call6) + ) + ) + (block + (local.set $$5 + (i32.load + (local.get $$iov_len) + ) + ) + (local.set $$cmp8 + (i32.gt_u + (local.get $$call6) + (local.get $$5) + ) + ) + (if + (local.get $$cmp8) + (block + (local.set $$sub13 + (i32.sub + (local.get $$call6) + (local.get $$5) + ) + ) + (local.set $$6 + (i32.load + (local.get $$buf3) + ) + ) + (local.set $$rpos + (i32.add + (local.get $$f) + (i32.const 4) + ) + ) + (i32.store + (local.get $$rpos) + (local.get $$6) + ) + (local.set $$$cast + (local.get $$6) + ) + (local.set $$add$ptr + (i32.add + (local.get $$$cast) + (local.get $$sub13) + ) + ) + (local.set $$rend + (i32.add + (local.get $$f) + (i32.const 8) + ) + ) + (i32.store + (local.get $$rend) + (local.get $$add$ptr) + ) + (local.set $$7 + (i32.load + (local.get $$buf_size) + ) + ) + (local.set $$tobool17 + (i32.eq + (local.get $$7) + (i32.const 0) + ) + ) + (if + (local.get $$tobool17) + (local.set $$retval$0 + (local.get $$len) + ) + (block + (local.set $$incdec$ptr + (i32.add + (local.get $$$cast) + (i32.const 1) + ) + ) + (i32.store + (local.get $$rpos) + (local.get $$incdec$ptr) + ) + (local.set $$8 + (i32.load8_s + (local.get $$$cast) + ) + ) + (local.set $$sub20 + (i32.add + (local.get $$len) + (i32.const -1) + ) + ) + (local.set $$arrayidx21 + (i32.add + (local.get $$buf) + (local.get $$sub20) + ) + ) + (i32.store8 + (local.get $$arrayidx21) + (local.get $$8) + ) + (local.set $$retval$0 + (local.get $$len) + ) + ) + ) + ) + (local.set $$retval$0 + (local.get $$call6) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___emscripten_stdout_close (; 571 ;) (param $$f i32) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (i32.const 0) + ) + ) + (func $___emscripten_stdout_seek (; 572 ;) (param $$f i32) (param $$off i64) (param $$whence i32) (result i64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (i64.const 0) + ) + ) + (func $_strcmp (; 573 ;) (param $$l i32) (param $$r i32) (result i32) + (local $$$lcssa i32) + (local $$$lcssa6 i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$cmp i32) + (local $$cmp7 i32) + (local $$conv5 i32) + (local $$conv6 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr4 i32) + (local $$l$addr$010 i32) + (local $$or$cond i32) + (local $$or$cond9 i32) + (local $$r$addr$011 i32) + (local $$sub i32) + (local $$tobool i32) + (local $$tobool8 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$l) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$r) + ) + ) + (local.set $$cmp7 + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$tobool8 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$or$cond9 + (i32.or + (local.get $$tobool8) + (local.get $$cmp7) + ) + ) + (if + (local.get $$or$cond9) + (block + (local.set $$$lcssa + (local.get $$1) + ) + (local.set $$$lcssa6 + (local.get $$0) + ) + ) + (block + (local.set $$l$addr$010 + (local.get $$l) + ) + (local.set $$r$addr$011 + (local.get $$r) + ) + (loop $while-in + (block $while-out + (local.set $$incdec$ptr + (i32.add + (local.get $$l$addr$010) + (i32.const 1) + ) + ) + (local.set $$incdec$ptr4 + (i32.add + (local.get $$r$addr$011) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$incdec$ptr4) + ) + ) + (local.set $$cmp + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$tobool) + (local.get $$cmp) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$$lcssa + (local.get $$3) + ) + (local.set $$$lcssa6 + (local.get $$2) + ) + (br $while-out) + ) + (block + (local.set $$l$addr$010 + (local.get $$incdec$ptr) + ) + (local.set $$r$addr$011 + (local.get $$incdec$ptr4) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$$lcssa6) + (i32.const 255) + ) + ) + (local.set $$conv6 + (i32.and + (local.get $$$lcssa) + (i32.const 255) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$conv5) + (local.get $$conv6) + ) + ) + (return + (local.get $$sub) + ) + ) + (func $_memcmp (; 574 ;) (param $$vl i32) (param $$vr i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$cmp i32) + (local $$cond i32) + (local $$conv5 i32) + (local $$conv6 i32) + (local $$dec i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr3 i32) + (local $$l$012 i32) + (local $$n$addr$011 i32) + (local $$r$013 i32) + (local $$sub i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$n) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool10) + (local.set $$cond + (i32.const 0) + ) + (block + (local.set $$l$012 + (local.get $$vl) + ) + (local.set $$n$addr$011 + (local.get $$n) + ) + (local.set $$r$013 + (local.get $$vr) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (i32.load8_s + (local.get $$l$012) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$r$013) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (br $while-out) + ) + (local.set $$dec + (i32.add + (local.get $$n$addr$011) + (i32.const -1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$l$012) + (i32.const 1) + ) + ) + (local.set $$incdec$ptr3 + (i32.add + (local.get $$r$013) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$dec) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$cond + (i32.const 0) + ) + (br $label$break$L1) + ) + (block + (local.set $$l$012 + (local.get $$incdec$ptr) + ) + (local.set $$n$addr$011 + (local.get $$dec) + ) + (local.set $$r$013 + (local.get $$incdec$ptr3) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$conv6 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$conv5) + (local.get $$conv6) + ) + ) + (local.set $$cond + (local.get $$sub) + ) + ) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $_isdigit (; 575 ;) (param $$c i32) (result i32) + (local $$cmp i32) + (local $$conv i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$sub + (i32.add + (local.get $$c) + (i32.const -48) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$sub) + (i32.const 10) + ) + ) + (local.set $$conv + (i32.and + (local.get $$cmp) + (i32.const 1) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $_vsprintf (; 576 ;) (param $$s i32) (param $$fmt i32) (param $$ap i32) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_vsnprintf + (local.get $$s) + (i32.const 2147483647) + (local.get $$fmt) + (local.get $$ap) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_vsnprintf (; 577 ;) (param $$s i32) (param $$n i32) (param $$fmt i32) (param $$ap i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$add$ptr i32) + (local $$arrayidx i32) + (local $$b i32) + (local $$buf i32) + (local $$buf_size i32) + (local $$call i32) + (local $$call10 i32) + (local $$cmp i32) + (local $$cmp16 i32) + (local $$cmp4 i32) + (local $$f i32) + (local $$n$addr$0 i32) + (local $$retval$0 i32) + (local $$s$addr$0 i32) + (local $$spec$select i32) + (local $$sub i32) + (local $$sub$ptr$rhs$cast i32) + (local $$sub17 i32) + (local $$sub3 i32) + (local $$tobool i32) + (local $$tobool11 i32) + (local $$wbase i32) + (local $$wend i32) + (local $$wpos i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 160) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 160) + ) + ) + (local.set $$b + (i32.add + (local.get $sp_a) + (i32.const 144) + ) + ) + (local.set $$f + (local.get $sp_a) + ) + (drop + (call $_memcpy + (local.get $$f) + (i32.const 7856) + (i32.const 144) + ) + ) + (local.set $$sub + (i32.add + (local.get $$n) + (i32.const -1) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$sub) + (i32.const 2147483646) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$tobool + (i32.eq + (local.get $$n) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$n$addr$0 + (i32.const 1) + ) + (local.set $$s$addr$0 + (local.get $$b) + ) + (local.set $label + (i32.const 4) + ) + ) + (block + (local.set $$call + (call $___errno_location) + ) + (i32.store + (local.get $$call) + (i32.const 75) + ) + (local.set $$retval$0 + (i32.const -1) + ) + ) + ) + ) + (block + (local.set $$n$addr$0 + (local.get $$n) + ) + (local.set $$s$addr$0 + (local.get $$s) + ) + (local.set $label + (i32.const 4) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 4) + ) + (block + (local.set $$sub$ptr$rhs$cast + (local.get $$s$addr$0) + ) + (local.set $$sub3 + (i32.sub + (i32.const -2) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (local.set $$cmp4 + (i32.gt_u + (local.get $$n$addr$0) + (local.get $$sub3) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp4) + (local.get $$sub3) + (local.get $$n$addr$0) + ) + ) + (local.set $$buf_size + (i32.add + (local.get $$f) + (i32.const 48) + ) + ) + (i32.store + (local.get $$buf_size) + (local.get $$spec$select) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$s$addr$0) + ) + (local.set $$buf + (i32.add + (local.get $$f) + (i32.const 44) + ) + ) + (i32.store + (local.get $$buf) + (local.get $$s$addr$0) + ) + (local.set $$add$ptr + (i32.add + (local.get $$s$addr$0) + (local.get $$spec$select) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend) + (local.get $$add$ptr) + ) + (local.set $$wbase + (i32.add + (local.get $$f) + (i32.const 28) + ) + ) + (i32.store + (local.get $$wbase) + (local.get $$add$ptr) + ) + (local.set $$call10 + (call $_vfprintf + (local.get $$f) + (local.get $$fmt) + (local.get $$ap) + ) + ) + (local.set $$tobool11 + (i32.eq + (local.get $$spec$select) + (i32.const 0) + ) + ) + (if + (local.get $$tobool11) + (local.set $$retval$0 + (local.get $$call10) + ) + (block + (local.set $$0 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$1 + (i32.load + (local.get $$wend) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$sub17 + (i32.shr_s + (i32.shl + (local.get $$cmp16) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$0) + (local.get $$sub17) + ) + ) + (i32.store8 + (local.get $$arrayidx) + (i32.const 0) + ) + (local.set $$retval$0 + (local.get $$call10) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_vfprintf (; 578 ;) (param $$f i32) (param $$fmt i32) (param $$ap i32) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $___vfprintf_internal + (local.get $$f) + (local.get $$fmt) + (local.get $$ap) + (i32.const 30) + (i32.const 31) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_fmt_fp (; 579 ;) (param $$f i32) (param $$y f64) (param $$w i32) (param $$p i32) (param $$fl i32) (param $$t i32) (result i32) + (local $$$ i32) + (local $$$pr i32) + (local $$$pr415 i32) + (local $$$pre i32) + (local $$$pre516 i64) + (local $$$pre517 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i64) + (local $$16 i64) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$a$1$lcssa i32) + (local $$a$1502 i32) + (local $$a$2 i32) + (local $$a$3$lcssa i32) + (local $$a$3488 i32) + (local $$a$5$lcssa i32) + (local $$a$5471 i32) + (local $$a$6 i32) + (local $$a$8 i32) + (local $$a$9 i32) + (local $$add i32) + (local $$add$ptr213 i32) + (local $$add$ptr311 i32) + (local $$add$ptr354 i32) + (local $$add$ptr358 i32) + (local $$add$ptr373 i32) + (local $$add$ptr442 i32) + (local $$add$ptr65 i32) + (local $$add$ptr671 i32) + (local $$add$ptr742 i32) + (local $$add$ptr756 i32) + (local $$add113 i32) + (local $$add150 i32) + (local $$add154 i32) + (local $$add163 i32) + (local $$add165 i32) + (local $$add240 i64) + (local $$add273 i32) + (local $$add275 i32) + (local $$add284 i32) + (local $$add313 i32) + (local $$add355 i32) + (local $$add410 f64) + (local $$add414 i32) + (local $$add477$neg i32) + (local $$add561 i32) + (local $$add608 i32) + (local $$add612 i32) + (local $$add620 i32) + (local $$add653 i32) + (local $$add653$sink524 i32) + (local $$add67 i32) + (local $$add737 i32) + (local $$add810 i32) + (local $$add87 f64) + (local $$add90 f64) + (local $$and i32) + (local $$and12 i32) + (local $$and134 i32) + (local $$and27 i64) + (local $$and282 i32) + (local $$and36 i32) + (local $$and379 i32) + (local $$and45 i32) + (local $$and483 i32) + (local $$and610 i32) + (local $$and610$lobit i32) + (local $$and62 i32) + (local $$and702 i32) + (local $$and780 i32) + (local $$arrayidx i32) + (local $$arrayidx117 i32) + (local $$arrayidx251 i32) + (local $$arrayidx453 i32) + (local $$arrayidx489 i32) + (local $$big i32) + (local $$buf i32) + (local $$call102 i32) + (local $$call2 i64) + (local $$call26$pre$phiZ2D i64) + (local $$call55 f64) + (local $$call631 i32) + (local $$call672 i32) + (local $$call719 i32) + (local $$call757 i32) + (local $$carry$0493 i32) + (local $$carry262$0484 i32) + (local $$cmp103 i32) + (local $$cmp127 i32) + (local $$cmp131 i32) + (local $$cmp147 i32) + (local $$cmp196 i32) + (local $$cmp205 i32) + (local $$cmp225 i32) + (local $$cmp225500 i32) + (local $$cmp235 i32) + (local $$cmp235492 i32) + (local $$cmp249 i32) + (local $$cmp249496 i32) + (local $$cmp259 i32) + (local $$cmp259486 i32) + (local $$cmp277 i32) + (local $$cmp277482 i32) + (local $$cmp28 i32) + (local $$cmp299 i32) + (local $$cmp308 i32) + (local $$cmp315 i32) + (local $$cmp324 i32) + (local $$cmp324478 i32) + (local $$cmp333 i32) + (local $$cmp338 i32) + (local $$cmp350 i32) + (local $$cmp363 i32) + (local $$cmp363474 i32) + (local $$cmp374 i32) + (local $$cmp38 i32) + (local $$cmp385 i32) + (local $$cmp390 i32) + (local $$cmp403 i32) + (local $$cmp411 i32) + (local $$cmp416 i32) + (local $$cmp416469 i32) + (local $$cmp420 i32) + (local $$cmp433 i32) + (local $$cmp433465 i32) + (local $$cmp443 i32) + (local $$cmp450 i32) + (local $$cmp450$lcssa i32) + (local $$cmp450458 i32) + (local $$cmp470 i32) + (local $$cmp473 i32) + (local $$cmp495 i32) + (local $$cmp495454 i32) + (local $$cmp505 i32) + (local $$cmp528 i32) + (local $$cmp577 i32) + (local $$cmp59 i32) + (local $$cmp614 i32) + (local $$cmp617 i32) + (local $$cmp623 i32) + (local $$cmp636 i32) + (local $$cmp636449 i32) + (local $$cmp660 i32) + (local $$cmp665 i32) + (local $$cmp673 i32) + (local $$cmp678 i32) + (local $$cmp678435 i32) + (local $$cmp686 i32) + (local $$cmp707 i32) + (local $$cmp707430 i32) + (local $$cmp710 i32) + (local $$cmp710431 i32) + (local $$cmp722 i32) + (local $$cmp722427 i32) + (local $$cmp745 i32) + (local $$cmp745442 i32) + (local $$cmp748 i32) + (local $$cmp748443 i32) + (local $$cmp760 i32) + (local $$cmp765 i32) + (local $$cmp770 i32) + (local $$cmp770439 i32) + (local $$cmp777 i32) + (local $$cmp790 i32) + (local $$cmp818 i32) + (local $$cmp82 i32) + (local $$cmp94 i32) + (local $$cond i32) + (local $$cond100 i32) + (local $$cond233 i32) + (local $$cond271 i32) + (local $$cond304 i32) + (local $$cond43 i32) + (local $$cond629 i32) + (local $$cond732 i32) + (local $$cond800 i32) + (local $$conv101 i64) + (local $$conv111 i32) + (local $$conv114 i32) + (local $$conv116 i32) + (local $$conv118393 i32) + (local $$conv121 i32) + (local $$conv123 f64) + (local $$conv216 i32) + (local $$conv218 f64) + (local $$conv238 i64) + (local $$conv239 i64) + (local $$conv241 i32) + (local $$conv242 i32) + (local $$conv630 i64) + (local $$conv644 i32) + (local $$conv646 i32) + (local $$conv669 i64) + (local $$conv716 i64) + (local $$conv754 i64) + (local $$d$0 i32) + (local $$d$0491 i32) + (local $$d$0494 i32) + (local $$d$1483 i32) + (local $$d$2$lcssa i32) + (local $$d$2470 i32) + (local $$d$4 i32) + (local $$d$5438 i32) + (local $$d$6432 i32) + (local $$d$7444 i32) + (local $$dec i32) + (local $$dec476 i32) + (local $$dec481 i32) + (local $$dec78 i32) + (local $$div i64) + (local $$div274 i32) + (local $$div356 i32) + (local $$div378 i32) + (local $$div384 i32) + (local $$e$0480 i32) + (local $$e$1 i32) + (local $$e$2467 i32) + (local $$e$4 i32) + (local $$e$5 i32) + (local $$e2 i32) + (local $$ebuf0 i32) + (local $$estr$0 i32) + (local $$estr$1$lcssa i32) + (local $$estr$1450 i32) + (local $$estr$2 i32) + (local $$i$0479 i32) + (local $$i$1$lcssa i32) + (local $$i$1475 i32) + (local $$i$2466 i32) + (local $$i$3455 i32) + (local $$inc i32) + (local $$inc425 i32) + (local $$inc438 i32) + (local $$inc468 i32) + (local $$inc500 i32) + (local $$incdec$ptr106 i32) + (local $$incdec$ptr112 i32) + (local $$incdec$ptr115 i32) + (local $$incdec$ptr122 i32) + (local $$incdec$ptr137 i32) + (local $$incdec$ptr217 i32) + (local $$incdec$ptr246 i32) + (local $$incdec$ptr288 i32) + (local $$incdec$ptr292 i32) + (local $$incdec$ptr292520 i32) + (local $$incdec$ptr296 i32) + (local $$incdec$ptr419 i32) + (local $$incdec$ptr423 i32) + (local $$incdec$ptr639 i32) + (local $$incdec$ptr645 i32) + (local $$incdec$ptr647 i32) + (local $$incdec$ptr681 i32) + (local $$incdec$ptr689 i32) + (local $$incdec$ptr698 i32) + (local $$incdec$ptr725 i32) + (local $$incdec$ptr734 i32) + (local $$incdec$ptr763 i32) + (local $$incdec$ptr773 i32) + (local $$incdec$ptr776 i32) + (local $$incdec$ptr808 i32) + (local $$j$0 i32) + (local $$j$0$in476 i32) + (local $$j$1456 i32) + (local $$j$2 i32) + (local $$l$0 i32) + (local $$l$1 i32) + (local $$land$ext$neg i32) + (local $$mul f64) + (local $$mul125 f64) + (local $$mul202 f64) + (local $$mul220 f64) + (local $$mul286 i32) + (local $$mul322 i32) + (local $$mul328 i32) + (local $$mul335 i32) + (local $$mul349 i32) + (local $$mul367 i32) + (local $$mul406 f64) + (local $$mul407 f64) + (local $$mul431 i32) + (local $$mul437 i32) + (local $$mul499 i32) + (local $$mul513 i32) + (local $$mul80 f64) + (local $$not$tobool341 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond1$not i32) + (local $$or$cond2 i32) + (local $$or$cond398 i32) + (local $$or$cond400 i32) + (local $$or$cond409 i32) + (local $$or$cond411 i32) + (local $$or120 i32) + (local $$or504 i32) + (local $$or613 i32) + (local $$p$addr$2 i32) + (local $$p$addr$3 i32) + (local $$p$addr$4$lcssa i32) + (local $$p$addr$4433 i32) + (local $$p$addr$5$lcssa i32) + (local $$p$addr$5445 i32) + (local $$pl$0 i32) + (local $$prefix$0 i32) + (local $$re$1426 i32) + (local $$rem494 i32) + (local $$rem494453 i32) + (local $$round$0425 f64) + (local $$round377$1 f64) + (local $$s$0 i32) + (local $$s$1 i32) + (local $$s35$0 i32) + (local $$s668$0436 i32) + (local $$s668$1 i32) + (local $$s715$0$lcssa i32) + (local $$s715$0428 i32) + (local $$s753$0 i32) + (local $$s753$1440 i32) + (local $$s753$2 i32) + (local $$scevgep513 i32) + (local $$scevgep513514 i32) + (local $$sh_prom i64) + (local $$shl i64) + (local $$shl280 i32) + (local $$shr283 i32) + (local $$shr285 i32) + (local $$small$1 f64) + (local $$spec$select i32) + (local $$spec$select395 i32) + (local $$spec$select396 i32) + (local $$spec$select396521 i32) + (local $$spec$select396523 i32) + (local $$spec$select397 i32) + (local $$spec$select399 f64) + (local $$spec$select401 i32) + (local $$spec$select402 i32) + (local $$spec$select403 i32) + (local $$spec$select405 i32) + (local $$spec$select408 i32) + (local $$spec$select410 i32) + (local $$spec$select412 f64) + (local $$spec$select413 i32) + (local $$spec$select414 i32) + (local $$spec$select416 i32) + (local $$spec$select417 i32) + (local $$spec$select418 f64) + (local $$spec$select419 f64) + (local $$spec$select420 f64) + (local $$sub f64) + (local $$sub$ptr$div i32) + (local $$sub$ptr$div321 i32) + (local $$sub$ptr$div347 i32) + (local $$sub$ptr$div430 i32) + (local $$sub$ptr$div511 i32) + (local $$sub$ptr$lhs$cast i32) + (local $$sub$ptr$lhs$cast151 i32) + (local $$sub$ptr$lhs$cast160 i32) + (local $$sub$ptr$lhs$cast173$pre$phiZZZZ2D i32) + (local $$sub$ptr$lhs$cast305 i32) + (local $$sub$ptr$lhs$cast344 i32) + (local $$sub$ptr$lhs$cast508 i32) + (local $$sub$ptr$lhs$cast633 i32) + (local $$sub$ptr$lhs$cast694 i32) + (local $$sub$ptr$lhs$cast787 i32) + (local $$sub$ptr$lhs$cast811 i32) + (local $$sub$ptr$rhs$cast$le i32) + (local $$sub$ptr$rhs$cast152 i32) + (local $$sub$ptr$rhs$cast161 i32) + (local $$sub$ptr$rhs$cast174$pre$phiZZZZ2D i32) + (local $$sub$ptr$rhs$cast306 i32) + (local $$sub$ptr$rhs$cast319 i32) + (local $$sub$ptr$rhs$cast345 i32) + (local $$sub$ptr$rhs$cast428 i32) + (local $$sub$ptr$rhs$cast634 i32) + (local $$sub$ptr$rhs$cast634447 i32) + (local $$sub$ptr$rhs$cast649 i32) + (local $$sub$ptr$rhs$cast695 i32) + (local $$sub$ptr$rhs$cast788 i32) + (local $$sub$ptr$rhs$cast812 i32) + (local $$sub$ptr$sub i32) + (local $$sub$ptr$sub145 i32) + (local $$sub$ptr$sub153 i32) + (local $$sub$ptr$sub159 i32) + (local $$sub$ptr$sub162 i32) + (local $$sub$ptr$sub172 i32) + (local $$sub$ptr$sub175 i32) + (local $$sub$ptr$sub307 i32) + (local $$sub$ptr$sub320 i32) + (local $$sub$ptr$sub346 i32) + (local $$sub$ptr$sub429 i32) + (local $$sub$ptr$sub510 i32) + (local $$sub$ptr$sub635 i32) + (local $$sub$ptr$sub635448 i32) + (local $$sub$ptr$sub650 i32) + (local $$sub$ptr$sub650$pn i32) + (local $$sub$ptr$sub696 i32) + (local $$sub$ptr$sub789 i32) + (local $$sub$ptr$sub813 i32) + (local $$sub124 f64) + (local $$sub146 i32) + (local $$sub181 i32) + (local $$sub203 i32) + (local $$sub219 f64) + (local $$sub256 i32) + (local $$sub264 i32) + (local $$sub281 i32) + (local $$sub336 i32) + (local $$sub343 i32) + (local $$sub357 i32) + (local $$sub409 i32) + (local $$sub478 i32) + (local $$sub480 i32) + (local $$sub514 i32) + (local $$sub562 i32) + (local $$sub626 i32) + (local $$sub735 i32) + (local $$sub74 i32) + (local $$sub806 i32) + (local $$sub85 f64) + (local $$sub86 f64) + (local $$sub88 f64) + (local $$sub91 f64) + (local $$sub97 i32) + (local $$t$addr$0 i32) + (local $$t$addr$1 i32) + (local $$tobool129 i32) + (local $$tobool13 i32) + (local $$tobool135 i32) + (local $$tobool139 i32) + (local $$tobool140 i32) + (local $$tobool222 i32) + (local $$tobool244 i32) + (local $$tobool252 i32) + (local $$tobool290 i32) + (local $$tobool290519 i32) + (local $$tobool294 i32) + (local $$tobool341 i32) + (local $$tobool37 i32) + (local $$tobool371 i32) + (local $$tobool380 i32) + (local $$tobool400 i32) + (local $$tobool454 i32) + (local $$tobool484 i32) + (local $$tobool490 i32) + (local $$tobool5 i32) + (local $$tobool56 i32) + (local $$tobool609 i32) + (local $$tobool609$not i32) + (local $$tobool63 i32) + (local $$tobool703 i32) + (local $$tobool76 i32) + (local $$tobool76421 i32) + (local $$tobool781 i32) + (local $$tobool79 i32) + (local $$tobool9 i32) + (local $$w$add653 i32) + (local $$xor i32) + (local $$xor167 i32) + (local $$xor186 i32) + (local $$xor655 i32) + (local $$xor816 i32) + (local $$y$addr$0 f64) + (local $$y$addr$1 f64) + (local $$y$addr$2 f64) + (local $$y$addr$3 f64) + (local $$y$addr$4 f64) + (local $$z$0 i32) + (local $$z$1 i32) + (local $$z$2$lcssa i32) + (local $$z$2501 i32) + (local $$z$3$lcssa i32) + (local $$z$3497 i32) + (local $$z$4$lcssa i32) + (local $$z$4487 i32) + (local $$z$5 i32) + (local $$z$8 i32) + (local $$z$9$lcssa i32) + (local $$z$9459 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 560) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 560) + ) + ) + (local.set $$big + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$e2 + (i32.add + (local.get $sp_a) + (i32.const 536) + ) + ) + (local.set $$buf + (local.get $sp_a) + ) + (local.set $$sub$ptr$rhs$cast$le + (local.get $$buf) + ) + (local.set $$ebuf0 + (i32.add + (local.get $sp_a) + (i32.const 540) + ) + ) + (i32.store + (local.get $$e2) + (i32.const 0) + ) + (local.set $$arrayidx + (i32.add + (local.get $$ebuf0) + (i32.const 12) + ) + ) + (local.set $$call2 + (call $___DOUBLE_BITS_662 + (local.get $$y) + ) + ) + (local.set $$tobool5 + (i64.lt_s + (local.get $$call2) + (i64.const 0) + ) + ) + (if + (local.get $$tobool5) + (block + (local.set $$sub + (f64.neg + (local.get $$y) + ) + ) + (local.set $$$pre516 + (call $___DOUBLE_BITS_662 + (local.get $$sub) + ) + ) + (local.set $$call26$pre$phiZ2D + (local.get $$$pre516) + ) + (local.set $$pl$0 + (i32.const 1) + ) + (local.set $$prefix$0 + (i32.const 16614) + ) + (local.set $$y$addr$0 + (local.get $$sub) + ) + ) + (block + (local.set $$and + (i32.and + (local.get $$fl) + (i32.const 2048) + ) + ) + (local.set $$tobool9 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$and12 + (i32.and + (local.get $$fl) + (i32.const 1) + ) + ) + (local.set $$tobool13 + (i32.eq + (local.get $$and12) + (i32.const 0) + ) + ) + (local.set $$$ + (if (result i32) + (local.get $$tobool13) + (i32.const 16615) + (i32.const 16620) + ) + ) + (local.set $$spec$select416 + (if (result i32) + (local.get $$tobool9) + (local.get $$$) + (i32.const 16617) + ) + ) + (local.set $$0 + (i32.and + (local.get $$fl) + (i32.const 2049) + ) + ) + (local.set $$1 + (i32.ne + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$spec$select417 + (i32.and + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$call26$pre$phiZ2D + (local.get $$call2) + ) + (local.set $$pl$0 + (local.get $$spec$select417) + ) + (local.set $$prefix$0 + (local.get $$spec$select416) + ) + (local.set $$y$addr$0 + (local.get $$y) + ) + ) + ) + (local.set $$and27 + (i64.and + (local.get $$call26$pre$phiZ2D) + (i64.const 9218868437227405312) + ) + ) + (local.set $$cmp28 + (i64.eq + (local.get $$and27) + (i64.const 9218868437227405312) + ) + ) + (block $do-once + (if + (local.get $$cmp28) + (block + (local.set $$and36 + (i32.and + (local.get $$t) + (i32.const 32) + ) + ) + (local.set $$tobool37 + (i32.ne + (local.get $$and36) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$tobool37) + (i32.const 16633) + (i32.const 16637) + ) + ) + (local.set $$cmp38 + (i32.or + (f64.ne + (local.get $$y$addr$0) + (local.get $$y$addr$0) + ) + (f64.ne + (f64.const 0) + (f64.const 0) + ) + ) + ) + (local.set $$cond43 + (if (result i32) + (local.get $$tobool37) + (i32.const 16641) + (i32.const 16645) + ) + ) + (local.set $$s35$0 + (if (result i32) + (local.get $$cmp38) + (local.get $$cond43) + (local.get $$cond) + ) + ) + (local.set $$add + (i32.add + (local.get $$pl$0) + (i32.const 3) + ) + ) + (local.set $$and45 + (i32.and + (local.get $$fl) + (i32.const -65537) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add) + (local.get $$and45) + ) + (call $_out + (local.get $$f) + (local.get $$prefix$0) + (local.get $$pl$0) + ) + (call $_out + (local.get $$f) + (local.get $$s35$0) + (i32.const 3) + ) + (local.set $$xor + (i32.xor + (local.get $$fl) + (i32.const 8192) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add) + (local.get $$xor) + ) + (local.set $$add653$sink524 + (local.get $$add) + ) + ) + (block + (local.set $$call55 + (call $_frexp + (local.get $$y$addr$0) + (local.get $$e2) + ) + ) + (local.set $$mul + (f64.mul + (local.get $$call55) + (f64.const 2) + ) + ) + (local.set $$tobool56 + (f64.ne + (local.get $$mul) + (f64.const 0) + ) + ) + (if + (local.get $$tobool56) + (block + (local.set $$2 + (i32.load + (local.get $$e2) + ) + ) + (local.set $$dec + (i32.add + (local.get $$2) + (i32.const -1) + ) + ) + (i32.store + (local.get $$e2) + (local.get $$dec) + ) + ) + ) + (local.set $$or + (i32.or + (local.get $$t) + (i32.const 32) + ) + ) + (local.set $$cmp59 + (i32.eq + (local.get $$or) + (i32.const 97) + ) + ) + (if + (local.get $$cmp59) + (block + (local.set $$and62 + (i32.and + (local.get $$t) + (i32.const 32) + ) + ) + (local.set $$tobool63 + (i32.eq + (local.get $$and62) + (i32.const 0) + ) + ) + (local.set $$add$ptr65 + (i32.add + (local.get $$prefix$0) + (i32.const 9) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool63) + (local.get $$prefix$0) + (local.get $$add$ptr65) + ) + ) + (local.set $$add67 + (i32.or + (local.get $$pl$0) + (i32.const 2) + ) + ) + (local.set $$3 + (i32.gt_u + (local.get $$p) + (i32.const 11) + ) + ) + (local.set $$sub74 + (i32.sub + (i32.const 12) + (local.get $$p) + ) + ) + (local.set $$tobool76421 + (i32.eq + (local.get $$sub74) + (i32.const 0) + ) + ) + (local.set $$tobool76 + (i32.or + (local.get $$3) + (local.get $$tobool76421) + ) + ) + (block $do-once0 + (if + (local.get $$tobool76) + (local.set $$y$addr$1 + (local.get $$mul) + ) + (block + (local.set $$re$1426 + (local.get $$sub74) + ) + (local.set $$round$0425 + (f64.const 8) + ) + (loop $while-in + (block $while-out + (local.set $$dec78 + (i32.add + (local.get $$re$1426) + (i32.const -1) + ) + ) + (local.set $$mul80 + (f64.mul + (local.get $$round$0425) + (f64.const 16) + ) + ) + (local.set $$tobool79 + (i32.eq + (local.get $$dec78) + (i32.const 0) + ) + ) + (if + (local.get $$tobool79) + (br $while-out) + (block + (local.set $$re$1426 + (local.get $$dec78) + ) + (local.set $$round$0425 + (local.get $$mul80) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$spec$select) + ) + ) + (local.set $$cmp82 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 45) + ) + ) + (if + (local.get $$cmp82) + (block + (local.set $$sub85 + (f64.neg + (local.get $$mul) + ) + ) + (local.set $$sub86 + (f64.sub + (local.get $$sub85) + (local.get $$mul80) + ) + ) + (local.set $$add87 + (f64.add + (local.get $$mul80) + (local.get $$sub86) + ) + ) + (local.set $$sub88 + (f64.neg + (local.get $$add87) + ) + ) + (local.set $$y$addr$1 + (local.get $$sub88) + ) + (br $do-once0) + ) + (block + (local.set $$add90 + (f64.add + (local.get $$mul) + (local.get $$mul80) + ) + ) + (local.set $$sub91 + (f64.sub + (local.get $$add90) + (local.get $$mul80) + ) + ) + (local.set $$y$addr$1 + (local.get $$sub91) + ) + (br $do-once0) + ) + ) + ) + ) + ) + (local.set $$5 + (i32.load + (local.get $$e2) + ) + ) + (local.set $$cmp94 + (i32.lt_s + (local.get $$5) + (i32.const 0) + ) + ) + (local.set $$sub97 + (i32.sub + (i32.const 0) + (local.get $$5) + ) + ) + (local.set $$cond100 + (if (result i32) + (local.get $$cmp94) + (local.get $$sub97) + (local.get $$5) + ) + ) + (local.set $$conv101 + (i64.extend_i32_s + (local.get $$cond100) + ) + ) + (local.set $$call102 + (call $_fmt_u + (local.get $$conv101) + (local.get $$arrayidx) + ) + ) + (local.set $$cmp103 + (i32.eq + (local.get $$call102) + (local.get $$arrayidx) + ) + ) + (if + (local.get $$cmp103) + (block + (local.set $$incdec$ptr106 + (i32.add + (local.get $$ebuf0) + (i32.const 11) + ) + ) + (i32.store8 + (local.get $$incdec$ptr106) + (i32.const 48) + ) + (local.set $$estr$0 + (local.get $$incdec$ptr106) + ) + ) + (local.set $$estr$0 + (local.get $$call102) + ) + ) + (local.set $$6 + (i32.shr_s + (local.get $$5) + (i32.const 31) + ) + ) + (local.set $$7 + (i32.and + (local.get $$6) + (i32.const 2) + ) + ) + (local.set $$8 + (i32.add + (local.get $$7) + (i32.const 43) + ) + ) + (local.set $$conv111 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr112 + (i32.add + (local.get $$estr$0) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr112) + (local.get $$conv111) + ) + (local.set $$add113 + (i32.add + (local.get $$t) + (i32.const 15) + ) + ) + (local.set $$conv114 + (i32.and + (local.get $$add113) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr115 + (i32.add + (local.get $$estr$0) + (i32.const -2) + ) + ) + (i32.store8 + (local.get $$incdec$ptr115) + (local.get $$conv114) + ) + (local.set $$cmp131 + (i32.lt_s + (local.get $$p) + (i32.const 1) + ) + ) + (local.set $$and134 + (i32.and + (local.get $$fl) + (i32.const 8) + ) + ) + (local.set $$tobool135 + (i32.eq + (local.get $$and134) + (i32.const 0) + ) + ) + (local.set $$s$0 + (local.get $$buf) + ) + (local.set $$y$addr$2 + (local.get $$y$addr$1) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$conv116 + (i32.trunc_f64_s + (local.get $$y$addr$2) + ) + ) + (local.set $$arrayidx117 + (i32.add + (i32.const 7264) + (local.get $$conv116) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx117) + ) + ) + (local.set $$conv118393 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$or120 + (i32.or + (local.get $$and62) + (local.get $$conv118393) + ) + ) + (local.set $$conv121 + (i32.and + (local.get $$or120) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr122 + (i32.add + (local.get $$s$0) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$s$0) + (local.get $$conv121) + ) + (local.set $$conv123 + (f64.convert_i32_s + (local.get $$conv116) + ) + ) + (local.set $$sub124 + (f64.sub + (local.get $$y$addr$2) + (local.get $$conv123) + ) + ) + (local.set $$mul125 + (f64.mul + (local.get $$sub124) + (f64.const 16) + ) + ) + (local.set $$sub$ptr$lhs$cast + (local.get $$incdec$ptr122) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$sub$ptr$lhs$cast) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (local.set $$cmp127 + (i32.eq + (local.get $$sub$ptr$sub) + (i32.const 1) + ) + ) + (if + (local.get $$cmp127) + (block + (local.set $$tobool129 + (f64.eq + (local.get $$mul125) + (f64.const 0) + ) + ) + (local.set $$or$cond1$not + (i32.and + (local.get $$cmp131) + (local.get $$tobool129) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$tobool135) + (local.get $$or$cond1$not) + ) + ) + (if + (local.get $$or$cond) + (local.set $$s$1 + (local.get $$incdec$ptr122) + ) + (block + (local.set $$incdec$ptr137 + (i32.add + (local.get $$s$0) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$incdec$ptr122) + (i32.const 46) + ) + (local.set $$s$1 + (local.get $$incdec$ptr137) + ) + ) + ) + ) + (local.set $$s$1 + (local.get $$incdec$ptr122) + ) + ) + (local.set $$tobool139 + (f64.ne + (local.get $$mul125) + (f64.const 0) + ) + ) + (if + (local.get $$tobool139) + (block + (local.set $$s$0 + (local.get $$s$1) + ) + (local.set $$y$addr$2 + (local.get $$mul125) + ) + ) + (br $while-out2) + ) + (br $while-in3) + ) + ) + (local.set $$tobool140 + (i32.eq + (local.get $$p) + (i32.const 0) + ) + ) + (local.set $$$pre517 + (local.get $$s$1) + ) + (if + (local.get $$tobool140) + (local.set $label + (i32.const 25) + ) + (block + (local.set $$sub$ptr$sub145 + (i32.sub + (i32.const -2) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (local.set $$sub146 + (i32.add + (local.get $$sub$ptr$sub145) + (local.get $$$pre517) + ) + ) + (local.set $$cmp147 + (i32.lt_s + (local.get $$sub146) + (local.get $$p) + ) + ) + (if + (local.get $$cmp147) + (block + (local.set $$sub$ptr$lhs$cast151 + (local.get $$arrayidx) + ) + (local.set $$sub$ptr$rhs$cast152 + (local.get $$incdec$ptr115) + ) + (local.set $$sub$ptr$sub153 + (i32.add + (local.get $$p) + (i32.const 2) + ) + ) + (local.set $$add150 + (i32.add + (local.get $$sub$ptr$sub153) + (local.get $$sub$ptr$lhs$cast151) + ) + ) + (local.set $$add154 + (i32.sub + (local.get $$add150) + (local.get $$sub$ptr$rhs$cast152) + ) + ) + (local.set $$l$0 + (local.get $$add154) + ) + (local.set $$sub$ptr$lhs$cast173$pre$phiZZZZ2D + (local.get $$sub$ptr$lhs$cast151) + ) + (local.set $$sub$ptr$rhs$cast174$pre$phiZZZZ2D + (local.get $$sub$ptr$rhs$cast152) + ) + ) + (local.set $label + (i32.const 25) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 25) + ) + (block + (local.set $$sub$ptr$lhs$cast160 + (local.get $$arrayidx) + ) + (local.set $$sub$ptr$rhs$cast161 + (local.get $$incdec$ptr115) + ) + (local.set $$sub$ptr$sub159 + (i32.sub + (local.get $$sub$ptr$lhs$cast160) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (local.set $$sub$ptr$sub162 + (i32.sub + (local.get $$sub$ptr$sub159) + (local.get $$sub$ptr$rhs$cast161) + ) + ) + (local.set $$add163 + (i32.add + (local.get $$sub$ptr$sub162) + (local.get $$$pre517) + ) + ) + (local.set $$l$0 + (local.get $$add163) + ) + (local.set $$sub$ptr$lhs$cast173$pre$phiZZZZ2D + (local.get $$sub$ptr$lhs$cast160) + ) + (local.set $$sub$ptr$rhs$cast174$pre$phiZZZZ2D + (local.get $$sub$ptr$rhs$cast161) + ) + ) + ) + (local.set $$add165 + (i32.add + (local.get $$l$0) + (local.get $$add67) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add165) + (local.get $$fl) + ) + (call $_out + (local.get $$f) + (local.get $$spec$select) + (local.get $$add67) + ) + (local.set $$xor167 + (i32.xor + (local.get $$fl) + (i32.const 65536) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$w) + (local.get $$add165) + (local.get $$xor167) + ) + (local.set $$sub$ptr$sub172 + (i32.sub + (local.get $$$pre517) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (call $_out + (local.get $$f) + (local.get $$buf) + (local.get $$sub$ptr$sub172) + ) + (local.set $$sub$ptr$sub175 + (i32.sub + (local.get $$sub$ptr$lhs$cast173$pre$phiZZZZ2D) + (local.get $$sub$ptr$rhs$cast174$pre$phiZZZZ2D) + ) + ) + (local.set $$10 + (i32.add + (local.get $$sub$ptr$sub172) + (local.get $$sub$ptr$sub175) + ) + ) + (local.set $$sub181 + (i32.sub + (local.get $$l$0) + (local.get $$10) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$sub181) + (i32.const 0) + (i32.const 0) + ) + (call $_out + (local.get $$f) + (local.get $$incdec$ptr115) + (local.get $$sub$ptr$sub175) + ) + (local.set $$xor186 + (i32.xor + (local.get $$fl) + (i32.const 8192) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add165) + (local.get $$xor186) + ) + (local.set $$add653$sink524 + (local.get $$add165) + ) + (br $do-once) + ) + ) + (local.set $$cmp196 + (i32.lt_s + (local.get $$p) + (i32.const 0) + ) + ) + (local.set $$spec$select395 + (if (result i32) + (local.get $$cmp196) + (i32.const 6) + (local.get $$p) + ) + ) + (if + (local.get $$tobool56) + (block + (local.set $$mul202 + (f64.mul + (local.get $$mul) + (f64.const 268435456) + ) + ) + (local.set $$11 + (i32.load + (local.get $$e2) + ) + ) + (local.set $$sub203 + (i32.add + (local.get $$11) + (i32.const -28) + ) + ) + (i32.store + (local.get $$e2) + (local.get $$sub203) + ) + (local.set $$$pr + (local.get $$sub203) + ) + (local.set $$y$addr$3 + (local.get $$mul202) + ) + ) + (block + (local.set $$$pre + (i32.load + (local.get $$e2) + ) + ) + (local.set $$$pr + (local.get $$$pre) + ) + (local.set $$y$addr$3 + (local.get $$mul) + ) + ) + ) + (local.set $$cmp205 + (i32.lt_s + (local.get $$$pr) + (i32.const 0) + ) + ) + (local.set $$add$ptr213 + (i32.add + (local.get $$big) + (i32.const 288) + ) + ) + (local.set $$z$0 + (if (result i32) + (local.get $$cmp205) + (local.get $$big) + (local.get $$add$ptr213) + ) + ) + (local.set $$y$addr$4 + (local.get $$y$addr$3) + ) + (local.set $$z$1 + (local.get $$z$0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$conv216 + (i32.trunc_f64_u + (local.get $$y$addr$4) + ) + ) + (i32.store + (local.get $$z$1) + (local.get $$conv216) + ) + (local.set $$incdec$ptr217 + (i32.add + (local.get $$z$1) + (i32.const 4) + ) + ) + (local.set $$conv218 + (f64.convert_i32_u + (local.get $$conv216) + ) + ) + (local.set $$sub219 + (f64.sub + (local.get $$y$addr$4) + (local.get $$conv218) + ) + ) + (local.set $$mul220 + (f64.mul + (local.get $$sub219) + (f64.const 1e9) + ) + ) + (local.set $$tobool222 + (f64.ne + (local.get $$mul220) + (f64.const 0) + ) + ) + (if + (local.get $$tobool222) + (block + (local.set $$y$addr$4 + (local.get $$mul220) + ) + (local.set $$z$1 + (local.get $$incdec$ptr217) + ) + ) + (br $while-out4) + ) + (br $while-in5) + ) + ) + (local.set $$sub$ptr$rhs$cast345 + (local.get $$z$0) + ) + (local.set $$cmp225500 + (i32.gt_s + (local.get $$$pr) + (i32.const 0) + ) + ) + (if + (local.get $$cmp225500) + (block + (local.set $$13 + (local.get $$$pr) + ) + (local.set $$a$1502 + (local.get $$z$0) + ) + (local.set $$z$2501 + (local.get $$incdec$ptr217) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$12 + (i32.lt_s + (local.get $$13) + (i32.const 29) + ) + ) + (local.set $$cond233 + (if (result i32) + (local.get $$12) + (local.get $$13) + (i32.const 29) + ) + ) + (local.set $$d$0491 + (i32.add + (local.get $$z$2501) + (i32.const -4) + ) + ) + (local.set $$cmp235492 + (i32.lt_u + (local.get $$d$0491) + (local.get $$a$1502) + ) + ) + (if + (local.get $$cmp235492) + (local.set $$a$2 + (local.get $$a$1502) + ) + (block + (local.set $$sh_prom + (i64.extend_i32_u + (local.get $$cond233) + ) + ) + (local.set $$carry$0493 + (i32.const 0) + ) + (local.set $$d$0494 + (local.get $$d$0491) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$14 + (i32.load + (local.get $$d$0494) + ) + ) + (local.set $$conv238 + (i64.extend_i32_u + (local.get $$14) + ) + ) + (local.set $$shl + (i64.shl + (local.get $$conv238) + (local.get $$sh_prom) + ) + ) + (local.set $$conv239 + (i64.extend_i32_u + (local.get $$carry$0493) + ) + ) + (local.set $$add240 + (i64.add + (local.get $$shl) + (local.get $$conv239) + ) + ) + (local.set $$div + (i64.div_u + (local.get $$add240) + (i64.const 1000000000) + ) + ) + (local.set $$15 + (i64.mul + (local.get $$div) + (i64.const 1000000000) + ) + ) + (local.set $$16 + (i64.sub + (local.get $$add240) + (local.get $$15) + ) + ) + (local.set $$conv241 + (i32.wrap_i64 + (local.get $$16) + ) + ) + (i32.store + (local.get $$d$0494) + (local.get $$conv241) + ) + (local.set $$conv242 + (i32.wrap_i64 + (local.get $$div) + ) + ) + (local.set $$d$0 + (i32.add + (local.get $$d$0494) + (i32.const -4) + ) + ) + (local.set $$cmp235 + (i32.lt_u + (local.get $$d$0) + (local.get $$a$1502) + ) + ) + (if + (local.get $$cmp235) + (br $while-out8) + (block + (local.set $$carry$0493 + (local.get $$conv242) + ) + (local.set $$d$0494 + (local.get $$d$0) + ) + ) + ) + (br $while-in9) + ) + ) + (local.set $$tobool244 + (i32.eq + (local.get $$conv242) + (i32.const 0) + ) + ) + (if + (local.get $$tobool244) + (local.set $$a$2 + (local.get $$a$1502) + ) + (block + (local.set $$incdec$ptr246 + (i32.add + (local.get $$a$1502) + (i32.const -4) + ) + ) + (i32.store + (local.get $$incdec$ptr246) + (local.get $$conv242) + ) + (local.set $$a$2 + (local.get $$incdec$ptr246) + ) + ) + ) + ) + ) + (local.set $$cmp249496 + (i32.gt_u + (local.get $$z$2501) + (local.get $$a$2) + ) + ) + (block $label$break$L57 + (if + (local.get $$cmp249496) + (block + (local.set $$z$3497 + (local.get $$z$2501) + ) + (loop $while-in12 + (block $while-out11 + (local.set $$arrayidx251 + (i32.add + (local.get $$z$3497) + (i32.const -4) + ) + ) + (local.set $$17 + (i32.load + (local.get $$arrayidx251) + ) + ) + (local.set $$tobool252 + (i32.eq + (local.get $$17) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool252) + ) + (block + (local.set $$z$3$lcssa + (local.get $$z$3497) + ) + (br $label$break$L57) + ) + ) + (local.set $$cmp249 + (i32.gt_u + (local.get $$arrayidx251) + (local.get $$a$2) + ) + ) + (if + (local.get $$cmp249) + (local.set $$z$3497 + (local.get $$arrayidx251) + ) + (block + (local.set $$z$3$lcssa + (local.get $$arrayidx251) + ) + (br $while-out11) + ) + ) + (br $while-in12) + ) + ) + ) + (local.set $$z$3$lcssa + (local.get $$z$2501) + ) + ) + ) + (local.set $$18 + (i32.load + (local.get $$e2) + ) + ) + (local.set $$sub256 + (i32.sub + (local.get $$18) + (local.get $$cond233) + ) + ) + (i32.store + (local.get $$e2) + (local.get $$sub256) + ) + (local.set $$cmp225 + (i32.gt_s + (local.get $$sub256) + (i32.const 0) + ) + ) + (if + (local.get $$cmp225) + (block + (local.set $$13 + (local.get $$sub256) + ) + (local.set $$a$1502 + (local.get $$a$2) + ) + (local.set $$z$2501 + (local.get $$z$3$lcssa) + ) + ) + (block + (local.set $$$pr415 + (local.get $$sub256) + ) + (local.set $$a$1$lcssa + (local.get $$a$2) + ) + (local.set $$z$2$lcssa + (local.get $$z$3$lcssa) + ) + (br $while-out6) + ) + ) + (br $while-in7) + ) + ) + ) + (block + (local.set $$$pr415 + (local.get $$$pr) + ) + (local.set $$a$1$lcssa + (local.get $$z$0) + ) + (local.set $$z$2$lcssa + (local.get $$incdec$ptr217) + ) + ) + ) + (local.set $$cmp259486 + (i32.lt_s + (local.get $$$pr415) + (i32.const 0) + ) + ) + (if + (local.get $$cmp259486) + (block + (local.set $$add273 + (i32.add + (local.get $$spec$select395) + (i32.const 25) + ) + ) + (local.set $$div274 + (i32.and + (i32.div_s + (local.get $$add273) + (i32.const 9) + ) + (i32.const -1) + ) + ) + (local.set $$add275 + (i32.add + (local.get $$div274) + (i32.const 1) + ) + ) + (local.set $$cmp299 + (i32.eq + (local.get $$or) + (i32.const 102) + ) + ) + (local.set $$19 + (local.get $$$pr415) + ) + (local.set $$a$3488 + (local.get $$a$1$lcssa) + ) + (local.set $$z$4487 + (local.get $$z$2$lcssa) + ) + (loop $while-in14 + (block $while-out13 + (local.set $$sub264 + (i32.sub + (i32.const 0) + (local.get $$19) + ) + ) + (local.set $$20 + (i32.lt_s + (local.get $$sub264) + (i32.const 9) + ) + ) + (local.set $$cond271 + (if (result i32) + (local.get $$20) + (local.get $$sub264) + (i32.const 9) + ) + ) + (local.set $$cmp277482 + (i32.lt_u + (local.get $$a$3488) + (local.get $$z$4487) + ) + ) + (if + (local.get $$cmp277482) + (block + (local.set $$shl280 + (i32.shl + (i32.const 1) + (local.get $$cond271) + ) + ) + (local.set $$sub281 + (i32.add + (local.get $$shl280) + (i32.const -1) + ) + ) + (local.set $$shr285 + (i32.shr_u + (i32.const 1000000000) + (local.get $$cond271) + ) + ) + (local.set $$carry262$0484 + (i32.const 0) + ) + (local.set $$d$1483 + (local.get $$a$3488) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$22 + (i32.load + (local.get $$d$1483) + ) + ) + (local.set $$and282 + (i32.and + (local.get $$22) + (local.get $$sub281) + ) + ) + (local.set $$shr283 + (i32.shr_u + (local.get $$22) + (local.get $$cond271) + ) + ) + (local.set $$add284 + (i32.add + (local.get $$shr283) + (local.get $$carry262$0484) + ) + ) + (i32.store + (local.get $$d$1483) + (local.get $$add284) + ) + (local.set $$mul286 + (i32.mul + (local.get $$and282) + (local.get $$shr285) + ) + ) + (local.set $$incdec$ptr288 + (i32.add + (local.get $$d$1483) + (i32.const 4) + ) + ) + (local.set $$cmp277 + (i32.lt_u + (local.get $$incdec$ptr288) + (local.get $$z$4487) + ) + ) + (if + (local.get $$cmp277) + (block + (local.set $$carry262$0484 + (local.get $$mul286) + ) + (local.set $$d$1483 + (local.get $$incdec$ptr288) + ) + ) + (br $while-out15) + ) + (br $while-in16) + ) + ) + (local.set $$23 + (i32.load + (local.get $$a$3488) + ) + ) + (local.set $$tobool290 + (i32.eq + (local.get $$23) + (i32.const 0) + ) + ) + (local.set $$incdec$ptr292 + (i32.add + (local.get $$a$3488) + (i32.const 4) + ) + ) + (local.set $$spec$select396 + (if (result i32) + (local.get $$tobool290) + (local.get $$incdec$ptr292) + (local.get $$a$3488) + ) + ) + (local.set $$tobool294 + (i32.eq + (local.get $$mul286) + (i32.const 0) + ) + ) + (if + (local.get $$tobool294) + (block + (local.set $$spec$select396523 + (local.get $$spec$select396) + ) + (local.set $$z$5 + (local.get $$z$4487) + ) + ) + (block + (local.set $$incdec$ptr296 + (i32.add + (local.get $$z$4487) + (i32.const 4) + ) + ) + (i32.store + (local.get $$z$4487) + (local.get $$mul286) + ) + (local.set $$spec$select396523 + (local.get $$spec$select396) + ) + (local.set $$z$5 + (local.get $$incdec$ptr296) + ) + ) + ) + ) + (block + (local.set $$21 + (i32.load + (local.get $$a$3488) + ) + ) + (local.set $$tobool290519 + (i32.eq + (local.get $$21) + (i32.const 0) + ) + ) + (local.set $$incdec$ptr292520 + (i32.add + (local.get $$a$3488) + (i32.const 4) + ) + ) + (local.set $$spec$select396521 + (if (result i32) + (local.get $$tobool290519) + (local.get $$incdec$ptr292520) + (local.get $$a$3488) + ) + ) + (local.set $$spec$select396523 + (local.get $$spec$select396521) + ) + (local.set $$z$5 + (local.get $$z$4487) + ) + ) + ) + (local.set $$cond304 + (if (result i32) + (local.get $$cmp299) + (local.get $$z$0) + (local.get $$spec$select396523) + ) + ) + (local.set $$sub$ptr$lhs$cast305 + (local.get $$z$5) + ) + (local.set $$sub$ptr$rhs$cast306 + (local.get $$cond304) + ) + (local.set $$sub$ptr$sub307 + (i32.sub + (local.get $$sub$ptr$lhs$cast305) + (local.get $$sub$ptr$rhs$cast306) + ) + ) + (local.set $$sub$ptr$div + (i32.shr_s + (local.get $$sub$ptr$sub307) + (i32.const 2) + ) + ) + (local.set $$cmp308 + (i32.gt_s + (local.get $$sub$ptr$div) + (local.get $$add275) + ) + ) + (local.set $$add$ptr311 + (i32.add + (local.get $$cond304) + (i32.shl + (local.get $$add275) + (i32.const 2) + ) + ) + ) + (local.set $$spec$select397 + (if (result i32) + (local.get $$cmp308) + (local.get $$add$ptr311) + (local.get $$z$5) + ) + ) + (local.set $$24 + (i32.load + (local.get $$e2) + ) + ) + (local.set $$add313 + (i32.add + (local.get $$24) + (local.get $$cond271) + ) + ) + (i32.store + (local.get $$e2) + (local.get $$add313) + ) + (local.set $$cmp259 + (i32.lt_s + (local.get $$add313) + (i32.const 0) + ) + ) + (if + (local.get $$cmp259) + (block + (local.set $$19 + (local.get $$add313) + ) + (local.set $$a$3488 + (local.get $$spec$select396523) + ) + (local.set $$z$4487 + (local.get $$spec$select397) + ) + ) + (block + (local.set $$a$3$lcssa + (local.get $$spec$select396523) + ) + (local.set $$z$4$lcssa + (local.get $$spec$select397) + ) + (br $while-out13) + ) + ) + (br $while-in14) + ) + ) + ) + (block + (local.set $$a$3$lcssa + (local.get $$a$1$lcssa) + ) + (local.set $$z$4$lcssa + (local.get $$z$2$lcssa) + ) + ) + ) + (local.set $$cmp315 + (i32.lt_u + (local.get $$a$3$lcssa) + (local.get $$z$4$lcssa) + ) + ) + (if + (local.get $$cmp315) + (block + (local.set $$sub$ptr$rhs$cast319 + (local.get $$a$3$lcssa) + ) + (local.set $$sub$ptr$sub320 + (i32.sub + (local.get $$sub$ptr$rhs$cast345) + (local.get $$sub$ptr$rhs$cast319) + ) + ) + (local.set $$sub$ptr$div321 + (i32.shr_s + (local.get $$sub$ptr$sub320) + (i32.const 2) + ) + ) + (local.set $$mul322 + (i32.mul + (local.get $$sub$ptr$div321) + (i32.const 9) + ) + ) + (local.set $$25 + (i32.load + (local.get $$a$3$lcssa) + ) + ) + (local.set $$cmp324478 + (i32.lt_u + (local.get $$25) + (i32.const 10) + ) + ) + (if + (local.get $$cmp324478) + (local.set $$e$1 + (local.get $$mul322) + ) + (block + (local.set $$e$0480 + (local.get $$mul322) + ) + (local.set $$i$0479 + (i32.const 10) + ) + (loop $while-in18 + (block $while-out17 + (local.set $$mul328 + (i32.mul + (local.get $$i$0479) + (i32.const 10) + ) + ) + (local.set $$inc + (i32.add + (local.get $$e$0480) + (i32.const 1) + ) + ) + (local.set $$cmp324 + (i32.lt_u + (local.get $$25) + (local.get $$mul328) + ) + ) + (if + (local.get $$cmp324) + (block + (local.set $$e$1 + (local.get $$inc) + ) + (br $while-out17) + ) + (block + (local.set $$e$0480 + (local.get $$inc) + ) + (local.set $$i$0479 + (local.get $$mul328) + ) + ) + ) + (br $while-in18) + ) + ) + ) + ) + ) + (local.set $$e$1 + (i32.const 0) + ) + ) + (local.set $$cmp333 + (i32.eq + (local.get $$or) + (i32.const 102) + ) + ) + (local.set $$mul335 + (if (result i32) + (local.get $$cmp333) + (i32.const 0) + (local.get $$e$1) + ) + ) + (local.set $$sub336 + (i32.sub + (local.get $$spec$select395) + (local.get $$mul335) + ) + ) + (local.set $$cmp338 + (i32.eq + (local.get $$or) + (i32.const 103) + ) + ) + (local.set $$tobool341 + (i32.ne + (local.get $$spec$select395) + (i32.const 0) + ) + ) + (local.set $$26 + (i32.and + (local.get $$tobool341) + (local.get $$cmp338) + ) + ) + (local.set $$land$ext$neg + (i32.shr_s + (i32.shl + (local.get $$26) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (local.set $$sub343 + (i32.add + (local.get $$sub336) + (local.get $$land$ext$neg) + ) + ) + (local.set $$sub$ptr$lhs$cast344 + (local.get $$z$4$lcssa) + ) + (local.set $$sub$ptr$sub346 + (i32.sub + (local.get $$sub$ptr$lhs$cast344) + (local.get $$sub$ptr$rhs$cast345) + ) + ) + (local.set $$sub$ptr$div347 + (i32.shr_s + (local.get $$sub$ptr$sub346) + (i32.const 2) + ) + ) + (local.set $$27 + (i32.mul + (local.get $$sub$ptr$div347) + (i32.const 9) + ) + ) + (local.set $$mul349 + (i32.add + (local.get $$27) + (i32.const -9) + ) + ) + (local.set $$cmp350 + (i32.lt_s + (local.get $$sub343) + (local.get $$mul349) + ) + ) + (if + (local.get $$cmp350) + (block + (local.set $$add$ptr354 + (i32.add + (local.get $$z$0) + (i32.const 4) + ) + ) + (local.set $$add355 + (i32.add + (local.get $$sub343) + (i32.const 9216) + ) + ) + (local.set $$div356 + (i32.and + (i32.div_s + (local.get $$add355) + (i32.const 9) + ) + (i32.const -1) + ) + ) + (local.set $$sub357 + (i32.add + (local.get $$div356) + (i32.const -1024) + ) + ) + (local.set $$add$ptr358 + (i32.add + (local.get $$add$ptr354) + (i32.shl + (local.get $$sub357) + (i32.const 2) + ) + ) + ) + (local.set $$28 + (i32.mul + (local.get $$div356) + (i32.const 9) + ) + ) + (local.set $$29 + (i32.sub + (local.get $$add355) + (local.get $$28) + ) + ) + (local.set $$cmp363474 + (i32.lt_s + (local.get $$29) + (i32.const 8) + ) + ) + (if + (local.get $$cmp363474) + (block + (local.set $$i$1475 + (i32.const 10) + ) + (local.set $$j$0$in476 + (local.get $$29) + ) + (loop $while-in20 + (block $while-out19 + (local.set $$j$0 + (i32.add + (local.get $$j$0$in476) + (i32.const 1) + ) + ) + (local.set $$mul367 + (i32.mul + (local.get $$i$1475) + (i32.const 10) + ) + ) + (local.set $$cmp363 + (i32.lt_s + (local.get $$j$0$in476) + (i32.const 7) + ) + ) + (if + (local.get $$cmp363) + (block + (local.set $$i$1475 + (local.get $$mul367) + ) + (local.set $$j$0$in476 + (local.get $$j$0) + ) + ) + (block + (local.set $$i$1$lcssa + (local.get $$mul367) + ) + (br $while-out19) + ) + ) + (br $while-in20) + ) + ) + ) + (local.set $$i$1$lcssa + (i32.const 10) + ) + ) + (local.set $$30 + (i32.load + (local.get $$add$ptr358) + ) + ) + (local.set $$div378 + (i32.and + (i32.div_u + (local.get $$30) + (local.get $$i$1$lcssa) + ) + (i32.const -1) + ) + ) + (local.set $$31 + (i32.mul + (local.get $$div378) + (local.get $$i$1$lcssa) + ) + ) + (local.set $$32 + (i32.sub + (local.get $$30) + (local.get $$31) + ) + ) + (local.set $$tobool371 + (i32.eq + (local.get $$32) + (i32.const 0) + ) + ) + (local.set $$add$ptr373 + (i32.add + (local.get $$add$ptr358) + (i32.const 4) + ) + ) + (local.set $$cmp374 + (i32.eq + (local.get $$add$ptr373) + (local.get $$z$4$lcssa) + ) + ) + (local.set $$or$cond398 + (i32.and + (local.get $$cmp374) + (local.get $$tobool371) + ) + ) + (if + (local.get $$or$cond398) + (block + (local.set $$a$8 + (local.get $$a$3$lcssa) + ) + (local.set $$d$4 + (local.get $$add$ptr358) + ) + (local.set $$e$4 + (local.get $$e$1) + ) + ) + (block + (local.set $$and379 + (i32.and + (local.get $$div378) + (i32.const 1) + ) + ) + (local.set $$tobool380 + (i32.eq + (local.get $$and379) + (i32.const 0) + ) + ) + (local.set $$spec$select399 + (if (result f64) + (local.get $$tobool380) + (f64.const 9007199254740992) + (f64.const 9007199254740994) + ) + ) + (local.set $$div384 + (i32.shr_u + (local.get $$i$1$lcssa) + (i32.const 1) + ) + ) + (local.set $$cmp385 + (i32.lt_u + (local.get $$32) + (local.get $$div384) + ) + ) + (local.set $$cmp390 + (i32.eq + (local.get $$32) + (local.get $$div384) + ) + ) + (local.set $$or$cond400 + (i32.and + (local.get $$cmp374) + (local.get $$cmp390) + ) + ) + (local.set $$spec$select412 + (if (result f64) + (local.get $$or$cond400) + (f64.const 1) + (f64.const 1.5) + ) + ) + (local.set $$spec$select418 + (if (result f64) + (local.get $$cmp385) + (f64.const 0.5) + (local.get $$spec$select412) + ) + ) + (local.set $$tobool400 + (i32.eq + (local.get $$pl$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool400) + (block + (local.set $$round377$1 + (local.get $$spec$select399) + ) + (local.set $$small$1 + (local.get $$spec$select418) + ) + ) + (block + (local.set $$33 + (i32.load8_s + (local.get $$prefix$0) + ) + ) + (local.set $$cmp403 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$33) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 45) + ) + ) + (local.set $$mul406 + (f64.neg + (local.get $$spec$select399) + ) + ) + (local.set $$mul407 + (f64.neg + (local.get $$spec$select418) + ) + ) + (local.set $$spec$select419 + (if (result f64) + (local.get $$cmp403) + (local.get $$mul406) + (local.get $$spec$select399) + ) + ) + (local.set $$spec$select420 + (if (result f64) + (local.get $$cmp403) + (local.get $$mul407) + (local.get $$spec$select418) + ) + ) + (local.set $$round377$1 + (local.get $$spec$select419) + ) + (local.set $$small$1 + (local.get $$spec$select420) + ) + ) + ) + (local.set $$sub409 + (i32.sub + (local.get $$30) + (local.get $$32) + ) + ) + (i32.store + (local.get $$add$ptr358) + (local.get $$sub409) + ) + (local.set $$add410 + (f64.add + (local.get $$round377$1) + (local.get $$small$1) + ) + ) + (local.set $$cmp411 + (f64.ne + (local.get $$add410) + (local.get $$round377$1) + ) + ) + (if + (local.get $$cmp411) + (block + (local.set $$add414 + (i32.add + (local.get $$sub409) + (local.get $$i$1$lcssa) + ) + ) + (i32.store + (local.get $$add$ptr358) + (local.get $$add414) + ) + (local.set $$cmp416469 + (i32.gt_u + (local.get $$add414) + (i32.const 999999999) + ) + ) + (if + (local.get $$cmp416469) + (block + (local.set $$a$5471 + (local.get $$a$3$lcssa) + ) + (local.set $$d$2470 + (local.get $$add$ptr358) + ) + (loop $while-in22 + (block $while-out21 + (local.set $$incdec$ptr419 + (i32.add + (local.get $$d$2470) + (i32.const -4) + ) + ) + (i32.store + (local.get $$d$2470) + (i32.const 0) + ) + (local.set $$cmp420 + (i32.lt_u + (local.get $$incdec$ptr419) + (local.get $$a$5471) + ) + ) + (if + (local.get $$cmp420) + (block + (local.set $$incdec$ptr423 + (i32.add + (local.get $$a$5471) + (i32.const -4) + ) + ) + (i32.store + (local.get $$incdec$ptr423) + (i32.const 0) + ) + (local.set $$a$6 + (local.get $$incdec$ptr423) + ) + ) + (local.set $$a$6 + (local.get $$a$5471) + ) + ) + (local.set $$34 + (i32.load + (local.get $$incdec$ptr419) + ) + ) + (local.set $$inc425 + (i32.add + (local.get $$34) + (i32.const 1) + ) + ) + (i32.store + (local.get $$incdec$ptr419) + (local.get $$inc425) + ) + (local.set $$cmp416 + (i32.gt_u + (local.get $$inc425) + (i32.const 999999999) + ) + ) + (if + (local.get $$cmp416) + (block + (local.set $$a$5471 + (local.get $$a$6) + ) + (local.set $$d$2470 + (local.get $$incdec$ptr419) + ) + ) + (block + (local.set $$a$5$lcssa + (local.get $$a$6) + ) + (local.set $$d$2$lcssa + (local.get $$incdec$ptr419) + ) + (br $while-out21) + ) + ) + (br $while-in22) + ) + ) + ) + (block + (local.set $$a$5$lcssa + (local.get $$a$3$lcssa) + ) + (local.set $$d$2$lcssa + (local.get $$add$ptr358) + ) + ) + ) + (local.set $$sub$ptr$rhs$cast428 + (local.get $$a$5$lcssa) + ) + (local.set $$sub$ptr$sub429 + (i32.sub + (local.get $$sub$ptr$rhs$cast345) + (local.get $$sub$ptr$rhs$cast428) + ) + ) + (local.set $$sub$ptr$div430 + (i32.shr_s + (local.get $$sub$ptr$sub429) + (i32.const 2) + ) + ) + (local.set $$mul431 + (i32.mul + (local.get $$sub$ptr$div430) + (i32.const 9) + ) + ) + (local.set $$35 + (i32.load + (local.get $$a$5$lcssa) + ) + ) + (local.set $$cmp433465 + (i32.lt_u + (local.get $$35) + (i32.const 10) + ) + ) + (if + (local.get $$cmp433465) + (block + (local.set $$a$8 + (local.get $$a$5$lcssa) + ) + (local.set $$d$4 + (local.get $$d$2$lcssa) + ) + (local.set $$e$4 + (local.get $$mul431) + ) + ) + (block + (local.set $$e$2467 + (local.get $$mul431) + ) + (local.set $$i$2466 + (i32.const 10) + ) + (loop $while-in24 + (block $while-out23 + (local.set $$mul437 + (i32.mul + (local.get $$i$2466) + (i32.const 10) + ) + ) + (local.set $$inc438 + (i32.add + (local.get $$e$2467) + (i32.const 1) + ) + ) + (local.set $$cmp433 + (i32.lt_u + (local.get $$35) + (local.get $$mul437) + ) + ) + (if + (local.get $$cmp433) + (block + (local.set $$a$8 + (local.get $$a$5$lcssa) + ) + (local.set $$d$4 + (local.get $$d$2$lcssa) + ) + (local.set $$e$4 + (local.get $$inc438) + ) + (br $while-out23) + ) + (block + (local.set $$e$2467 + (local.get $$inc438) + ) + (local.set $$i$2466 + (local.get $$mul437) + ) + ) + ) + (br $while-in24) + ) + ) + ) + ) + ) + (block + (local.set $$a$8 + (local.get $$a$3$lcssa) + ) + (local.set $$d$4 + (local.get $$add$ptr358) + ) + (local.set $$e$4 + (local.get $$e$1) + ) + ) + ) + ) + ) + (local.set $$add$ptr442 + (i32.add + (local.get $$d$4) + (i32.const 4) + ) + ) + (local.set $$cmp443 + (i32.gt_u + (local.get $$z$4$lcssa) + (local.get $$add$ptr442) + ) + ) + (local.set $$spec$select401 + (if (result i32) + (local.get $$cmp443) + (local.get $$add$ptr442) + (local.get $$z$4$lcssa) + ) + ) + (local.set $$a$9 + (local.get $$a$8) + ) + (local.set $$e$5 + (local.get $$e$4) + ) + (local.set $$z$8 + (local.get $$spec$select401) + ) + ) + (block + (local.set $$a$9 + (local.get $$a$3$lcssa) + ) + (local.set $$e$5 + (local.get $$e$1) + ) + (local.set $$z$8 + (local.get $$z$4$lcssa) + ) + ) + ) + (local.set $$sub626 + (i32.sub + (i32.const 0) + (local.get $$e$5) + ) + ) + (local.set $$cmp450458 + (i32.gt_u + (local.get $$z$8) + (local.get $$a$9) + ) + ) + (block $label$break$L109 + (if + (local.get $$cmp450458) + (block + (local.set $$z$9459 + (local.get $$z$8) + ) + (loop $while-in27 + (block $while-out26 + (local.set $$arrayidx453 + (i32.add + (local.get $$z$9459) + (i32.const -4) + ) + ) + (local.set $$36 + (i32.load + (local.get $$arrayidx453) + ) + ) + (local.set $$tobool454 + (i32.eq + (local.get $$36) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool454) + ) + (block + (local.set $$cmp450$lcssa + (i32.const 1) + ) + (local.set $$z$9$lcssa + (local.get $$z$9459) + ) + (br $label$break$L109) + ) + ) + (local.set $$cmp450 + (i32.gt_u + (local.get $$arrayidx453) + (local.get $$a$9) + ) + ) + (if + (local.get $$cmp450) + (local.set $$z$9459 + (local.get $$arrayidx453) + ) + (block + (local.set $$cmp450$lcssa + (i32.const 0) + ) + (local.set $$z$9$lcssa + (local.get $$arrayidx453) + ) + (br $while-out26) + ) + ) + (br $while-in27) + ) + ) + ) + (block + (local.set $$cmp450$lcssa + (i32.const 0) + ) + (local.set $$z$9$lcssa + (local.get $$z$8) + ) + ) + ) + ) + (block $do-once28 + (if + (local.get $$cmp338) + (block + (local.set $$not$tobool341 + (i32.xor + (local.get $$tobool341) + (i32.const 1) + ) + ) + (local.set $$inc468 + (i32.and + (local.get $$not$tobool341) + (i32.const 1) + ) + ) + (local.set $$spec$select402 + (i32.add + (local.get $$spec$select395) + (local.get $$inc468) + ) + ) + (local.set $$cmp470 + (i32.gt_s + (local.get $$spec$select402) + (local.get $$e$5) + ) + ) + (local.set $$cmp473 + (i32.gt_s + (local.get $$e$5) + (i32.const -5) + ) + ) + (local.set $$or$cond2 + (i32.and + (local.get $$cmp470) + (local.get $$cmp473) + ) + ) + (if + (local.get $$or$cond2) + (block + (local.set $$dec476 + (i32.add + (local.get $$t) + (i32.const -1) + ) + ) + (local.set $$add477$neg + (i32.add + (local.get $$spec$select402) + (i32.const -1) + ) + ) + (local.set $$sub478 + (i32.sub + (local.get $$add477$neg) + (local.get $$e$5) + ) + ) + (local.set $$p$addr$2 + (local.get $$sub478) + ) + (local.set $$t$addr$0 + (local.get $$dec476) + ) + ) + (block + (local.set $$sub480 + (i32.add + (local.get $$t) + (i32.const -2) + ) + ) + (local.set $$dec481 + (i32.add + (local.get $$spec$select402) + (i32.const -1) + ) + ) + (local.set $$p$addr$2 + (local.get $$dec481) + ) + (local.set $$t$addr$0 + (local.get $$sub480) + ) + ) + ) + (local.set $$and483 + (i32.and + (local.get $$fl) + (i32.const 8) + ) + ) + (local.set $$tobool484 + (i32.eq + (local.get $$and483) + (i32.const 0) + ) + ) + (if + (local.get $$tobool484) + (block + (if + (local.get $$cmp450$lcssa) + (block + (local.set $$arrayidx489 + (i32.add + (local.get $$z$9$lcssa) + (i32.const -4) + ) + ) + (local.set $$37 + (i32.load + (local.get $$arrayidx489) + ) + ) + (local.set $$tobool490 + (i32.eq + (local.get $$37) + (i32.const 0) + ) + ) + (if + (local.get $$tobool490) + (local.set $$j$2 + (i32.const 9) + ) + (block + (local.set $$rem494453 + (i32.and + (i32.rem_u + (local.get $$37) + (i32.const 10) + ) + (i32.const -1) + ) + ) + (local.set $$cmp495454 + (i32.eq + (local.get $$rem494453) + (i32.const 0) + ) + ) + (if + (local.get $$cmp495454) + (block + (local.set $$i$3455 + (i32.const 10) + ) + (local.set $$j$1456 + (i32.const 0) + ) + (loop $while-in31 + (block $while-out30 + (local.set $$mul499 + (i32.mul + (local.get $$i$3455) + (i32.const 10) + ) + ) + (local.set $$inc500 + (i32.add + (local.get $$j$1456) + (i32.const 1) + ) + ) + (local.set $$rem494 + (i32.and + (i32.rem_u + (local.get $$37) + (local.get $$mul499) + ) + (i32.const -1) + ) + ) + (local.set $$cmp495 + (i32.eq + (local.get $$rem494) + (i32.const 0) + ) + ) + (if + (local.get $$cmp495) + (block + (local.set $$i$3455 + (local.get $$mul499) + ) + (local.set $$j$1456 + (local.get $$inc500) + ) + ) + (block + (local.set $$j$2 + (local.get $$inc500) + ) + (br $while-out30) + ) + ) + (br $while-in31) + ) + ) + ) + (local.set $$j$2 + (i32.const 0) + ) + ) + ) + ) + ) + (local.set $$j$2 + (i32.const 9) + ) + ) + (local.set $$or504 + (i32.or + (local.get $$t$addr$0) + (i32.const 32) + ) + ) + (local.set $$cmp505 + (i32.eq + (local.get $$or504) + (i32.const 102) + ) + ) + (local.set $$sub$ptr$lhs$cast508 + (local.get $$z$9$lcssa) + ) + (local.set $$sub$ptr$sub510 + (i32.sub + (local.get $$sub$ptr$lhs$cast508) + (local.get $$sub$ptr$rhs$cast345) + ) + ) + (local.set $$sub$ptr$div511 + (i32.shr_s + (local.get $$sub$ptr$sub510) + (i32.const 2) + ) + ) + (local.set $$38 + (i32.mul + (local.get $$sub$ptr$div511) + (i32.const 9) + ) + ) + (local.set $$mul513 + (i32.add + (local.get $$38) + (i32.const -9) + ) + ) + (if + (local.get $$cmp505) + (block + (local.set $$sub514 + (i32.sub + (local.get $$mul513) + (local.get $$j$2) + ) + ) + (local.set $$39 + (i32.gt_s + (local.get $$sub514) + (i32.const 0) + ) + ) + (local.set $$spec$select403 + (if (result i32) + (local.get $$39) + (local.get $$sub514) + (i32.const 0) + ) + ) + (local.set $$cmp528 + (i32.lt_s + (local.get $$p$addr$2) + (local.get $$spec$select403) + ) + ) + (local.set $$spec$select413 + (if (result i32) + (local.get $$cmp528) + (local.get $$p$addr$2) + (local.get $$spec$select403) + ) + ) + (local.set $$p$addr$3 + (local.get $$spec$select413) + ) + (local.set $$t$addr$1 + (local.get $$t$addr$0) + ) + (br $do-once28) + ) + (block + (local.set $$add561 + (i32.add + (local.get $$mul513) + (local.get $$e$5) + ) + ) + (local.set $$sub562 + (i32.sub + (local.get $$add561) + (local.get $$j$2) + ) + ) + (local.set $$40 + (i32.gt_s + (local.get $$sub562) + (i32.const 0) + ) + ) + (local.set $$spec$select405 + (if (result i32) + (local.get $$40) + (local.get $$sub562) + (i32.const 0) + ) + ) + (local.set $$cmp577 + (i32.lt_s + (local.get $$p$addr$2) + (local.get $$spec$select405) + ) + ) + (local.set $$spec$select414 + (if (result i32) + (local.get $$cmp577) + (local.get $$p$addr$2) + (local.get $$spec$select405) + ) + ) + (local.set $$p$addr$3 + (local.get $$spec$select414) + ) + (local.set $$t$addr$1 + (local.get $$t$addr$0) + ) + (br $do-once28) + ) + ) + ) + (block + (local.set $$p$addr$3 + (local.get $$p$addr$2) + ) + (local.set $$t$addr$1 + (local.get $$t$addr$0) + ) + ) + ) + ) + (block + (local.set $$p$addr$3 + (local.get $$spec$select395) + ) + (local.set $$t$addr$1 + (local.get $$t) + ) + ) + ) + ) + (local.set $$tobool609 + (i32.ne + (local.get $$p$addr$3) + (i32.const 0) + ) + ) + (local.set $$and610 + (i32.shr_u + (local.get $$fl) + (i32.const 3) + ) + ) + (local.set $$and610$lobit + (i32.and + (local.get $$and610) + (i32.const 1) + ) + ) + (local.set $$41 + (if (result i32) + (local.get $$tobool609) + (i32.const 1) + (local.get $$and610$lobit) + ) + ) + (local.set $$or613 + (i32.or + (local.get $$t$addr$1) + (i32.const 32) + ) + ) + (local.set $$cmp614 + (i32.eq + (local.get $$or613) + (i32.const 102) + ) + ) + (if + (local.get $$cmp614) + (block + (local.set $$cmp617 + (i32.gt_s + (local.get $$e$5) + (i32.const 0) + ) + ) + (local.set $$add620 + (if (result i32) + (local.get $$cmp617) + (local.get $$e$5) + (i32.const 0) + ) + ) + (local.set $$estr$2 + (i32.const 0) + ) + (local.set $$sub$ptr$sub650$pn + (local.get $$add620) + ) + ) + (block + (local.set $$cmp623 + (i32.lt_s + (local.get $$e$5) + (i32.const 0) + ) + ) + (local.set $$cond629 + (if (result i32) + (local.get $$cmp623) + (local.get $$sub626) + (local.get $$e$5) + ) + ) + (local.set $$conv630 + (i64.extend_i32_s + (local.get $$cond629) + ) + ) + (local.set $$call631 + (call $_fmt_u + (local.get $$conv630) + (local.get $$arrayidx) + ) + ) + (local.set $$sub$ptr$lhs$cast633 + (local.get $$arrayidx) + ) + (local.set $$sub$ptr$rhs$cast634447 + (local.get $$call631) + ) + (local.set $$sub$ptr$sub635448 + (i32.sub + (local.get $$sub$ptr$lhs$cast633) + (local.get $$sub$ptr$rhs$cast634447) + ) + ) + (local.set $$cmp636449 + (i32.lt_s + (local.get $$sub$ptr$sub635448) + (i32.const 2) + ) + ) + (if + (local.get $$cmp636449) + (block + (local.set $$estr$1450 + (local.get $$call631) + ) + (loop $while-in33 + (block $while-out32 + (local.set $$incdec$ptr639 + (i32.add + (local.get $$estr$1450) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr639) + (i32.const 48) + ) + (local.set $$sub$ptr$rhs$cast634 + (local.get $$incdec$ptr639) + ) + (local.set $$sub$ptr$sub635 + (i32.sub + (local.get $$sub$ptr$lhs$cast633) + (local.get $$sub$ptr$rhs$cast634) + ) + ) + (local.set $$cmp636 + (i32.lt_s + (local.get $$sub$ptr$sub635) + (i32.const 2) + ) + ) + (if + (local.get $$cmp636) + (local.set $$estr$1450 + (local.get $$incdec$ptr639) + ) + (block + (local.set $$estr$1$lcssa + (local.get $$incdec$ptr639) + ) + (br $while-out32) + ) + ) + (br $while-in33) + ) + ) + ) + (local.set $$estr$1$lcssa + (local.get $$call631) + ) + ) + (local.set $$42 + (i32.shr_s + (local.get $$e$5) + (i32.const 31) + ) + ) + (local.set $$43 + (i32.and + (local.get $$42) + (i32.const 2) + ) + ) + (local.set $$44 + (i32.add + (local.get $$43) + (i32.const 43) + ) + ) + (local.set $$conv644 + (i32.and + (local.get $$44) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr645 + (i32.add + (local.get $$estr$1$lcssa) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr645) + (local.get $$conv644) + ) + (local.set $$conv646 + (i32.and + (local.get $$t$addr$1) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr647 + (i32.add + (local.get $$estr$1$lcssa) + (i32.const -2) + ) + ) + (i32.store8 + (local.get $$incdec$ptr647) + (local.get $$conv646) + ) + (local.set $$sub$ptr$rhs$cast649 + (local.get $$incdec$ptr647) + ) + (local.set $$sub$ptr$sub650 + (i32.sub + (local.get $$sub$ptr$lhs$cast633) + (local.get $$sub$ptr$rhs$cast649) + ) + ) + (local.set $$estr$2 + (local.get $$incdec$ptr647) + ) + (local.set $$sub$ptr$sub650$pn + (local.get $$sub$ptr$sub650) + ) + ) + ) + (local.set $$add608 + (i32.add + (local.get $$pl$0) + (i32.const 1) + ) + ) + (local.set $$add612 + (i32.add + (local.get $$add608) + (local.get $$p$addr$3) + ) + ) + (local.set $$l$1 + (i32.add + (local.get $$add612) + (local.get $$41) + ) + ) + (local.set $$add653 + (i32.add + (local.get $$l$1) + (local.get $$sub$ptr$sub650$pn) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add653) + (local.get $$fl) + ) + (call $_out + (local.get $$f) + (local.get $$prefix$0) + (local.get $$pl$0) + ) + (local.set $$xor655 + (i32.xor + (local.get $$fl) + (i32.const 65536) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$w) + (local.get $$add653) + (local.get $$xor655) + ) + (if + (local.get $$cmp614) + (block + (local.set $$cmp660 + (i32.gt_u + (local.get $$a$9) + (local.get $$z$0) + ) + ) + (local.set $$spec$select408 + (if (result i32) + (local.get $$cmp660) + (local.get $$z$0) + (local.get $$a$9) + ) + ) + (local.set $$add$ptr671 + (i32.add + (local.get $$buf) + (i32.const 9) + ) + ) + (local.set $$sub$ptr$lhs$cast694 + (local.get $$add$ptr671) + ) + (local.set $$incdec$ptr689 + (i32.add + (local.get $$buf) + (i32.const 8) + ) + ) + (local.set $$d$5438 + (local.get $$spec$select408) + ) + (loop $while-in35 + (block $while-out34 + (local.set $$45 + (i32.load + (local.get $$d$5438) + ) + ) + (local.set $$conv669 + (i64.extend_i32_u + (local.get $$45) + ) + ) + (local.set $$call672 + (call $_fmt_u + (local.get $$conv669) + (local.get $$add$ptr671) + ) + ) + (local.set $$cmp673 + (i32.eq + (local.get $$d$5438) + (local.get $$spec$select408) + ) + ) + (if + (local.get $$cmp673) + (block + (local.set $$cmp686 + (i32.eq + (local.get $$call672) + (local.get $$add$ptr671) + ) + ) + (if + (local.get $$cmp686) + (block + (i32.store8 + (local.get $$incdec$ptr689) + (i32.const 48) + ) + (local.set $$s668$1 + (local.get $$incdec$ptr689) + ) + ) + (local.set $$s668$1 + (local.get $$call672) + ) + ) + ) + (block + (local.set $$cmp678435 + (i32.gt_u + (local.get $$call672) + (local.get $$buf) + ) + ) + (if + (local.get $$cmp678435) + (block + (local.set $$46 + (local.get $$call672) + ) + (local.set $$47 + (i32.sub + (local.get $$46) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (drop + (call $_memset + (local.get $$buf) + (i32.const 48) + (local.get $$47) + ) + ) + (local.set $$s668$0436 + (local.get $$call672) + ) + (loop $while-in37 + (block $while-out36 + (local.set $$incdec$ptr681 + (i32.add + (local.get $$s668$0436) + (i32.const -1) + ) + ) + (local.set $$cmp678 + (i32.gt_u + (local.get $$incdec$ptr681) + (local.get $$buf) + ) + ) + (if + (local.get $$cmp678) + (local.set $$s668$0436 + (local.get $$incdec$ptr681) + ) + (block + (local.set $$s668$1 + (local.get $$incdec$ptr681) + ) + (br $while-out36) + ) + ) + (br $while-in37) + ) + ) + ) + (local.set $$s668$1 + (local.get $$call672) + ) + ) + ) + ) + (local.set $$sub$ptr$rhs$cast695 + (local.get $$s668$1) + ) + (local.set $$sub$ptr$sub696 + (i32.sub + (local.get $$sub$ptr$lhs$cast694) + (local.get $$sub$ptr$rhs$cast695) + ) + ) + (call $_out + (local.get $$f) + (local.get $$s668$1) + (local.get $$sub$ptr$sub696) + ) + (local.set $$incdec$ptr698 + (i32.add + (local.get $$d$5438) + (i32.const 4) + ) + ) + (local.set $$cmp665 + (i32.gt_u + (local.get $$incdec$ptr698) + (local.get $$z$0) + ) + ) + (if + (local.get $$cmp665) + (br $while-out34) + (local.set $$d$5438 + (local.get $$incdec$ptr698) + ) + ) + (br $while-in35) + ) + ) + (local.set $$tobool609$not + (i32.xor + (local.get $$tobool609) + (i32.const 1) + ) + ) + (local.set $$and702 + (i32.and + (local.get $$fl) + (i32.const 8) + ) + ) + (local.set $$tobool703 + (i32.eq + (local.get $$and702) + (i32.const 0) + ) + ) + (local.set $$or$cond409 + (i32.and + (local.get $$tobool703) + (local.get $$tobool609$not) + ) + ) + (if + (i32.eqz + (local.get $$or$cond409) + ) + (call $_out + (local.get $$f) + (i32.const 16649) + (i32.const 1) + ) + ) + (local.set $$cmp707430 + (i32.lt_u + (local.get $$incdec$ptr698) + (local.get $$z$9$lcssa) + ) + ) + (local.set $$cmp710431 + (i32.gt_s + (local.get $$p$addr$3) + (i32.const 0) + ) + ) + (local.set $$48 + (i32.and + (local.get $$cmp707430) + (local.get $$cmp710431) + ) + ) + (if + (local.get $$48) + (block + (local.set $$d$6432 + (local.get $$incdec$ptr698) + ) + (local.set $$p$addr$4433 + (local.get $$p$addr$3) + ) + (loop $while-in39 + (block $while-out38 + (local.set $$49 + (i32.load + (local.get $$d$6432) + ) + ) + (local.set $$conv716 + (i64.extend_i32_u + (local.get $$49) + ) + ) + (local.set $$call719 + (call $_fmt_u + (local.get $$conv716) + (local.get $$add$ptr671) + ) + ) + (local.set $$cmp722427 + (i32.gt_u + (local.get $$call719) + (local.get $$buf) + ) + ) + (if + (local.get $$cmp722427) + (block + (local.set $$50 + (local.get $$call719) + ) + (local.set $$51 + (i32.sub + (local.get $$50) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (drop + (call $_memset + (local.get $$buf) + (i32.const 48) + (local.get $$51) + ) + ) + (local.set $$s715$0428 + (local.get $$call719) + ) + (loop $while-in41 + (block $while-out40 + (local.set $$incdec$ptr725 + (i32.add + (local.get $$s715$0428) + (i32.const -1) + ) + ) + (local.set $$cmp722 + (i32.gt_u + (local.get $$incdec$ptr725) + (local.get $$buf) + ) + ) + (if + (local.get $$cmp722) + (local.set $$s715$0428 + (local.get $$incdec$ptr725) + ) + (block + (local.set $$s715$0$lcssa + (local.get $$incdec$ptr725) + ) + (br $while-out40) + ) + ) + (br $while-in41) + ) + ) + ) + (local.set $$s715$0$lcssa + (local.get $$call719) + ) + ) + (local.set $$52 + (i32.lt_s + (local.get $$p$addr$4433) + (i32.const 9) + ) + ) + (local.set $$cond732 + (if (result i32) + (local.get $$52) + (local.get $$p$addr$4433) + (i32.const 9) + ) + ) + (call $_out + (local.get $$f) + (local.get $$s715$0$lcssa) + (local.get $$cond732) + ) + (local.set $$incdec$ptr734 + (i32.add + (local.get $$d$6432) + (i32.const 4) + ) + ) + (local.set $$sub735 + (i32.add + (local.get $$p$addr$4433) + (i32.const -9) + ) + ) + (local.set $$cmp707 + (i32.lt_u + (local.get $$incdec$ptr734) + (local.get $$z$9$lcssa) + ) + ) + (local.set $$cmp710 + (i32.gt_s + (local.get $$p$addr$4433) + (i32.const 9) + ) + ) + (local.set $$53 + (i32.and + (local.get $$cmp707) + (local.get $$cmp710) + ) + ) + (if + (local.get $$53) + (block + (local.set $$d$6432 + (local.get $$incdec$ptr734) + ) + (local.set $$p$addr$4433 + (local.get $$sub735) + ) + ) + (block + (local.set $$p$addr$4$lcssa + (local.get $$sub735) + ) + (br $while-out38) + ) + ) + (br $while-in39) + ) + ) + ) + (local.set $$p$addr$4$lcssa + (local.get $$p$addr$3) + ) + ) + (local.set $$add737 + (i32.add + (local.get $$p$addr$4$lcssa) + (i32.const 9) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$add737) + (i32.const 9) + (i32.const 0) + ) + ) + (block + (local.set $$add$ptr742 + (i32.add + (local.get $$a$9) + (i32.const 4) + ) + ) + (local.set $$spec$select410 + (if (result i32) + (local.get $$cmp450$lcssa) + (local.get $$z$9$lcssa) + (local.get $$add$ptr742) + ) + ) + (local.set $$cmp745442 + (i32.lt_u + (local.get $$a$9) + (local.get $$spec$select410) + ) + ) + (local.set $$cmp748443 + (i32.gt_s + (local.get $$p$addr$3) + (i32.const -1) + ) + ) + (local.set $$54 + (i32.and + (local.get $$cmp745442) + (local.get $$cmp748443) + ) + ) + (if + (local.get $$54) + (block + (local.set $$add$ptr756 + (i32.add + (local.get $$buf) + (i32.const 9) + ) + ) + (local.set $$and780 + (i32.and + (local.get $$fl) + (i32.const 8) + ) + ) + (local.set $$tobool781 + (i32.eq + (local.get $$and780) + (i32.const 0) + ) + ) + (local.set $$sub$ptr$lhs$cast787 + (local.get $$add$ptr756) + ) + (local.set $$55 + (i32.sub + (i32.const 0) + (local.get $$sub$ptr$rhs$cast$le) + ) + ) + (local.set $$incdec$ptr763 + (i32.add + (local.get $$buf) + (i32.const 8) + ) + ) + (local.set $$d$7444 + (local.get $$a$9) + ) + (local.set $$p$addr$5445 + (local.get $$p$addr$3) + ) + (loop $while-in43 + (block $while-out42 + (local.set $$56 + (i32.load + (local.get $$d$7444) + ) + ) + (local.set $$conv754 + (i64.extend_i32_u + (local.get $$56) + ) + ) + (local.set $$call757 + (call $_fmt_u + (local.get $$conv754) + (local.get $$add$ptr756) + ) + ) + (local.set $$cmp760 + (i32.eq + (local.get $$call757) + (local.get $$add$ptr756) + ) + ) + (if + (local.get $$cmp760) + (block + (i32.store8 + (local.get $$incdec$ptr763) + (i32.const 48) + ) + (local.set $$s753$0 + (local.get $$incdec$ptr763) + ) + ) + (local.set $$s753$0 + (local.get $$call757) + ) + ) + (local.set $$cmp765 + (i32.eq + (local.get $$d$7444) + (local.get $$a$9) + ) + ) + (block $do-once44 + (if + (local.get $$cmp765) + (block + (local.set $$incdec$ptr776 + (i32.add + (local.get $$s753$0) + (i32.const 1) + ) + ) + (call $_out + (local.get $$f) + (local.get $$s753$0) + (i32.const 1) + ) + (local.set $$cmp777 + (i32.lt_s + (local.get $$p$addr$5445) + (i32.const 1) + ) + ) + (local.set $$or$cond411 + (i32.and + (local.get $$tobool781) + (local.get $$cmp777) + ) + ) + (if + (local.get $$or$cond411) + (block + (local.set $$s753$2 + (local.get $$incdec$ptr776) + ) + (br $do-once44) + ) + ) + (call $_out + (local.get $$f) + (i32.const 16649) + (i32.const 1) + ) + (local.set $$s753$2 + (local.get $$incdec$ptr776) + ) + ) + (block + (local.set $$cmp770439 + (i32.gt_u + (local.get $$s753$0) + (local.get $$buf) + ) + ) + (if + (i32.eqz + (local.get $$cmp770439) + ) + (block + (local.set $$s753$2 + (local.get $$s753$0) + ) + (br $do-once44) + ) + ) + (local.set $$scevgep513 + (i32.add + (local.get $$s753$0) + (local.get $$55) + ) + ) + (local.set $$scevgep513514 + (local.get $$scevgep513) + ) + (drop + (call $_memset + (local.get $$buf) + (i32.const 48) + (local.get $$scevgep513514) + ) + ) + (local.set $$s753$1440 + (local.get $$s753$0) + ) + (loop $while-in47 + (block $while-out46 + (local.set $$incdec$ptr773 + (i32.add + (local.get $$s753$1440) + (i32.const -1) + ) + ) + (local.set $$cmp770 + (i32.gt_u + (local.get $$incdec$ptr773) + (local.get $$buf) + ) + ) + (if + (local.get $$cmp770) + (local.set $$s753$1440 + (local.get $$incdec$ptr773) + ) + (block + (local.set $$s753$2 + (local.get $$incdec$ptr773) + ) + (br $while-out46) + ) + ) + (br $while-in47) + ) + ) + ) + ) + ) + (local.set $$sub$ptr$rhs$cast788 + (local.get $$s753$2) + ) + (local.set $$sub$ptr$sub789 + (i32.sub + (local.get $$sub$ptr$lhs$cast787) + (local.get $$sub$ptr$rhs$cast788) + ) + ) + (local.set $$cmp790 + (i32.gt_s + (local.get $$p$addr$5445) + (local.get $$sub$ptr$sub789) + ) + ) + (local.set $$cond800 + (if (result i32) + (local.get $$cmp790) + (local.get $$sub$ptr$sub789) + (local.get $$p$addr$5445) + ) + ) + (call $_out + (local.get $$f) + (local.get $$s753$2) + (local.get $$cond800) + ) + (local.set $$sub806 + (i32.sub + (local.get $$p$addr$5445) + (local.get $$sub$ptr$sub789) + ) + ) + (local.set $$incdec$ptr808 + (i32.add + (local.get $$d$7444) + (i32.const 4) + ) + ) + (local.set $$cmp745 + (i32.lt_u + (local.get $$incdec$ptr808) + (local.get $$spec$select410) + ) + ) + (local.set $$cmp748 + (i32.gt_s + (local.get $$sub806) + (i32.const -1) + ) + ) + (local.set $$57 + (i32.and + (local.get $$cmp745) + (local.get $$cmp748) + ) + ) + (if + (local.get $$57) + (block + (local.set $$d$7444 + (local.get $$incdec$ptr808) + ) + (local.set $$p$addr$5445 + (local.get $$sub806) + ) + ) + (block + (local.set $$p$addr$5$lcssa + (local.get $$sub806) + ) + (br $while-out42) + ) + ) + (br $while-in43) + ) + ) + ) + (local.set $$p$addr$5$lcssa + (local.get $$p$addr$3) + ) + ) + (local.set $$add810 + (i32.add + (local.get $$p$addr$5$lcssa) + (i32.const 18) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$add810) + (i32.const 18) + (i32.const 0) + ) + (local.set $$sub$ptr$lhs$cast811 + (local.get $$arrayidx) + ) + (local.set $$sub$ptr$rhs$cast812 + (local.get $$estr$2) + ) + (local.set $$sub$ptr$sub813 + (i32.sub + (local.get $$sub$ptr$lhs$cast811) + (local.get $$sub$ptr$rhs$cast812) + ) + ) + (call $_out + (local.get $$f) + (local.get $$estr$2) + (local.get $$sub$ptr$sub813) + ) + ) + ) + (local.set $$xor816 + (i32.xor + (local.get $$fl) + (i32.const 8192) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w) + (local.get $$add653) + (local.get $$xor816) + ) + (local.set $$add653$sink524 + (local.get $$add653) + ) + ) + ) + ) + (local.set $$cmp818 + (i32.lt_s + (local.get $$add653$sink524) + (local.get $$w) + ) + ) + (local.set $$w$add653 + (if (result i32) + (local.get $$cmp818) + (local.get $$w) + (local.get $$add653$sink524) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$w$add653) + ) + ) + (func $_pop_arg_long_double (; 580 ;) (param $$arg i32) (param $$ap i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 f64) + (local $$arglist_current i32) + (local $$arglist_next i32) + (local $$expanded i32) + (local $$expanded1 i32) + (local $$expanded2 i32) + (local $$expanded3 i32) + (local $$expanded4 i32) + (local $$expanded5 i32) + (local $$expanded6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$arglist_current + (i32.load + (local.get $$ap) + ) + ) + (local.set $$0 + (local.get $$arglist_current) + ) + (local.set $$expanded2 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded1 + (local.get $$expanded2) + ) + (local.set $$expanded + (i32.sub + (local.get $$expanded1) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.add + (local.get $$0) + (local.get $$expanded) + ) + ) + (local.set $$expanded6 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded5 + (local.get $$expanded6) + ) + (local.set $$expanded4 + (i32.sub + (local.get $$expanded5) + (i32.const 1) + ) + ) + (local.set $$expanded3 + (i32.xor + (local.get $$expanded4) + (i32.const -1) + ) + ) + (local.set $$2 + (i32.and + (local.get $$1) + (local.get $$expanded3) + ) + ) + (local.set $$3 + (local.get $$2) + ) + (local.set $$4 + (f64.load + (local.get $$3) + ) + ) + (local.set $$arglist_next + (i32.add + (local.get $$3) + (i32.const 8) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next) + ) + (f64.store + (local.get $$arg) + (local.get $$4) + ) + (return) + ) + (func $___vfprintf_internal (; 581 ;) (param $$f i32) (param $$fmt i32) (param $$ap i32) (param $$fmt_fp i32) (param $$pop_arg_long_double i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add$ptr i32) + (local $$and i32) + (local $$and11 i32) + (local $$and36 i32) + (local $$ap2 i32) + (local $$buf i32) + (local $$buf_size i32) + (local $$call i32) + (local $$call21 i32) + (local $$call2133 i32) + (local $$call6 i32) + (local $$cmp i32) + (local $$cmp5 i32) + (local $$cmp7 i32) + (local $$cond i32) + (local $$internal_buf i32) + (local $$lock i32) + (local $$mode i32) + (local $$nl_arg i32) + (local $$nl_type i32) + (local $$or i32) + (local $$ret$1 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$spec$select32 i32) + (local $$tobool i32) + (local $$tobool22 i32) + (local $$tobool26 i32) + (local $$tobool37 i32) + (local $$tobool41 i32) + (local $$vacopy_currentptr i32) + (local $$wbase i32) + (local $$wend i32) + (local $$wpos i32) + (local $$write i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 224) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 224) + ) + ) + (local.set $$ap2 + (i32.add + (local.get $sp_a) + (i32.const 208) + ) + ) + (local.set $$nl_type + (i32.add + (local.get $sp_a) + (i32.const 160) + ) + ) + (local.set $$nl_arg + (i32.add + (local.get $sp_a) + (i32.const 80) + ) + ) + (local.set $$internal_buf + (local.get $sp_a) + ) + (i64.store + (local.get $$nl_type) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$nl_type) + (i32.const 8) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$nl_type) + (i32.const 16) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$nl_type) + (i32.const 24) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$nl_type) + (i32.const 32) + ) + (i64.const 0) + ) + (local.set $$vacopy_currentptr + (i32.load + (local.get $$ap) + ) + ) + (i32.store + (local.get $$ap2) + (local.get $$vacopy_currentptr) + ) + (local.set $$call + (call $_printf_core + (i32.const 0) + (local.get $$fmt) + (local.get $$ap2) + (local.get $$nl_arg) + (local.get $$nl_type) + (local.get $$fmt_fp) + (local.get $$pop_arg_long_double) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$retval$0 + (i32.const -1) + ) + (block + (local.set $$lock + (i32.add + (local.get $$f) + (i32.const 76) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lock) + ) + ) + (local.set $$cmp5 + (i32.gt_s + (local.get $$0) + (i32.const -1) + ) + ) + (if + (local.get $$cmp5) + (block + (local.set $$call6 + (call $___lockfile + (local.get $$f) + ) + ) + (local.set $$cond + (local.get $$call6) + ) + ) + (local.set $$cond + (i32.const 0) + ) + ) + (local.set $$1 + (i32.load + (local.get $$f) + ) + ) + (local.set $$and + (i32.and + (local.get $$1) + (i32.const 32) + ) + ) + (local.set $$mode + (i32.add + (local.get $$f) + (i32.const 74) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$cmp7 + (i32.lt_s + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 1) + ) + ) + (if + (local.get $$cmp7) + (block + (local.set $$and11 + (i32.and + (local.get $$1) + (i32.const -33) + ) + ) + (i32.store + (local.get $$f) + (local.get $$and11) + ) + ) + ) + (local.set $$buf_size + (i32.add + (local.get $$f) + (i32.const 48) + ) + ) + (local.set $$3 + (i32.load + (local.get $$buf_size) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$buf + (i32.add + (local.get $$f) + (i32.const 44) + ) + ) + (local.set $$4 + (i32.load + (local.get $$buf) + ) + ) + (i32.store + (local.get $$buf) + (local.get $$internal_buf) + ) + (local.set $$wbase + (i32.add + (local.get $$f) + (i32.const 28) + ) + ) + (i32.store + (local.get $$wbase) + (local.get $$internal_buf) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$internal_buf) + ) + (i32.store + (local.get $$buf_size) + (i32.const 80) + ) + (local.set $$add$ptr + (i32.add + (local.get $$internal_buf) + (i32.const 80) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend) + (local.get $$add$ptr) + ) + (local.set $$call21 + (call $_printf_core + (local.get $$f) + (local.get $$fmt) + (local.get $$ap2) + (local.get $$nl_arg) + (local.get $$nl_type) + (local.get $$fmt_fp) + (local.get $$pop_arg_long_double) + ) + ) + (local.set $$tobool22 + (i32.eq + (local.get $$4) + (i32.const 0) + ) + ) + (if + (local.get $$tobool22) + (local.set $$ret$1 + (local.get $$call21) + ) + (block + (local.set $$write + (i32.add + (local.get $$f) + (i32.const 36) + ) + ) + (local.set $$5 + (i32.load + (local.get $$write) + ) + ) + (drop + (call_indirect (type $FUNCSIG$iiii) + (local.get $$f) + (i32.const 0) + (i32.const 0) + (i32.add + (i32.and + (local.get $$5) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$tobool26 + (i32.eq + (local.get $$6) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool26) + (i32.const -1) + (local.get $$call21) + ) + ) + (i32.store + (local.get $$buf) + (local.get $$4) + ) + (i32.store + (local.get $$buf_size) + (i32.const 0) + ) + (i32.store + (local.get $$wend) + (i32.const 0) + ) + (i32.store + (local.get $$wbase) + (i32.const 0) + ) + (i32.store + (local.get $$wpos) + (i32.const 0) + ) + (local.set $$ret$1 + (local.get $$spec$select) + ) + ) + ) + ) + (block + (local.set $$call2133 + (call $_printf_core + (local.get $$f) + (local.get $$fmt) + (local.get $$ap2) + (local.get $$nl_arg) + (local.get $$nl_type) + (local.get $$fmt_fp) + (local.get $$pop_arg_long_double) + ) + ) + (local.set $$ret$1 + (local.get $$call2133) + ) + ) + ) + (local.set $$7 + (i32.load + (local.get $$f) + ) + ) + (local.set $$and36 + (i32.and + (local.get $$7) + (i32.const 32) + ) + ) + (local.set $$tobool37 + (i32.eq + (local.get $$and36) + (i32.const 0) + ) + ) + (local.set $$spec$select32 + (if (result i32) + (local.get $$tobool37) + (local.get $$ret$1) + (i32.const -1) + ) + ) + (local.set $$or + (i32.or + (local.get $$7) + (local.get $$and) + ) + ) + (i32.store + (local.get $$f) + (local.get $$or) + ) + (local.set $$tobool41 + (i32.eq + (local.get $$cond) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool41) + ) + (call $___unlockfile + (local.get $$f) + ) + ) + (local.set $$retval$0 + (local.get $$spec$select32) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_printf_core (; 582 ;) (param $$f i32) (param $$fmt i32) (param $$ap i32) (param $$nl_arg i32) (param $$nl_type i32) (param $$fmt_fp i32) (param $$pop_arg_long_double i32) (result i32) + (local $$$ i32) + (local $$$lcssa213 i32) + (local $$$pre i32) + (local $$$pre261 i32) + (local $$$pre262 i32) + (local $$$pre263 i32) + (local $$$pre263$pre i32) + (local $$$pre264 i32) + (local $$$pre265 i64) + (local $$$pre267 i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i64) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i64) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i64) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i64) + (local $$56 i64) + (local $$57 i64) + (local $$58 i32) + (local $$59 i64) + (local $$6 i32) + (local $$60 i32) + (local $$61 i32) + (local $$62 i64) + (local $$63 i64) + (local $$64 i64) + (local $$65 i32) + (local $$66 i64) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 i32) + (local $$70 i32) + (local $$71 f64) + (local $$72 i32) + (local $$73 i32) + (local $$8 i32) + (local $$9 i32) + (local $$a$0 i32) + (local $$a$1 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr139 i32) + (local $$add$ptr150 i32) + (local $$add$ptr206 i32) + (local $$add$ptr258 i32) + (local $$add$ptr341 i32) + (local $$add$ptr354 i32) + (local $$add$ptr468 i32) + (local $$add$ptr88 i32) + (local $$add270 i32) + (local $$add323 i32) + (local $$add390 i32) + (local $$add407 i32) + (local $$add436 i32) + (local $$and i32) + (local $$and211 i32) + (local $$and215 i32) + (local $$and217 i32) + (local $$and220 i32) + (local $$and233 i32) + (local $$and250 i32) + (local $$and255 i32) + (local $$and264 i32) + (local $$and290 i32) + (local $$and295 i32) + (local $$and310 i32) + (local $$arg i32) + (local $$arglist_current i32) + (local $$arglist_current2 i32) + (local $$arglist_next i32) + (local $$arglist_next3 i32) + (local $$argpos$0 i32) + (local $$arrayidx114 i32) + (local $$arrayidx119 i32) + (local $$arrayidx124 i32) + (local $$arrayidx129 i32) + (local $$arrayidx132 i32) + (local $$arrayidx16 i32) + (local $$arrayidx174 i32) + (local $$arrayidx193 i32) + (local $$arrayidx207 i32) + (local $$arrayidx31 i32) + (local $$arrayidx35 i32) + (local $$arrayidx365 i32) + (local $$arrayidx40 i32) + (local $$arrayidx464 i32) + (local $$arrayidx476 i32) + (local $$arrayidx68 i32) + (local $$arrayidx73 i32) + (local $$arrayidx78 i32) + (local $$arrayidx81 i32) + (local $$brmerge i32) + (local $$brmerge235 i32) + (local $$buf i32) + (local $$call i32) + (local $$call104 i32) + (local $$call121 i32) + (local $$call160 i32) + (local $$call251 i32) + (local $$call263 i32) + (local $$call305 i32) + (local $$call33 i32) + (local $$call351 i32) + (local $$call379 i32) + (local $$call406 i32) + (local $$call424 i32) + (local $$call70 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp105 i32) + (local $$cmp111 i32) + (local $$cmp116 i32) + (local $$cmp126 i32) + (local $$cmp13 i32) + (local $$cmp166 i32) + (local $$cmp177 i32) + (local $$cmp18 i32) + (local $$cmp182 i32) + (local $$cmp185 i32) + (local $$cmp212 i32) + (local $$cmp241 i32) + (local $$cmp271 i32) + (local $$cmp283 i32) + (local $$cmp307 i32) + (local $$cmp324 i32) + (local $$cmp37 i32) + (local $$cmp372 i32) + (local $$cmp372242 i32) + (local $$cmp380 i32) + (local $$cmp385 i32) + (local $$cmp399 i32) + (local $$cmp399247 i32) + (local $$cmp408 i32) + (local $$cmp416 i32) + (local $$cmp429 i32) + (local $$cmp437 i32) + (local $$cmp461 i32) + (local $$cmp473 i32) + (local $$cmp50 i32) + (local $$cmp50231 i32) + (local $$cmp65 i32) + (local $$cmp75 i32) + (local $$cmp97 i32) + (local $$cnt$0 i32) + (local $$cnt$0$ph i32) + (local $$cnt$1 i32) + (local $$cond i32) + (local $$cond149 i32) + (local $$cond246 i32) + (local $$cond350 i32) + (local $$cond421 i32) + (local $$conv120 i32) + (local $$conv130 i32) + (local $$conv134 i32) + (local $$conv138 i32) + (local $$conv164 i32) + (local $$conv172 i32) + (local $$conv175 i32) + (local $$conv208 i32) + (local $$conv227 i64) + (local $$conv230 i32) + (local $$conv233 i32) + (local $$conv238 i64) + (local $$conv32 i32) + (local $$conv340 i32) + (local $$conv363 i32) + (local $$conv41 i32) + (local $$conv48 i32) + (local $$conv48229 i32) + (local $$conv69 i32) + (local $$conv79 i32) + (local $$conv83 i32) + (local $$conv87 i32) + (local $$expanded i32) + (local $$expanded10 i32) + (local $$expanded11 i32) + (local $$expanded12 i32) + (local $$expanded13 i32) + (local $$expanded14 i32) + (local $$expanded15 i32) + (local $$expanded16 i32) + (local $$expanded4 i32) + (local $$expanded5 i32) + (local $$expanded6 i32) + (local $$expanded7 i32) + (local $$expanded8 i32) + (local $$expanded9 i32) + (local $$fl$0$lcssa i32) + (local $$fl$0237 i32) + (local $$fl$1 i32) + (local $$fl$3 i32) + (local $$fl$4 i32) + (local $$fl$6 i32) + (local $$i$0217 i32) + (local $$i$0217271 i32) + (local $$i$0243 i32) + (local $$i$1248 i32) + (local $$i$2224 i32) + (local $$i$3221 i32) + (local $$i137 i32) + (local $$i86 i32) + (local $$inc i32) + (local $$inc483 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr171 i32) + (local $$incdec$ptr23 i32) + (local $$incdec$ptr378 i32) + (local $$incdec$ptr405 i32) + (local $$incdec$ptr45 i32) + (local $$incdec$ptr62 i32) + (local $$incdec$ptr93 i32) + (local $$l$0 i32) + (local $$l$0$ph i32) + (local $$l$0$ph$be i32) + (local $$l10n$0$ph i32) + (local $$l10n$1 i32) + (local $$l10n$2 i32) + (local $$l10n$3 i32) + (local $$lnot i32) + (local $$lnot$ext i32) + (local $$mb i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond189 i32) + (local $$or$cond190 i32) + (local $$or$cond194 i32) + (local $$or100 i32) + (local $$or247 i32) + (local $$p$0 i32) + (local $$p$1 i32) + (local $$p$2 i32) + (local $$p$2$add323 i32) + (local $$p$3 i32) + (local $$p$4269 i32) + (local $$p$5 i32) + (local $$pl$0 i32) + (local $$pl$1 i32) + (local $$pl$2 i32) + (local $$prefix$0 i32) + (local $$prefix$1 i32) + (local $$prefix$2 i32) + (local $$retval$0 i32) + (local $$s i32) + (local $$shl i32) + (local $$shl232 i32) + (local $$shl60 i32) + (local $$shr199 i32) + (local $$spec$select i32) + (local $$spec$select193 i32) + (local $$spec$select195 i32) + (local $$spec$select200 i32) + (local $$spec$select201 i32) + (local $$spec$select202 i32) + (local $$spec$select203 i32) + (local $$spec$select204 i32) + (local $$spec$select205 i32) + (local $$spec$select206 i32) + (local $$spec$select207 i32) + (local $$spec$select208 i32) + (local $$st$0 i32) + (local $$storemerge187$lcssa i32) + (local $$storemerge187236 i32) + (local $$storemerge188 i32) + (local $$sub i32) + (local $$sub$ptr$lhs$cast i32) + (local $$sub$ptr$lhs$cast318 i32) + (local $$sub$ptr$lhs$cast356 i32) + (local $$sub$ptr$lhs$cast426$pre$phiZZZZ2D i32) + (local $$sub$ptr$rhs$cast i32) + (local $$sub$ptr$rhs$cast268 i32) + (local $$sub$ptr$rhs$cast319 i32) + (local $$sub$ptr$rhs$cast357 i32) + (local $$sub$ptr$rhs$cast427 i32) + (local $$sub$ptr$sub i32) + (local $$sub$ptr$sub269 i32) + (local $$sub$ptr$sub320 i32) + (local $$sub$ptr$sub358 i32) + (local $$sub$ptr$sub428 i32) + (local $$sub101 i32) + (local $$sub131 i32) + (local $$sub135 i32) + (local $$sub165 i32) + (local $$sub173 i32) + (local $$sub176 i32) + (local $$sub287 i64) + (local $$sub384 i32) + (local $$sub42 i32) + (local $$sub49 i32) + (local $$sub49230 i32) + (local $$sub49238 i32) + (local $$sub80 i32) + (local $$sub84 i32) + (local $$t$0 i32) + (local $$t$1 i32) + (local $$tobool i32) + (local $$tobool122 i32) + (local $$tobool141 i32) + (local $$tobool179 i32) + (local $$tobool209 i32) + (local $$tobool218 i32) + (local $$tobool25 i32) + (local $$tobool253 i32) + (local $$tobool256 i32) + (local $$tobool265 i32) + (local $$tobool28 i32) + (local $$tobool291 i32) + (local $$tobool296 i32) + (local $$tobool313 i32) + (local $$tobool315 i32) + (local $$tobool34 i32) + (local $$tobool345 i32) + (local $$tobool352 i32) + (local $$tobool375 i32) + (local $$tobool402 i32) + (local $$tobool454 i32) + (local $$tobool457 i32) + (local $$tobool465 i32) + (local $$tobool477 i32) + (local $$tobool55 i32) + (local $$tobool55234 i32) + (local $$tobool71 i32) + (local $$tobool90 i32) + (local $$trunc i32) + (local $$w$0 i32) + (local $$w$1 i32) + (local $$w$2 i32) + (local $$wc i32) + (local $$ws$0244 i32) + (local $$ws$1249 i32) + (local $$xor i32) + (local $$xor444 i32) + (local $$xor452 i32) + (local $$z$0$lcssa i32) + (local $$z$0226 i32) + (local $$z$1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$s + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$arg + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$buf + (local.get $sp_a) + ) + (local.set $$wc + (i32.add + (local.get $sp_a) + (i32.const 48) + ) + ) + (local.set $$mb + (i32.add + (local.get $sp_a) + (i32.const 60) + ) + ) + (i32.store + (local.get $$s) + (local.get $$fmt) + ) + (local.set $$tobool25 + (i32.ne + (local.get $$f) + (i32.const 0) + ) + ) + (local.set $$add$ptr206 + (i32.add + (local.get $$buf) + (i32.const 40) + ) + ) + (local.set $$sub$ptr$lhs$cast318 + (local.get $$add$ptr206) + ) + (local.set $$add$ptr341 + (i32.add + (local.get $$buf) + (i32.const 39) + ) + ) + (local.set $$arrayidx365 + (i32.add + (local.get $$wc) + (i32.const 4) + ) + ) + (local.set $$cnt$0$ph + (i32.const 0) + ) + (local.set $$l$0$ph + (i32.const 0) + ) + (local.set $$l10n$0$ph + (i32.const 0) + ) + (loop $label$continue$L1 + (block $label$break$L1 + (local.set $$cnt$0 + (local.get $$cnt$0$ph) + ) + (local.set $$l$0 + (local.get $$l$0$ph) + ) + (loop $while-in + (block $while-out + (local.set $$cmp + (i32.gt_s + (local.get $$cnt$0) + (i32.const -1) + ) + ) + (block $do-once + (if + (local.get $$cmp) + (block + (local.set $$sub + (i32.sub + (i32.const 2147483647) + (local.get $$cnt$0) + ) + ) + (local.set $$cmp1 + (i32.gt_s + (local.get $$l$0) + (local.get $$sub) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$call + (call $___errno_location) + ) + (i32.store + (local.get $$call) + (i32.const 75) + ) + (local.set $$cnt$1 + (i32.const -1) + ) + (br $do-once) + ) + (block + (local.set $$add + (i32.add + (local.get $$l$0) + (local.get $$cnt$0) + ) + ) + (local.set $$cnt$1 + (local.get $$add) + ) + (br $do-once) + ) + ) + ) + (local.set $$cnt$1 + (local.get $$cnt$0) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$s) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$0) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $label + (i32.const 92) + ) + (br $label$break$L1) + ) + ) + (local.set $$2 + (local.get $$1) + ) + (local.set $$3 + (local.get $$0) + ) + (loop $label$continue$L12 + (block $label$break$L12 + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-case $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $label + (i32.const 10) + ) + (br $label$break$L12) + ) + ) + (block + (local.set $$z$0$lcssa + (local.get $$3) + ) + (br $label$break$L12) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$3) + (i32.const 1) + ) + ) + (i32.store + (local.get $$s) + (local.get $$incdec$ptr) + ) + (local.set $$$pre + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$2 + (local.get $$$pre) + ) + (local.set $$3 + (local.get $$incdec$ptr) + ) + (br $label$continue$L12) + ) + ) + (block $label$break$L15 + (if + (i32.eq + (local.get $label) + (i32.const 10) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$4 + (local.get $$3) + ) + (local.set $$z$0226 + (local.get $$3) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$arrayidx16 + (i32.add + (local.get $$4) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx16) + ) + ) + (local.set $$cmp18 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 37) + ) + ) + (if + (i32.eqz + (local.get $$cmp18) + ) + (block + (local.set $$z$0$lcssa + (local.get $$z$0226) + ) + (br $label$break$L15) + ) + ) + (local.set $$incdec$ptr23 + (i32.add + (local.get $$z$0226) + (i32.const 1) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$4) + (i32.const 2) + ) + ) + (i32.store + (local.get $$s) + (local.get $$add$ptr) + ) + (local.set $$6 + (i32.load8_s + (local.get $$add$ptr) + ) + ) + (local.set $$cmp13 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 37) + ) + ) + (if + (local.get $$cmp13) + (block + (local.set $$4 + (local.get $$add$ptr) + ) + (local.set $$z$0226 + (local.get $$incdec$ptr23) + ) + ) + (block + (local.set $$z$0$lcssa + (local.get $$incdec$ptr23) + ) + (br $while-out2) + ) + ) + (br $while-in3) + ) + ) + ) + ) + ) + (local.set $$sub$ptr$lhs$cast + (local.get $$z$0$lcssa) + ) + (local.set $$sub$ptr$rhs$cast + (local.get $$0) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$sub$ptr$lhs$cast) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (if + (local.get $$tobool25) + (call $_out + (local.get $$f) + (local.get $$0) + (local.get $$sub$ptr$sub) + ) + ) + (local.set $$tobool28 + (i32.eq + (local.get $$sub$ptr$sub) + (i32.const 0) + ) + ) + (if + (local.get $$tobool28) + (br $while-out) + (block + (local.set $$cnt$0 + (local.get $$cnt$1) + ) + (local.set $$l$0 + (local.get $$sub$ptr$sub) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$7 + (i32.load + (local.get $$s) + ) + ) + (local.set $$arrayidx31 + (i32.add + (local.get $$7) + (i32.const 1) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx31) + ) + ) + (local.set $$conv32 + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call33 + (call $_isdigit + (local.get $$conv32) + ) + ) + (local.set $$tobool34 + (i32.eq + (local.get $$call33) + (i32.const 0) + ) + ) + (local.set $$$pre261 + (i32.load + (local.get $$s) + ) + ) + (if + (local.get $$tobool34) + (block + (local.set $$$sink + (i32.const 1) + ) + (local.set $$argpos$0 + (i32.const -1) + ) + (local.set $$l10n$1 + (local.get $$l10n$0$ph) + ) + ) + (block + (local.set $$arrayidx35 + (i32.add + (local.get $$$pre261) + (i32.const 2) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx35) + ) + ) + (local.set $$cmp37 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 36) + ) + ) + (if + (local.get $$cmp37) + (block + (local.set $$arrayidx40 + (i32.add + (local.get $$$pre261) + (i32.const 1) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$arrayidx40) + ) + ) + (local.set $$conv41 + (i32.shr_s + (i32.shl + (local.get $$10) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub42 + (i32.add + (local.get $$conv41) + (i32.const -48) + ) + ) + (local.set $$$sink + (i32.const 3) + ) + (local.set $$argpos$0 + (local.get $$sub42) + ) + (local.set $$l10n$1 + (i32.const 1) + ) + ) + (block + (local.set $$$sink + (i32.const 1) + ) + (local.set $$argpos$0 + (i32.const -1) + ) + (local.set $$l10n$1 + (local.get $$l10n$0$ph) + ) + ) + ) + ) + ) + (local.set $$incdec$ptr45 + (i32.add + (local.get $$$pre261) + (local.get $$$sink) + ) + ) + (i32.store + (local.get $$s) + (local.get $$incdec$ptr45) + ) + (local.set $$11 + (i32.load8_s + (local.get $$incdec$ptr45) + ) + ) + (local.set $$conv48229 + (i32.shr_s + (i32.shl + (local.get $$11) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub49230 + (i32.add + (local.get $$conv48229) + (i32.const -32) + ) + ) + (local.set $$cmp50231 + (i32.gt_u + (local.get $$sub49230) + (i32.const 31) + ) + ) + (local.set $$shl232 + (i32.shl + (i32.const 1) + (local.get $$sub49230) + ) + ) + (local.set $$and233 + (i32.and + (local.get $$shl232) + (i32.const 75913) + ) + ) + (local.set $$tobool55234 + (i32.eq + (local.get $$and233) + (i32.const 0) + ) + ) + (local.set $$brmerge235 + (i32.or + (local.get $$cmp50231) + (local.get $$tobool55234) + ) + ) + (if + (local.get $$brmerge235) + (block + (local.set $$$lcssa213 + (local.get $$11) + ) + (local.set $$fl$0$lcssa + (i32.const 0) + ) + (local.set $$storemerge187$lcssa + (local.get $$incdec$ptr45) + ) + ) + (block + (local.set $$fl$0237 + (i32.const 0) + ) + (local.set $$storemerge187236 + (local.get $$incdec$ptr45) + ) + (local.set $$sub49238 + (local.get $$sub49230) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$shl60 + (i32.shl + (i32.const 1) + (local.get $$sub49238) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl60) + (local.get $$fl$0237) + ) + ) + (local.set $$incdec$ptr62 + (i32.add + (local.get $$storemerge187236) + (i32.const 1) + ) + ) + (i32.store + (local.get $$s) + (local.get $$incdec$ptr62) + ) + (local.set $$12 + (i32.load8_s + (local.get $$incdec$ptr62) + ) + ) + (local.set $$conv48 + (i32.shr_s + (i32.shl + (local.get $$12) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub49 + (i32.add + (local.get $$conv48) + (i32.const -32) + ) + ) + (local.set $$cmp50 + (i32.gt_u + (local.get $$sub49) + (i32.const 31) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$sub49) + ) + ) + (local.set $$and + (i32.and + (local.get $$shl) + (i32.const 75913) + ) + ) + (local.set $$tobool55 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$brmerge + (i32.or + (local.get $$cmp50) + (local.get $$tobool55) + ) + ) + (if + (local.get $$brmerge) + (block + (local.set $$$lcssa213 + (local.get $$12) + ) + (local.set $$fl$0$lcssa + (local.get $$or) + ) + (local.set $$storemerge187$lcssa + (local.get $$incdec$ptr62) + ) + (br $while-out4) + ) + (block + (local.set $$fl$0237 + (local.get $$or) + ) + (local.set $$storemerge187236 + (local.get $$incdec$ptr62) + ) + (local.set $$sub49238 + (local.get $$sub49) + ) + ) + ) + (br $while-in5) + ) + ) + ) + ) + (local.set $$cmp65 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$$lcssa213) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 42) + ) + ) + (if + (local.get $$cmp65) + (block + (local.set $$arrayidx68 + (i32.add + (local.get $$storemerge187$lcssa) + (i32.const 1) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx68) + ) + ) + (local.set $$conv69 + (i32.shr_s + (i32.shl + (local.get $$13) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call70 + (call $_isdigit + (local.get $$conv69) + ) + ) + (local.set $$tobool71 + (i32.eq + (local.get $$call70) + (i32.const 0) + ) + ) + (if + (local.get $$tobool71) + (local.set $label + (i32.const 27) + ) + (block + (local.set $$14 + (i32.load + (local.get $$s) + ) + ) + (local.set $$arrayidx73 + (i32.add + (local.get $$14) + (i32.const 2) + ) + ) + (local.set $$15 + (i32.load8_s + (local.get $$arrayidx73) + ) + ) + (local.set $$cmp75 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$15) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 36) + ) + ) + (if + (local.get $$cmp75) + (block + (local.set $$arrayidx78 + (i32.add + (local.get $$14) + (i32.const 1) + ) + ) + (local.set $$16 + (i32.load8_s + (local.get $$arrayidx78) + ) + ) + (local.set $$conv79 + (i32.shr_s + (i32.shl + (local.get $$16) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub80 + (i32.add + (local.get $$conv79) + (i32.const -48) + ) + ) + (local.set $$arrayidx81 + (i32.add + (local.get $$nl_type) + (i32.shl + (local.get $$sub80) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx81) + (i32.const 10) + ) + (local.set $$17 + (i32.load8_s + (local.get $$arrayidx78) + ) + ) + (local.set $$conv83 + (i32.shr_s + (i32.shl + (local.get $$17) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub84 + (i32.add + (local.get $$conv83) + (i32.const -48) + ) + ) + (local.set $$i86 + (i32.add + (local.get $$nl_arg) + (i32.shl + (local.get $$sub84) + (i32.const 3) + ) + ) + ) + (local.set $$18 + (i64.load + (local.get $$i86) + ) + ) + (local.set $$conv87 + (i32.wrap_i64 + (local.get $$18) + ) + ) + (local.set $$add$ptr88 + (i32.add + (local.get $$14) + (i32.const 3) + ) + ) + (local.set $$l10n$2 + (i32.const 1) + ) + (local.set $$storemerge188 + (local.get $$add$ptr88) + ) + (local.set $$w$0 + (local.get $$conv87) + ) + ) + (local.set $label + (i32.const 27) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 27) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$tobool90 + (i32.eq + (local.get $$l10n$1) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool90) + ) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool25) + (block + (local.set $$arglist_current + (i32.load + (local.get $$ap) + ) + ) + (local.set $$19 + (local.get $$arglist_current) + ) + (local.set $$expanded5 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded4 + (local.get $$expanded5) + ) + (local.set $$expanded + (i32.sub + (local.get $$expanded4) + (i32.const 1) + ) + ) + (local.set $$20 + (i32.add + (local.get $$19) + (local.get $$expanded) + ) + ) + (local.set $$expanded9 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded8 + (local.get $$expanded9) + ) + (local.set $$expanded7 + (i32.sub + (local.get $$expanded8) + (i32.const 1) + ) + ) + (local.set $$expanded6 + (i32.xor + (local.get $$expanded7) + (i32.const -1) + ) + ) + (local.set $$21 + (i32.and + (local.get $$20) + (local.get $$expanded6) + ) + ) + (local.set $$22 + (local.get $$21) + ) + (local.set $$23 + (i32.load + (local.get $$22) + ) + ) + (local.set $$arglist_next + (i32.add + (local.get $$22) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next) + ) + (local.set $$cond + (local.get $$23) + ) + ) + (local.set $$cond + (i32.const 0) + ) + ) + (local.set $$24 + (i32.load + (local.get $$s) + ) + ) + (local.set $$incdec$ptr93 + (i32.add + (local.get $$24) + (i32.const 1) + ) + ) + (local.set $$l10n$2 + (i32.const 0) + ) + (local.set $$storemerge188 + (local.get $$incdec$ptr93) + ) + (local.set $$w$0 + (local.get $$cond) + ) + ) + ) + (i32.store + (local.get $$s) + (local.get $$storemerge188) + ) + (local.set $$cmp97 + (i32.lt_s + (local.get $$w$0) + (i32.const 0) + ) + ) + (local.set $$or100 + (i32.or + (local.get $$fl$0$lcssa) + (i32.const 8192) + ) + ) + (local.set $$sub101 + (i32.sub + (i32.const 0) + (local.get $$w$0) + ) + ) + (local.set $$spec$select200 + (if (result i32) + (local.get $$cmp97) + (local.get $$or100) + (local.get $$fl$0$lcssa) + ) + ) + (local.set $$spec$select201 + (if (result i32) + (local.get $$cmp97) + (local.get $$sub101) + (local.get $$w$0) + ) + ) + (local.set $$26 + (local.get $$storemerge188) + ) + (local.set $$fl$1 + (local.get $$spec$select200) + ) + (local.set $$l10n$3 + (local.get $$l10n$2) + ) + (local.set $$w$1 + (local.get $$spec$select201) + ) + ) + (block + (local.set $$call104 + (call $_getint + (local.get $$s) + ) + ) + (local.set $$cmp105 + (i32.lt_s + (local.get $$call104) + (i32.const 0) + ) + ) + (if + (local.get $$cmp105) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (local.set $$$pre262 + (i32.load + (local.get $$s) + ) + ) + (local.set $$26 + (local.get $$$pre262) + ) + (local.set $$fl$1 + (local.get $$fl$0$lcssa) + ) + (local.set $$l10n$3 + (local.get $$l10n$1) + ) + (local.set $$w$1 + (local.get $$call104) + ) + ) + ) + (local.set $$25 + (i32.load8_s + (local.get $$26) + ) + ) + (local.set $$cmp111 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$25) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 46) + ) + ) + (block $do-once6 + (if + (local.get $$cmp111) + (block + (local.set $$arrayidx114 + (i32.add + (local.get $$26) + (i32.const 1) + ) + ) + (local.set $$27 + (i32.load8_s + (local.get $$arrayidx114) + ) + ) + (local.set $$cmp116 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$27) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 42) + ) + ) + (if + (i32.eqz + (local.get $$cmp116) + ) + (block + (i32.store + (local.get $$s) + (local.get $$arrayidx114) + ) + (local.set $$call160 + (call $_getint + (local.get $$s) + ) + ) + (local.set $$$pre263$pre + (i32.load + (local.get $$s) + ) + ) + (local.set $$$pre263 + (local.get $$$pre263$pre) + ) + (local.set $$p$0 + (local.get $$call160) + ) + (br $do-once6) + ) + ) + (local.set $$arrayidx119 + (i32.add + (local.get $$26) + (i32.const 2) + ) + ) + (local.set $$28 + (i32.load8_s + (local.get $$arrayidx119) + ) + ) + (local.set $$conv120 + (i32.shr_s + (i32.shl + (local.get $$28) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call121 + (call $_isdigit + (local.get $$conv120) + ) + ) + (local.set $$tobool122 + (i32.eq + (local.get $$call121) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool122) + ) + (block + (local.set $$29 + (i32.load + (local.get $$s) + ) + ) + (local.set $$arrayidx124 + (i32.add + (local.get $$29) + (i32.const 3) + ) + ) + (local.set $$30 + (i32.load8_s + (local.get $$arrayidx124) + ) + ) + (local.set $$cmp126 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$30) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 36) + ) + ) + (if + (local.get $$cmp126) + (block + (local.set $$arrayidx129 + (i32.add + (local.get $$29) + (i32.const 2) + ) + ) + (local.set $$31 + (i32.load8_s + (local.get $$arrayidx129) + ) + ) + (local.set $$conv130 + (i32.shr_s + (i32.shl + (local.get $$31) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub131 + (i32.add + (local.get $$conv130) + (i32.const -48) + ) + ) + (local.set $$arrayidx132 + (i32.add + (local.get $$nl_type) + (i32.shl + (local.get $$sub131) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx132) + (i32.const 10) + ) + (local.set $$32 + (i32.load8_s + (local.get $$arrayidx129) + ) + ) + (local.set $$conv134 + (i32.shr_s + (i32.shl + (local.get $$32) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub135 + (i32.add + (local.get $$conv134) + (i32.const -48) + ) + ) + (local.set $$i137 + (i32.add + (local.get $$nl_arg) + (i32.shl + (local.get $$sub135) + (i32.const 3) + ) + ) + ) + (local.set $$33 + (i64.load + (local.get $$i137) + ) + ) + (local.set $$conv138 + (i32.wrap_i64 + (local.get $$33) + ) + ) + (local.set $$add$ptr139 + (i32.add + (local.get $$29) + (i32.const 4) + ) + ) + (i32.store + (local.get $$s) + (local.get $$add$ptr139) + ) + (local.set $$$pre263 + (local.get $$add$ptr139) + ) + (local.set $$p$0 + (local.get $$conv138) + ) + (br $do-once6) + ) + ) + ) + ) + (local.set $$tobool141 + (i32.eq + (local.get $$l10n$3) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool141) + ) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool25) + (block + (local.set $$arglist_current2 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$34 + (local.get $$arglist_current2) + ) + (local.set $$expanded12 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded11 + (local.get $$expanded12) + ) + (local.set $$expanded10 + (i32.sub + (local.get $$expanded11) + (i32.const 1) + ) + ) + (local.set $$35 + (i32.add + (local.get $$34) + (local.get $$expanded10) + ) + ) + (local.set $$expanded16 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded15 + (local.get $$expanded16) + ) + (local.set $$expanded14 + (i32.sub + (local.get $$expanded15) + (i32.const 1) + ) + ) + (local.set $$expanded13 + (i32.xor + (local.get $$expanded14) + (i32.const -1) + ) + ) + (local.set $$36 + (i32.and + (local.get $$35) + (local.get $$expanded13) + ) + ) + (local.set $$37 + (local.get $$36) + ) + (local.set $$38 + (i32.load + (local.get $$37) + ) + ) + (local.set $$arglist_next3 + (i32.add + (local.get $$37) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next3) + ) + (local.set $$cond149 + (local.get $$38) + ) + ) + (local.set $$cond149 + (i32.const 0) + ) + ) + (local.set $$39 + (i32.load + (local.get $$s) + ) + ) + (local.set $$add$ptr150 + (i32.add + (local.get $$39) + (i32.const 2) + ) + ) + (i32.store + (local.get $$s) + (local.get $$add$ptr150) + ) + (local.set $$$pre263 + (local.get $$add$ptr150) + ) + (local.set $$p$0 + (local.get $$cond149) + ) + ) + (block + (local.set $$$pre263 + (local.get $$26) + ) + (local.set $$p$0 + (i32.const -1) + ) + ) + ) + ) + (local.set $$41 + (local.get $$$pre263) + ) + (local.set $$st$0 + (i32.const 0) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$40 + (i32.load8_s + (local.get $$41) + ) + ) + (local.set $$conv164 + (i32.shr_s + (i32.shl + (local.get $$40) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub165 + (i32.add + (local.get $$conv164) + (i32.const -65) + ) + ) + (local.set $$cmp166 + (i32.gt_u + (local.get $$sub165) + (i32.const 57) + ) + ) + (if + (local.get $$cmp166) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr171 + (i32.add + (local.get $$41) + (i32.const 1) + ) + ) + (i32.store + (local.get $$s) + (local.get $$incdec$ptr171) + ) + (local.set $$42 + (i32.load8_s + (local.get $$41) + ) + ) + (local.set $$conv172 + (i32.shr_s + (i32.shl + (local.get $$42) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub173 + (i32.add + (local.get $$conv172) + (i32.const -65) + ) + ) + (local.set $$arrayidx174 + (i32.add + (i32.add + (i32.const 6800) + (i32.mul + (local.get $$st$0) + (i32.const 58) + ) + ) + (local.get $$sub173) + ) + ) + (local.set $$43 + (i32.load8_s + (local.get $$arrayidx174) + ) + ) + (local.set $$conv175 + (i32.and + (local.get $$43) + (i32.const 255) + ) + ) + (local.set $$sub176 + (i32.add + (local.get $$conv175) + (i32.const -1) + ) + ) + (local.set $$cmp177 + (i32.lt_u + (local.get $$sub176) + (i32.const 8) + ) + ) + (if + (local.get $$cmp177) + (block + (local.set $$41 + (local.get $$incdec$ptr171) + ) + (local.set $$st$0 + (local.get $$conv175) + ) + ) + (br $while-out8) + ) + (br $while-in9) + ) + ) + (local.set $$tobool179 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$43) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool179) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (local.set $$cmp182 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$43) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 19) + ) + ) + (local.set $$cmp185 + (i32.gt_s + (local.get $$argpos$0) + (i32.const -1) + ) + ) + (block $do-once10 + (if + (local.get $$cmp182) + (if + (local.get $$cmp185) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + (local.set $label + (i32.const 54) + ) + ) + (block + (if + (local.get $$cmp185) + (block + (local.set $$arrayidx193 + (i32.add + (local.get $$nl_type) + (i32.shl + (local.get $$argpos$0) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx193) + (local.get $$conv175) + ) + (local.set $$44 + (i32.add + (local.get $$nl_arg) + (i32.shl + (local.get $$argpos$0) + (i32.const 3) + ) + ) + ) + (local.set $$45 + (i64.load + (local.get $$44) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$45) + ) + (local.set $label + (i32.const 54) + ) + (br $do-once10) + ) + ) + (if + (i32.eqz + (local.get $$tobool25) + ) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (br $label$break$L1) + ) + ) + (call $_pop_arg + (local.get $$arg) + (local.get $$conv175) + (local.get $$ap) + (local.get $$pop_arg_long_double) + ) + (local.set $$$pre264 + (i32.load + (local.get $$s) + ) + ) + (local.set $$46 + (local.get $$$pre264) + ) + (local.set $label + (i32.const 55) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 54) + ) + (block + (local.set $label + (i32.const 0) + ) + (if + (local.get $$tobool25) + (block + (local.set $$46 + (local.get $$incdec$ptr171) + ) + (local.set $label + (i32.const 55) + ) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + ) + ) + ) + (block $label$break$L77 + (if + (i32.eq + (local.get $label) + (i32.const 55) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$arrayidx207 + (i32.add + (local.get $$46) + (i32.const -1) + ) + ) + (local.set $$47 + (i32.load8_s + (local.get $$arrayidx207) + ) + ) + (local.set $$conv208 + (i32.shr_s + (i32.shl + (local.get $$47) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$tobool209 + (i32.ne + (local.get $$st$0) + (i32.const 0) + ) + ) + (local.set $$and211 + (i32.and + (local.get $$conv208) + (i32.const 15) + ) + ) + (local.set $$cmp212 + (i32.eq + (local.get $$and211) + (i32.const 3) + ) + ) + (local.set $$or$cond189 + (i32.and + (local.get $$tobool209) + (local.get $$cmp212) + ) + ) + (local.set $$and215 + (i32.and + (local.get $$conv208) + (i32.const -33) + ) + ) + (local.set $$t$0 + (if (result i32) + (local.get $$or$cond189) + (local.get $$and215) + (local.get $$conv208) + ) + ) + (local.set $$and217 + (i32.and + (local.get $$fl$1) + (i32.const 8192) + ) + ) + (local.set $$tobool218 + (i32.eq + (local.get $$and217) + (i32.const 0) + ) + ) + (local.set $$and220 + (i32.and + (local.get $$fl$1) + (i32.const -65537) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool218) + (local.get $$fl$1) + (local.get $$and220) + ) + ) + (block $label$break$L79 + (block $switch14 + (block $switch-default44 + (block $switch-case43 + (block $switch-case42 + (block $switch-case41 + (block $switch-case40 + (block $switch-case39 + (block $switch-case38 + (block $switch-case37 + (block $switch-case36 + (block $switch-case35 + (block $switch-case34 + (block $switch-case33 + (block $switch-case32 + (block $switch-case31 + (block $switch-case30 + (block $switch-case29 + (block $switch-case28 + (block $switch-case27 + (block $switch-case26 + (block $switch-case25 + (block $switch-case24 + (br_table $switch-case36 $switch-default44 $switch-case34 $switch-default44 $switch-case39 $switch-case38 $switch-case37 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case35 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case26 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case40 $switch-default44 $switch-case32 $switch-case30 $switch-case43 $switch-case42 $switch-case41 $switch-default44 $switch-case29 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case24 $switch-case28 $switch-case25 $switch-default44 $switch-default44 $switch-case33 $switch-default44 $switch-case31 $switch-default44 $switch-default44 $switch-case27 $switch-default44 + (i32.sub + (local.get $$t$0) + (i32.const 65) + ) + ) + ) + (block + (local.set $$trunc + (i32.and + (local.get $$st$0) + (i32.const 255) + ) + ) + (block $switch15 + (block $switch-default23 + (block $switch-case22 + (block $switch-case21 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (br_table $switch-case16 $switch-case17 $switch-case18 $switch-case19 $switch-case20 $switch-default23 $switch-case21 $switch-case22 $switch-default23 + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$48 + (i32.load + (local.get $$arg) + ) + ) + (i32.store + (local.get $$48) + (local.get $$cnt$1) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$49 + (i32.load + (local.get $$arg) + ) + ) + (i32.store + (local.get $$49) + (local.get $$cnt$1) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$conv227 + (i64.extend_i32_s + (local.get $$cnt$1) + ) + ) + (local.set $$50 + (i32.load + (local.get $$arg) + ) + ) + (i64.store + (local.get $$50) + (local.get $$conv227) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$conv230 + (i32.and + (local.get $$cnt$1) + (i32.const 65535) + ) + ) + (local.set $$51 + (i32.load + (local.get $$arg) + ) + ) + (i32.store16 + (local.get $$51) + (local.get $$conv230) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$conv233 + (i32.and + (local.get $$cnt$1) + (i32.const 255) + ) + ) + (local.set $$52 + (i32.load + (local.get $$arg) + ) + ) + (i32.store8 + (local.get $$52) + (local.get $$conv233) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$53 + (i32.load + (local.get $$arg) + ) + ) + (i32.store + (local.get $$53) + (local.get $$cnt$1) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$conv238 + (i64.extend_i32_s + (local.get $$cnt$1) + ) + ) + (local.set $$54 + (i32.load + (local.get $$arg) + ) + ) + (i64.store + (local.get $$54) + (local.get $$conv238) + ) + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$l$0$ph$be + (i32.const 0) + ) + (br $label$break$L77) + ) + ) + ) + ) + (block + (local.set $$cmp241 + (i32.gt_u + (local.get $$p$0) + (i32.const 8) + ) + ) + (local.set $$cond246 + (if (result i32) + (local.get $$cmp241) + (local.get $$p$0) + (i32.const 8) + ) + ) + (local.set $$or247 + (i32.or + (local.get $$spec$select) + (i32.const 8) + ) + ) + (local.set $$fl$3 + (local.get $$or247) + ) + (local.set $$p$1 + (local.get $$cond246) + ) + (local.set $$t$1 + (i32.const 120) + ) + (local.set $label + (i32.const 67) + ) + (br $switch14) + ) + ) + ) + (block + (local.set $$fl$3 + (local.get $$spec$select) + ) + (local.set $$p$1 + (local.get $$p$0) + ) + (local.set $$t$1 + (local.get $$t$0) + ) + (local.set $label + (i32.const 67) + ) + (br $switch14) + ) + ) + (block + (local.set $$57 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$call263 + (call $_fmt_o + (local.get $$57) + (local.get $$add$ptr206) + ) + ) + (local.set $$and264 + (i32.and + (local.get $$spec$select) + (i32.const 8) + ) + ) + (local.set $$tobool265 + (i32.eq + (local.get $$and264) + (i32.const 0) + ) + ) + (local.set $$sub$ptr$rhs$cast268 + (local.get $$call263) + ) + (local.set $$sub$ptr$sub269 + (i32.sub + (local.get $$sub$ptr$lhs$cast318) + (local.get $$sub$ptr$rhs$cast268) + ) + ) + (local.set $$cmp271 + (i32.gt_s + (local.get $$p$0) + (local.get $$sub$ptr$sub269) + ) + ) + (local.set $$add270 + (i32.add + (local.get $$sub$ptr$sub269) + (i32.const 1) + ) + ) + (local.set $$58 + (i32.or + (local.get $$tobool265) + (local.get $$cmp271) + ) + ) + (local.set $$spec$select204 + (if (result i32) + (local.get $$58) + (local.get $$p$0) + (local.get $$add270) + ) + ) + (local.set $$a$0 + (local.get $$call263) + ) + (local.set $$fl$4 + (local.get $$spec$select) + ) + (local.set $$p$2 + (local.get $$spec$select204) + ) + (local.set $$pl$1 + (i32.const 0) + ) + (local.set $$prefix$1 + (i32.const 16597) + ) + (local.set $label + (i32.const 73) + ) + (br $switch14) + ) + ) + ) + (block + (local.set $$59 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$cmp283 + (i64.lt_s + (local.get $$59) + (i64.const 0) + ) + ) + (if + (local.get $$cmp283) + (block + (local.set $$sub287 + (i64.sub + (i64.const 0) + (local.get $$59) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$sub287) + ) + (local.set $$62 + (local.get $$sub287) + ) + (local.set $$pl$0 + (i32.const 1) + ) + (local.set $$prefix$0 + (i32.const 16597) + ) + (local.set $label + (i32.const 72) + ) + (br $label$break$L79) + ) + (block + (local.set $$and290 + (i32.and + (local.get $$spec$select) + (i32.const 2048) + ) + ) + (local.set $$tobool291 + (i32.eq + (local.get $$and290) + (i32.const 0) + ) + ) + (local.set $$and295 + (i32.and + (local.get $$spec$select) + (i32.const 1) + ) + ) + (local.set $$tobool296 + (i32.eq + (local.get $$and295) + (i32.const 0) + ) + ) + (local.set $$$ + (if (result i32) + (local.get $$tobool296) + (i32.const 16597) + (i32.const 16599) + ) + ) + (local.set $$spec$select205 + (if (result i32) + (local.get $$tobool291) + (local.get $$$) + (i32.const 16598) + ) + ) + (local.set $$60 + (i32.and + (local.get $$spec$select) + (i32.const 2049) + ) + ) + (local.set $$61 + (i32.ne + (local.get $$60) + (i32.const 0) + ) + ) + (local.set $$spec$select206 + (i32.and + (local.get $$61) + (i32.const 1) + ) + ) + (local.set $$62 + (local.get $$59) + ) + (local.set $$pl$0 + (local.get $$spec$select206) + ) + (local.set $$prefix$0 + (local.get $$spec$select205) + ) + (local.set $label + (i32.const 72) + ) + (br $label$break$L79) + ) + ) + ) + ) + (block + (local.set $$$pre265 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$62 + (local.get $$$pre265) + ) + (local.set $$pl$0 + (i32.const 0) + ) + (local.set $$prefix$0 + (i32.const 16597) + ) + (local.set $label + (i32.const 72) + ) + (br $switch14) + ) + ) + (block + (local.set $$64 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$conv340 + (i32.and + (i32.wrap_i64 + (local.get $$64) + ) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$add$ptr341) + (local.get $$conv340) + ) + (local.set $$a$1 + (local.get $$add$ptr341) + ) + (local.set $$fl$6 + (local.get $$and220) + ) + (local.set $$p$5 + (i32.const 1) + ) + (local.set $$pl$2 + (i32.const 0) + ) + (local.set $$prefix$2 + (i32.const 16597) + ) + (local.set $$sub$ptr$lhs$cast426$pre$phiZZZZ2D + (local.get $$sub$ptr$lhs$cast318) + ) + (br $switch14) + ) + ) + (block + (local.set $$65 + (i32.load + (local.get $$arg) + ) + ) + (local.set $$tobool345 + (i32.eq + (local.get $$65) + (i32.const 0) + ) + ) + (local.set $$cond350 + (if (result i32) + (local.get $$tobool345) + (i32.const 16607) + (local.get $$65) + ) + ) + (local.set $$call351 + (call $_memchr + (local.get $$cond350) + (i32.const 0) + (local.get $$p$0) + ) + ) + (local.set $$tobool352 + (i32.eq + (local.get $$call351) + (i32.const 0) + ) + ) + (local.set $$sub$ptr$lhs$cast356 + (local.get $$call351) + ) + (local.set $$sub$ptr$rhs$cast357 + (local.get $$cond350) + ) + (local.set $$sub$ptr$sub358 + (i32.sub + (local.get $$sub$ptr$lhs$cast356) + (local.get $$sub$ptr$rhs$cast357) + ) + ) + (local.set $$add$ptr354 + (i32.add + (local.get $$cond350) + (local.get $$p$0) + ) + ) + (local.set $$p$3 + (if (result i32) + (local.get $$tobool352) + (local.get $$p$0) + (local.get $$sub$ptr$sub358) + ) + ) + (local.set $$z$1 + (if (result i32) + (local.get $$tobool352) + (local.get $$add$ptr354) + (local.get $$call351) + ) + ) + (local.set $$$pre267 + (local.get $$z$1) + ) + (local.set $$a$1 + (local.get $$cond350) + ) + (local.set $$fl$6 + (local.get $$and220) + ) + (local.set $$p$5 + (local.get $$p$3) + ) + (local.set $$pl$2 + (i32.const 0) + ) + (local.set $$prefix$2 + (i32.const 16597) + ) + (local.set $$sub$ptr$lhs$cast426$pre$phiZZZZ2D + (local.get $$$pre267) + ) + (br $switch14) + ) + ) + (block + (local.set $$66 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$conv363 + (i32.wrap_i64 + (local.get $$66) + ) + ) + (i32.store + (local.get $$wc) + (local.get $$conv363) + ) + (i32.store + (local.get $$arrayidx365) + (i32.const 0) + ) + (i32.store + (local.get $$arg) + (local.get $$wc) + ) + (local.set $$p$4269 + (i32.const -1) + ) + (local.set $label + (i32.const 79) + ) + (br $switch14) + ) + ) + (block + (local.set $$cmp372242 + (i32.eq + (local.get $$p$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp372242) + (block + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w$1) + (i32.const 0) + (local.get $$spec$select) + ) + (local.set $$i$0217271 + (i32.const 0) + ) + (local.set $label + (i32.const 89) + ) + ) + (block + (local.set $$p$4269 + (local.get $$p$0) + ) + (local.set $label + (i32.const 79) + ) + ) + ) + (br $switch14) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (block + (local.set $$71 + (f64.load + (local.get $$arg) + ) + ) + (local.set $$call424 + (call_indirect (type $FUNCSIG$iidiiii) + (local.get $$f) + (local.get $$71) + (local.get $$w$1) + (local.get $$p$0) + (local.get $$spec$select) + (local.get $$t$0) + (i32.add + (i32.and + (local.get $$fmt_fp) + (i32.const 31) + ) + (i32.const 408) + ) + ) + ) + (local.set $$l$0$ph$be + (local.get $$call424) + ) + (br $label$break$L77) + ) + ) + (block + (local.set $$a$1 + (local.get $$0) + ) + (local.set $$fl$6 + (local.get $$spec$select) + ) + (local.set $$p$5 + (local.get $$p$0) + ) + (local.set $$pl$2 + (i32.const 0) + ) + (local.set $$prefix$2 + (i32.const 16597) + ) + (local.set $$sub$ptr$lhs$cast426$pre$phiZZZZ2D + (local.get $$sub$ptr$lhs$cast318) + ) + ) + ) + ) + (block $label$break$L102 + (if + (i32.eq + (local.get $label) + (i32.const 67) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$55 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$and250 + (i32.and + (local.get $$t$1) + (i32.const 32) + ) + ) + (local.set $$call251 + (call $_fmt_x + (local.get $$55) + (local.get $$add$ptr206) + (local.get $$and250) + ) + ) + (local.set $$56 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$tobool253 + (i64.eq + (local.get $$56) + (i64.const 0) + ) + ) + (local.set $$and255 + (i32.and + (local.get $$fl$3) + (i32.const 8) + ) + ) + (local.set $$tobool256 + (i32.eq + (local.get $$and255) + (i32.const 0) + ) + ) + (local.set $$or$cond190 + (i32.or + (local.get $$tobool256) + (local.get $$tobool253) + ) + ) + (local.set $$shr199 + (i32.shr_u + (local.get $$t$1) + (i32.const 4) + ) + ) + (local.set $$add$ptr258 + (i32.add + (i32.const 16597) + (local.get $$shr199) + ) + ) + (local.set $$spec$select202 + (if (result i32) + (local.get $$or$cond190) + (i32.const 16597) + (local.get $$add$ptr258) + ) + ) + (local.set $$spec$select203 + (if (result i32) + (local.get $$or$cond190) + (i32.const 0) + (i32.const 2) + ) + ) + (local.set $$a$0 + (local.get $$call251) + ) + (local.set $$fl$4 + (local.get $$fl$3) + ) + (local.set $$p$2 + (local.get $$p$1) + ) + (local.set $$pl$1 + (local.get $$spec$select203) + ) + (local.set $$prefix$1 + (local.get $$spec$select202) + ) + (local.set $label + (i32.const 73) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 72) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$call305 + (call $_fmt_u + (local.get $$62) + (local.get $$add$ptr206) + ) + ) + (local.set $$a$0 + (local.get $$call305) + ) + (local.set $$fl$4 + (local.get $$spec$select) + ) + (local.set $$p$2 + (local.get $$p$0) + ) + (local.set $$pl$1 + (local.get $$pl$0) + ) + (local.set $$prefix$1 + (local.get $$prefix$0) + ) + (local.set $label + (i32.const 73) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 79) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$67 + (i32.load + (local.get $$arg) + ) + ) + (local.set $$i$0243 + (i32.const 0) + ) + (local.set $$ws$0244 + (local.get $$67) + ) + (loop $while-in47 + (block $while-out46 + (local.set $$68 + (i32.load + (local.get $$ws$0244) + ) + ) + (local.set $$tobool375 + (i32.eq + (local.get $$68) + (i32.const 0) + ) + ) + (if + (local.get $$tobool375) + (block + (local.set $$i$0217 + (local.get $$i$0243) + ) + (br $while-out46) + ) + ) + (local.set $$call379 + (call $_wctomb + (local.get $$mb) + (local.get $$68) + ) + ) + (local.set $$cmp380 + (i32.lt_s + (local.get $$call379) + (i32.const 0) + ) + ) + (local.set $$sub384 + (i32.sub + (local.get $$p$4269) + (local.get $$i$0243) + ) + ) + (local.set $$cmp385 + (i32.gt_u + (local.get $$call379) + (local.get $$sub384) + ) + ) + (local.set $$or$cond194 + (i32.or + (local.get $$cmp380) + (local.get $$cmp385) + ) + ) + (if + (local.get $$or$cond194) + (block + (local.set $label + (i32.const 83) + ) + (br $while-out46) + ) + ) + (local.set $$incdec$ptr378 + (i32.add + (local.get $$ws$0244) + (i32.const 4) + ) + ) + (local.set $$add390 + (i32.add + (local.get $$call379) + (local.get $$i$0243) + ) + ) + (local.set $$cmp372 + (i32.gt_u + (local.get $$p$4269) + (local.get $$add390) + ) + ) + (if + (local.get $$cmp372) + (block + (local.set $$i$0243 + (local.get $$add390) + ) + (local.set $$ws$0244 + (local.get $$incdec$ptr378) + ) + ) + (block + (local.set $$i$0217 + (local.get $$add390) + ) + (br $while-out46) + ) + ) + (br $while-in47) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 83) + ) + (block + (local.set $label + (i32.const 0) + ) + (if + (local.get $$cmp380) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L1) + ) + (local.set $$i$0217 + (local.get $$i$0243) + ) + ) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w$1) + (local.get $$i$0217) + (local.get $$spec$select) + ) + (local.set $$cmp399247 + (i32.eq + (local.get $$i$0217) + (i32.const 0) + ) + ) + (if + (local.get $$cmp399247) + (block + (local.set $$i$0217271 + (i32.const 0) + ) + (local.set $label + (i32.const 89) + ) + ) + (block + (local.set $$69 + (i32.load + (local.get $$arg) + ) + ) + (local.set $$i$1248 + (i32.const 0) + ) + (local.set $$ws$1249 + (local.get $$69) + ) + (loop $while-in49 + (block $while-out48 + (local.set $$70 + (i32.load + (local.get $$ws$1249) + ) + ) + (local.set $$tobool402 + (i32.eq + (local.get $$70) + (i32.const 0) + ) + ) + (if + (local.get $$tobool402) + (block + (local.set $$i$0217271 + (local.get $$i$0217) + ) + (local.set $label + (i32.const 89) + ) + (br $label$break$L102) + ) + ) + (local.set $$call406 + (call $_wctomb + (local.get $$mb) + (local.get $$70) + ) + ) + (local.set $$add407 + (i32.add + (local.get $$call406) + (local.get $$i$1248) + ) + ) + (local.set $$cmp408 + (i32.gt_s + (local.get $$add407) + (local.get $$i$0217) + ) + ) + (if + (local.get $$cmp408) + (block + (local.set $$i$0217271 + (local.get $$i$0217) + ) + (local.set $label + (i32.const 89) + ) + (br $label$break$L102) + ) + ) + (local.set $$incdec$ptr405 + (i32.add + (local.get $$ws$1249) + (i32.const 4) + ) + ) + (call $_out + (local.get $$f) + (local.get $$mb) + (local.get $$call406) + ) + (local.set $$cmp399 + (i32.lt_u + (local.get $$add407) + (local.get $$i$0217) + ) + ) + (if + (local.get $$cmp399) + (block + (local.set $$i$1248 + (local.get $$add407) + ) + (local.set $$ws$1249 + (local.get $$incdec$ptr405) + ) + ) + (block + (local.set $$i$0217271 + (local.get $$i$0217) + ) + (local.set $label + (i32.const 89) + ) + (br $while-out48) + ) + ) + (br $while-in49) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 73) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$cmp307 + (i32.gt_s + (local.get $$p$2) + (i32.const -1) + ) + ) + (local.set $$and310 + (i32.and + (local.get $$fl$4) + (i32.const -65537) + ) + ) + (local.set $$spec$select193 + (if (result i32) + (local.get $$cmp307) + (local.get $$and310) + (local.get $$fl$4) + ) + ) + (local.set $$63 + (i64.load + (local.get $$arg) + ) + ) + (local.set $$tobool313 + (i64.ne + (local.get $$63) + (i64.const 0) + ) + ) + (local.set $$tobool315 + (i32.ne + (local.get $$p$2) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$tobool315) + (local.get $$tobool313) + ) + ) + (local.set $$sub$ptr$rhs$cast319 + (local.get $$a$0) + ) + (local.set $$sub$ptr$sub320 + (i32.sub + (local.get $$sub$ptr$lhs$cast318) + (local.get $$sub$ptr$rhs$cast319) + ) + ) + (local.set $$lnot + (i32.xor + (local.get $$tobool313) + (i32.const 1) + ) + ) + (local.set $$lnot$ext + (i32.and + (local.get $$lnot) + (i32.const 1) + ) + ) + (local.set $$add323 + (i32.add + (local.get $$sub$ptr$sub320) + (local.get $$lnot$ext) + ) + ) + (local.set $$cmp324 + (i32.gt_s + (local.get $$p$2) + (local.get $$add323) + ) + ) + (local.set $$p$2$add323 + (if (result i32) + (local.get $$cmp324) + (local.get $$p$2) + (local.get $$add323) + ) + ) + (local.set $$spec$select207 + (if (result i32) + (local.get $$or$cond) + (local.get $$p$2$add323) + (i32.const 0) + ) + ) + (local.set $$spec$select208 + (if (result i32) + (local.get $$or$cond) + (local.get $$a$0) + (local.get $$add$ptr206) + ) + ) + (local.set $$a$1 + (local.get $$spec$select208) + ) + (local.set $$fl$6 + (local.get $$spec$select193) + ) + (local.set $$p$5 + (local.get $$spec$select207) + ) + (local.set $$pl$2 + (local.get $$pl$1) + ) + (local.set $$prefix$2 + (local.get $$prefix$1) + ) + (local.set $$sub$ptr$lhs$cast426$pre$phiZZZZ2D + (local.get $$sub$ptr$lhs$cast318) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 89) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$xor + (i32.xor + (local.get $$spec$select) + (i32.const 8192) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w$1) + (local.get $$i$0217271) + (local.get $$xor) + ) + (local.set $$cmp416 + (i32.gt_s + (local.get $$w$1) + (local.get $$i$0217271) + ) + ) + (local.set $$cond421 + (if (result i32) + (local.get $$cmp416) + (local.get $$w$1) + (local.get $$i$0217271) + ) + ) + (local.set $$l$0$ph$be + (local.get $$cond421) + ) + (br $label$break$L77) + ) + ) + ) + (local.set $$sub$ptr$rhs$cast427 + (local.get $$a$1) + ) + (local.set $$sub$ptr$sub428 + (i32.sub + (local.get $$sub$ptr$lhs$cast426$pre$phiZZZZ2D) + (local.get $$sub$ptr$rhs$cast427) + ) + ) + (local.set $$cmp429 + (i32.lt_s + (local.get $$p$5) + (local.get $$sub$ptr$sub428) + ) + ) + (local.set $$spec$select195 + (if (result i32) + (local.get $$cmp429) + (local.get $$sub$ptr$sub428) + (local.get $$p$5) + ) + ) + (local.set $$add436 + (i32.add + (local.get $$spec$select195) + (local.get $$pl$2) + ) + ) + (local.set $$cmp437 + (i32.lt_s + (local.get $$w$1) + (local.get $$add436) + ) + ) + (local.set $$w$2 + (if (result i32) + (local.get $$cmp437) + (local.get $$add436) + (local.get $$w$1) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w$2) + (local.get $$add436) + (local.get $$fl$6) + ) + (call $_out + (local.get $$f) + (local.get $$prefix$2) + (local.get $$pl$2) + ) + (local.set $$xor444 + (i32.xor + (local.get $$fl$6) + (i32.const 65536) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$w$2) + (local.get $$add436) + (local.get $$xor444) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 48) + (local.get $$spec$select195) + (local.get $$sub$ptr$sub428) + (i32.const 0) + ) + (call $_out + (local.get $$f) + (local.get $$a$1) + (local.get $$sub$ptr$sub428) + ) + (local.set $$xor452 + (i32.xor + (local.get $$fl$6) + (i32.const 8192) + ) + ) + (call $_pad_659 + (local.get $$f) + (i32.const 32) + (local.get $$w$2) + (local.get $$add436) + (local.get $$xor452) + ) + (local.set $$l$0$ph$be + (local.get $$w$2) + ) + ) + ) + ) + (local.set $$cnt$0$ph + (local.get $$cnt$1) + ) + (local.set $$l$0$ph + (local.get $$l$0$ph$be) + ) + (local.set $$l10n$0$ph + (local.get $$l10n$3) + ) + (br $label$continue$L1) + ) + ) + (block $label$break$L123 + (if + (i32.eq + (local.get $label) + (i32.const 92) + ) + (block + (local.set $$tobool454 + (i32.eq + (local.get $$f) + (i32.const 0) + ) + ) + (if + (local.get $$tobool454) + (block + (local.set $$tobool457 + (i32.eq + (local.get $$l10n$0$ph) + (i32.const 0) + ) + ) + (if + (local.get $$tobool457) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$i$2224 + (i32.const 1) + ) + (loop $while-in52 + (block $while-out51 + (local.set $$arrayidx464 + (i32.add + (local.get $$nl_type) + (i32.shl + (local.get $$i$2224) + (i32.const 2) + ) + ) + ) + (local.set $$72 + (i32.load + (local.get $$arrayidx464) + ) + ) + (local.set $$tobool465 + (i32.eq + (local.get $$72) + (i32.const 0) + ) + ) + (if + (local.get $$tobool465) + (br $while-out51) + ) + (local.set $$add$ptr468 + (i32.add + (local.get $$nl_arg) + (i32.shl + (local.get $$i$2224) + (i32.const 3) + ) + ) + ) + (call $_pop_arg + (local.get $$add$ptr468) + (local.get $$72) + (local.get $$ap) + (local.get $$pop_arg_long_double) + ) + (local.set $$inc + (i32.add + (local.get $$i$2224) + (i32.const 1) + ) + ) + (local.set $$cmp461 + (i32.lt_u + (local.get $$inc) + (i32.const 10) + ) + ) + (if + (local.get $$cmp461) + (local.set $$i$2224 + (local.get $$inc) + ) + (block + (local.set $$retval$0 + (i32.const 1) + ) + (br $label$break$L123) + ) + ) + (br $while-in52) + ) + ) + (local.set $$i$3221 + (local.get $$i$2224) + ) + (loop $while-in54 + (block $while-out53 + (local.set $$arrayidx476 + (i32.add + (local.get $$nl_type) + (i32.shl + (local.get $$i$3221) + (i32.const 2) + ) + ) + ) + (local.set $$73 + (i32.load + (local.get $$arrayidx476) + ) + ) + (local.set $$tobool477 + (i32.eq + (local.get $$73) + (i32.const 0) + ) + ) + (local.set $$inc483 + (i32.add + (local.get $$i$3221) + (i32.const 1) + ) + ) + (if + (i32.eqz + (local.get $$tobool477) + ) + (block + (local.set $$retval$0 + (i32.const -1) + ) + (br $label$break$L123) + ) + ) + (local.set $$cmp473 + (i32.lt_u + (local.get $$inc483) + (i32.const 10) + ) + ) + (if + (local.get $$cmp473) + (local.set $$i$3221 + (local.get $$inc483) + ) + (block + (local.set $$retval$0 + (i32.const 1) + ) + (br $while-out53) + ) + ) + (br $while-in54) + ) + ) + ) + ) + ) + (local.set $$retval$0 + (local.get $$cnt$1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___lockfile (; 583 ;) (param $$f i32) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (i32.const 1) + ) + ) + (func $___unlockfile (; 584 ;) (param $$f i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return) + ) + (func $_out (; 585 ;) (param $$f i32) (param $$s i32) (param $$l i32) + (local $$0 i32) + (local $$and i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$f) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 32) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (drop + (call $___fwritex + (local.get $$s) + (local.get $$l) + (local.get $$f) + ) + ) + ) + (return) + ) + (func $_getint (; 586 ;) (param $$s i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$add i32) + (local $$call i32) + (local $$call5 i32) + (local $$conv i32) + (local $$conv1 i32) + (local $$conv4 i32) + (local $$i$0$lcssa i32) + (local $$i$07 i32) + (local $$incdec$ptr i32) + (local $$mul i32) + (local $$sub i32) + (local $$tobool i32) + (local $$tobool6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (local.get $$s) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$0) + ) + ) + (local.set $$conv4 + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call5 + (call $_isdigit + (local.get $$conv4) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$call5) + (i32.const 0) + ) + ) + (if + (local.get $$tobool6) + (local.set $$i$0$lcssa + (i32.const 0) + ) + (block + (local.set $$i$07 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$mul + (i32.mul + (local.get $$i$07) + (i32.const 10) + ) + ) + (local.set $$2 + (i32.load + (local.get $$s) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$2) + ) + ) + (local.set $$conv1 + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub + (i32.add + (local.get $$mul) + (i32.const -48) + ) + ) + (local.set $$add + (i32.add + (local.get $$sub) + (local.get $$conv1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (local.get $$s) + (local.get $$incdec$ptr) + ) + (local.set $$4 + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call + (call $_isdigit + (local.get $$conv) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$i$0$lcssa + (local.get $$add) + ) + (br $while-out) + ) + (local.set $$i$07 + (local.get $$add) + ) + ) + (br $while-in) + ) + ) + ) + ) + (return + (local.get $$i$0$lcssa) + ) + ) + (func $_pop_arg (; 587 ;) (param $$arg i32) (param $$type i32) (param $$ap i32) (param $$pop_arg_long_double i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i64) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 f64) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$arglist_current i32) + (local $$arglist_current11 i32) + (local $$arglist_current14 i32) + (local $$arglist_current17 i32) + (local $$arglist_current2 i32) + (local $$arglist_current20 i32) + (local $$arglist_current23 i32) + (local $$arglist_current5 i32) + (local $$arglist_current8 i32) + (local $$arglist_next i32) + (local $$arglist_next12 i32) + (local $$arglist_next15 i32) + (local $$arglist_next18 i32) + (local $$arglist_next21 i32) + (local $$arglist_next24 i32) + (local $$arglist_next3 i32) + (local $$arglist_next6 i32) + (local $$arglist_next9 i32) + (local $$cmp i32) + (local $$conv i64) + (local $$conv16 i32) + (local $$conv17 i64) + (local $$conv22$mask i32) + (local $$conv23 i64) + (local $$conv28 i32) + (local $$conv29 i64) + (local $$conv34$mask i32) + (local $$conv35 i64) + (local $$conv7 i64) + (local $$expanded i32) + (local $$expanded25 i32) + (local $$expanded26 i32) + (local $$expanded27 i32) + (local $$expanded28 i32) + (local $$expanded29 i32) + (local $$expanded30 i32) + (local $$expanded31 i32) + (local $$expanded32 i32) + (local $$expanded33 i32) + (local $$expanded34 i32) + (local $$expanded35 i32) + (local $$expanded36 i32) + (local $$expanded37 i32) + (local $$expanded38 i32) + (local $$expanded39 i32) + (local $$expanded40 i32) + (local $$expanded41 i32) + (local $$expanded42 i32) + (local $$expanded43 i32) + (local $$expanded44 i32) + (local $$expanded45 i32) + (local $$expanded46 i32) + (local $$expanded47 i32) + (local $$expanded48 i32) + (local $$expanded49 i32) + (local $$expanded50 i32) + (local $$expanded51 i32) + (local $$expanded52 i32) + (local $$expanded53 i32) + (local $$expanded54 i32) + (local $$expanded55 i32) + (local $$expanded56 i32) + (local $$expanded57 i32) + (local $$expanded58 i32) + (local $$expanded59 i32) + (local $$expanded60 i32) + (local $$expanded61 i32) + (local $$expanded62 i32) + (local $$expanded63 i32) + (local $$expanded64 i32) + (local $$expanded65 i32) + (local $$expanded66 i32) + (local $$expanded67 i32) + (local $$expanded68 i32) + (local $$expanded69 i32) + (local $$expanded70 i32) + (local $$expanded71 i32) + (local $$expanded72 i32) + (local $$expanded73 i32) + (local $$expanded74 i32) + (local $$expanded75 i32) + (local $$expanded76 i32) + (local $$expanded77 i32) + (local $$expanded78 i32) + (local $$expanded79 i32) + (local $$expanded80 i32) + (local $$expanded81 i32) + (local $$expanded82 i32) + (local $$expanded83 i32) + (local $$expanded84 i32) + (local $$expanded85 i32) + (local $$expanded86 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$type) + (i32.const 20) + ) + ) + (block $label$break$L1 + (if + (i32.eqz + (local.get $$cmp) + ) + (block $switch + (block $switch-default + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case + (br_table $switch-case $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-case5 $switch-case6 $switch-case7 $switch-case8 $switch-case9 $switch-default + (i32.sub + (local.get $$type) + (i32.const 9) + ) + ) + ) + (block + (local.set $$arglist_current + (i32.load + (local.get $$ap) + ) + ) + (local.set $$0 + (local.get $$arglist_current) + ) + (local.set $$expanded26 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded25 + (local.get $$expanded26) + ) + (local.set $$expanded + (i32.sub + (local.get $$expanded25) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.add + (local.get $$0) + (local.get $$expanded) + ) + ) + (local.set $$expanded30 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded29 + (local.get $$expanded30) + ) + (local.set $$expanded28 + (i32.sub + (local.get $$expanded29) + (i32.const 1) + ) + ) + (local.set $$expanded27 + (i32.xor + (local.get $$expanded28) + (i32.const -1) + ) + ) + (local.set $$2 + (i32.and + (local.get $$1) + (local.get $$expanded27) + ) + ) + (local.set $$3 + (local.get $$2) + ) + (local.set $$4 + (i32.load + (local.get $$3) + ) + ) + (local.set $$arglist_next + (i32.add + (local.get $$3) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next) + ) + (i32.store + (local.get $$arg) + (local.get $$4) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current2 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$5 + (local.get $$arglist_current2) + ) + (local.set $$expanded33 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded32 + (local.get $$expanded33) + ) + (local.set $$expanded31 + (i32.sub + (local.get $$expanded32) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.add + (local.get $$5) + (local.get $$expanded31) + ) + ) + (local.set $$expanded37 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded36 + (local.get $$expanded37) + ) + (local.set $$expanded35 + (i32.sub + (local.get $$expanded36) + (i32.const 1) + ) + ) + (local.set $$expanded34 + (i32.xor + (local.get $$expanded35) + (i32.const -1) + ) + ) + (local.set $$7 + (i32.and + (local.get $$6) + (local.get $$expanded34) + ) + ) + (local.set $$8 + (local.get $$7) + ) + (local.set $$9 + (i32.load + (local.get $$8) + ) + ) + (local.set $$arglist_next3 + (i32.add + (local.get $$8) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next3) + ) + (local.set $$conv + (i64.extend_i32_s + (local.get $$9) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current5 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$10 + (local.get $$arglist_current5) + ) + (local.set $$expanded40 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded39 + (local.get $$expanded40) + ) + (local.set $$expanded38 + (i32.sub + (local.get $$expanded39) + (i32.const 1) + ) + ) + (local.set $$11 + (i32.add + (local.get $$10) + (local.get $$expanded38) + ) + ) + (local.set $$expanded44 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded43 + (local.get $$expanded44) + ) + (local.set $$expanded42 + (i32.sub + (local.get $$expanded43) + (i32.const 1) + ) + ) + (local.set $$expanded41 + (i32.xor + (local.get $$expanded42) + (i32.const -1) + ) + ) + (local.set $$12 + (i32.and + (local.get $$11) + (local.get $$expanded41) + ) + ) + (local.set $$13 + (local.get $$12) + ) + (local.set $$14 + (i32.load + (local.get $$13) + ) + ) + (local.set $$arglist_next6 + (i32.add + (local.get $$13) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next6) + ) + (local.set $$conv7 + (i64.extend_i32_u + (local.get $$14) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv7) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current8 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$15 + (local.get $$arglist_current8) + ) + (local.set $$expanded47 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded46 + (local.get $$expanded47) + ) + (local.set $$expanded45 + (i32.sub + (local.get $$expanded46) + (i32.const 1) + ) + ) + (local.set $$16 + (i32.add + (local.get $$15) + (local.get $$expanded45) + ) + ) + (local.set $$expanded51 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded50 + (local.get $$expanded51) + ) + (local.set $$expanded49 + (i32.sub + (local.get $$expanded50) + (i32.const 1) + ) + ) + (local.set $$expanded48 + (i32.xor + (local.get $$expanded49) + (i32.const -1) + ) + ) + (local.set $$17 + (i32.and + (local.get $$16) + (local.get $$expanded48) + ) + ) + (local.set $$18 + (local.get $$17) + ) + (local.set $$19 + (i64.load + (local.get $$18) + ) + ) + (local.set $$arglist_next9 + (i32.add + (local.get $$18) + (i32.const 8) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next9) + ) + (i64.store + (local.get $$arg) + (local.get $$19) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current11 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$20 + (local.get $$arglist_current11) + ) + (local.set $$expanded54 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded53 + (local.get $$expanded54) + ) + (local.set $$expanded52 + (i32.sub + (local.get $$expanded53) + (i32.const 1) + ) + ) + (local.set $$21 + (i32.add + (local.get $$20) + (local.get $$expanded52) + ) + ) + (local.set $$expanded58 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded57 + (local.get $$expanded58) + ) + (local.set $$expanded56 + (i32.sub + (local.get $$expanded57) + (i32.const 1) + ) + ) + (local.set $$expanded55 + (i32.xor + (local.get $$expanded56) + (i32.const -1) + ) + ) + (local.set $$22 + (i32.and + (local.get $$21) + (local.get $$expanded55) + ) + ) + (local.set $$23 + (local.get $$22) + ) + (local.set $$24 + (i32.load + (local.get $$23) + ) + ) + (local.set $$arglist_next12 + (i32.add + (local.get $$23) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next12) + ) + (local.set $$conv16 + (i32.and + (local.get $$24) + (i32.const 65535) + ) + ) + (local.set $$conv17 + (i64.extend_i32_s + (i32.shr_s + (i32.shl + (local.get $$conv16) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv17) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current14 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$25 + (local.get $$arglist_current14) + ) + (local.set $$expanded61 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded60 + (local.get $$expanded61) + ) + (local.set $$expanded59 + (i32.sub + (local.get $$expanded60) + (i32.const 1) + ) + ) + (local.set $$26 + (i32.add + (local.get $$25) + (local.get $$expanded59) + ) + ) + (local.set $$expanded65 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded64 + (local.get $$expanded65) + ) + (local.set $$expanded63 + (i32.sub + (local.get $$expanded64) + (i32.const 1) + ) + ) + (local.set $$expanded62 + (i32.xor + (local.get $$expanded63) + (i32.const -1) + ) + ) + (local.set $$27 + (i32.and + (local.get $$26) + (local.get $$expanded62) + ) + ) + (local.set $$28 + (local.get $$27) + ) + (local.set $$29 + (i32.load + (local.get $$28) + ) + ) + (local.set $$arglist_next15 + (i32.add + (local.get $$28) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next15) + ) + (local.set $$conv22$mask + (i32.and + (local.get $$29) + (i32.const 65535) + ) + ) + (local.set $$conv23 + (i64.extend_i32_u + (local.get $$conv22$mask) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv23) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current17 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$30 + (local.get $$arglist_current17) + ) + (local.set $$expanded68 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded67 + (local.get $$expanded68) + ) + (local.set $$expanded66 + (i32.sub + (local.get $$expanded67) + (i32.const 1) + ) + ) + (local.set $$31 + (i32.add + (local.get $$30) + (local.get $$expanded66) + ) + ) + (local.set $$expanded72 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded71 + (local.get $$expanded72) + ) + (local.set $$expanded70 + (i32.sub + (local.get $$expanded71) + (i32.const 1) + ) + ) + (local.set $$expanded69 + (i32.xor + (local.get $$expanded70) + (i32.const -1) + ) + ) + (local.set $$32 + (i32.and + (local.get $$31) + (local.get $$expanded69) + ) + ) + (local.set $$33 + (local.get $$32) + ) + (local.set $$34 + (i32.load + (local.get $$33) + ) + ) + (local.set $$arglist_next18 + (i32.add + (local.get $$33) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next18) + ) + (local.set $$conv28 + (i32.and + (local.get $$34) + (i32.const 255) + ) + ) + (local.set $$conv29 + (i64.extend_i32_s + (i32.shr_s + (i32.shl + (local.get $$conv28) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv29) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current20 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$35 + (local.get $$arglist_current20) + ) + (local.set $$expanded75 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded74 + (local.get $$expanded75) + ) + (local.set $$expanded73 + (i32.sub + (local.get $$expanded74) + (i32.const 1) + ) + ) + (local.set $$36 + (i32.add + (local.get $$35) + (local.get $$expanded73) + ) + ) + (local.set $$expanded79 + (i32.add + (i32.const 0) + (i32.const 4) + ) + ) + (local.set $$expanded78 + (local.get $$expanded79) + ) + (local.set $$expanded77 + (i32.sub + (local.get $$expanded78) + (i32.const 1) + ) + ) + (local.set $$expanded76 + (i32.xor + (local.get $$expanded77) + (i32.const -1) + ) + ) + (local.set $$37 + (i32.and + (local.get $$36) + (local.get $$expanded76) + ) + ) + (local.set $$38 + (local.get $$37) + ) + (local.set $$39 + (i32.load + (local.get $$38) + ) + ) + (local.set $$arglist_next21 + (i32.add + (local.get $$38) + (i32.const 4) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next21) + ) + (local.set $$conv34$mask + (i32.and + (local.get $$39) + (i32.const 255) + ) + ) + (local.set $$conv35 + (i64.extend_i32_u + (local.get $$conv34$mask) + ) + ) + (i64.store + (local.get $$arg) + (local.get $$conv35) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$arglist_current23 + (i32.load + (local.get $$ap) + ) + ) + (local.set $$40 + (local.get $$arglist_current23) + ) + (local.set $$expanded82 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded81 + (local.get $$expanded82) + ) + (local.set $$expanded80 + (i32.sub + (local.get $$expanded81) + (i32.const 1) + ) + ) + (local.set $$41 + (i32.add + (local.get $$40) + (local.get $$expanded80) + ) + ) + (local.set $$expanded86 + (i32.add + (i32.const 0) + (i32.const 8) + ) + ) + (local.set $$expanded85 + (local.get $$expanded86) + ) + (local.set $$expanded84 + (i32.sub + (local.get $$expanded85) + (i32.const 1) + ) + ) + (local.set $$expanded83 + (i32.xor + (local.get $$expanded84) + (i32.const -1) + ) + ) + (local.set $$42 + (i32.and + (local.get $$41) + (local.get $$expanded83) + ) + ) + (local.set $$43 + (local.get $$42) + ) + (local.set $$44 + (f64.load + (local.get $$43) + ) + ) + (local.set $$arglist_next24 + (i32.add + (local.get $$43) + (i32.const 8) + ) + ) + (i32.store + (local.get $$ap) + (local.get $$arglist_next24) + ) + (f64.store + (local.get $$arg) + (local.get $$44) + ) + (br $label$break$L1) + ) + ) + (block + (call_indirect (type $FUNCSIG$vii) + (local.get $$arg) + (local.get $$ap) + (i32.add + (i32.and + (local.get $$pop_arg_long_double) + (i32.const 255) + ) + (i32.const 2841) + ) + ) + (br $label$break$L1) + ) + ) + (br $label$break$L1) + ) + ) + ) + (return) + ) + (func $_fmt_x (; 588 ;) (param $$x i64) (param $$s i32) (param $$lower i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$conv1 i32) + (local $$conv4 i32) + (local $$idxprom i32) + (local $$incdec$ptr i32) + (local $$or i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$06 i32) + (local $$shr i64) + (local $$tobool i32) + (local $$tobool5 i32) + (local $$x$addr$07 i64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool5 + (i64.eq + (local.get $$x) + (i64.const 0) + ) + ) + (if + (local.get $$tobool5) + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + (block + (local.set $$s$addr$06 + (local.get $$s) + ) + (local.set $$x$addr$07 + (local.get $$x) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (i32.wrap_i64 + (local.get $$x$addr$07) + ) + ) + (local.set $$idxprom + (i32.and + (local.get $$0) + (i32.const 15) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 7264) + (local.get $$idxprom) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$conv4 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$or + (i32.or + (local.get $$conv4) + (local.get $$lower) + ) + ) + (local.set $$conv1 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$06) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr) + (local.get $$conv1) + ) + (local.set $$shr + (i64.shr_u + (local.get $$x$addr$07) + (i64.const 4) + ) + ) + (local.set $$tobool + (i64.eq + (local.get $$shr) + (i64.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (br $while-out) + ) + (block + (local.set $$s$addr$06 + (local.get $$incdec$ptr) + ) + (local.set $$x$addr$07 + (local.get $$shr) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (return + (local.get $$s$addr$0$lcssa) + ) + ) + (func $_fmt_o (; 589 ;) (param $$x i64) (param $$s i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$conv i32) + (local $$incdec$ptr i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$06 i32) + (local $$shr i64) + (local $$tobool i32) + (local $$tobool4 i32) + (local $$x$addr$05 i64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool4 + (i64.eq + (local.get $$x) + (i64.const 0) + ) + ) + (if + (local.get $$tobool4) + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + (block + (local.set $$s$addr$06 + (local.get $$s) + ) + (local.set $$x$addr$05 + (local.get $$x) + ) + (loop $while-in + (block $while-out + (local.set $$0 + (i32.and + (i32.wrap_i64 + (local.get $$x$addr$05) + ) + (i32.const 255) + ) + ) + (local.set $$1 + (i32.and + (local.get $$0) + (i32.const 7) + ) + ) + (local.set $$conv + (i32.or + (local.get $$1) + (i32.const 48) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$06) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr) + (local.get $$conv) + ) + (local.set $$shr + (i64.shr_u + (local.get $$x$addr$05) + (i64.const 3) + ) + ) + (local.set $$tobool + (i64.eq + (local.get $$shr) + (i64.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (br $while-out) + ) + (block + (local.set $$s$addr$06 + (local.get $$incdec$ptr) + ) + (local.set $$x$addr$05 + (local.get $$shr) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (return + (local.get $$s$addr$0$lcssa) + ) + ) + (func $_fmt_u (; 590 ;) (param $$x i64) (param $$s i32) (result i32) + (local $$0 i64) + (local $$1 i64) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$add5 i32) + (local $$cmp i32) + (local $$cmp11 i32) + (local $$conv i32) + (local $$conv6 i32) + (local $$div i64) + (local $$div9 i32) + (local $$extract$t i32) + (local $$extract$t16 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr7 i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$013 i32) + (local $$s$addr$1$lcssa i32) + (local $$s$addr$19 i32) + (local $$tobool8 i32) + (local $$x$addr$0$lcssa$off0 i32) + (local $$x$addr$012 i64) + (local $$y$010 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp11 + (i64.gt_u + (local.get $$x) + (i64.const 4294967295) + ) + ) + (local.set $$extract$t + (i32.wrap_i64 + (local.get $$x) + ) + ) + (if + (local.get $$cmp11) + (block + (local.set $$s$addr$013 + (local.get $$s) + ) + (local.set $$x$addr$012 + (local.get $$x) + ) + (loop $while-in + (block $while-out + (local.set $$div + (i64.div_u + (local.get $$x$addr$012) + (i64.const 10) + ) + ) + (local.set $$0 + (i64.mul + (local.get $$div) + (i64.const 10) + ) + ) + (local.set $$1 + (i64.sub + (local.get $$x$addr$012) + (local.get $$0) + ) + ) + (local.set $$2 + (i32.and + (i32.wrap_i64 + (local.get $$1) + ) + (i32.const 255) + ) + ) + (local.set $$conv + (i32.or + (local.get $$2) + (i32.const 48) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$013) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr) + (local.get $$conv) + ) + (local.set $$cmp + (i64.gt_u + (local.get $$x$addr$012) + (i64.const 42949672959) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$s$addr$013 + (local.get $$incdec$ptr) + ) + (local.set $$x$addr$012 + (local.get $$div) + ) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (local.set $$extract$t16 + (i32.wrap_i64 + (local.get $$div) + ) + ) + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (local.set $$x$addr$0$lcssa$off0 + (local.get $$extract$t16) + ) + ) + (block + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + (local.set $$x$addr$0$lcssa$off0 + (local.get $$extract$t) + ) + ) + ) + (local.set $$tobool8 + (i32.eq + (local.get $$x$addr$0$lcssa$off0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool8) + (local.set $$s$addr$1$lcssa + (local.get $$s$addr$0$lcssa) + ) + (block + (local.set $$s$addr$19 + (local.get $$s$addr$0$lcssa) + ) + (local.set $$y$010 + (local.get $$x$addr$0$lcssa$off0) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$div9 + (i32.and + (i32.div_u + (local.get $$y$010) + (i32.const 10) + ) + (i32.const -1) + ) + ) + (local.set $$3 + (i32.mul + (local.get $$div9) + (i32.const 10) + ) + ) + (local.set $$4 + (i32.sub + (local.get $$y$010) + (local.get $$3) + ) + ) + (local.set $$add5 + (i32.or + (local.get $$4) + (i32.const 48) + ) + ) + (local.set $$conv6 + (i32.and + (local.get $$add5) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr7 + (i32.add + (local.get $$s$addr$19) + (i32.const -1) + ) + ) + (i32.store8 + (local.get $$incdec$ptr7) + (local.get $$conv6) + ) + (local.set $$5 + (i32.lt_u + (local.get $$y$010) + (i32.const 10) + ) + ) + (if + (local.get $$5) + (block + (local.set $$s$addr$1$lcssa + (local.get $$incdec$ptr7) + ) + (br $while-out0) + ) + (block + (local.set $$s$addr$19 + (local.get $$incdec$ptr7) + ) + (local.set $$y$010 + (local.get $$div9) + ) + ) + ) + (br $while-in1) + ) + ) + ) + ) + (return + (local.get $$s$addr$1$lcssa) + ) + ) + (func $_memchr (; 591 ;) (param $$src i32) (param $$c i32) (param $$n i32) (result i32) + (local $$$in i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$and i32) + (local $$and15 i32) + (local $$and16 i32) + (local $$and39 i32) + (local $$cmp i32) + (local $$cmp11 i32) + (local $$cmp1132 i32) + (local $$cmp28 i32) + (local $$cmp8 i32) + (local $$conv1 i32) + (local $$dec i32) + (local $$dec34 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr21 i32) + (local $$incdec$ptr33 i32) + (local $$mul i32) + (local $$n$addr$0$lcssa i32) + (local $$n$addr$0$lcssa52 i32) + (local $$n$addr$043 i32) + (local $$n$addr$1$lcssa i32) + (local $$n$addr$1$lcssa55 i32) + (local $$n$addr$133 i32) + (local $$n$addr$227 i32) + (local $$neg i32) + (local $$or$cond i32) + (local $$or$cond42 i32) + (local $$s$0$lcssa i32) + (local $$s$0$lcssa53 i32) + (local $$s$044 i32) + (local $$s$128 i32) + (local $$sub i32) + (local $$sub22 i32) + (local $$tobool i32) + (local $$tobool17 i32) + (local $$tobool2 i32) + (local $$tobool2$lcssa i32) + (local $$tobool241 i32) + (local $$tobool25 i32) + (local $$tobool2526 i32) + (local $$tobool36 i32) + (local $$tobool40 i32) + (local $$w$0$lcssa i32) + (local $$w$034 i32) + (local $$xor i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$0 + (local.get $$src) + ) + (local.set $$and39 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$tobool40 + (i32.ne + (local.get $$and39) + (i32.const 0) + ) + ) + (local.set $$tobool241 + (i32.ne + (local.get $$n) + (i32.const 0) + ) + ) + (local.set $$or$cond42 + (i32.and + (local.get $$tobool241) + (local.get $$tobool40) + ) + ) + (block $label$break$L1 + (if + (local.get $$or$cond42) + (block + (local.set $$1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$n$addr$043 + (local.get $$n) + ) + (local.set $$s$044 + (local.get $$src) + ) + (loop $while-in + (block $while-out + (local.set $$2 + (i32.load8_s + (local.get $$s$044) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$n$addr$0$lcssa52 + (local.get $$n$addr$043) + ) + (local.set $$s$0$lcssa53 + (local.get $$s$044) + ) + (local.set $label + (i32.const 6) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$044) + (i32.const 1) + ) + ) + (local.set $$dec + (i32.add + (local.get $$n$addr$043) + (i32.const -1) + ) + ) + (local.set $$3 + (local.get $$incdec$ptr) + ) + (local.set $$and + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$tobool2 + (i32.ne + (local.get $$dec) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$tobool2) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$n$addr$043 + (local.get $$dec) + ) + (local.set $$s$044 + (local.get $$incdec$ptr) + ) + ) + (block + (local.set $$n$addr$0$lcssa + (local.get $$dec) + ) + (local.set $$s$0$lcssa + (local.get $$incdec$ptr) + ) + (local.set $$tobool2$lcssa + (local.get $$tobool2) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + ) + (br $while-in) + ) + ) + ) + (block + (local.set $$n$addr$0$lcssa + (local.get $$n) + ) + (local.set $$s$0$lcssa + (local.get $$src) + ) + (local.set $$tobool2$lcssa + (local.get $$tobool241) + ) + (local.set $label + (i32.const 5) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (if + (local.get $$tobool2$lcssa) + (block + (local.set $$n$addr$0$lcssa52 + (local.get $$n$addr$0$lcssa) + ) + (local.set $$s$0$lcssa53 + (local.get $$s$0$lcssa) + ) + (local.set $label + (i32.const 6) + ) + ) + (local.set $label + (i32.const 16) + ) + ) + ) + (block $label$break$L8 + (if + (i32.eq + (local.get $label) + (i32.const 6) + ) + (block + (local.set $$4 + (i32.load8_s + (local.get $$s$0$lcssa53) + ) + ) + (local.set $$5 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$cmp8 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp8) + (block + (local.set $$tobool36 + (i32.eq + (local.get $$n$addr$0$lcssa52) + (i32.const 0) + ) + ) + (if + (local.get $$tobool36) + (block + (local.set $label + (i32.const 16) + ) + (br $label$break$L8) + ) + (block + (local.set $$8 + (local.get $$s$0$lcssa53) + ) + (br $label$break$L8) + ) + ) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$conv1) + (i32.const 16843009) + ) + ) + (local.set $$cmp1132 + (i32.gt_u + (local.get $$n$addr$0$lcssa52) + (i32.const 3) + ) + ) + (block $label$break$L13 + (if + (local.get $$cmp1132) + (block + (local.set $$n$addr$133 + (local.get $$n$addr$0$lcssa52) + ) + (local.set $$w$034 + (local.get $$s$0$lcssa53) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$6 + (i32.load + (local.get $$w$034) + ) + ) + (local.set $$xor + (i32.xor + (local.get $$6) + (local.get $$mul) + ) + ) + (local.set $$sub + (i32.add + (local.get $$xor) + (i32.const -16843009) + ) + ) + (local.set $$neg + (i32.and + (local.get $$xor) + (i32.const -2139062144) + ) + ) + (local.set $$and15 + (i32.xor + (local.get $$neg) + (i32.const -2139062144) + ) + ) + (local.set $$and16 + (i32.and + (local.get $$and15) + (local.get $$sub) + ) + ) + (local.set $$tobool17 + (i32.eq + (local.get $$and16) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool17) + ) + (block + (local.set $$$in + (local.get $$w$034) + ) + (local.set $$n$addr$1$lcssa55 + (local.get $$n$addr$133) + ) + (br $label$break$L13) + ) + ) + (local.set $$incdec$ptr21 + (i32.add + (local.get $$w$034) + (i32.const 4) + ) + ) + (local.set $$sub22 + (i32.add + (local.get $$n$addr$133) + (i32.const -4) + ) + ) + (local.set $$cmp11 + (i32.gt_u + (local.get $$sub22) + (i32.const 3) + ) + ) + (if + (local.get $$cmp11) + (block + (local.set $$n$addr$133 + (local.get $$sub22) + ) + (local.set $$w$034 + (local.get $$incdec$ptr21) + ) + ) + (block + (local.set $$n$addr$1$lcssa + (local.get $$sub22) + ) + (local.set $$w$0$lcssa + (local.get $$incdec$ptr21) + ) + (local.set $label + (i32.const 11) + ) + (br $while-out2) + ) + ) + (br $while-in3) + ) + ) + ) + (block + (local.set $$n$addr$1$lcssa + (local.get $$n$addr$0$lcssa52) + ) + (local.set $$w$0$lcssa + (local.get $$s$0$lcssa53) + ) + (local.set $label + (i32.const 11) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 11) + ) + (block + (local.set $$tobool2526 + (i32.eq + (local.get $$n$addr$1$lcssa) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2526) + (block + (local.set $label + (i32.const 16) + ) + (br $label$break$L8) + ) + (block + (local.set $$$in + (local.get $$w$0$lcssa) + ) + (local.set $$n$addr$1$lcssa55 + (local.get $$n$addr$1$lcssa) + ) + ) + ) + ) + ) + (local.set $$n$addr$227 + (local.get $$n$addr$1$lcssa55) + ) + (local.set $$s$128 + (local.get $$$in) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$7 + (i32.load8_s + (local.get $$s$128) + ) + ) + (local.set $$cmp28 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp28) + (block + (local.set $$8 + (local.get $$s$128) + ) + (br $label$break$L8) + ) + ) + (local.set $$incdec$ptr33 + (i32.add + (local.get $$s$128) + (i32.const 1) + ) + ) + (local.set $$dec34 + (i32.add + (local.get $$n$addr$227) + (i32.const -1) + ) + ) + (local.set $$tobool25 + (i32.eq + (local.get $$dec34) + (i32.const 0) + ) + ) + (if + (local.get $$tobool25) + (block + (local.set $label + (i32.const 16) + ) + (br $while-out4) + ) + (block + (local.set $$n$addr$227 + (local.get $$dec34) + ) + (local.set $$s$128 + (local.get $$incdec$ptr33) + ) + ) + ) + (br $while-in5) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 16) + ) + (local.set $$8 + (i32.const 0) + ) + ) + (return + (local.get $$8) + ) + ) + (func $_pad_659 (; 592 ;) (param $$f i32) (param $$c i32) (param $$w i32) (param $$l i32) (param $$fl i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$and i32) + (local $$cmp i32) + (local $$cmp3 i32) + (local $$cmp38 i32) + (local $$cond i32) + (local $$conv i32) + (local $$l$addr$0$lcssa i32) + (local $$l$addr$09 i32) + (local $$or$cond i32) + (local $$pad i32) + (local $$sub i32) + (local $$sub6 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $$pad + (local.get $sp_a) + ) + (local.set $$and + (i32.and + (local.get $$fl) + (i32.const 73728) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$w) + (local.get $$l) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$sub + (i32.sub + (local.get $$w) + (local.get $$l) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$c) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$0 + (i32.lt_u + (local.get $$sub) + (i32.const 256) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$0) + (local.get $$sub) + (i32.const 256) + ) + ) + (drop + (call $_memset + (local.get $$pad) + (local.get $$conv) + (local.get $$cond) + ) + ) + (local.set $$cmp38 + (i32.gt_u + (local.get $$sub) + (i32.const 255) + ) + ) + (if + (local.get $$cmp38) + (block + (local.set $$1 + (i32.sub + (local.get $$w) + (local.get $$l) + ) + ) + (local.set $$l$addr$09 + (local.get $$sub) + ) + (loop $while-in + (block $while-out + (call $_out + (local.get $$f) + (local.get $$pad) + (i32.const 256) + ) + (local.set $$sub6 + (i32.add + (local.get $$l$addr$09) + (i32.const -256) + ) + ) + (local.set $$cmp3 + (i32.gt_u + (local.get $$sub6) + (i32.const 255) + ) + ) + (if + (local.get $$cmp3) + (local.set $$l$addr$09 + (local.get $$sub6) + ) + (br $while-out) + ) + (br $while-in) + ) + ) + (local.set $$2 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$l$addr$0$lcssa + (local.get $$2) + ) + ) + (local.set $$l$addr$0$lcssa + (local.get $$sub) + ) + ) + (call $_out + (local.get $$f) + (local.get $$pad) + (local.get $$l$addr$0$lcssa) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_wctomb (; 593 ;) (param $$s i32) (param $$wc i32) (result i32) + (local $$call i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool + (i32.eq + (local.get $$s) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$call + (call $_wcrtomb + (local.get $$s) + (local.get $$wc) + (i32.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$call) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_wcrtomb (; 594 ;) (param $$s i32) (param $$wc i32) (param $$st i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$and32 i32) + (local $$and36 i32) + (local $$and49 i32) + (local $$and54 i32) + (local $$and58 i32) + (local $$call i32) + (local $$call10 i32) + (local $$call66 i32) + (local $$cmp i32) + (local $$cmp14 i32) + (local $$cmp21 i32) + (local $$cmp24 i32) + (local $$cmp41 i32) + (local $$cmp7 i32) + (local $$conv i32) + (local $$conv12 i32) + (local $$conv17 i32) + (local $$conv19 i32) + (local $$conv29 i32) + (local $$conv34 i32) + (local $$conv38 i32) + (local $$conv46 i32) + (local $$conv51 i32) + (local $$conv56 i32) + (local $$conv60 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr30 i32) + (local $$incdec$ptr35 i32) + (local $$incdec$ptr47 i32) + (local $$incdec$ptr52 i32) + (local $$incdec$ptr57 i32) + (local $$locale i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or18 i32) + (local $$or28 i32) + (local $$or33 i32) + (local $$or37 i32) + (local $$or45 i32) + (local $$or50 i32) + (local $$or55 i32) + (local $$or59 i32) + (local $$retval$0 i32) + (local $$sub40 i32) + (local $$tobool i32) + (local $$tobool2 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool + (i32.eq + (local.get $$s) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$tobool) + (local.set $$retval$0 + (i32.const 1) + ) + (block + (local.set $$cmp + (i32.lt_u + (local.get $$wc) + (i32.const 128) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$conv + (i32.and + (local.get $$wc) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$s) + (local.get $$conv) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (local.set $$call + (call $___pthread_self_440) + ) + (local.set $$locale + (i32.add + (local.get $$call) + (i32.const 188) + ) + ) + (local.set $$0 + (i32.load + (local.get $$locale) + ) + ) + (local.set $$1 + (i32.load + (local.get $$0) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (block + (local.set $$2 + (i32.and + (local.get $$wc) + (i32.const -128) + ) + ) + (local.set $$cmp7 + (i32.eq + (local.get $$2) + (i32.const 57216) + ) + ) + (if + (local.get $$cmp7) + (block + (local.set $$conv12 + (i32.and + (local.get $$wc) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$s) + (local.get $$conv12) + ) + (local.set $$retval$0 + (i32.const 1) + ) + (br $do-once) + ) + (block + (local.set $$call10 + (call $___errno_location) + ) + (i32.store + (local.get $$call10) + (i32.const 84) + ) + (local.set $$retval$0 + (i32.const -1) + ) + (br $do-once) + ) + ) + ) + ) + (local.set $$cmp14 + (i32.lt_u + (local.get $$wc) + (i32.const 2048) + ) + ) + (if + (local.get $$cmp14) + (block + (local.set $$3 + (i32.shr_u + (local.get $$wc) + (i32.const 6) + ) + ) + (local.set $$or + (i32.or + (local.get $$3) + (i32.const 192) + ) + ) + (local.set $$conv17 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$s) + (local.get $$conv17) + ) + (local.set $$and + (i32.and + (local.get $$wc) + (i32.const 63) + ) + ) + (local.set $$or18 + (i32.or + (local.get $$and) + (i32.const 128) + ) + ) + (local.set $$conv19 + (i32.and + (local.get $$or18) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$incdec$ptr) + (local.get $$conv19) + ) + (local.set $$retval$0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (local.set $$cmp21 + (i32.lt_u + (local.get $$wc) + (i32.const 55296) + ) + ) + (local.set $$4 + (i32.and + (local.get $$wc) + (i32.const -8192) + ) + ) + (local.set $$cmp24 + (i32.eq + (local.get $$4) + (i32.const 57344) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp21) + (local.get $$cmp24) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$5 + (i32.shr_u + (local.get $$wc) + (i32.const 12) + ) + ) + (local.set $$or28 + (i32.or + (local.get $$5) + (i32.const 224) + ) + ) + (local.set $$conv29 + (i32.and + (local.get $$or28) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr30 + (i32.add + (local.get $$s) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$s) + (local.get $$conv29) + ) + (local.set $$6 + (i32.shr_u + (local.get $$wc) + (i32.const 6) + ) + ) + (local.set $$and32 + (i32.and + (local.get $$6) + (i32.const 63) + ) + ) + (local.set $$or33 + (i32.or + (local.get $$and32) + (i32.const 128) + ) + ) + (local.set $$conv34 + (i32.and + (local.get $$or33) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr35 + (i32.add + (local.get $$s) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$incdec$ptr30) + (local.get $$conv34) + ) + (local.set $$and36 + (i32.and + (local.get $$wc) + (i32.const 63) + ) + ) + (local.set $$or37 + (i32.or + (local.get $$and36) + (i32.const 128) + ) + ) + (local.set $$conv38 + (i32.and + (local.get $$or37) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$incdec$ptr35) + (local.get $$conv38) + ) + (local.set $$retval$0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (local.set $$sub40 + (i32.add + (local.get $$wc) + (i32.const -65536) + ) + ) + (local.set $$cmp41 + (i32.lt_u + (local.get $$sub40) + (i32.const 1048576) + ) + ) + (if + (local.get $$cmp41) + (block + (local.set $$7 + (i32.shr_u + (local.get $$wc) + (i32.const 18) + ) + ) + (local.set $$or45 + (i32.or + (local.get $$7) + (i32.const 240) + ) + ) + (local.set $$conv46 + (i32.and + (local.get $$or45) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr47 + (i32.add + (local.get $$s) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $$s) + (local.get $$conv46) + ) + (local.set $$8 + (i32.shr_u + (local.get $$wc) + (i32.const 12) + ) + ) + (local.set $$and49 + (i32.and + (local.get $$8) + (i32.const 63) + ) + ) + (local.set $$or50 + (i32.or + (local.get $$and49) + (i32.const 128) + ) + ) + (local.set $$conv51 + (i32.and + (local.get $$or50) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr52 + (i32.add + (local.get $$s) + (i32.const 2) + ) + ) + (i32.store8 + (local.get $$incdec$ptr47) + (local.get $$conv51) + ) + (local.set $$9 + (i32.shr_u + (local.get $$wc) + (i32.const 6) + ) + ) + (local.set $$and54 + (i32.and + (local.get $$9) + (i32.const 63) + ) + ) + (local.set $$or55 + (i32.or + (local.get $$and54) + (i32.const 128) + ) + ) + (local.set $$conv56 + (i32.and + (local.get $$or55) + (i32.const 255) + ) + ) + (local.set $$incdec$ptr57 + (i32.add + (local.get $$s) + (i32.const 3) + ) + ) + (i32.store8 + (local.get $$incdec$ptr52) + (local.get $$conv56) + ) + (local.set $$and58 + (i32.and + (local.get $$wc) + (i32.const 63) + ) + ) + (local.set $$or59 + (i32.or + (local.get $$and58) + (i32.const 128) + ) + ) + (local.set $$conv60 + (i32.and + (local.get $$or59) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$incdec$ptr57) + (local.get $$conv60) + ) + (local.set $$retval$0 + (i32.const 4) + ) + (br $do-once) + ) + (block + (local.set $$call66 + (call $___errno_location) + ) + (i32.store + (local.get $$call66) + (i32.const 84) + ) + (local.set $$retval$0 + (i32.const -1) + ) + (br $do-once) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___pthread_self_440 (; 595 ;) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_pthread_self) + ) + (return + (local.get $$call) + ) + ) + (func $_pthread_self (; 596 ;) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (return + (i32.const 8020) + ) + ) + (func $___fwritex (; 597 ;) (param $$s i32) (param $$l i32) (param $$f i32) (result i32) + (local $$$pre i32) + (local $$$pre35 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr27 i32) + (local $$arrayidx i32) + (local $$call i32) + (local $$call16 i32) + (local $$call4 i32) + (local $$cmp i32) + (local $$cmp11 i32) + (local $$cmp17 i32) + (local $$cmp6 i32) + (local $$i$033 i32) + (local $$i$1 i32) + (local $$l$addr$0 i32) + (local $$l$addr$1 i32) + (local $$lbf i32) + (local $$or$cond i32) + (local $$retval$1 i32) + (local $$s$addr$1 i32) + (local $$sub i32) + (local $$sub$ptr$sub i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$tobool9 i32) + (local $$tobool932 i32) + (local $$wend i32) + (local $$wpos i32) + (local $$write i32) + (local $$write15 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (local.set $$0 + (i32.load + (local.get $$wend) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call + (call $___towrite + (local.get $$f) + ) + ) + (local.set $$tobool1 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1) + (block + (local.set $$$pre + (i32.load + (local.get $$wend) + ) + ) + (local.set $$3 + (local.get $$$pre) + ) + (local.set $label + (i32.const 5) + ) + ) + (local.set $$retval$1 + (i32.const 0) + ) + ) + ) + (block + (local.set $$1 + (local.get $$0) + ) + (local.set $$3 + (local.get $$1) + ) + (local.set $label + (i32.const 5) + ) + ) + ) + (block $label$break$L5 + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (block + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$2 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$3) + (local.get $$2) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$sub$ptr$sub) + (local.get $$l) + ) + ) + (local.set $$4 + (local.get $$2) + ) + (if + (local.get $$cmp) + (block + (local.set $$write + (i32.add + (local.get $$f) + (i32.const 36) + ) + ) + (local.set $$5 + (i32.load + (local.get $$write) + ) + ) + (local.set $$call4 + (call_indirect (type $FUNCSIG$iiii) + (local.get $$f) + (local.get $$s) + (local.get $$l) + (i32.add + (i32.and + (local.get $$5) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + (local.set $$retval$1 + (local.get $$call4) + ) + (br $label$break$L5) + ) + ) + (local.set $$lbf + (i32.add + (local.get $$f) + (i32.const 75) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$lbf) + ) + ) + (local.set $$cmp6 + (i32.lt_s + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$tobool932 + (i32.eq + (local.get $$l) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp6) + (local.get $$tobool932) + ) + ) + (block $label$break$L10 + (if + (local.get $$or$cond) + (block + (local.set $$9 + (local.get $$4) + ) + (local.set $$i$1 + (i32.const 0) + ) + (local.set $$l$addr$1 + (local.get $$l) + ) + (local.set $$s$addr$1 + (local.get $$s) + ) + ) + (block + (local.set $$i$033 + (local.get $$l) + ) + (loop $while-in + (block $while-out + (local.set $$sub + (i32.add + (local.get $$i$033) + (i32.const -1) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$s) + (local.get $$sub) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$cmp11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 10) + ) + ) + (if + (local.get $$cmp11) + (br $while-out) + ) + (local.set $$tobool9 + (i32.eq + (local.get $$sub) + (i32.const 0) + ) + ) + (if + (local.get $$tobool9) + (block + (local.set $$9 + (local.get $$4) + ) + (local.set $$i$1 + (i32.const 0) + ) + (local.set $$l$addr$1 + (local.get $$l) + ) + (local.set $$s$addr$1 + (local.get $$s) + ) + (br $label$break$L10) + ) + (local.set $$i$033 + (local.get $$sub) + ) + ) + (br $while-in) + ) + ) + (local.set $$write15 + (i32.add + (local.get $$f) + (i32.const 36) + ) + ) + (local.set $$8 + (i32.load + (local.get $$write15) + ) + ) + (local.set $$call16 + (call_indirect (type $FUNCSIG$iiii) + (local.get $$f) + (local.get $$s) + (local.get $$i$033) + (i32.add + (i32.and + (local.get $$8) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + (local.set $$cmp17 + (i32.lt_u + (local.get $$call16) + (local.get $$i$033) + ) + ) + (if + (local.get $$cmp17) + (block + (local.set $$retval$1 + (local.get $$call16) + ) + (br $label$break$L5) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$s) + (local.get $$i$033) + ) + ) + (local.set $$l$addr$0 + (i32.sub + (local.get $$l) + (local.get $$i$033) + ) + ) + (local.set $$$pre35 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$9 + (local.get $$$pre35) + ) + (local.set $$i$1 + (local.get $$i$033) + ) + (local.set $$l$addr$1 + (local.get $$l$addr$0) + ) + (local.set $$s$addr$1 + (local.get $$add$ptr) + ) + ) + ) + ) + (drop + (call $_memcpy + (local.get $$9) + (local.get $$s$addr$1) + (local.get $$l$addr$1) + ) + ) + (local.set $$10 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$add$ptr27 + (i32.add + (local.get $$10) + (local.get $$l$addr$1) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$add$ptr27) + ) + (local.set $$add + (i32.add + (local.get $$i$1) + (local.get $$l$addr$1) + ) + ) + (local.set $$retval$1 + (local.get $$add) + ) + ) + ) + ) + (return + (local.get $$retval$1) + ) + ) + (func $___towrite (; 598 ;) (param $$f i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$add$ptr i32) + (local $$and i32) + (local $$buf i32) + (local $$buf_size i32) + (local $$conv i32) + (local $$conv3 i32) + (local $$mode i32) + (local $$or i32) + (local $$or5 i32) + (local $$rend i32) + (local $$retval$0 i32) + (local $$rpos i32) + (local $$sub i32) + (local $$tobool i32) + (local $$wbase i32) + (local $$wend i32) + (local $$wpos i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mode + (i32.add + (local.get $$f) + (i32.const 74) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$sub + (i32.add + (local.get $$conv) + (i32.const 255) + ) + ) + (local.set $$or + (i32.or + (local.get $$sub) + (local.get $$conv) + ) + ) + (local.set $$conv3 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$mode) + (local.get $$conv3) + ) + (local.set $$1 + (i32.load + (local.get $$f) + ) + ) + (local.set $$and + (i32.and + (local.get $$1) + (i32.const 8) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$rend + (i32.add + (local.get $$f) + (i32.const 8) + ) + ) + (i32.store + (local.get $$rend) + (i32.const 0) + ) + (local.set $$rpos + (i32.add + (local.get $$f) + (i32.const 4) + ) + ) + (i32.store + (local.get $$rpos) + (i32.const 0) + ) + (local.set $$buf + (i32.add + (local.get $$f) + (i32.const 44) + ) + ) + (local.set $$2 + (i32.load + (local.get $$buf) + ) + ) + (local.set $$wbase + (i32.add + (local.get $$f) + (i32.const 28) + ) + ) + (i32.store + (local.get $$wbase) + (local.get $$2) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$2) + ) + (local.set $$3 + (local.get $$2) + ) + (local.set $$buf_size + (i32.add + (local.get $$f) + (i32.const 48) + ) + ) + (local.set $$4 + (i32.load + (local.get $$buf_size) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$3) + (local.get $$4) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend) + (local.get $$add$ptr) + ) + (local.set $$retval$0 + (i32.const 0) + ) + ) + (block + (local.set $$or5 + (i32.or + (local.get $$1) + (i32.const 32) + ) + ) + (i32.store + (local.get $$f) + (local.get $$or5) + ) + (local.set $$retval$0 + (i32.const -1) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___DOUBLE_BITS_662 (; 599 ;) (param $$__f f64) (result i64) + (local $$0 i64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i64.reinterpret_f64 + (local.get $$__f) + ) + ) + (return + (local.get $$0) + ) + ) + (func $_frexp (; 600 ;) (param $$x f64) (param $$e i32) (result f64) + (local $$0 i64) + (local $$1 i32) + (local $$2 i32) + (local $$3 f64) + (local $$and10 i64) + (local $$call f64) + (local $$conv i32) + (local $$mul f64) + (local $$or i64) + (local $$retval$0 f64) + (local $$shr i64) + (local $$storemerge i32) + (local $$sub i32) + (local $$sub8 i32) + (local $$tobool1 i32) + (local $$trunc i32) + (local $$trunc$clear i32) + (local $$x$addr$0 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i64.reinterpret_f64 + (local.get $$x) + ) + ) + (local.set $$shr + (i64.shr_u + (local.get $$0) + (i64.const 52) + ) + ) + (local.set $$trunc + (i32.and + (i32.wrap_i64 + (local.get $$shr) + ) + (i32.const 65535) + ) + ) + (local.set $$trunc$clear + (i32.and + (local.get $$trunc) + (i32.const 2047) + ) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc$clear) + (i32.const 16) + ) + (i32.const 16) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$tobool1 + (f64.ne + (local.get $$x) + (f64.const 0) + ) + ) + (if + (local.get $$tobool1) + (block + (local.set $$mul + (f64.mul + (local.get $$x) + (f64.const 18446744073709551615) + ) + ) + (local.set $$call + (call $_frexp + (local.get $$mul) + (local.get $$e) + ) + ) + (local.set $$1 + (i32.load + (local.get $$e) + ) + ) + (local.set $$sub + (i32.add + (local.get $$1) + (i32.const -64) + ) + ) + (local.set $$storemerge + (local.get $$sub) + ) + (local.set $$x$addr$0 + (local.get $$call) + ) + ) + (block + (local.set $$storemerge + (i32.const 0) + ) + (local.set $$x$addr$0 + (local.get $$x) + ) + ) + ) + (i32.store + (local.get $$e) + (local.get $$storemerge) + ) + (local.set $$retval$0 + (local.get $$x$addr$0) + ) + (br $switch) + ) + ) + (block + (local.set $$retval$0 + (local.get $$x) + ) + (br $switch) + ) + ) + (block + (local.set $$2 + (i32.wrap_i64 + (local.get $$shr) + ) + ) + (local.set $$conv + (i32.and + (local.get $$2) + (i32.const 2047) + ) + ) + (local.set $$sub8 + (i32.add + (local.get $$conv) + (i32.const -1022) + ) + ) + (i32.store + (local.get $$e) + (local.get $$sub8) + ) + (local.set $$and10 + (i64.and + (local.get $$0) + (i64.const -9218868437227405313) + ) + ) + (local.set $$or + (i64.or + (local.get $$and10) + (i64.const 4602678819172646912) + ) + ) + (local.set $$3 + (f64.reinterpret_i64 + (local.get $$or) + ) + ) + (local.set $$retval$0 + (local.get $$3) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_sn_write (; 601 ;) (param $$f i32) (param $$s i32) (param $$l i32) (result i32) + (local $$$cast i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$add$ptr i32) + (local $$cmp i32) + (local $$spec$select i32) + (local $$sub$ptr$sub i32) + (local $$wend i32) + (local $$wpos i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (local.set $$0 + (i32.load + (local.get $$wend) + ) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$sub$ptr$sub) + (local.get $$l) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp) + (local.get $$l) + (local.get $$sub$ptr$sub) + ) + ) + (local.set $$$cast + (local.get $$1) + ) + (drop + (call $_memcpy + (local.get $$$cast) + (local.get $$s) + (local.get $$spec$select) + ) + ) + (local.set $$2 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$2) + (local.get $$spec$select) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$add$ptr) + ) + (return + (local.get $$l) + ) + ) + (func $_scalbn (; 602 ;) (param $$x f64) (param $$n i32) (result f64) + (local $$0 i32) + (local $$1 i32) + (local $$2 f64) + (local $$add i32) + (local $$add14 i32) + (local $$add21 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp11 i32) + (local $$cmp8 i32) + (local $$conv19 i64) + (local $$mul f64) + (local $$mul10 f64) + (local $$mul13 f64) + (local $$mul22 f64) + (local $$mul3 f64) + (local $$n$addr$0 i32) + (local $$shl i64) + (local $$spec$select i32) + (local $$spec$select20 f64) + (local $$spec$select21 i32) + (local $$spec$select22 f64) + (local $$spec$store$select i32) + (local $$spec$store$select1 i32) + (local $$sub i32) + (local $$sub4 i32) + (local $$y$0 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$n) + (i32.const 1023) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$mul + (f64.mul + (local.get $$x) + (f64.const 8988465674311579538646525e283) + ) + ) + (local.set $$sub + (i32.add + (local.get $$n) + (i32.const -1023) + ) + ) + (local.set $$cmp1 + (i32.gt_s + (local.get $$n) + (i32.const 2046) + ) + ) + (local.set $$mul3 + (f64.mul + (local.get $$mul) + (f64.const 8988465674311579538646525e283) + ) + ) + (local.set $$sub4 + (i32.add + (local.get $$n) + (i32.const -2046) + ) + ) + (local.set $$0 + (i32.lt_s + (local.get $$sub4) + (i32.const 1023) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$0) + (local.get $$sub4) + (i32.const 1023) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp1) + (local.get $$spec$store$select) + (local.get $$sub) + ) + ) + (local.set $$spec$select20 + (if (result f64) + (local.get $$cmp1) + (local.get $$mul3) + (local.get $$mul) + ) + ) + (local.set $$n$addr$0 + (local.get $$spec$select) + ) + (local.set $$y$0 + (local.get $$spec$select20) + ) + ) + (block + (local.set $$cmp8 + (i32.lt_s + (local.get $$n) + (i32.const -1022) + ) + ) + (if + (local.get $$cmp8) + (block + (local.set $$mul10 + (f64.mul + (local.get $$x) + (f64.const 2.2250738585072014e-308) + ) + ) + (local.set $$add + (i32.add + (local.get $$n) + (i32.const 1022) + ) + ) + (local.set $$cmp11 + (i32.lt_s + (local.get $$n) + (i32.const -2044) + ) + ) + (local.set $$mul13 + (f64.mul + (local.get $$mul10) + (f64.const 2.2250738585072014e-308) + ) + ) + (local.set $$add14 + (i32.add + (local.get $$n) + (i32.const 2044) + ) + ) + (local.set $$1 + (i32.gt_s + (local.get $$add14) + (i32.const -1022) + ) + ) + (local.set $$spec$store$select1 + (if (result i32) + (local.get $$1) + (local.get $$add14) + (i32.const -1022) + ) + ) + (local.set $$spec$select21 + (if (result i32) + (local.get $$cmp11) + (local.get $$spec$store$select1) + (local.get $$add) + ) + ) + (local.set $$spec$select22 + (if (result f64) + (local.get $$cmp11) + (local.get $$mul13) + (local.get $$mul10) + ) + ) + (local.set $$n$addr$0 + (local.get $$spec$select21) + ) + (local.set $$y$0 + (local.get $$spec$select22) + ) + ) + (block + (local.set $$n$addr$0 + (local.get $$n) + ) + (local.set $$y$0 + (local.get $$x) + ) + ) + ) + ) + ) + (local.set $$add21 + (i32.add + (local.get $$n$addr$0) + (i32.const 1023) + ) + ) + (local.set $$conv19 + (i64.extend_i32_u + (local.get $$add21) + ) + ) + (local.set $$shl + (i64.shl + (local.get $$conv19) + (i64.const 52) + ) + ) + (local.set $$2 + (f64.reinterpret_i64 + (local.get $$shl) + ) + ) + (local.set $$mul22 + (f64.mul + (local.get $$y$0) + (local.get $$2) + ) + ) + (return + (local.get $$mul22) + ) + ) + (func $_strlen (; 603 ;) (param $$s i32) (result i32) + (local $$$pn i32) + (local $$$pn24 i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$and i32) + (local $$and3 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr1323 i32) + (local $$incdec$ptr7 i32) + (local $$neg i32) + (local $$rem i32) + (local $$rem13 i32) + (local $$retval$0 i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$015 i32) + (local $$s$addr$1$lcssa i32) + (local $$sub i32) + (local $$sub$ptr$lhs$cast15 i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$tobool10 i32) + (local $$tobool1021 i32) + (local $$tobool14 i32) + (local $$tobool4 i32) + (local $$w$0 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (local.get $$s) + ) + (local.set $$rem13 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$tobool14 + (i32.eq + (local.get $$rem13) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool14) + (block + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + (local.set $label + (i32.const 5) + ) + ) + (block + (local.set $$5 + (local.get $$0) + ) + (local.set $$s$addr$015 + (local.get $$s) + ) + (loop $while-in + (block $while-out + (local.set $$1 + (i32.load8_s + (local.get $$s$addr$015) + ) + ) + (local.set $$tobool1 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1) + (block + (local.set $$$pn + (local.get $$5) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$015) + (i32.const 1) + ) + ) + (local.set $$2 + (local.get $$incdec$ptr) + ) + (local.set $$rem + (i32.and + (local.get $$2) + (i32.const 3) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$rem) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (local.set $label + (i32.const 5) + ) + (br $while-out) + ) + (block + (local.set $$5 + (local.get $$2) + ) + (local.set $$s$addr$015 + (local.get $$incdec$ptr) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 5) + ) + (block + (local.set $$w$0 + (local.get $$s$addr$0$lcssa) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$3 + (i32.load + (local.get $$w$0) + ) + ) + (local.set $$sub + (i32.add + (local.get $$3) + (i32.const -16843009) + ) + ) + (local.set $$neg + (i32.and + (local.get $$3) + (i32.const -2139062144) + ) + ) + (local.set $$and + (i32.xor + (local.get $$neg) + (i32.const -2139062144) + ) + ) + (local.set $$and3 + (i32.and + (local.get $$and) + (local.get $$sub) + ) + ) + (local.set $$tobool4 + (i32.eq + (local.get $$and3) + (i32.const 0) + ) + ) + (local.set $$incdec$ptr7 + (i32.add + (local.get $$w$0) + (i32.const 4) + ) + ) + (if + (local.get $$tobool4) + (local.set $$w$0 + (local.get $$incdec$ptr7) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + (local.set $$4 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$tobool1021 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1021) + (local.set $$s$addr$1$lcssa + (local.get $$w$0) + ) + (block + (local.set $$$pn24 + (local.get $$w$0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$incdec$ptr1323 + (i32.add + (local.get $$$pn24) + (i32.const 1) + ) + ) + (local.set $$$pre + (i32.load8_s + (local.get $$incdec$ptr1323) + ) + ) + (local.set $$tobool10 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$$pre) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (block + (local.set $$s$addr$1$lcssa + (local.get $$incdec$ptr1323) + ) + (br $while-out2) + ) + (local.set $$$pn24 + (local.get $$incdec$ptr1323) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (local.set $$sub$ptr$lhs$cast15 + (local.get $$s$addr$1$lcssa) + ) + (local.set $$$pn + (local.get $$sub$ptr$lhs$cast15) + ) + ) + ) + (local.set $$retval$0 + (i32.sub + (local.get $$$pn) + (local.get $$0) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_strchr (; 604 ;) (param $$s i32) (param $$c i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cond i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $___strchrnul + (local.get $$s) + (local.get $$c) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$call) + ) + ) + (local.set $$1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp) + (local.get $$call) + (i32.const 0) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $___strchrnul (; 605 ;) (param $$s i32) (param $$c i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$add$ptr i32) + (local $$and i32) + (local $$and14 i32) + (local $$and15 i32) + (local $$and29 i32) + (local $$and9 i32) + (local $$and930 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp26 i32) + (local $$conv1 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr19 i32) + (local $$incdec$ptr31 i32) + (local $$mul i32) + (local $$neg i32) + (local $$neg13 i32) + (local $$neg28 i32) + (local $$or$cond i32) + (local $$or$cond24 i32) + (local $$rem i32) + (local $$rem34 i32) + (local $$retval$0 i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$036 i32) + (local $$s$addr$1 i32) + (local $$sub i32) + (local $$sub11 i32) + (local $$sub27 i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool1031 i32) + (local $$tobool16 i32) + (local $$tobool2 i32) + (local $$tobool23 i32) + (local $$tobool235 i32) + (local $$tobool3 i32) + (local $$w$0$lcssa i32) + (local $$w$032 i32) + (local $$xor i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$conv1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$conv1) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool) + (block + (local.set $$call + (call $_strlen + (local.get $$s) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$s) + (local.get $$call) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr) + ) + ) + (block + (local.set $$0 + (local.get $$s) + ) + (local.set $$rem34 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$tobool235 + (i32.eq + (local.get $$rem34) + (i32.const 0) + ) + ) + (if + (local.get $$tobool235) + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + (block + (local.set $$1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$s$addr$036 + (local.get $$s) + ) + (loop $while-in + (block $while-out + (local.set $$2 + (i32.load8_s + (local.get $$s$addr$036) + ) + ) + (local.set $$tobool3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$tobool3) + (local.get $$cmp) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (local.get $$s$addr$036) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$036) + (i32.const 1) + ) + ) + (local.set $$3 + (local.get $$incdec$ptr) + ) + (local.set $$rem + (i32.and + (local.get $$3) + (i32.const 3) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$rem) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (block + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (br $while-out) + ) + (local.set $$s$addr$036 + (local.get $$incdec$ptr) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$mul + (i32.mul + (local.get $$conv1) + (i32.const 16843009) + ) + ) + (local.set $$4 + (i32.load + (local.get $$s$addr$0$lcssa) + ) + ) + (local.set $$sub27 + (i32.add + (local.get $$4) + (i32.const -16843009) + ) + ) + (local.set $$neg28 + (i32.and + (local.get $$4) + (i32.const -2139062144) + ) + ) + (local.set $$and29 + (i32.xor + (local.get $$neg28) + (i32.const -2139062144) + ) + ) + (local.set $$and930 + (i32.and + (local.get $$and29) + (local.get $$sub27) + ) + ) + (local.set $$tobool1031 + (i32.eq + (local.get $$and930) + (i32.const 0) + ) + ) + (block $label$break$L10 + (if + (local.get $$tobool1031) + (block + (local.set $$5 + (local.get $$4) + ) + (local.set $$w$032 + (local.get $$s$addr$0$lcssa) + ) + (loop $while-in2 + (block $while-out1 + (local.set $$xor + (i32.xor + (local.get $$5) + (local.get $$mul) + ) + ) + (local.set $$sub11 + (i32.add + (local.get $$xor) + (i32.const -16843009) + ) + ) + (local.set $$neg13 + (i32.and + (local.get $$xor) + (i32.const -2139062144) + ) + ) + (local.set $$and14 + (i32.xor + (local.get $$neg13) + (i32.const -2139062144) + ) + ) + (local.set $$and15 + (i32.and + (local.get $$and14) + (local.get $$sub11) + ) + ) + (local.set $$tobool16 + (i32.eq + (local.get $$and15) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool16) + ) + (block + (local.set $$w$0$lcssa + (local.get $$w$032) + ) + (br $label$break$L10) + ) + ) + (local.set $$incdec$ptr19 + (i32.add + (local.get $$w$032) + (i32.const 4) + ) + ) + (local.set $$6 + (i32.load + (local.get $$incdec$ptr19) + ) + ) + (local.set $$sub + (i32.add + (local.get $$6) + (i32.const -16843009) + ) + ) + (local.set $$neg + (i32.and + (local.get $$6) + (i32.const -2139062144) + ) + ) + (local.set $$and + (i32.xor + (local.get $$neg) + (i32.const -2139062144) + ) + ) + (local.set $$and9 + (i32.and + (local.get $$and) + (local.get $$sub) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$and9) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (block + (local.set $$5 + (local.get $$6) + ) + (local.set $$w$032 + (local.get $$incdec$ptr19) + ) + ) + (block + (local.set $$w$0$lcssa + (local.get $$incdec$ptr19) + ) + (br $while-out1) + ) + ) + (br $while-in2) + ) + ) + ) + (local.set $$w$0$lcssa + (local.get $$s$addr$0$lcssa) + ) + ) + ) + (local.set $$7 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$s$addr$1 + (local.get $$w$0$lcssa) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$8 + (i32.load8_s + (local.get $$s$addr$1) + ) + ) + (local.set $$tobool23 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp26 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (local.set $$or$cond24 + (i32.or + (local.get $$tobool23) + (local.get $$cmp26) + ) + ) + (local.set $$incdec$ptr31 + (i32.add + (local.get $$s$addr$1) + (i32.const 1) + ) + ) + (if + (local.get $$or$cond24) + (block + (local.set $$retval$0 + (local.get $$s$addr$1) + ) + (br $while-out3) + ) + (local.set $$s$addr$1 + (local.get $$incdec$ptr31) + ) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_strcpy (; 606 ;) (param $$dest i32) (param $$src i32) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (drop + (call $___stpcpy + (local.get $$dest) + (local.get $$src) + ) + ) + (return + (local.get $$dest) + ) + ) + (func $___stpcpy (; 607 ;) (param $$d i32) (param $$s i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$and28 i32) + (local $$and7 i32) + (local $$and729 i32) + (local $$cmp i32) + (local $$d$addr$0$lcssa i32) + (local $$d$addr$037 i32) + (local $$d$addr$1 i32) + (local $$d$addr$224 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr11 i32) + (local $$incdec$ptr12 i32) + (local $$incdec$ptr19 i32) + (local $$incdec$ptr20 i32) + (local $$incdec$ptr5 i32) + (local $$neg i32) + (local $$neg27 i32) + (local $$rem2 i32) + (local $$rem235 i32) + (local $$retval$0 i32) + (local $$s$addr$0$lcssa i32) + (local $$s$addr$038 i32) + (local $$s$addr$1 i32) + (local $$s$addr$225 i32) + (local $$sub i32) + (local $$sub26 i32) + (local $$tobool i32) + (local $$tobool16 i32) + (local $$tobool1623 i32) + (local $$tobool3 i32) + (local $$tobool36 i32) + (local $$tobool8 i32) + (local $$tobool830 i32) + (local $$wd$0$lcssa i32) + (local $$wd$031 i32) + (local $$ws$0$lcssa i32) + (local $$ws$032 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (local.get $$s) + ) + (local.set $$1 + (local.get $$d) + ) + (local.set $$2 + (i32.xor + (local.get $$0) + (local.get $$1) + ) + ) + (local.set $$3 + (i32.and + (local.get $$2) + (i32.const 3) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp) + (block + (local.set $$rem235 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$tobool36 + (i32.eq + (local.get $$rem235) + (i32.const 0) + ) + ) + (if + (local.get $$tobool36) + (block + (local.set $$d$addr$0$lcssa + (local.get $$d) + ) + (local.set $$s$addr$0$lcssa + (local.get $$s) + ) + ) + (block + (local.set $$d$addr$037 + (local.get $$d) + ) + (local.set $$s$addr$038 + (local.get $$s) + ) + (loop $while-in + (block $while-out + (local.set $$4 + (i32.load8_s + (local.get $$s$addr$038) + ) + ) + (i32.store8 + (local.get $$d$addr$037) + (local.get $$4) + ) + (local.set $$tobool3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3) + (block + (local.set $$retval$0 + (local.get $$d$addr$037) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$s$addr$038) + (i32.const 1) + ) + ) + (local.set $$incdec$ptr5 + (i32.add + (local.get $$d$addr$037) + (i32.const 1) + ) + ) + (local.set $$5 + (local.get $$incdec$ptr) + ) + (local.set $$rem2 + (i32.and + (local.get $$5) + (i32.const 3) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$rem2) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$d$addr$0$lcssa + (local.get $$incdec$ptr5) + ) + (local.set $$s$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (br $while-out) + ) + (block + (local.set $$d$addr$037 + (local.get $$incdec$ptr5) + ) + (local.set $$s$addr$038 + (local.get $$incdec$ptr) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$6 + (i32.load + (local.get $$s$addr$0$lcssa) + ) + ) + (local.set $$sub26 + (i32.add + (local.get $$6) + (i32.const -16843009) + ) + ) + (local.set $$neg27 + (i32.and + (local.get $$6) + (i32.const -2139062144) + ) + ) + (local.set $$and28 + (i32.xor + (local.get $$neg27) + (i32.const -2139062144) + ) + ) + (local.set $$and729 + (i32.and + (local.get $$and28) + (local.get $$sub26) + ) + ) + (local.set $$tobool830 + (i32.eq + (local.get $$and729) + (i32.const 0) + ) + ) + (if + (local.get $$tobool830) + (block + (local.set $$7 + (local.get $$6) + ) + (local.set $$wd$031 + (local.get $$d$addr$0$lcssa) + ) + (local.set $$ws$032 + (local.get $$s$addr$0$lcssa) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$incdec$ptr11 + (i32.add + (local.get $$ws$032) + (i32.const 4) + ) + ) + (local.set $$incdec$ptr12 + (i32.add + (local.get $$wd$031) + (i32.const 4) + ) + ) + (i32.store + (local.get $$wd$031) + (local.get $$7) + ) + (local.set $$8 + (i32.load + (local.get $$incdec$ptr11) + ) + ) + (local.set $$sub + (i32.add + (local.get $$8) + (i32.const -16843009) + ) + ) + (local.set $$neg + (i32.and + (local.get $$8) + (i32.const -2139062144) + ) + ) + (local.set $$and + (i32.xor + (local.get $$neg) + (i32.const -2139062144) + ) + ) + (local.set $$and7 + (i32.and + (local.get $$and) + (local.get $$sub) + ) + ) + (local.set $$tobool8 + (i32.eq + (local.get $$and7) + (i32.const 0) + ) + ) + (if + (local.get $$tobool8) + (block + (local.set $$7 + (local.get $$8) + ) + (local.set $$wd$031 + (local.get $$incdec$ptr12) + ) + (local.set $$ws$032 + (local.get $$incdec$ptr11) + ) + ) + (block + (local.set $$wd$0$lcssa + (local.get $$incdec$ptr12) + ) + (local.set $$ws$0$lcssa + (local.get $$incdec$ptr11) + ) + (br $while-out0) + ) + ) + (br $while-in1) + ) + ) + ) + (block + (local.set $$wd$0$lcssa + (local.get $$d$addr$0$lcssa) + ) + (local.set $$ws$0$lcssa + (local.get $$s$addr$0$lcssa) + ) + ) + ) + (local.set $$d$addr$1 + (local.get $$wd$0$lcssa) + ) + (local.set $$s$addr$1 + (local.get $$ws$0$lcssa) + ) + (local.set $label + (i32.const 10) + ) + ) + (block + (local.set $$d$addr$1 + (local.get $$d) + ) + (local.set $$s$addr$1 + (local.get $$s) + ) + (local.set $label + (i32.const 10) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 10) + ) + (block + (local.set $$9 + (i32.load8_s + (local.get $$s$addr$1) + ) + ) + (i32.store8 + (local.get $$d$addr$1) + (local.get $$9) + ) + (local.set $$tobool1623 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1623) + (local.set $$retval$0 + (local.get $$d$addr$1) + ) + (block + (local.set $$d$addr$224 + (local.get $$d$addr$1) + ) + (local.set $$s$addr$225 + (local.get $$s$addr$1) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$incdec$ptr19 + (i32.add + (local.get $$s$addr$225) + (i32.const 1) + ) + ) + (local.set $$incdec$ptr20 + (i32.add + (local.get $$d$addr$224) + (i32.const 1) + ) + ) + (local.set $$10 + (i32.load8_s + (local.get $$incdec$ptr19) + ) + ) + (i32.store8 + (local.get $$incdec$ptr20) + (local.get $$10) + ) + (local.set $$tobool16 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$10) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool16) + (block + (local.set $$retval$0 + (local.get $$incdec$ptr20) + ) + (br $while-out2) + ) + (block + (local.set $$d$addr$224 + (local.get $$incdec$ptr20) + ) + (local.set $$s$addr$225 + (local.get $$incdec$ptr19) + ) + ) + ) + (br $while-in3) + ) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___sindf (; 608 ;) (param $$x f64) (result f32) + (local $$add f64) + (local $$add10 f64) + (local $$add5 f64) + (local $$add7 f64) + (local $$conv f32) + (local $$mul f64) + (local $$mul1 f64) + (local $$mul2 f64) + (local $$mul3 f64) + (local $$mul4 f64) + (local $$mul6 f64) + (local $$mul8 f64) + (local $$mul9 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (f64.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul1 + (f64.mul + (local.get $$mul) + (local.get $$mul) + ) + ) + (local.set $$mul2 + (f64.mul + (local.get $$mul) + (f64.const 2.718311493989822e-06) + ) + ) + (local.set $$add + (f64.add + (local.get $$mul2) + (f64.const -1.9839334836096632e-04) + ) + ) + (local.set $$mul3 + (f64.mul + (local.get $$mul) + (local.get $$x) + ) + ) + (local.set $$mul4 + (f64.mul + (local.get $$mul) + (f64.const 0.008333329385889463) + ) + ) + (local.set $$add5 + (f64.add + (local.get $$mul4) + (f64.const -0.16666666641626524) + ) + ) + (local.set $$mul6 + (f64.mul + (local.get $$mul3) + (local.get $$add5) + ) + ) + (local.set $$add7 + (f64.add + (local.get $$mul6) + (local.get $$x) + ) + ) + (local.set $$mul8 + (f64.mul + (local.get $$mul3) + (local.get $$mul1) + ) + ) + (local.set $$mul9 + (f64.mul + (local.get $$mul8) + (local.get $$add) + ) + ) + (local.set $$add10 + (f64.add + (local.get $$mul9) + (local.get $$add7) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$add10) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $___cosdf (; 609 ;) (param $$x f64) (result f32) + (local $$add f64) + (local $$add410 f64) + (local $$add6 f64) + (local $$add9 f64) + (local $$conv f32) + (local $$mul f64) + (local $$mul1 f64) + (local $$mul2 f64) + (local $$mul3 f64) + (local $$mul5 f64) + (local $$mul7 f64) + (local $$mul8 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (f64.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul1 + (f64.mul + (local.get $$mul) + (local.get $$mul) + ) + ) + (local.set $$mul2 + (f64.mul + (local.get $$mul) + (f64.const 2.439044879627741e-05) + ) + ) + (local.set $$add + (f64.add + (local.get $$mul2) + (f64.const -0.001388676377460993) + ) + ) + (local.set $$mul3 + (f64.mul + (local.get $$mul) + (f64.const 0.499999997251031) + ) + ) + (local.set $$add410 + (f64.sub + (f64.const 1) + (local.get $$mul3) + ) + ) + (local.set $$mul5 + (f64.mul + (local.get $$mul1) + (f64.const 0.04166662332373906) + ) + ) + (local.set $$add6 + (f64.add + (local.get $$add410) + (local.get $$mul5) + ) + ) + (local.set $$mul7 + (f64.mul + (local.get $$mul) + (local.get $$mul1) + ) + ) + (local.set $$mul8 + (f64.mul + (local.get $$mul7) + (local.get $$add) + ) + ) + (local.set $$add9 + (f64.add + (local.get $$add6) + (local.get $$mul8) + ) + ) + (local.set $$conv + (f32.demote_f64 + (local.get $$add9) + ) + ) + (return + (local.get $$conv) + ) + ) + (func $___rem_pio2_large (; 610 ;) (param $$x i32) (param $$y i32) (param $$e0 i32) (param $$nx i32) (param $$prec i32) (result i32) + (local $$$neg i32) + (local $$$pre f64) + (local $$$pre300 f64) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 f64) + (local $$17 f64) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 f64) + (local $$21 f64) + (local $$22 f64) + (local $$23 f64) + (local $$24 f64) + (local $$25 f64) + (local $$26 f64) + (local $$27 f64) + (local $$28 f64) + (local $$29 f64) + (local $$3 i32) + (local $$30 f64) + (local $$31 f64) + (local $$32 f64) + (local $$33 f64) + (local $$4 f64) + (local $$5 f64) + (local $$6 f64) + (local $$7 f64) + (local $$8 i32) + (local $$9 i32) + (local $$add157 i32) + (local $$add161 i32) + (local $$add164 i32) + (local $$add175 f64) + (local $$add19 i32) + (local $$add209 i32) + (local $$add209$sink i32) + (local $$add210 i32) + (local $$add23 f64) + (local $$add243 i32) + (local $$add246 f64) + (local $$add261 f64) + (local $$add279 f64) + (local $$add298 f64) + (local $$add318 f64) + (local $$add323 f64) + (local $$add336 f64) + (local $$add341 f64) + (local $$add352 f64) + (local $$add4 i32) + (local $$add45 f64) + (local $$add62 i32) + (local $$add87 i32) + (local $$and i32) + (local $$and117 i32) + (local $$and375 i32) + (local $$arrayidx i32) + (local $$arrayidx113 i32) + (local $$arrayidx116 i32) + (local $$arrayidx139 i32) + (local $$arrayidx148 i32) + (local $$arrayidx162 i32) + (local $$arrayidx165 i32) + (local $$arrayidx170 i32) + (local $$arrayidx173 i32) + (local $$arrayidx179 i32) + (local $$arrayidx18 i32) + (local $$arrayidx191 i32) + (local $$arrayidx208 i32) + (local $$arrayidx21 i32) + (local $$arrayidx212 i32) + (local $$arrayidx223 i32) + (local $$arrayidx226 i32) + (local $$arrayidx242 i32) + (local $$arrayidx244 i32) + (local $$arrayidx251 i32) + (local $$arrayidx260 i32) + (local $$arrayidx27 i32) + (local $$arrayidx278 i32) + (local $$arrayidx297 i32) + (local $$arrayidx309 i32) + (local $$arrayidx31 i32) + (local $$arrayidx316 i32) + (local $$arrayidx317 i32) + (local $$arrayidx317$phi$trans$insert i32) + (local $$arrayidx334 i32) + (local $$arrayidx335 i32) + (local $$arrayidx335$phi$trans$insert i32) + (local $$arrayidx351 i32) + (local $$arrayidx361 i32) + (local $$arrayidx362 i32) + (local $$arrayidx363 i32) + (local $$arrayidx368 i32) + (local $$arrayidx370 i32) + (local $$arrayidx372 i32) + (local $$arrayidx42 i32) + (local $$arrayidx44 i32) + (local $$arrayidx60 i32) + (local $$arrayidx7 i32) + (local $$arrayidx75 i32) + (local $$arrayidx8 i32) + (local $$arrayidx92 i32) + (local $$call f64) + (local $$call126 f64) + (local $$call198 f64) + (local $$call218 f64) + (local $$call50 f64) + (local $$carry$0$lcssa i32) + (local $$carry$0266 i32) + (local $$carry$1 i32) + (local $$carry$1$ph i32) + (local $$cmp11 i32) + (local $$cmp119 i32) + (local $$cmp123 i32) + (local $$cmp131 i32) + (local $$cmp136 i32) + (local $$cmp136270 i32) + (local $$cmp143 i32) + (local $$cmp149 i32) + (local $$cmp15281 i32) + (local $$cmp158 i32) + (local $$cmp167274 i32) + (local $$cmp192 i32) + (local $$cmp199 i32) + (local $$cmp220 i32) + (local $$cmp220257 i32) + (local $$cmp232 i32) + (local $$cmp236 i32) + (local $$cmp239 i32) + (local $$cmp257 i32) + (local $$cmp265 i32) + (local $$cmp275 i32) + (local $$cmp283 i32) + (local $$cmp294231 i32) + (local $$cmp312 i32) + (local $$cmp312245 i32) + (local $$cmp33 i32) + (local $$cmp330 i32) + (local $$cmp330243 i32) + (local $$cmp33260 i32) + (local $$cmp348 i32) + (local $$cmp356 i32) + (local $$cmp5287 i32) + (local $$cmp56 i32) + (local $$cmp6 i32) + (local $$cmp71 i32) + (local $$cmp78 i32) + (local $$cmp84 i32) + (local $$cmp93 i32) + (local $$cmp96 i32) + (local $$cond f64) + (local $$cond271 f64) + (local $$cond289 f64) + (local $$cond308 f64) + (local $$conv f64) + (local $$conv163 f64) + (local $$conv203 i32) + (local $$conv203$sink i32) + (local $$conv204 f64) + (local $$conv207 i32) + (local $$conv214 i32) + (local $$conv224 f64) + (local $$conv37 i32) + (local $$conv38 f64) + (local $$conv41 i32) + (local $$conv53 i32) + (local $$conv54 f64) + (local $$dec229 i32) + (local $$dec253 i32) + (local $$dec263 i32) + (local $$dec281 i32) + (local $$dec354 i32) + (local $$div i32) + (local $$exitcond i32) + (local $$exitcond296 i32) + (local $$exitcond297 i32) + (local $$exitcond298 i32) + (local $$exitcond299 i32) + (local $$f i32) + (local $$fq i32) + (local $$fw$0$lcssa f64) + (local $$fw$0283 f64) + (local $$fw$1$lcssa f64) + (local $$fw$1276 f64) + (local $$fw$2259 f64) + (local $$fw$3251 f64) + (local $$fw$4$lcssa f64) + (local $$fw$4230 f64) + (local $$fw$5$lcssa f64) + (local $$fw$5237 f64) + (local $$fw$6$lcssa f64) + (local $$fw$6233 f64) + (local $$fw$7$lcssa f64) + (local $$fw$7241 f64) + (local $$i$0288 i32) + (local $$i$10232 i32) + (local $$i$11246 i32) + (local $$i$12244 i32) + (local $$i$1286 i32) + (local $$i$13240 i32) + (local $$i$2261 i32) + (local $$i$3267 i32) + (local $$i$4272 i32) + (local $$i$4272$in i32) + (local $$i$5280 i32) + (local $$i$5280$in i32) + (local $$i$6258 i32) + (local $$i$7255 i32) + (local $$i$8229 i32) + (local $$i$9236 i32) + (local $$ih$0 i32) + (local $$ih$0218 i32) + (local $$ih$0219 i32) + (local $$inc i32) + (local $$inc107 i32) + (local $$inc153 i32) + (local $$inc177 i32) + (local $$inc248 i32) + (local $$inc25 i32) + (local $$inc29 i32) + (local $$inc300 i32) + (local $$inc47 i32) + (local $$inc9 i32) + (local $$iq i32) + (local $$j$0289 i32) + (local $$j$1282 i32) + (local $$j$2262 i32) + (local $$j$3271 i32) + (local $$j$4275 i32) + (local $$jz$0 i32) + (local $$jz$1 i32) + (local $$jz$1$in i32) + (local $$jz$2 i32) + (local $$k$0 i32) + (local $$k$1250 i32) + (local $$mul$neg i32) + (local $$mul174 f64) + (local $$mul202 f64) + (local $$mul205 f64) + (local $$mul22 f64) + (local $$mul225 f64) + (local $$mul227 f64) + (local $$mul245 f64) + (local $$mul36 f64) + (local $$mul39 f64) + (local $$mul49 f64) + (local $$mul51 f64) + (local $$n$0 i32) + (local $$n$0217 i32) + (local $$n$1 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$q i32) + (local $$q0$0 i32) + (local $$q0$0$in i32) + (local $$q0$1 i32) + (local $$q0$1$ph i32) + (local $$shl i32) + (local $$shr i32) + (local $$shr70 i32) + (local $$shr76 i32) + (local $$spec$store$select i32) + (local $$sub i32) + (local $$sub1 i32) + (local $$sub103 i32) + (local $$sub112 i32) + (local $$sub115 i32) + (local $$sub122 f64) + (local $$sub127 f64) + (local $$sub147 i32) + (local $$sub172 i32) + (local $$sub197 i32) + (local $$sub2 i32) + (local $$sub20 i32) + (local $$sub206 f64) + (local $$sub238 i32) + (local $$sub269 f64) + (local $$sub287 f64) + (local $$sub292 f64) + (local $$sub3 i32) + (local $$sub306 f64) + (local $$sub315 i32) + (local $$sub321 f64) + (local $$sub333 i32) + (local $$sub339 f64) + (local $$sub366 f64) + (local $$sub369 f64) + (local $$sub371 f64) + (local $$sub40 f64) + (local $$sub43 i32) + (local $$sub52 f64) + (local $$sub55 f64) + (local $$sub59 i32) + (local $$sub61 i32) + (local $$sub66 i32) + (local $$sub69 i32) + (local $$sub74 i32) + (local $$z$0$lcssa f64) + (local $$z$0263 f64) + (local $$z$1 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 560) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 560) + ) + ) + (local.set $$iq + (i32.add + (local.get $sp_a) + (i32.const 480) + ) + ) + (local.set $$f + (i32.add + (local.get $sp_a) + (i32.const 320) + ) + ) + (local.set $$fq + (i32.add + (local.get $sp_a) + (i32.const 160) + ) + ) + (local.set $$q + (local.get $sp_a) + ) + (local.set $$arrayidx + (i32.add + (i32.const 7280) + (i32.shl + (local.get $$prec) + (i32.const 2) + ) + ) + ) + (local.set $$0 + (i32.load + (local.get $$arrayidx) + ) + ) + (local.set $$sub + (i32.add + (local.get $$nx) + (i32.const -1) + ) + ) + (local.set $$sub1 + (i32.add + (local.get $$e0) + (i32.const -3) + ) + ) + (local.set $$div + (i32.and + (i32.div_s + (local.get $$sub1) + (i32.const 24) + ) + (i32.const -1) + ) + ) + (local.set $$1 + (i32.gt_s + (local.get $$div) + (i32.const 0) + ) + ) + (local.set $$spec$store$select + (if (result i32) + (local.get $$1) + (local.get $$div) + (i32.const 0) + ) + ) + (local.set $$$neg + (i32.mul + (local.get $$spec$store$select) + (i32.const -24) + ) + ) + (local.set $$mul$neg + (i32.add + (local.get $$e0) + (i32.const -24) + ) + ) + (local.set $$sub2 + (i32.add + (local.get $$mul$neg) + (local.get $$$neg) + ) + ) + (local.set $$add4 + (i32.add + (local.get $$0) + (local.get $$sub) + ) + ) + (local.set $$cmp5287 + (i32.lt_s + (local.get $$add4) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp5287) + ) + (block + (local.set $$sub3 + (i32.sub + (local.get $$spec$store$select) + (local.get $$sub) + ) + ) + (local.set $$2 + (i32.add + (local.get $$0) + (local.get $$nx) + ) + ) + (local.set $$i$0288 + (i32.const 0) + ) + (local.set $$j$0289 + (local.get $$sub3) + ) + (loop $while-in + (block $while-out + (local.set $$cmp6 + (i32.lt_s + (local.get $$j$0289) + (i32.const 0) + ) + ) + (if + (local.get $$cmp6) + (local.set $$cond + (f64.const 0) + ) + (block + (local.set $$arrayidx7 + (i32.add + (i32.const 7296) + (i32.shl + (local.get $$j$0289) + (i32.const 2) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx7) + ) + ) + (local.set $$conv + (f64.convert_i32_s + (local.get $$3) + ) + ) + (local.set $$cond + (local.get $$conv) + ) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$f) + (i32.shl + (local.get $$i$0288) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx8) + (local.get $$cond) + ) + (local.set $$inc + (i32.add + (local.get $$i$0288) + (i32.const 1) + ) + ) + (local.set $$inc9 + (i32.add + (local.get $$j$0289) + (i32.const 1) + ) + ) + (local.set $$exitcond299 + (i32.eq + (local.get $$inc) + (local.get $$2) + ) + ) + (if + (local.get $$exitcond299) + (br $while-out) + (block + (local.set $$i$0288 + (local.get $$inc) + ) + (local.set $$j$0289 + (local.get $$inc9) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$cmp15281 + (i32.gt_s + (local.get $$nx) + (i32.const 0) + ) + ) + (local.set $$i$1286 + (i32.const 0) + ) + (loop $while-in1 + (block $while-out0 + (if + (local.get $$cmp15281) + (block + (local.set $$add19 + (i32.add + (local.get $$i$1286) + (local.get $$sub) + ) + ) + (local.set $$fw$0283 + (f64.const 0) + ) + (local.set $$j$1282 + (i32.const 0) + ) + (loop $while-in3 + (block $while-out2 + (local.set $$arrayidx18 + (i32.add + (local.get $$x) + (i32.shl + (local.get $$j$1282) + (i32.const 3) + ) + ) + ) + (local.set $$4 + (f64.load + (local.get $$arrayidx18) + ) + ) + (local.set $$sub20 + (i32.sub + (local.get $$add19) + (local.get $$j$1282) + ) + ) + (local.set $$arrayidx21 + (i32.add + (local.get $$f) + (i32.shl + (local.get $$sub20) + (i32.const 3) + ) + ) + ) + (local.set $$5 + (f64.load + (local.get $$arrayidx21) + ) + ) + (local.set $$mul22 + (f64.mul + (local.get $$4) + (local.get $$5) + ) + ) + (local.set $$add23 + (f64.add + (local.get $$fw$0283) + (local.get $$mul22) + ) + ) + (local.set $$inc25 + (i32.add + (local.get $$j$1282) + (i32.const 1) + ) + ) + (local.set $$exitcond298 + (i32.eq + (local.get $$inc25) + (local.get $$nx) + ) + ) + (if + (local.get $$exitcond298) + (block + (local.set $$fw$0$lcssa + (local.get $$add23) + ) + (br $while-out2) + ) + (block + (local.set $$fw$0283 + (local.get $$add23) + ) + (local.set $$j$1282 + (local.get $$inc25) + ) + ) + ) + (br $while-in3) + ) + ) + ) + (local.set $$fw$0$lcssa + (f64.const 0) + ) + ) + (local.set $$arrayidx27 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$i$1286) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx27) + (local.get $$fw$0$lcssa) + ) + (local.set $$inc29 + (i32.add + (local.get $$i$1286) + (i32.const 1) + ) + ) + (local.set $$cmp11 + (i32.lt_s + (local.get $$i$1286) + (local.get $$0) + ) + ) + (if + (local.get $$cmp11) + (local.set $$i$1286 + (local.get $$inc29) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + (local.set $$cmp56 + (i32.gt_s + (local.get $$sub2) + (i32.const 0) + ) + ) + (local.set $$sub61 + (i32.sub + (i32.const 24) + (local.get $$sub2) + ) + ) + (local.set $$sub69 + (i32.sub + (i32.const 23) + (local.get $$sub2) + ) + ) + (local.set $$cmp71 + (i32.eq + (local.get $$sub2) + (i32.const 0) + ) + ) + (local.set $$cmp167274 + (i32.gt_s + (local.get $$nx) + (i32.const 0) + ) + ) + (local.set $$jz$0 + (local.get $$0) + ) + (loop $while-in5 + (block $while-out4 + (local.set $$arrayidx31 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$jz$0) + (i32.const 3) + ) + ) + ) + (local.set $$6 + (f64.load + (local.get $$arrayidx31) + ) + ) + (local.set $$cmp33260 + (i32.gt_s + (local.get $$jz$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp33260) + (block + (local.set $$i$2261 + (i32.const 0) + ) + (local.set $$j$2262 + (local.get $$jz$0) + ) + (local.set $$z$0263 + (local.get $$6) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$mul36 + (f64.mul + (local.get $$z$0263) + (f64.const 5.960464477539063e-08) + ) + ) + (local.set $$conv37 + (i32.trunc_f64_s + (local.get $$mul36) + ) + ) + (local.set $$conv38 + (f64.convert_i32_s + (local.get $$conv37) + ) + ) + (local.set $$mul39 + (f64.mul + (local.get $$conv38) + (f64.const 16777216) + ) + ) + (local.set $$sub40 + (f64.sub + (local.get $$z$0263) + (local.get $$mul39) + ) + ) + (local.set $$conv41 + (i32.trunc_f64_s + (local.get $$sub40) + ) + ) + (local.set $$arrayidx42 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$i$2261) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx42) + (local.get $$conv41) + ) + (local.set $$sub43 + (i32.add + (local.get $$j$2262) + (i32.const -1) + ) + ) + (local.set $$arrayidx44 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$sub43) + (i32.const 3) + ) + ) + ) + (local.set $$7 + (f64.load + (local.get $$arrayidx44) + ) + ) + (local.set $$add45 + (f64.add + (local.get $$7) + (local.get $$conv38) + ) + ) + (local.set $$inc47 + (i32.add + (local.get $$i$2261) + (i32.const 1) + ) + ) + (local.set $$cmp33 + (i32.gt_s + (local.get $$j$2262) + (i32.const 1) + ) + ) + (if + (local.get $$cmp33) + (block + (local.set $$i$2261 + (local.get $$inc47) + ) + (local.set $$j$2262 + (local.get $$sub43) + ) + (local.set $$z$0263 + (local.get $$add45) + ) + ) + (block + (local.set $$z$0$lcssa + (local.get $$add45) + ) + (br $while-out6) + ) + ) + (br $while-in7) + ) + ) + ) + (local.set $$z$0$lcssa + (local.get $$6) + ) + ) + (local.set $$call + (call $_scalbn + (local.get $$z$0$lcssa) + (local.get $$sub2) + ) + ) + (local.set $$mul49 + (f64.mul + (local.get $$call) + (f64.const 0.125) + ) + ) + (local.set $$call50 + (f64.floor + (local.get $$mul49) + ) + ) + (local.set $$mul51 + (f64.mul + (local.get $$call50) + (f64.const 8) + ) + ) + (local.set $$sub52 + (f64.sub + (local.get $$call) + (local.get $$mul51) + ) + ) + (local.set $$conv53 + (i32.trunc_f64_s + (local.get $$sub52) + ) + ) + (local.set $$conv54 + (f64.convert_i32_s + (local.get $$conv53) + ) + ) + (local.set $$sub55 + (f64.sub + (local.get $$sub52) + (local.get $$conv54) + ) + ) + (block $do-once + (if + (local.get $$cmp56) + (block + (local.set $$sub59 + (i32.add + (local.get $$jz$0) + (i32.const -1) + ) + ) + (local.set $$arrayidx60 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$sub59) + (i32.const 2) + ) + ) + ) + (local.set $$8 + (i32.load + (local.get $$arrayidx60) + ) + ) + (local.set $$shr + (i32.shr_s + (local.get $$8) + (local.get $$sub61) + ) + ) + (local.set $$add62 + (i32.add + (local.get $$shr) + (local.get $$conv53) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr) + (local.get $$sub61) + ) + ) + (local.set $$sub66 + (i32.sub + (local.get $$8) + (local.get $$shl) + ) + ) + (i32.store + (local.get $$arrayidx60) + (local.get $$sub66) + ) + (local.set $$shr70 + (i32.shr_s + (local.get $$sub66) + (local.get $$sub69) + ) + ) + (local.set $$ih$0 + (local.get $$shr70) + ) + (local.set $$n$0 + (local.get $$add62) + ) + (local.set $label + (i32.const 21) + ) + ) + (if + (local.get $$cmp71) + (block + (local.set $$sub74 + (i32.add + (local.get $$jz$0) + (i32.const -1) + ) + ) + (local.set $$arrayidx75 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$sub74) + (i32.const 2) + ) + ) + ) + (local.set $$9 + (i32.load + (local.get $$arrayidx75) + ) + ) + (local.set $$shr76 + (i32.shr_s + (local.get $$9) + (i32.const 23) + ) + ) + (local.set $$ih$0 + (local.get $$shr76) + ) + (local.set $$n$0 + (local.get $$conv53) + ) + (local.set $label + (i32.const 21) + ) + (br $do-once) + ) + (block + (local.set $$cmp78 + (i32.eqz + (f64.ge + (local.get $$sub55) + (f64.const 0.5) + ) + ) + ) + (if + (local.get $$cmp78) + (block + (local.set $$ih$0219 + (i32.const 0) + ) + (local.set $$n$1 + (local.get $$conv53) + ) + (local.set $$z$1 + (local.get $$sub55) + ) + (br $do-once) + ) + (block + (local.set $$ih$0218 + (i32.const 2) + ) + (local.set $$n$0217 + (local.get $$conv53) + ) + (local.set $label + (i32.const 22) + ) + (br $do-once) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 21) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$cmp84 + (i32.gt_s + (local.get $$ih$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp84) + (block + (local.set $$ih$0218 + (local.get $$ih$0) + ) + (local.set $$n$0217 + (local.get $$n$0) + ) + (local.set $label + (i32.const 22) + ) + ) + (block + (local.set $$ih$0219 + (local.get $$ih$0) + ) + (local.set $$n$1 + (local.get $$n$0) + ) + (local.set $$z$1 + (local.get $$sub55) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 22) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$add87 + (i32.add + (local.get $$n$0217) + (i32.const 1) + ) + ) + (if + (local.get $$cmp33260) + (block + (local.set $$carry$0266 + (i32.const 0) + ) + (local.set $$i$3267 + (i32.const 0) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$arrayidx92 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$i$3267) + (i32.const 2) + ) + ) + ) + (local.set $$10 + (i32.load + (local.get $$arrayidx92) + ) + ) + (local.set $$cmp93 + (i32.eq + (local.get $$carry$0266) + (i32.const 0) + ) + ) + (if + (local.get $$cmp93) + (block + (local.set $$cmp96 + (i32.eq + (local.get $$10) + (i32.const 0) + ) + ) + (if + (local.get $$cmp96) + (local.set $$carry$1 + (i32.const 0) + ) + (block + (local.set $$$sink + (i32.const 16777216) + ) + (local.set $$carry$1$ph + (i32.const 1) + ) + (local.set $label + (i32.const 26) + ) + ) + ) + ) + (block + (local.set $$$sink + (i32.const 16777215) + ) + (local.set $$carry$1$ph + (local.get $$carry$0266) + ) + (local.set $label + (i32.const 26) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 26) + ) + (block + (local.set $label + (i32.const 0) + ) + (local.set $$sub103 + (i32.sub + (local.get $$$sink) + (local.get $$10) + ) + ) + (i32.store + (local.get $$arrayidx92) + (local.get $$sub103) + ) + (local.set $$carry$1 + (local.get $$carry$1$ph) + ) + ) + ) + (local.set $$inc107 + (i32.add + (local.get $$i$3267) + (i32.const 1) + ) + ) + (local.set $$exitcond296 + (i32.eq + (local.get $$inc107) + (local.get $$jz$0) + ) + ) + (if + (local.get $$exitcond296) + (block + (local.set $$carry$0$lcssa + (local.get $$carry$1) + ) + (br $while-out8) + ) + (block + (local.set $$carry$0266 + (local.get $$carry$1) + ) + (local.set $$i$3267 + (local.get $$inc107) + ) + ) + ) + (br $while-in9) + ) + ) + ) + (local.set $$carry$0$lcssa + (i32.const 0) + ) + ) + (block $label$break$L44 + (if + (local.get $$cmp56) + (block $switch + (block $switch-default + (block $switch-case11 + (block $switch-case + (br_table $switch-case $switch-case11 $switch-default + (i32.sub + (local.get $$sub2) + (i32.const 1) + ) + ) + ) + (block + (local.set $$sub112 + (i32.add + (local.get $$jz$0) + (i32.const -1) + ) + ) + (local.set $$arrayidx113 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$sub112) + (i32.const 2) + ) + ) + ) + (local.set $$11 + (i32.load + (local.get $$arrayidx113) + ) + ) + (local.set $$and + (i32.and + (local.get $$11) + (i32.const 8388607) + ) + ) + (i32.store + (local.get $$arrayidx113) + (local.get $$and) + ) + (br $label$break$L44) + ) + ) + (block + (local.set $$sub115 + (i32.add + (local.get $$jz$0) + (i32.const -1) + ) + ) + (local.set $$arrayidx116 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$sub115) + (i32.const 2) + ) + ) + ) + (local.set $$12 + (i32.load + (local.get $$arrayidx116) + ) + ) + (local.set $$and117 + (i32.and + (local.get $$12) + (i32.const 4194303) + ) + ) + (i32.store + (local.get $$arrayidx116) + (local.get $$and117) + ) + (br $label$break$L44) + ) + ) + (br $label$break$L44) + ) + ) + ) + (local.set $$cmp119 + (i32.eq + (local.get $$ih$0218) + (i32.const 2) + ) + ) + (if + (local.get $$cmp119) + (block + (local.set $$sub122 + (f64.sub + (f64.const 1) + (local.get $$sub55) + ) + ) + (local.set $$cmp123 + (i32.eq + (local.get $$carry$0$lcssa) + (i32.const 0) + ) + ) + (if + (local.get $$cmp123) + (block + (local.set $$ih$0219 + (i32.const 2) + ) + (local.set $$n$1 + (local.get $$add87) + ) + (local.set $$z$1 + (local.get $$sub122) + ) + ) + (block + (local.set $$call126 + (call $_scalbn + (f64.const 1) + (local.get $$sub2) + ) + ) + (local.set $$sub127 + (f64.sub + (local.get $$sub122) + (local.get $$call126) + ) + ) + (local.set $$ih$0219 + (i32.const 2) + ) + (local.set $$n$1 + (local.get $$add87) + ) + (local.set $$z$1 + (local.get $$sub127) + ) + ) + ) + ) + (block + (local.set $$ih$0219 + (local.get $$ih$0218) + ) + (local.set $$n$1 + (local.get $$add87) + ) + (local.set $$z$1 + (local.get $$sub55) + ) + ) + ) + ) + ) + (local.set $$cmp131 + (f64.eq + (local.get $$z$1) + (f64.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp131) + ) + (block + (local.set $label + (i32.const 49) + ) + (br $while-out4) + ) + ) + (local.set $$cmp136270 + (i32.gt_s + (local.get $$jz$0) + (local.get $$0) + ) + ) + (if + (local.get $$cmp136270) + (block + (local.set $$i$4272$in + (local.get $$jz$0) + ) + (local.set $$j$3271 + (i32.const 0) + ) + (loop $while-in13 + (block $while-out12 + (local.set $$i$4272 + (i32.add + (local.get $$i$4272$in) + (i32.const -1) + ) + ) + (local.set $$arrayidx139 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$i$4272) + (i32.const 2) + ) + ) + ) + (local.set $$13 + (i32.load + (local.get $$arrayidx139) + ) + ) + (local.set $$or + (i32.or + (local.get $$13) + (local.get $$j$3271) + ) + ) + (local.set $$cmp136 + (i32.gt_s + (local.get $$i$4272) + (local.get $$0) + ) + ) + (if + (local.get $$cmp136) + (block + (local.set $$i$4272$in + (local.get $$i$4272) + ) + (local.set $$j$3271 + (local.get $$or) + ) + ) + (br $while-out12) + ) + (br $while-in13) + ) + ) + (local.set $$cmp143 + (i32.eq + (local.get $$or) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp143) + ) + (block + (local.set $label + (i32.const 41) + ) + (br $while-out4) + ) + ) + ) + ) + (local.set $$k$0 + (i32.const 1) + ) + (loop $while-in15 + (block $while-out14 + (local.set $$sub147 + (i32.sub + (local.get $$0) + (local.get $$k$0) + ) + ) + (local.set $$arrayidx148 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$sub147) + (i32.const 2) + ) + ) + ) + (local.set $$14 + (i32.load + (local.get $$arrayidx148) + ) + ) + (local.set $$cmp149 + (i32.eq + (local.get $$14) + (i32.const 0) + ) + ) + (local.set $$inc153 + (i32.add + (local.get $$k$0) + (i32.const 1) + ) + ) + (if + (local.get $$cmp149) + (local.set $$k$0 + (local.get $$inc153) + ) + (br $while-out14) + ) + (br $while-in15) + ) + ) + (local.set $$add157 + (i32.add + (local.get $$k$0) + (local.get $$jz$0) + ) + ) + (local.set $$i$5280$in + (local.get $$jz$0) + ) + (loop $while-in17 + (block $while-out16 + (local.set $$i$5280 + (i32.add + (local.get $$i$5280$in) + (i32.const 1) + ) + ) + (local.set $$add161 + (i32.add + (local.get $$i$5280) + (local.get $$spec$store$select) + ) + ) + (local.set $$arrayidx162 + (i32.add + (i32.const 7296) + (i32.shl + (local.get $$add161) + (i32.const 2) + ) + ) + ) + (local.set $$15 + (i32.load + (local.get $$arrayidx162) + ) + ) + (local.set $$conv163 + (f64.convert_i32_s + (local.get $$15) + ) + ) + (local.set $$add164 + (i32.add + (local.get $$i$5280$in) + (local.get $$nx) + ) + ) + (local.set $$arrayidx165 + (i32.add + (local.get $$f) + (i32.shl + (local.get $$add164) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx165) + (local.get $$conv163) + ) + (if + (local.get $$cmp167274) + (block + (local.set $$fw$1276 + (f64.const 0) + ) + (local.set $$j$4275 + (i32.const 0) + ) + (loop $while-in19 + (block $while-out18 + (local.set $$arrayidx170 + (i32.add + (local.get $$x) + (i32.shl + (local.get $$j$4275) + (i32.const 3) + ) + ) + ) + (local.set $$16 + (f64.load + (local.get $$arrayidx170) + ) + ) + (local.set $$sub172 + (i32.sub + (local.get $$add164) + (local.get $$j$4275) + ) + ) + (local.set $$arrayidx173 + (i32.add + (local.get $$f) + (i32.shl + (local.get $$sub172) + (i32.const 3) + ) + ) + ) + (local.set $$17 + (f64.load + (local.get $$arrayidx173) + ) + ) + (local.set $$mul174 + (f64.mul + (local.get $$16) + (local.get $$17) + ) + ) + (local.set $$add175 + (f64.add + (local.get $$fw$1276) + (local.get $$mul174) + ) + ) + (local.set $$inc177 + (i32.add + (local.get $$j$4275) + (i32.const 1) + ) + ) + (local.set $$exitcond297 + (i32.eq + (local.get $$inc177) + (local.get $$nx) + ) + ) + (if + (local.get $$exitcond297) + (block + (local.set $$fw$1$lcssa + (local.get $$add175) + ) + (br $while-out18) + ) + (block + (local.set $$fw$1276 + (local.get $$add175) + ) + (local.set $$j$4275 + (local.get $$inc177) + ) + ) + ) + (br $while-in19) + ) + ) + ) + (local.set $$fw$1$lcssa + (f64.const 0) + ) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$i$5280) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx179) + (local.get $$fw$1$lcssa) + ) + (local.set $$cmp158 + (i32.lt_s + (local.get $$i$5280) + (local.get $$add157) + ) + ) + (if + (local.get $$cmp158) + (local.set $$i$5280$in + (local.get $$i$5280) + ) + (br $while-out16) + ) + (br $while-in17) + ) + ) + (local.set $$jz$0 + (local.get $$add157) + ) + (br $while-in5) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 41) + ) + (block + (local.set $$jz$1$in + (local.get $$jz$0) + ) + (local.set $$q0$0$in + (local.get $$sub2) + ) + (loop $while-in21 + (block $while-out20 + (local.set $$q0$0 + (i32.add + (local.get $$q0$0$in) + (i32.const -24) + ) + ) + (local.set $$jz$1 + (i32.add + (local.get $$jz$1$in) + (i32.const -1) + ) + ) + (local.set $$arrayidx191 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$jz$1) + (i32.const 2) + ) + ) + ) + (local.set $$18 + (i32.load + (local.get $$arrayidx191) + ) + ) + (local.set $$cmp192 + (i32.eq + (local.get $$18) + (i32.const 0) + ) + ) + (if + (local.get $$cmp192) + (block + (local.set $$jz$1$in + (local.get $$jz$1) + ) + (local.set $$q0$0$in + (local.get $$q0$0) + ) + ) + (block + (local.set $$jz$2 + (local.get $$jz$1) + ) + (local.set $$q0$1 + (local.get $$q0$0) + ) + (br $while-out20) + ) + ) + (br $while-in21) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 49) + ) + (block + (local.set $$sub197 + (i32.sub + (i32.const 0) + (local.get $$sub2) + ) + ) + (local.set $$call198 + (call $_scalbn + (local.get $$z$1) + (local.get $$sub197) + ) + ) + (local.set $$cmp199 + (i32.eqz + (f64.ge + (local.get $$call198) + (f64.const 16777216) + ) + ) + ) + (if + (local.get $$cmp199) + (block + (local.set $$conv214 + (i32.trunc_f64_s + (local.get $$call198) + ) + ) + (local.set $$add209$sink + (local.get $$jz$0) + ) + (local.set $$conv203$sink + (local.get $$conv214) + ) + (local.set $$q0$1$ph + (local.get $$sub2) + ) + ) + (block + (local.set $$mul202 + (f64.mul + (local.get $$call198) + (f64.const 5.960464477539063e-08) + ) + ) + (local.set $$conv203 + (i32.trunc_f64_s + (local.get $$mul202) + ) + ) + (local.set $$conv204 + (f64.convert_i32_s + (local.get $$conv203) + ) + ) + (local.set $$mul205 + (f64.mul + (local.get $$conv204) + (f64.const 16777216) + ) + ) + (local.set $$sub206 + (f64.sub + (local.get $$call198) + (local.get $$mul205) + ) + ) + (local.set $$conv207 + (i32.trunc_f64_s + (local.get $$sub206) + ) + ) + (local.set $$arrayidx208 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$jz$0) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx208) + (local.get $$conv207) + ) + (local.set $$add209 + (i32.add + (local.get $$jz$0) + (i32.const 1) + ) + ) + (local.set $$add210 + (i32.add + (local.get $$$neg) + (local.get $$e0) + ) + ) + (local.set $$add209$sink + (local.get $$add209) + ) + (local.set $$conv203$sink + (local.get $$conv203) + ) + (local.set $$q0$1$ph + (local.get $$add210) + ) + ) + ) + (local.set $$arrayidx212 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$add209$sink) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx212) + (local.get $$conv203$sink) + ) + (local.set $$jz$2 + (local.get $$add209$sink) + ) + (local.set $$q0$1 + (local.get $$q0$1$ph) + ) + ) + ) + ) + (local.set $$call218 + (call $_scalbn + (f64.const 1) + (local.get $$q0$1) + ) + ) + (local.set $$cmp220257 + (i32.gt_s + (local.get $$jz$2) + (i32.const -1) + ) + ) + (if + (local.get $$cmp220257) + (block + (local.set $$fw$2259 + (local.get $$call218) + ) + (local.set $$i$6258 + (local.get $$jz$2) + ) + (loop $while-in23 + (block $while-out22 + (local.set $$arrayidx223 + (i32.add + (local.get $$iq) + (i32.shl + (local.get $$i$6258) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx223) + ) + ) + (local.set $$conv224 + (f64.convert_i32_s + (local.get $$19) + ) + ) + (local.set $$mul225 + (f64.mul + (local.get $$fw$2259) + (local.get $$conv224) + ) + ) + (local.set $$arrayidx226 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$i$6258) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx226) + (local.get $$mul225) + ) + (local.set $$mul227 + (f64.mul + (local.get $$fw$2259) + (f64.const 5.960464477539063e-08) + ) + ) + (local.set $$dec229 + (i32.add + (local.get $$i$6258) + (i32.const -1) + ) + ) + (local.set $$cmp220 + (i32.gt_s + (local.get $$i$6258) + (i32.const 0) + ) + ) + (if + (local.get $$cmp220) + (block + (local.set $$fw$2259 + (local.get $$mul227) + ) + (local.set $$i$6258 + (local.get $$dec229) + ) + ) + (br $while-out22) + ) + (br $while-in23) + ) + ) + (if + (local.get $$cmp220257) + (block + (local.set $$i$7255 + (local.get $$jz$2) + ) + (loop $while-in25 + (block $while-out24 + (local.set $$sub238 + (i32.sub + (local.get $$jz$2) + (local.get $$i$7255) + ) + ) + (local.set $$fw$3251 + (f64.const 0) + ) + (local.set $$k$1250 + (i32.const 0) + ) + (loop $while-in27 + (block $while-out26 + (local.set $$arrayidx242 + (i32.add + (i32.const 7568) + (i32.shl + (local.get $$k$1250) + (i32.const 3) + ) + ) + ) + (local.set $$20 + (f64.load + (local.get $$arrayidx242) + ) + ) + (local.set $$add243 + (i32.add + (local.get $$k$1250) + (local.get $$i$7255) + ) + ) + (local.set $$arrayidx244 + (i32.add + (local.get $$q) + (i32.shl + (local.get $$add243) + (i32.const 3) + ) + ) + ) + (local.set $$21 + (f64.load + (local.get $$arrayidx244) + ) + ) + (local.set $$mul245 + (f64.mul + (local.get $$20) + (local.get $$21) + ) + ) + (local.set $$add246 + (f64.add + (local.get $$fw$3251) + (local.get $$mul245) + ) + ) + (local.set $$inc248 + (i32.add + (local.get $$k$1250) + (i32.const 1) + ) + ) + (local.set $$cmp236 + (i32.ge_s + (local.get $$k$1250) + (local.get $$0) + ) + ) + (local.set $$cmp239 + (i32.ge_u + (local.get $$k$1250) + (local.get $$sub238) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp236) + (local.get $$cmp239) + ) + ) + (if + (local.get $$or$cond) + (br $while-out26) + (block + (local.set $$fw$3251 + (local.get $$add246) + ) + (local.set $$k$1250 + (local.get $$inc248) + ) + ) + ) + (br $while-in27) + ) + ) + (local.set $$arrayidx251 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$sub238) + (i32.const 3) + ) + ) + ) + (f64.store + (local.get $$arrayidx251) + (local.get $$add246) + ) + (local.set $$dec253 + (i32.add + (local.get $$i$7255) + (i32.const -1) + ) + ) + (local.set $$cmp232 + (i32.gt_s + (local.get $$i$7255) + (i32.const 0) + ) + ) + (if + (local.get $$cmp232) + (local.set $$i$7255 + (local.get $$dec253) + ) + (br $while-out24) + ) + (br $while-in25) + ) + ) + ) + ) + ) + ) + (block $label$break$L93 + (block $switch29 + (block $switch-default46 + (block $switch-case45 + (block $switch-case38 + (block $switch-case33 + (block $switch-case32 + (br_table $switch-case32 $switch-case38 $switch-case33 $switch-case45 $switch-default46 + (i32.sub + (local.get $$prec) + (i32.const 0) + ) + ) + ) + (block + (if + (local.get $$cmp220257) + (block + (local.set $$fw$4230 + (f64.const 0) + ) + (local.set $$i$8229 + (local.get $$jz$2) + ) + (loop $while-in31 + (block $while-out30 + (local.set $$arrayidx260 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$8229) + (i32.const 3) + ) + ) + ) + (local.set $$22 + (f64.load + (local.get $$arrayidx260) + ) + ) + (local.set $$add261 + (f64.add + (local.get $$fw$4230) + (local.get $$22) + ) + ) + (local.set $$dec263 + (i32.add + (local.get $$i$8229) + (i32.const -1) + ) + ) + (local.set $$cmp257 + (i32.gt_s + (local.get $$i$8229) + (i32.const 0) + ) + ) + (if + (local.get $$cmp257) + (block + (local.set $$fw$4230 + (local.get $$add261) + ) + (local.set $$i$8229 + (local.get $$dec263) + ) + ) + (block + (local.set $$fw$4$lcssa + (local.get $$add261) + ) + (br $while-out30) + ) + ) + (br $while-in31) + ) + ) + ) + (local.set $$fw$4$lcssa + (f64.const 0) + ) + ) + (local.set $$cmp265 + (i32.eq + (local.get $$ih$0219) + (i32.const 0) + ) + ) + (local.set $$sub269 + (f64.neg + (local.get $$fw$4$lcssa) + ) + ) + (local.set $$cond271 + (if (result f64) + (local.get $$cmp265) + (local.get $$fw$4$lcssa) + (local.get $$sub269) + ) + ) + (f64.store + (local.get $$y) + (local.get $$cond271) + ) + (br $switch29) + ) + ) + ) + (block + (if + (local.get $$cmp220257) + (block + (local.set $$fw$5237 + (f64.const 0) + ) + (local.set $$i$9236 + (local.get $$jz$2) + ) + (loop $while-in35 + (block $while-out34 + (local.set $$arrayidx278 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$9236) + (i32.const 3) + ) + ) + ) + (local.set $$23 + (f64.load + (local.get $$arrayidx278) + ) + ) + (local.set $$add279 + (f64.add + (local.get $$fw$5237) + (local.get $$23) + ) + ) + (local.set $$dec281 + (i32.add + (local.get $$i$9236) + (i32.const -1) + ) + ) + (local.set $$cmp275 + (i32.gt_s + (local.get $$i$9236) + (i32.const 0) + ) + ) + (if + (local.get $$cmp275) + (block + (local.set $$fw$5237 + (local.get $$add279) + ) + (local.set $$i$9236 + (local.get $$dec281) + ) + ) + (block + (local.set $$fw$5$lcssa + (local.get $$add279) + ) + (br $while-out34) + ) + ) + (br $while-in35) + ) + ) + ) + (local.set $$fw$5$lcssa + (f64.const 0) + ) + ) + (local.set $$cmp283 + (i32.eq + (local.get $$ih$0219) + (i32.const 0) + ) + ) + (local.set $$sub287 + (f64.neg + (local.get $$fw$5$lcssa) + ) + ) + (local.set $$cond289 + (if (result f64) + (local.get $$cmp283) + (local.get $$fw$5$lcssa) + (local.get $$sub287) + ) + ) + (f64.store + (local.get $$y) + (local.get $$cond289) + ) + (local.set $$24 + (f64.load + (local.get $$fq) + ) + ) + (local.set $$sub292 + (f64.sub + (local.get $$24) + (local.get $$fw$5$lcssa) + ) + ) + (local.set $$cmp294231 + (i32.lt_s + (local.get $$jz$2) + (i32.const 1) + ) + ) + (if + (local.get $$cmp294231) + (local.set $$fw$6$lcssa + (local.get $$sub292) + ) + (block + (local.set $$fw$6233 + (local.get $$sub292) + ) + (local.set $$i$10232 + (i32.const 1) + ) + (loop $while-in37 + (block $while-out36 + (local.set $$arrayidx297 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$10232) + (i32.const 3) + ) + ) + ) + (local.set $$25 + (f64.load + (local.get $$arrayidx297) + ) + ) + (local.set $$add298 + (f64.add + (local.get $$fw$6233) + (local.get $$25) + ) + ) + (local.set $$inc300 + (i32.add + (local.get $$i$10232) + (i32.const 1) + ) + ) + (local.set $$exitcond + (i32.eq + (local.get $$i$10232) + (local.get $$jz$2) + ) + ) + (if + (local.get $$exitcond) + (block + (local.set $$fw$6$lcssa + (local.get $$add298) + ) + (br $while-out36) + ) + (block + (local.set $$fw$6233 + (local.get $$add298) + ) + (local.set $$i$10232 + (local.get $$inc300) + ) + ) + ) + (br $while-in37) + ) + ) + ) + ) + (local.set $$sub306 + (f64.neg + (local.get $$fw$6$lcssa) + ) + ) + (local.set $$cond308 + (if (result f64) + (local.get $$cmp283) + (local.get $$fw$6$lcssa) + (local.get $$sub306) + ) + ) + (local.set $$arrayidx309 + (i32.add + (local.get $$y) + (i32.const 8) + ) + ) + (f64.store + (local.get $$arrayidx309) + (local.get $$cond308) + ) + (br $switch29) + ) + ) + (block + (local.set $$cmp312245 + (i32.gt_s + (local.get $$jz$2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp312245) + (block + (local.set $$arrayidx317$phi$trans$insert + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$jz$2) + (i32.const 3) + ) + ) + ) + (local.set $$$pre + (f64.load + (local.get $$arrayidx317$phi$trans$insert) + ) + ) + (local.set $$27 + (local.get $$$pre) + ) + (local.set $$i$11246 + (local.get $$jz$2) + ) + (loop $while-in40 + (block $while-out39 + (local.set $$sub315 + (i32.add + (local.get $$i$11246) + (i32.const -1) + ) + ) + (local.set $$arrayidx316 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$sub315) + (i32.const 3) + ) + ) + ) + (local.set $$26 + (f64.load + (local.get $$arrayidx316) + ) + ) + (local.set $$arrayidx317 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$11246) + (i32.const 3) + ) + ) + ) + (local.set $$add318 + (f64.add + (local.get $$26) + (local.get $$27) + ) + ) + (local.set $$sub321 + (f64.sub + (local.get $$26) + (local.get $$add318) + ) + ) + (local.set $$add323 + (f64.add + (local.get $$27) + (local.get $$sub321) + ) + ) + (f64.store + (local.get $$arrayidx317) + (local.get $$add323) + ) + (f64.store + (local.get $$arrayidx316) + (local.get $$add318) + ) + (local.set $$cmp312 + (i32.gt_s + (local.get $$i$11246) + (i32.const 1) + ) + ) + (if + (local.get $$cmp312) + (block + (local.set $$27 + (local.get $$add318) + ) + (local.set $$i$11246 + (local.get $$sub315) + ) + ) + (br $while-out39) + ) + (br $while-in40) + ) + ) + (local.set $$cmp330243 + (i32.gt_s + (local.get $$jz$2) + (i32.const 1) + ) + ) + (if + (local.get $$cmp330243) + (block + (local.set $$arrayidx335$phi$trans$insert + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$jz$2) + (i32.const 3) + ) + ) + ) + (local.set $$$pre300 + (f64.load + (local.get $$arrayidx335$phi$trans$insert) + ) + ) + (local.set $$29 + (local.get $$$pre300) + ) + (local.set $$i$12244 + (local.get $$jz$2) + ) + (loop $while-in42 + (block $while-out41 + (local.set $$sub333 + (i32.add + (local.get $$i$12244) + (i32.const -1) + ) + ) + (local.set $$arrayidx334 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$sub333) + (i32.const 3) + ) + ) + ) + (local.set $$28 + (f64.load + (local.get $$arrayidx334) + ) + ) + (local.set $$arrayidx335 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$12244) + (i32.const 3) + ) + ) + ) + (local.set $$add336 + (f64.add + (local.get $$28) + (local.get $$29) + ) + ) + (local.set $$sub339 + (f64.sub + (local.get $$28) + (local.get $$add336) + ) + ) + (local.set $$add341 + (f64.add + (local.get $$29) + (local.get $$sub339) + ) + ) + (f64.store + (local.get $$arrayidx335) + (local.get $$add341) + ) + (f64.store + (local.get $$arrayidx334) + (local.get $$add336) + ) + (local.set $$cmp330 + (i32.gt_s + (local.get $$i$12244) + (i32.const 2) + ) + ) + (if + (local.get $$cmp330) + (block + (local.set $$29 + (local.get $$add336) + ) + (local.set $$i$12244 + (local.get $$sub333) + ) + ) + (br $while-out41) + ) + (br $while-in42) + ) + ) + (if + (local.get $$cmp330243) + (block + (local.set $$fw$7241 + (f64.const 0) + ) + (local.set $$i$13240 + (local.get $$jz$2) + ) + (loop $while-in44 + (block $while-out43 + (local.set $$arrayidx351 + (i32.add + (local.get $$fq) + (i32.shl + (local.get $$i$13240) + (i32.const 3) + ) + ) + ) + (local.set $$30 + (f64.load + (local.get $$arrayidx351) + ) + ) + (local.set $$add352 + (f64.add + (local.get $$fw$7241) + (local.get $$30) + ) + ) + (local.set $$dec354 + (i32.add + (local.get $$i$13240) + (i32.const -1) + ) + ) + (local.set $$cmp348 + (i32.gt_s + (local.get $$i$13240) + (i32.const 2) + ) + ) + (if + (local.get $$cmp348) + (block + (local.set $$fw$7241 + (local.get $$add352) + ) + (local.set $$i$13240 + (local.get $$dec354) + ) + ) + (block + (local.set $$fw$7$lcssa + (local.get $$add352) + ) + (br $while-out43) + ) + ) + (br $while-in44) + ) + ) + ) + (local.set $$fw$7$lcssa + (f64.const 0) + ) + ) + ) + (local.set $$fw$7$lcssa + (f64.const 0) + ) + ) + ) + (local.set $$fw$7$lcssa + (f64.const 0) + ) + ) + (local.set $$cmp356 + (i32.eq + (local.get $$ih$0219) + (i32.const 0) + ) + ) + (local.set $$31 + (f64.load + (local.get $$fq) + ) + ) + (if + (local.get $$cmp356) + (block + (f64.store + (local.get $$y) + (local.get $$31) + ) + (local.set $$arrayidx361 + (i32.add + (local.get $$fq) + (i32.const 8) + ) + ) + (local.set $$32 + (f64.load + (local.get $$arrayidx361) + ) + ) + (local.set $$arrayidx362 + (i32.add + (local.get $$y) + (i32.const 8) + ) + ) + (f64.store + (local.get $$arrayidx362) + (local.get $$32) + ) + (local.set $$arrayidx363 + (i32.add + (local.get $$y) + (i32.const 16) + ) + ) + (f64.store + (local.get $$arrayidx363) + (local.get $$fw$7$lcssa) + ) + (br $label$break$L93) + ) + (block + (local.set $$sub366 + (f64.neg + (local.get $$31) + ) + ) + (f64.store + (local.get $$y) + (local.get $$sub366) + ) + (local.set $$arrayidx368 + (i32.add + (local.get $$fq) + (i32.const 8) + ) + ) + (local.set $$33 + (f64.load + (local.get $$arrayidx368) + ) + ) + (local.set $$sub369 + (f64.neg + (local.get $$33) + ) + ) + (local.set $$arrayidx370 + (i32.add + (local.get $$y) + (i32.const 8) + ) + ) + (f64.store + (local.get $$arrayidx370) + (local.get $$sub369) + ) + (local.set $$sub371 + (f64.neg + (local.get $$fw$7$lcssa) + ) + ) + (local.set $$arrayidx372 + (i32.add + (local.get $$y) + (i32.const 16) + ) + ) + (f64.store + (local.get $$arrayidx372) + (local.get $$sub371) + ) + (br $label$break$L93) + ) + ) + ) + ) + ) + ) + (local.set $$and375 + (i32.and + (local.get $$n$1) + (i32.const 7) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$and375) + ) + ) + (func $___rem_pio2f (; 611 ;) (param $$x f32) (param $$y i32) (result i32) + (local $$0 i32) + (local $$1 f32) + (local $$2 f64) + (local $$add f64) + (local $$and i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp7 i32) + (local $$conv f64) + (local $$conv1 i32) + (local $$conv11 f64) + (local $$conv19 f64) + (local $$mul f64) + (local $$mul3 f64) + (local $$mul5 f64) + (local $$retval$0 i32) + (local $$shl i32) + (local $$shr14 i32) + (local $$sub f64) + (local $$sub10 f32) + (local $$sub15 i32) + (local $$sub16 i32) + (local $$sub23 f64) + (local $$sub24 i32) + (local $$sub4 f64) + (local $$sub6 f64) + (local $$tobool i32) + (local $$tx i32) + (local $$ty i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$tx + (i32.add + (local.get $sp_a) + (i32.const 8) + ) + ) + (local.set $$ty + (local.get $sp_a) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$and) + (i32.const 1305022427) + ) + ) + (block $do-once + (if + (local.get $$cmp) + (block + (local.set $$conv + (f64.promote_f32 + (local.get $$x) + ) + ) + (local.set $$mul + (f64.mul + (local.get $$conv) + (f64.const 0.6366197723675814) + ) + ) + (local.set $$add + (f64.add + (local.get $$mul) + (f64.const 6755399441055744) + ) + ) + (local.set $$sub + (f64.add + (local.get $$add) + (f64.const -6755399441055744) + ) + ) + (local.set $$conv1 + (i32.trunc_f64_s + (local.get $$sub) + ) + ) + (local.set $$mul3 + (f64.mul + (local.get $$sub) + (f64.const 1.5707963109016418) + ) + ) + (local.set $$sub4 + (f64.sub + (local.get $$conv) + (local.get $$mul3) + ) + ) + (local.set $$mul5 + (f64.mul + (local.get $$sub) + (f64.const 1.5893254773528196e-08) + ) + ) + (local.set $$sub6 + (f64.sub + (local.get $$sub4) + (local.get $$mul5) + ) + ) + (f64.store + (local.get $$y) + (local.get $$sub6) + ) + (local.set $$retval$0 + (local.get $$conv1) + ) + ) + (block + (local.set $$cmp7 + (i32.gt_u + (local.get $$and) + (i32.const 2139095039) + ) + ) + (if + (local.get $$cmp7) + (block + (local.set $$sub10 + (f32.sub + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$conv11 + (f64.promote_f32 + (local.get $$sub10) + ) + ) + (f64.store + (local.get $$y) + (local.get $$conv11) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (br $do-once) + ) + ) + (local.set $$shr14 + (i32.shr_u + (local.get $$and) + (i32.const 23) + ) + ) + (local.set $$sub15 + (i32.add + (local.get $$shr14) + (i32.const -150) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$sub15) + (i32.const 23) + ) + ) + (local.set $$sub16 + (i32.sub + (local.get $$and) + (local.get $$shl) + ) + ) + (local.set $$1 + (f32.reinterpret_i32 + (local.get $$sub16) + ) + ) + (local.set $$conv19 + (f64.promote_f32 + (local.get $$1) + ) + ) + (f64.store + (local.get $$tx) + (local.get $$conv19) + ) + (local.set $$call + (call $___rem_pio2_large + (local.get $$tx) + (local.get $$ty) + (local.get $$sub15) + (i32.const 1) + (i32.const 0) + ) + ) + (local.set $$tobool + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$2 + (f64.load + (local.get $$ty) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$sub23 + (f64.neg + (local.get $$2) + ) + ) + (f64.store + (local.get $$y) + (local.get $$sub23) + ) + (local.set $$sub24 + (i32.sub + (i32.const 0) + (local.get $$call) + ) + ) + (local.set $$retval$0 + (local.get $$sub24) + ) + (br $do-once) + ) + (block + (f64.store + (local.get $$y) + (local.get $$2) + ) + (local.set $$retval$0 + (local.get $$call) + ) + (br $do-once) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_fwrite (; 612 ;) (param $$src i32) (param $$size i32) (param $$nmemb i32) (param $$f i32) (result i32) + (local $$0 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call112 i32) + (local $$call113 i32) + (local $$cmp i32) + (local $$cmp5 i32) + (local $$cond9 i32) + (local $$div i32) + (local $$lock i32) + (local $$mul i32) + (local $$phitmp i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$mul + (i32.mul + (local.get $$nmemb) + (local.get $$size) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$size) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool) + (i32.const 0) + (local.get $$nmemb) + ) + ) + (local.set $$lock + (i32.add + (local.get $$f) + (i32.const 76) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lock) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const -1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$call + (call $___lockfile + (local.get $$f) + ) + ) + (local.set $$phitmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$call1 + (call $___fwritex + (local.get $$src) + (local.get $$mul) + (local.get $$f) + ) + ) + (if + (local.get $$phitmp) + (local.set $$call113 + (local.get $$call1) + ) + (block + (call $___unlockfile + (local.get $$f) + ) + (local.set $$call113 + (local.get $$call1) + ) + ) + ) + ) + (block + (local.set $$call112 + (call $___fwritex + (local.get $$src) + (local.get $$mul) + (local.get $$f) + ) + ) + (local.set $$call113 + (local.get $$call112) + ) + ) + ) + (local.set $$cmp5 + (i32.eq + (local.get $$call113) + (local.get $$mul) + ) + ) + (if + (local.get $$cmp5) + (local.set $$cond9 + (local.get $$spec$select) + ) + (block + (local.set $$div + (i32.and + (i32.div_u + (local.get $$call113) + (local.get $$size) + ) + (i32.const -1) + ) + ) + (local.set $$cond9 + (local.get $$div) + ) + ) + ) + (return + (local.get $$cond9) + ) + ) + (func $___unlist_locked_file (; 613 ;) (param $$f i32) + (local $$$pre i32) + (local $$$sink i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$call i32) + (local $$lockcount i32) + (local $$next_locked i32) + (local $$next_locked10 i32) + (local $$prev_locked4 i32) + (local $$stdio_locks i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$tobool6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$lockcount + (i32.add + (local.get $$f) + (i32.const 68) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lockcount) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$next_locked + (i32.add + (local.get $$f) + (i32.const 132) + ) + ) + (local.set $$1 + (i32.load + (local.get $$next_locked) + ) + ) + (local.set $$tobool1 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (local.set $$2 + (local.get $$1) + ) + (local.set $$$pre + (i32.add + (local.get $$f) + (i32.const 128) + ) + ) + (if + (i32.eqz + (local.get $$tobool1) + ) + (block + (local.set $$3 + (i32.load + (local.get $$$pre) + ) + ) + (local.set $$prev_locked4 + (i32.add + (local.get $$1) + (i32.const 128) + ) + ) + (i32.store + (local.get $$prev_locked4) + (local.get $$3) + ) + ) + ) + (local.set $$4 + (i32.load + (local.get $$$pre) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$4) + (i32.const 0) + ) + ) + (if + (local.get $$tobool6) + (block + (local.set $$call + (call $___pthread_self_599) + ) + (local.set $$stdio_locks + (i32.add + (local.get $$call) + (i32.const 232) + ) + ) + (local.set $$$sink + (local.get $$stdio_locks) + ) + ) + (block + (local.set $$next_locked10 + (i32.add + (local.get $$4) + (i32.const 132) + ) + ) + (local.set $$$sink + (local.get $$next_locked10) + ) + ) + ) + (i32.store + (local.get $$$sink) + (local.get $$2) + ) + ) + ) + (return) + ) + (func $___pthread_self_599 (; 614 ;) (result i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_pthread_self) + ) + (return + (local.get $$call) + ) + ) + (func $___overflow (; 615 ;) (param $$f i32) (param $$_c i32) (result i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$c i32) + (local $$call i32) + (local $$call13 i32) + (local $$cmp i32) + (local $$cmp14 i32) + (local $$cmp7 i32) + (local $$conv i32) + (local $$conv18 i32) + (local $$conv5 i32) + (local $$conv6 i32) + (local $$incdec$ptr i32) + (local $$lbf i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$wend i32) + (local $$wpos i32) + (local $$write i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$c + (local.get $sp_a) + ) + (local.set $$conv + (i32.and + (local.get $$_c) + (i32.const 255) + ) + ) + (i32.store8 + (local.get $$c) + (local.get $$conv) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (local.set $$0 + (i32.load + (local.get $$wend) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call + (call $___towrite + (local.get $$f) + ) + ) + (local.set $$tobool1 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1) + (block + (local.set $$$pre + (i32.load + (local.get $$wend) + ) + ) + (local.set $$2 + (local.get $$$pre) + ) + (local.set $label + (i32.const 4) + ) + ) + (local.set $$retval$0 + (i32.const -1) + ) + ) + ) + (block + (local.set $$2 + (local.get $$0) + ) + (local.set $label + (i32.const 4) + ) + ) + ) + (block $do-once + (if + (i32.eq + (local.get $label) + (i32.const 4) + ) + (block + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$1 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$1) + (local.get $$2) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$conv5 + (i32.and + (local.get $$_c) + (i32.const 255) + ) + ) + (local.set $$lbf + (i32.add + (local.get $$f) + (i32.const 75) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$lbf) + ) + ) + (local.set $$conv6 + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$cmp7 + (i32.eq + (local.get $$conv5) + (local.get $$conv6) + ) + ) + (if + (i32.eqz + (local.get $$cmp7) + ) + (block + (local.set $$incdec$ptr + (i32.add + (local.get $$1) + (i32.const 1) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$incdec$ptr) + ) + (i32.store8 + (local.get $$1) + (local.get $$conv) + ) + (local.set $$retval$0 + (local.get $$conv5) + ) + (br $do-once) + ) + ) + ) + ) + (local.set $$write + (i32.add + (local.get $$f) + (i32.const 36) + ) + ) + (local.set $$4 + (i32.load + (local.get $$write) + ) + ) + (local.set $$call13 + (call_indirect (type $FUNCSIG$iiii) + (local.get $$f) + (local.get $$c) + (i32.const 1) + (i32.add + (i32.and + (local.get $$4) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + (local.set $$cmp14 + (i32.eq + (local.get $$call13) + (i32.const 1) + ) + ) + (if + (local.get $$cmp14) + (block + (local.set $$5 + (i32.load8_s + (local.get $$c) + ) + ) + (local.set $$conv18 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$retval$0 + (local.get $$conv18) + ) + ) + (local.set $$retval$0 + (i32.const -1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_fopen (; 616 ;) (param $$filename i32) (param $$mode i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$and i32) + (local $$call i32) + (local $$call1 i32) + (local $$call12 i32) + (local $$call2 i32) + (local $$call3 i32) + (local $$call4 i32) + (local $$cmp i32) + (local $$conv i32) + (local $$or i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$tobool13 i32) + (local $$tobool8 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer3 i32) + (local $$vararg_buffer8 i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr6 i32) + (local $$vararg_ptr7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $$vararg_buffer8 + (i32.add + (local.get $sp_a) + (i32.const 32) + ) + ) + (local.set $$vararg_buffer3 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$0 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call + (call $_strchr + (i32.const 16651) + (local.get $$conv) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call1 + (call $___errno_location) + ) + (i32.store + (local.get $$call1) + (i32.const 22) + ) + (local.set $$retval$0 + (i32.const 0) + ) + ) + (block + (local.set $$call2 + (call $___fmodeflags + (local.get $$mode) + ) + ) + (local.set $$1 + (local.get $$filename) + ) + (local.set $$or + (i32.or + (local.get $$call2) + (i32.const 32768) + ) + ) + (i32.store + (local.get $$vararg_buffer) + (local.get $$1) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (local.get $$or) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (i32.const 438) + ) + (local.set $$call3 + (call $___syscall5 + (i32.const 5) + (local.get $$vararg_buffer) + ) + ) + (local.set $$call4 + (call $___syscall_ret + (local.get $$call3) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$call4) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$and + (i32.and + (local.get $$call2) + (i32.const 524288) + ) + ) + (local.set $$tobool8 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool8) + ) + (block + (i32.store + (local.get $$vararg_buffer3) + (local.get $$call4) + ) + (local.set $$vararg_ptr6 + (i32.add + (local.get $$vararg_buffer3) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr6) + (i32.const 2) + ) + (local.set $$vararg_ptr7 + (i32.add + (local.get $$vararg_buffer3) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr7) + (i32.const 1) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $$vararg_buffer3) + ) + ) + ) + ) + (local.set $$call12 + (call $___fdopen + (local.get $$call4) + (local.get $$mode) + ) + ) + (local.set $$tobool13 + (i32.eq + (local.get $$call12) + (i32.const 0) + ) + ) + (if + (local.get $$tobool13) + (block + (i32.store + (local.get $$vararg_buffer8) + (local.get $$call4) + ) + (drop + (call $___syscall6 + (i32.const 6) + (local.get $$vararg_buffer8) + ) + ) + (local.set $$retval$0 + (i32.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$call12) + ) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___fmodeflags (; 617 ;) (param $$mode i32) (result i32) + (local $$$ i32) + (local $$0 i32) + (local $$call i32) + (local $$call5 i32) + (local $$call9 i32) + (local $$cmp i32) + (local $$cmp15 i32) + (local $$cmp21 i32) + (local $$cmp27 i32) + (local $$flags$0 i32) + (local $$flags$2 i32) + (local $$flags$4 i32) + (local $$or i32) + (local $$or12 i32) + (local $$or18 i32) + (local $$or24 i32) + (local $$or30 i32) + (local $$spec$select i32) + (local $$spec$select13 i32) + (local $$spec$select14 i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool6 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strchr + (local.get $$mode) + (i32.const 43) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$cmp + (i32.ne + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 114) + ) + ) + (local.set $$$ + (i32.and + (local.get $$cmp) + (i32.const 1) + ) + ) + (local.set $$flags$0 + (if (result i32) + (local.get $$tobool) + (local.get $$$) + (i32.const 2) + ) + ) + (local.set $$call5 + (call $_strchr + (local.get $$mode) + (i32.const 120) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$call5) + (i32.const 0) + ) + ) + (local.set $$or + (i32.or + (local.get $$flags$0) + (i32.const 128) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool6) + (local.get $$flags$0) + (local.get $$or) + ) + ) + (local.set $$call9 + (call $_strchr + (local.get $$mode) + (i32.const 101) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$call9) + (i32.const 0) + ) + ) + (local.set $$or12 + (i32.or + (local.get $$spec$select) + (i32.const 524288) + ) + ) + (local.set $$flags$2 + (if (result i32) + (local.get $$tobool10) + (local.get $$spec$select) + (local.get $$or12) + ) + ) + (local.set $$cmp15 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 114) + ) + ) + (local.set $$or18 + (i32.or + (local.get $$flags$2) + (i32.const 64) + ) + ) + (local.set $$spec$select13 + (if (result i32) + (local.get $$cmp15) + (local.get $$flags$2) + (local.get $$or18) + ) + ) + (local.set $$cmp21 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 119) + ) + ) + (local.set $$or24 + (i32.or + (local.get $$spec$select13) + (i32.const 512) + ) + ) + (local.set $$flags$4 + (if (result i32) + (local.get $$cmp21) + (local.get $$or24) + (local.get $$spec$select13) + ) + ) + (local.set $$cmp27 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 97) + ) + ) + (local.set $$or30 + (i32.or + (local.get $$flags$4) + (i32.const 1024) + ) + ) + (local.set $$spec$select14 + (if (result i32) + (local.get $$cmp27) + (local.get $$or30) + (local.get $$flags$4) + ) + ) + (return + (local.get $$spec$select14) + ) + ) + (func $___fdopen (; 618 ;) (param $$fd i32) (param $$mode i32) (result i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$add$ptr32 i32) + (local $$and i32) + (local $$and34 i32) + (local $$buf i32) + (local $$buf_size i32) + (local $$call i32) + (local $$call1 i32) + (local $$call13 i32) + (local $$call2 i32) + (local $$call23 i32) + (local $$call36 i32) + (local $$call44 i32) + (local $$call7 i32) + (local $$close i32) + (local $$cmp i32) + (local $$cmp19 i32) + (local $$cond i32) + (local $$conv i32) + (local $$fd31 i32) + (local $$lock i32) + (local $$or i32) + (local $$or29 i32) + (local $$read i32) + (local $$retval$0 i32) + (local $$seek i32) + (local $$tobool i32) + (local $$tobool14 i32) + (local $$tobool24 i32) + (local $$tobool3 i32) + (local $$tobool35 i32) + (local $$tobool37 i32) + (local $$tobool41 i32) + (local $$tobool8 i32) + (local $$vararg_buffer i32) + (local $$vararg_buffer12 i32) + (local $$vararg_buffer3 i32) + (local $$vararg_buffer7 i32) + (local $$vararg_ptr1 i32) + (local $$vararg_ptr10 i32) + (local $$vararg_ptr11 i32) + (local $$vararg_ptr15 i32) + (local $$vararg_ptr16 i32) + (local $$vararg_ptr2 i32) + (local $$vararg_ptr6 i32) + (local $$write i32) + (local $$wsz i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $$vararg_buffer12 + (i32.add + (local.get $sp_a) + (i32.const 40) + ) + ) + (local.set $$vararg_buffer7 + (i32.add + (local.get $sp_a) + (i32.const 24) + ) + ) + (local.set $$vararg_buffer3 + (i32.add + (local.get $sp_a) + (i32.const 16) + ) + ) + (local.set $$vararg_buffer + (local.get $sp_a) + ) + (local.set $$wsz + (i32.add + (local.get $sp_a) + (i32.const 56) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call + (call $_strchr + (i32.const 16651) + (local.get $$conv) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$call1 + (call $___errno_location) + ) + (i32.store + (local.get $$call1) + (i32.const 22) + ) + (local.set $$retval$0 + (i32.const 0) + ) + ) + (block + (local.set $$call2 + (call $_malloc + (i32.const 1176) + ) + ) + (local.set $$tobool3 + (i32.eq + (local.get $$call2) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (drop + (call $_memset + (local.get $$call2) + (i32.const 0) + (i32.const 144) + ) + ) + (local.set $$call7 + (call $_strchr + (local.get $$mode) + (i32.const 43) + ) + ) + (local.set $$tobool8 + (i32.eq + (local.get $$call7) + (i32.const 0) + ) + ) + (if + (local.get $$tobool8) + (block + (local.set $$1 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 114) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp) + (i32.const 8) + (i32.const 4) + ) + ) + (i32.store + (local.get $$call2) + (local.get $$cond) + ) + ) + ) + (local.set $$call13 + (call $_strchr + (local.get $$mode) + (i32.const 101) + ) + ) + (local.set $$tobool14 + (i32.eq + (local.get $$call13) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool14) + ) + (block + (i32.store + (local.get $$vararg_buffer) + (local.get $$fd) + ) + (local.set $$vararg_ptr1 + (i32.add + (local.get $$vararg_buffer) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr1) + (i32.const 2) + ) + (local.set $$vararg_ptr2 + (i32.add + (local.get $$vararg_buffer) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr2) + (i32.const 1) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $$vararg_buffer) + ) + ) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$mode) + ) + ) + (local.set $$cmp19 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 97) + ) + ) + (if + (local.get $$cmp19) + (block + (i32.store + (local.get $$vararg_buffer3) + (local.get $$fd) + ) + (local.set $$vararg_ptr6 + (i32.add + (local.get $$vararg_buffer3) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr6) + (i32.const 3) + ) + (local.set $$call23 + (call $___syscall221 + (i32.const 221) + (local.get $$vararg_buffer3) + ) + ) + (local.set $$and + (i32.and + (local.get $$call23) + (i32.const 1024) + ) + ) + (local.set $$tobool24 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$tobool24) + (block + (local.set $$or + (i32.or + (local.get $$call23) + (i32.const 1024) + ) + ) + (i32.store + (local.get $$vararg_buffer7) + (local.get $$fd) + ) + (local.set $$vararg_ptr10 + (i32.add + (local.get $$vararg_buffer7) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr10) + (i32.const 4) + ) + (local.set $$vararg_ptr11 + (i32.add + (local.get $$vararg_buffer7) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr11) + (local.get $$or) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $$vararg_buffer7) + ) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$call2) + ) + ) + (local.set $$or29 + (i32.or + (local.get $$3) + (i32.const 128) + ) + ) + (i32.store + (local.get $$call2) + (local.get $$or29) + ) + (local.set $$5 + (local.get $$or29) + ) + ) + (block + (local.set $$$pre + (i32.load + (local.get $$call2) + ) + ) + (local.set $$5 + (local.get $$$pre) + ) + ) + ) + (local.set $$fd31 + (i32.add + (local.get $$call2) + (i32.const 60) + ) + ) + (i32.store + (local.get $$fd31) + (local.get $$fd) + ) + (local.set $$add$ptr32 + (i32.add + (local.get $$call2) + (i32.const 152) + ) + ) + (local.set $$buf + (i32.add + (local.get $$call2) + (i32.const 44) + ) + ) + (i32.store + (local.get $$buf) + (local.get $$add$ptr32) + ) + (local.set $$buf_size + (i32.add + (local.get $$call2) + (i32.const 48) + ) + ) + (i32.store + (local.get $$buf_size) + (i32.const 1024) + ) + (local.set $$4 + (i32.add + (local.get $$call2) + (i32.const 75) + ) + ) + (i32.store8 + (local.get $$4) + (i32.const -1) + ) + (local.set $$and34 + (i32.and + (local.get $$5) + (i32.const 8) + ) + ) + (local.set $$tobool35 + (i32.eq + (local.get $$and34) + (i32.const 0) + ) + ) + (if + (local.get $$tobool35) + (block + (local.set $$6 + (local.get $$wsz) + ) + (i32.store + (local.get $$vararg_buffer12) + (local.get $$fd) + ) + (local.set $$vararg_ptr15 + (i32.add + (local.get $$vararg_buffer12) + (i32.const 4) + ) + ) + (i32.store + (local.get $$vararg_ptr15) + (i32.const 21523) + ) + (local.set $$vararg_ptr16 + (i32.add + (local.get $$vararg_buffer12) + (i32.const 8) + ) + ) + (i32.store + (local.get $$vararg_ptr16) + (local.get $$6) + ) + (local.set $$call36 + (call $___syscall54 + (i32.const 54) + (local.get $$vararg_buffer12) + ) + ) + (local.set $$tobool37 + (i32.eq + (local.get $$call36) + (i32.const 0) + ) + ) + (if + (local.get $$tobool37) + (i32.store8 + (local.get $$4) + (i32.const 10) + ) + ) + ) + ) + (local.set $$read + (i32.add + (local.get $$call2) + (i32.const 32) + ) + ) + (i32.store + (local.get $$read) + (i32.const 32) + ) + (local.set $$write + (i32.add + (local.get $$call2) + (i32.const 36) + ) + ) + (i32.store + (local.get $$write) + (i32.const 11) + ) + (local.set $$seek + (i32.add + (local.get $$call2) + (i32.const 40) + ) + ) + (i32.store + (local.get $$seek) + (i32.const 33) + ) + (local.set $$close + (i32.add + (local.get $$call2) + (i32.const 12) + ) + ) + (i32.store + (local.get $$close) + (i32.const 34) + ) + (local.set $$7 + (i32.load + (i32.const 29328) + ) + ) + (local.set $$tobool41 + (i32.eq + (local.get $$7) + (i32.const 0) + ) + ) + (if + (local.get $$tobool41) + (block + (local.set $$lock + (i32.add + (local.get $$call2) + (i32.const 76) + ) + ) + (i32.store + (local.get $$lock) + (i32.const -1) + ) + ) + ) + (local.set $$call44 + (call $___ofl_add + (local.get $$call2) + ) + ) + (local.set $$retval$0 + (local.get $$call2) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___ofl_add (; 619 ;) (param $$f i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$call i32) + (local $$next i32) + (local $$prev i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $___ofl_lock) + ) + (local.set $$0 + (i32.load + (local.get $$call) + ) + ) + (local.set $$next + (i32.add + (local.get $$f) + (i32.const 56) + ) + ) + (i32.store + (local.get $$next) + (local.get $$0) + ) + (local.set $$1 + (i32.load + (local.get $$call) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$prev + (i32.add + (local.get $$1) + (i32.const 52) + ) + ) + (i32.store + (local.get $$prev) + (local.get $$f) + ) + ) + ) + (i32.store + (local.get $$call) + (local.get $$f) + ) + (call $___ofl_unlock) + (return + (local.get $$f) + ) + ) + (func $___ofl_lock (; 620 ;) (result i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $___lock + (i32.const 29392) + ) + (return + (i32.const 29400) + ) + ) + (func $___ofl_unlock (; 621 ;) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (call $___unlock + (i32.const 29392) + ) + (return) + ) + (func $_fclose (; 622 ;) (param $$f i32) (result i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$call i32) + (local $$call1 i32) + (local $$call18 i32) + (local $$call19 i32) + (local $$close i32) + (local $$cmp i32) + (local $$cmp13 i32) + (local $$cond i32) + (local $$getln_buf i32) + (local $$lock i32) + (local $$next5 i32) + (local $$or i32) + (local $$prev i32) + (local $$prev11 i32) + (local $$tobool i32) + (local $$tobool2 i32) + (local $$tobool20 i32) + (local $$tobool26 i32) + (local $$tobool7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$lock + (i32.add + (local.get $$f) + (i32.const 76) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lock) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const -1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$call + (call $___lockfile + (local.get $$f) + ) + ) + (local.set $$cond + (local.get $$call) + ) + ) + (local.set $$cond + (i32.const 0) + ) + ) + (call $___unlist_locked_file + (local.get $$f) + ) + (local.set $$1 + (i32.load + (local.get $$f) + ) + ) + (local.set $$and + (i32.and + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$and) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (block + (local.set $$call1 + (call $___ofl_lock) + ) + (local.set $$prev + (i32.add + (local.get $$f) + (i32.const 52) + ) + ) + (local.set $$2 + (i32.load + (local.get $$prev) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$2) + (i32.const 0) + ) + ) + (local.set $$3 + (local.get $$2) + ) + (local.set $$$pre + (i32.add + (local.get $$f) + (i32.const 56) + ) + ) + (if + (i32.eqz + (local.get $$tobool2) + ) + (block + (local.set $$4 + (i32.load + (local.get $$$pre) + ) + ) + (local.set $$next5 + (i32.add + (local.get $$2) + (i32.const 56) + ) + ) + (i32.store + (local.get $$next5) + (local.get $$4) + ) + ) + ) + (local.set $$5 + (i32.load + (local.get $$$pre) + ) + ) + (local.set $$tobool7 + (i32.eq + (local.get $$5) + (i32.const 0) + ) + ) + (local.set $$6 + (local.get $$5) + ) + (if + (i32.eqz + (local.get $$tobool7) + ) + (block + (local.set $$prev11 + (i32.add + (local.get $$5) + (i32.const 52) + ) + ) + (i32.store + (local.get $$prev11) + (local.get $$3) + ) + ) + ) + (local.set $$7 + (i32.load + (local.get $$call1) + ) + ) + (local.set $$cmp13 + (i32.eq + (local.get $$7) + (local.get $$f) + ) + ) + (if + (local.get $$cmp13) + (i32.store + (local.get $$call1) + (local.get $$6) + ) + ) + (call $___ofl_unlock) + ) + ) + (local.set $$call18 + (call $_fflush + (local.get $$f) + ) + ) + (local.set $$close + (i32.add + (local.get $$f) + (i32.const 12) + ) + ) + (local.set $$8 + (i32.load + (local.get $$close) + ) + ) + (local.set $$call19 + (call_indirect (type $FUNCSIG$ii) + (local.get $$f) + (i32.add + (i32.and + (local.get $$8) + (i32.const 255) + ) + (i32.const 152) + ) + ) + ) + (local.set $$or + (i32.or + (local.get $$call19) + (local.get $$call18) + ) + ) + (local.set $$getln_buf + (i32.add + (local.get $$f) + (i32.const 96) + ) + ) + (local.set $$9 + (i32.load + (local.get $$getln_buf) + ) + ) + (local.set $$tobool20 + (i32.eq + (local.get $$9) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool20) + ) + (call $_free + (local.get $$9) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$tobool26 + (i32.eq + (local.get $$cond) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool26) + ) + (call $___unlockfile + (local.get $$f) + ) + ) + ) + (call $_free + (local.get $$f) + ) + ) + (return + (local.get $$or) + ) + ) + (func $_fflush (; 623 ;) (param $$f i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$call i32) + (local $$call1 i32) + (local $$call11 i32) + (local $$call118 i32) + (local $$call17 i32) + (local $$call23 i32) + (local $$call7 i32) + (local $$cmp i32) + (local $$cmp15 i32) + (local $$cmp21 i32) + (local $$cond10 i32) + (local $$cond20 i32) + (local $$f$addr$0 i32) + (local $$f$addr$019 i32) + (local $$f$addr$022 i32) + (local $$lock i32) + (local $$lock14 i32) + (local $$next i32) + (local $$or i32) + (local $$phitmp i32) + (local $$r$0$lcssa i32) + (local $$r$021 i32) + (local $$r$1 i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$tobool12 i32) + (local $$tobool1220 i32) + (local $$tobool25 i32) + (local $$tobool5 i32) + (local $$wbase i32) + (local $$wpos i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool + (i32.eq + (local.get $$f) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$tobool) + (block + (local.set $$1 + (i32.load + (i32.const 8016) + ) + ) + (local.set $$tobool5 + (i32.eq + (local.get $$1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool5) + (local.set $$cond10 + (i32.const 0) + ) + (block + (local.set $$2 + (i32.load + (i32.const 8016) + ) + ) + (local.set $$call7 + (call $_fflush + (local.get $$2) + ) + ) + (local.set $$cond10 + (local.get $$call7) + ) + ) + ) + (local.set $$call11 + (call $___ofl_lock) + ) + (local.set $$f$addr$019 + (i32.load + (local.get $$call11) + ) + ) + (local.set $$tobool1220 + (i32.eq + (local.get $$f$addr$019) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1220) + (local.set $$r$0$lcssa + (local.get $$cond10) + ) + (block + (local.set $$f$addr$022 + (local.get $$f$addr$019) + ) + (local.set $$r$021 + (local.get $$cond10) + ) + (loop $while-in + (block $while-out + (local.set $$lock14 + (i32.add + (local.get $$f$addr$022) + (i32.const 76) + ) + ) + (local.set $$3 + (i32.load + (local.get $$lock14) + ) + ) + (local.set $$cmp15 + (i32.gt_s + (local.get $$3) + (i32.const -1) + ) + ) + (if + (local.get $$cmp15) + (block + (local.set $$call17 + (call $___lockfile + (local.get $$f$addr$022) + ) + ) + (local.set $$cond20 + (local.get $$call17) + ) + ) + (local.set $$cond20 + (i32.const 0) + ) + ) + (local.set $$wpos + (i32.add + (local.get $$f$addr$022) + (i32.const 20) + ) + ) + (local.set $$4 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$wbase + (i32.add + (local.get $$f$addr$022) + (i32.const 28) + ) + ) + (local.set $$5 + (i32.load + (local.get $$wbase) + ) + ) + (local.set $$cmp21 + (i32.gt_u + (local.get $$4) + (local.get $$5) + ) + ) + (if + (local.get $$cmp21) + (block + (local.set $$call23 + (call $___fflush_unlocked + (local.get $$f$addr$022) + ) + ) + (local.set $$or + (i32.or + (local.get $$call23) + (local.get $$r$021) + ) + ) + (local.set $$r$1 + (local.get $$or) + ) + ) + (local.set $$r$1 + (local.get $$r$021) + ) + ) + (local.set $$tobool25 + (i32.eq + (local.get $$cond20) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool25) + ) + (call $___unlockfile + (local.get $$f$addr$022) + ) + ) + (local.set $$next + (i32.add + (local.get $$f$addr$022) + (i32.const 56) + ) + ) + (local.set $$f$addr$0 + (i32.load + (local.get $$next) + ) + ) + (local.set $$tobool12 + (i32.eq + (local.get $$f$addr$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool12) + (block + (local.set $$r$0$lcssa + (local.get $$r$1) + ) + (br $while-out) + ) + (block + (local.set $$f$addr$022 + (local.get $$f$addr$0) + ) + (local.set $$r$021 + (local.get $$r$1) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (call $___ofl_unlock) + (local.set $$retval$0 + (local.get $$r$0$lcssa) + ) + ) + (block + (local.set $$lock + (i32.add + (local.get $$f) + (i32.const 76) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lock) + ) + ) + (local.set $$cmp + (i32.gt_s + (local.get $$0) + (i32.const -1) + ) + ) + (if + (i32.eqz + (local.get $$cmp) + ) + (block + (local.set $$call118 + (call $___fflush_unlocked + (local.get $$f) + ) + ) + (local.set $$retval$0 + (local.get $$call118) + ) + (br $do-once) + ) + ) + (local.set $$call + (call $___lockfile + (local.get $$f) + ) + ) + (local.set $$phitmp + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (local.set $$call1 + (call $___fflush_unlocked + (local.get $$f) + ) + ) + (if + (local.get $$phitmp) + (local.set $$retval$0 + (local.get $$call1) + ) + (block + (call $___unlockfile + (local.get $$f) + ) + (local.set $$retval$0 + (local.get $$call1) + ) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $___fflush_unlocked (; 624 ;) (param $$f i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$cmp i32) + (local $$cmp4 i32) + (local $$conv i64) + (local $$rend i32) + (local $$retval$0 i32) + (local $$rpos i32) + (local $$seek i32) + (local $$sub$ptr$lhs$cast i32) + (local $$sub$ptr$rhs$cast i32) + (local $$sub$ptr$sub i32) + (local $$tobool i32) + (local $$wbase i32) + (local $$wend i32) + (local $$wpos i32) + (local $$write i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$0 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$wbase + (i32.add + (local.get $$f) + (i32.const 28) + ) + ) + (local.set $$1 + (i32.load + (local.get $$wbase) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$0) + (local.get $$1) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$write + (i32.add + (local.get $$f) + (i32.const 36) + ) + ) + (local.set $$2 + (i32.load + (local.get $$write) + ) + ) + (drop + (call_indirect (type $FUNCSIG$iiii) + (local.get $$f) + (i32.const 0) + (i32.const 0) + (i32.add + (i32.and + (local.get $$2) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$3) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $$retval$0 + (i32.const -1) + ) + (local.set $label + (i32.const 3) + ) + ) + ) + (local.set $label + (i32.const 3) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (block + (local.set $$rpos + (i32.add + (local.get $$f) + (i32.const 4) + ) + ) + (local.set $$4 + (i32.load + (local.get $$rpos) + ) + ) + (local.set $$rend + (i32.add + (local.get $$f) + (i32.const 8) + ) + ) + (local.set $$5 + (i32.load + (local.get $$rend) + ) + ) + (local.set $$cmp4 + (i32.lt_u + (local.get $$4) + (local.get $$5) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$sub$ptr$lhs$cast + (local.get $$4) + ) + (local.set $$sub$ptr$rhs$cast + (local.get $$5) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$sub$ptr$lhs$cast) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (local.set $$conv + (i64.extend_i32_s + (local.get $$sub$ptr$sub) + ) + ) + (local.set $$seek + (i32.add + (local.get $$f) + (i32.const 40) + ) + ) + (local.set $$6 + (i32.load + (local.get $$seek) + ) + ) + (drop + (call_indirect (type $FUNCSIG$jiji) + (local.get $$f) + (local.get $$conv) + (i32.const 1) + (i32.add + (i32.and + (local.get $$6) + (i32.const 63) + ) + (i32.const 633) + ) + ) + ) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (i32.store + (local.get $$wend) + (i32.const 0) + ) + (i32.store + (local.get $$wbase) + (i32.const 0) + ) + (i32.store + (local.get $$wpos) + (i32.const 0) + ) + (i32.store + (local.get $$rend) + (i32.const 0) + ) + (i32.store + (local.get $$rpos) + (i32.const 0) + ) + (local.set $$retval$0 + (i32.const 0) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_strstr (; 625 ;) (param $$h i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$arrayidx10 i32) + (local $$arrayidx15 i32) + (local $$arrayidx19 i32) + (local $$arrayidx2 i32) + (local $$arrayidx24 i32) + (local $$arrayidx28 i32) + (local $$arrayidx6 i32) + (local $$call i32) + (local $$call13 i32) + (local $$call22 i32) + (local $$call31 i32) + (local $$call33 i32) + (local $$conv i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$tobool1 i32) + (local $$tobool11 i32) + (local $$tobool16 i32) + (local $$tobool20 i32) + (local $$tobool25 i32) + (local $$tobool29 i32) + (local $$tobool3 i32) + (local $$tobool7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$n) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$tobool) + (local.set $$retval$0 + (local.get $$h) + ) + (block + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call + (call $_strchr + (local.get $$h) + (local.get $$conv) + ) + ) + (local.set $$tobool1 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$arrayidx2 + (i32.add + (local.get $$n) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx2) + ) + ) + (local.set $$tobool3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3) + (local.set $$retval$0 + (local.get $$call) + ) + (block + (local.set $$arrayidx6 + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx6) + ) + ) + (local.set $$tobool7 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool7) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$arrayidx10 + (i32.add + (local.get $$n) + (i32.const 2) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx10) + ) + ) + (local.set $$tobool11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$3) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool11) + (block + (local.set $$call13 + (call $_twobyte_strstr + (local.get $$call) + (local.get $$n) + ) + ) + (local.set $$retval$0 + (local.get $$call13) + ) + (br $do-once) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$call) + (i32.const 2) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx15) + ) + ) + (local.set $$tobool16 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool16) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$arrayidx19 + (i32.add + (local.get $$n) + (i32.const 3) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx19) + ) + ) + (local.set $$tobool20 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool20) + (block + (local.set $$call22 + (call $_threebyte_strstr + (local.get $$call) + (local.get $$n) + ) + ) + (local.set $$retval$0 + (local.get $$call22) + ) + (br $do-once) + ) + ) + (local.set $$arrayidx24 + (i32.add + (local.get $$call) + (i32.const 3) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx24) + ) + ) + (local.set $$tobool25 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool25) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$arrayidx28 + (i32.add + (local.get $$n) + (i32.const 4) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx28) + ) + ) + (local.set $$tobool29 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool29) + (block + (local.set $$call31 + (call $_fourbyte_strstr + (local.get $$call) + (local.get $$n) + ) + ) + (local.set $$retval$0 + (local.get $$call31) + ) + (br $do-once) + ) + (block + (local.set $$call33 + (call $_twoway_strstr + (local.get $$call) + (local.get $$n) + ) + ) + (local.set $$retval$0 + (local.get $$call33) + ) + (br $do-once) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_twobyte_strstr (; 626 ;) (param $$h i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$add$ptr i32) + (local $$arrayidx1 i32) + (local $$arrayidx7 i32) + (local $$cmp i32) + (local $$conv i32) + (local $$conv12 i32) + (local $$conv18 i32) + (local $$conv2 i32) + (local $$conv5 i32) + (local $$conv8 i32) + (local $$h$addr$012 i32) + (local $$hw$0$in13 i32) + (local $$incdec$ptr17 i32) + (local $$or i32) + (local $$or19 i32) + (local $$or9 i32) + (local $$shl i32) + (local $$shl16 i32) + (local $$shl6 i32) + (local $$tobool i32) + (local $$tobool11 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$n) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv) + (i32.const 8) + ) + ) + (local.set $$arrayidx1 + (i32.add + (local.get $$n) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$conv2 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl) + (local.get $$conv2) + ) + ) + (local.set $$arrayidx7 + (i32.add + (local.get $$h) + (i32.const 1) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx7) + ) + ) + (local.set $$tobool11 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool11) + (local.set $$5 + (i32.const 0) + ) + (block + (local.set $$3 + (i32.load8_s + (local.get $$h) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$shl6 + (i32.shl + (local.get $$conv5) + (i32.const 8) + ) + ) + (local.set $$conv8 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$or9 + (i32.or + (local.get $$shl6) + (local.get $$conv8) + ) + ) + (local.set $$h$addr$012 + (local.get $$arrayidx7) + ) + (local.set $$hw$0$in13 + (local.get $$or9) + ) + (loop $while-in + (block $while-out + (local.set $$conv12 + (i32.and + (local.get $$hw$0$in13) + (i32.const 65535) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$conv12) + (local.get $$or) + ) + ) + (if + (local.get $$cmp) + (br $while-out) + ) + (local.set $$shl16 + (i32.shl + (local.get $$conv12) + (i32.const 8) + ) + ) + (local.set $$incdec$ptr17 + (i32.add + (local.get $$h$addr$012) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$incdec$ptr17) + ) + ) + (local.set $$conv18 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$or19 + (i32.or + (local.get $$shl16) + (local.get $$conv18) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$5 + (i32.const 0) + ) + (br $label$break$L1) + ) + (block + (local.set $$h$addr$012 + (local.get $$incdec$ptr17) + ) + (local.set $$hw$0$in13 + (local.get $$or19) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$h$addr$012) + (i32.const -1) + ) + ) + (local.set $$5 + (local.get $$add$ptr) + ) + ) + ) + ) + (return + (local.get $$5) + ) + ) + (func $_threebyte_strstr (; 627 ;) (param $$h i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$add$ptr26 i32) + (local $$arrayidx1 i32) + (local $$arrayidx11 i32) + (local $$arrayidx15 i32) + (local $$arrayidx4 i32) + (local $$cmp i32) + (local $$cmp14 i32) + (local $$cond i32) + (local $$conv i32) + (local $$conv12 i32) + (local $$conv16 i32) + (local $$conv2 i32) + (local $$conv21 i32) + (local $$conv5 i32) + (local $$conv9 i32) + (local $$h$addr$0$lcssa i32) + (local $$h$addr$016 i32) + (local $$hw$017 i32) + (local $$incdec$ptr i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond15 i32) + (local $$or14 i32) + (local $$or18 i32) + (local $$or22 i32) + (local $$or7 i32) + (local $$shl i32) + (local $$shl10 i32) + (local $$shl13 i32) + (local $$shl17 i32) + (local $$shl23 i32) + (local $$shl3 i32) + (local $$shl6 i32) + (local $$tobool i32) + (local $$tobool$lcssa i32) + (local $$tobool13 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$n) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv) + (i32.const 24) + ) + ) + (local.set $$arrayidx1 + (i32.add + (local.get $$n) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$conv2 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$shl3 + (i32.shl + (local.get $$conv2) + (i32.const 16) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl3) + (local.get $$shl) + ) + ) + (local.set $$arrayidx4 + (i32.add + (local.get $$n) + (i32.const 2) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx4) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$shl6 + (i32.shl + (local.get $$conv5) + (i32.const 8) + ) + ) + (local.set $$or7 + (i32.or + (local.get $$or) + (local.get $$shl6) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$h) + ) + ) + (local.set $$conv9 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$shl10 + (i32.shl + (local.get $$conv9) + (i32.const 24) + ) + ) + (local.set $$arrayidx11 + (i32.add + (local.get $$h) + (i32.const 1) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx11) + ) + ) + (local.set $$conv12 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$shl13 + (i32.shl + (local.get $$conv12) + (i32.const 16) + ) + ) + (local.set $$or14 + (i32.or + (local.get $$shl13) + (local.get $$shl10) + ) + ) + (local.set $$arrayidx15 + (i32.add + (local.get $$h) + (i32.const 2) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx15) + ) + ) + (local.set $$conv16 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$shl17 + (i32.shl + (local.get $$conv16) + (i32.const 8) + ) + ) + (local.set $$or18 + (i32.or + (local.get $$or14) + (local.get $$shl17) + ) + ) + (local.set $$tobool13 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp14 + (i32.eq + (local.get $$or18) + (local.get $$or7) + ) + ) + (local.set $$or$cond15 + (i32.or + (local.get $$cmp14) + (local.get $$tobool13) + ) + ) + (if + (local.get $$or$cond15) + (block + (local.set $$h$addr$0$lcssa + (local.get $$arrayidx15) + ) + (local.set $$tobool$lcssa + (local.get $$tobool13) + ) + ) + (block + (local.set $$h$addr$016 + (local.get $$arrayidx15) + ) + (local.set $$hw$017 + (local.get $$or18) + ) + (loop $while-in + (block $while-out + (local.set $$incdec$ptr + (i32.add + (local.get $$h$addr$016) + (i32.const 1) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$conv21 + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + (local.set $$or22 + (i32.or + (local.get $$hw$017) + (local.get $$conv21) + ) + ) + (local.set $$shl23 + (i32.shl + (local.get $$or22) + (i32.const 8) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$shl23) + (local.get $$or7) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$h$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (local.set $$tobool$lcssa + (local.get $$tobool) + ) + (br $while-out) + ) + (block + (local.set $$h$addr$016 + (local.get $$incdec$ptr) + ) + (local.set $$hw$017 + (local.get $$shl23) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$add$ptr26 + (i32.add + (local.get $$h$addr$0$lcssa) + (i32.const -2) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$tobool$lcssa) + (i32.const 0) + (local.get $$add$ptr26) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $_fourbyte_strstr (; 628 ;) (param $$h i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$add$ptr32 i32) + (local $$arrayidx1 i32) + (local $$arrayidx14 i32) + (local $$arrayidx18 i32) + (local $$arrayidx22 i32) + (local $$arrayidx4 i32) + (local $$arrayidx8 i32) + (local $$cmp i32) + (local $$cmp16 i32) + (local $$cond i32) + (local $$conv i32) + (local $$conv12 i32) + (local $$conv15 i32) + (local $$conv19 i32) + (local $$conv2 i32) + (local $$conv23 i32) + (local $$conv28 i32) + (local $$conv5 i32) + (local $$conv9 i32) + (local $$h$addr$0$lcssa i32) + (local $$h$addr$018 i32) + (local $$hw$019 i32) + (local $$incdec$ptr i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond17 i32) + (local $$or10 i32) + (local $$or17 i32) + (local $$or21 i32) + (local $$or24 i32) + (local $$or29 i32) + (local $$or7 i32) + (local $$shl i32) + (local $$shl13 i32) + (local $$shl16 i32) + (local $$shl20 i32) + (local $$shl27 i32) + (local $$shl3 i32) + (local $$shl6 i32) + (local $$tobool i32) + (local $$tobool$lcssa i32) + (local $$tobool15 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load8_s + (local.get $$n) + ) + ) + (local.set $$conv + (i32.and + (local.get $$0) + (i32.const 255) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$conv) + (i32.const 24) + ) + ) + (local.set $$arrayidx1 + (i32.add + (local.get $$n) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$conv2 + (i32.and + (local.get $$1) + (i32.const 255) + ) + ) + (local.set $$shl3 + (i32.shl + (local.get $$conv2) + (i32.const 16) + ) + ) + (local.set $$or + (i32.or + (local.get $$shl3) + (local.get $$shl) + ) + ) + (local.set $$arrayidx4 + (i32.add + (local.get $$n) + (i32.const 2) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$arrayidx4) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$shl6 + (i32.shl + (local.get $$conv5) + (i32.const 8) + ) + ) + (local.set $$or7 + (i32.or + (local.get $$or) + (local.get $$shl6) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$n) + (i32.const 3) + ) + ) + (local.set $$3 + (i32.load8_s + (local.get $$arrayidx8) + ) + ) + (local.set $$conv9 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$or10 + (i32.or + (local.get $$or7) + (local.get $$conv9) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$h) + ) + ) + (local.set $$conv12 + (i32.and + (local.get $$4) + (i32.const 255) + ) + ) + (local.set $$shl13 + (i32.shl + (local.get $$conv12) + (i32.const 24) + ) + ) + (local.set $$arrayidx14 + (i32.add + (local.get $$h) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx14) + ) + ) + (local.set $$conv15 + (i32.and + (local.get $$5) + (i32.const 255) + ) + ) + (local.set $$shl16 + (i32.shl + (local.get $$conv15) + (i32.const 16) + ) + ) + (local.set $$or17 + (i32.or + (local.get $$shl16) + (local.get $$shl13) + ) + ) + (local.set $$arrayidx18 + (i32.add + (local.get $$h) + (i32.const 2) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx18) + ) + ) + (local.set $$conv19 + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + (local.set $$shl20 + (i32.shl + (local.get $$conv19) + (i32.const 8) + ) + ) + (local.set $$or21 + (i32.or + (local.get $$or17) + (local.get $$shl20) + ) + ) + (local.set $$arrayidx22 + (i32.add + (local.get $$h) + (i32.const 3) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx22) + ) + ) + (local.set $$conv23 + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + (local.set $$or24 + (i32.or + (local.get $$or21) + (local.get $$conv23) + ) + ) + (local.set $$tobool15 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$or24) + (local.get $$or10) + ) + ) + (local.set $$or$cond17 + (i32.or + (local.get $$cmp16) + (local.get $$tobool15) + ) + ) + (if + (local.get $$or$cond17) + (block + (local.set $$h$addr$0$lcssa + (local.get $$arrayidx22) + ) + (local.set $$tobool$lcssa + (local.get $$tobool15) + ) + ) + (block + (local.set $$h$addr$018 + (local.get $$arrayidx22) + ) + (local.set $$hw$019 + (local.get $$or24) + ) + (loop $while-in + (block $while-out + (local.set $$shl27 + (i32.shl + (local.get $$hw$019) + (i32.const 8) + ) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$h$addr$018) + (i32.const 1) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$conv28 + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + (local.set $$or29 + (i32.or + (local.get $$shl27) + (local.get $$conv28) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$or29) + (local.get $$or10) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp) + (local.get $$tobool) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$h$addr$0$lcssa + (local.get $$incdec$ptr) + ) + (local.set $$tobool$lcssa + (local.get $$tobool) + ) + (br $while-out) + ) + (block + (local.set $$h$addr$018 + (local.get $$incdec$ptr) + ) + (local.set $$hw$019 + (local.get $$or29) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$add$ptr32 + (i32.add + (local.get $$h$addr$0$lcssa) + (i32.const -3) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$tobool$lcssa) + (i32.const 0) + (local.get $$add$ptr32) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $_twoway_strstr (; 629 ;) (param $$h i32) (param $$n i32) (result i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$add i32) + (local $$add$ptr i32) + (local $$add$ptr119 i32) + (local $$add$ptr150 i32) + (local $$add13 i32) + (local $$add13165 i32) + (local $$add15 i32) + (local $$add27 i32) + (local $$add46 i32) + (local $$add46157 i32) + (local $$add50 i32) + (local $$add62 i32) + (local $$add83 i32) + (local $$add84 i32) + (local $$add90 i32) + (local $$add99 i32) + (local $$and i32) + (local $$arrayidx i32) + (local $$arrayidx1 i32) + (local $$arrayidx10 i32) + (local $$arrayidx124 i32) + (local $$arrayidx127 i32) + (local $$arrayidx138 i32) + (local $$arrayidx16 i32) + (local $$arrayidx164 i32) + (local $$arrayidx164146 i32) + (local $$arrayidx170 i32) + (local $$arrayidx19 i32) + (local $$arrayidx191 i32) + (local $$arrayidx194 i32) + (local $$arrayidx51 i32) + (local $$arrayidx54 i32) + (local $$arrayidx8 i32) + (local $$byteset i32) + (local $$call i32) + (local $$call108 i32) + (local $$cmp i32) + (local $$cmp104 i32) + (local $$cmp114 i32) + (local $$cmp145 i32) + (local $$cmp156 i32) + (local $$cmp160 i32) + (local $$cmp172 i32) + (local $$cmp187 i32) + (local $$cmp196 i32) + (local $$cmp21 i32) + (local $$cmp24 i32) + (local $$cmp37 i32) + (local $$cmp47 i32) + (local $$cmp56 i32) + (local $$cmp59 i32) + (local $$cmp73 i32) + (local $$cmp85 i32) + (local $$cmp95 i32) + (local $$cond162 i32) + (local $$conv125 i32) + (local $$conv5 i32) + (local $$div i32) + (local $$div126 i32) + (local $$h$addr$0 i32) + (local $$inc177 i32) + (local $$inc28 i32) + (local $$inc42 i32) + (local $$inc64 i32) + (local $$inc79 i32) + (local $$ip$0$lcssa179 i32) + (local $$ip$0161 i32) + (local $$ip$1 i32) + (local $$ip$2$ip$0 i32) + (local $$ip$2$ip$0$sub94 i32) + (local $$ip$2$lcssa i32) + (local $$ip$2153 i32) + (local $$ip$3 i32) + (local $$jp$0162 i32) + (local $$jp$1 i32) + (local $$jp$2154 i32) + (local $$jp$3 i32) + (local $$k$0163 i32) + (local $$k$1 i32) + (local $$k$2155 i32) + (local $$k$3 i32) + (local $$k$4 i32) + (local $$k$4$sink i32) + (local $$k$5148 i32) + (local $$k$6150 i32) + (local $$l$0$lcssa176178 i32) + (local $$l$0169 i32) + (local $$mem$0 i32) + (local $$mem$0$be i32) + (local $$mem0$0 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond140 i32) + (local $$or107 i32) + (local $$p$0$lcssa180 i32) + (local $$p$0164 i32) + (local $$p$1 i32) + (local $$p$2$lcssa i32) + (local $$p$2$p$0 i32) + (local $$p$2156 i32) + (local $$p$3 i32) + (local $$p$5 i32) + (local $$rem i32) + (local $$rem131 i32) + (local $$retval$3 i32) + (local $$shift i32) + (local $$shl i32) + (local $$shl132 i32) + (local $$sub i32) + (local $$sub$ptr$lhs$cast i32) + (local $$sub$ptr$lhs$cast111 i32) + (local $$sub$ptr$rhs$cast i32) + (local $$sub$ptr$sub i32) + (local $$sub$ptr$sub113 i32) + (local $$sub101 i32) + (local $$sub123 i32) + (local $$sub139 i32) + (local $$sub148$pre$phiZ2D i32) + (local $$sub182 i32) + (local $$sub190 i32) + (local $$sub77 i32) + (local $$sub93 i32) + (local $$sub94 i32) + (local $$tobool i32) + (local $$tobool109 i32) + (local $$tobool133 i32) + (local $$tobool140 i32) + (local $$tobool142 i32) + (local $$tobool143 i32) + (local $$tobool166 i32) + (local $$tobool166147 i32) + (local $$tobool168 i32) + (local $$tobool3 i32) + (local $$tobool91 i32) + (local $$z$0 i32) + (local $$z$3 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1056) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1056) + ) + ) + (local.set $$byteset + (i32.add + (local.get $sp_a) + (i32.const 1024) + ) + ) + (local.set $$shift + (local.get $sp_a) + ) + (i64.store + (local.get $$byteset) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$byteset) + (i32.const 8) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$byteset) + (i32.const 16) + ) + (i64.const 0) + ) + (i64.store + (i32.add + (local.get $$byteset) + (i32.const 24) + ) + (i64.const 0) + ) + (local.set $$0 + (i32.load8_s + (local.get $$n) + ) + ) + (local.set $$tobool168 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool168) + (block + (local.set $$ip$0$lcssa179 + (i32.const -1) + ) + (local.set $$ip$2$lcssa + (i32.const -1) + ) + (local.set $$l$0$lcssa176178 + (i32.const 0) + ) + (local.set $$p$0$lcssa180 + (i32.const 1) + ) + (local.set $$p$2$lcssa + (i32.const 1) + ) + (local.set $label + (i32.const 25) + ) + ) + (block + (local.set $$2 + (local.get $$0) + ) + (local.set $$l$0169 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx1 + (i32.add + (local.get $$h) + (local.get $$l$0169) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$tobool3 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool3) + (block + (local.set $$retval$3 + (i32.const 0) + ) + (br $label$break$L1) + ) + ) + (local.set $$conv5 + (i32.and + (local.get $$2) + (i32.const 255) + ) + ) + (local.set $$rem + (i32.and + (local.get $$conv5) + (i32.const 31) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$rem) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$conv5) + (i32.const 5) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$byteset) + (i32.shl + (local.get $$div) + (i32.const 2) + ) + ) + ) + (local.set $$3 + (i32.load + (local.get $$arrayidx8) + ) + ) + (local.set $$or + (i32.or + (local.get $$3) + (local.get $$shl) + ) + ) + (i32.store + (local.get $$arrayidx8) + (local.get $$or) + ) + (local.set $$add + (i32.add + (local.get $$l$0169) + (i32.const 1) + ) + ) + (local.set $$arrayidx10 + (i32.add + (local.get $$shift) + (i32.shl + (local.get $$conv5) + (i32.const 2) + ) + ) + ) + (i32.store + (local.get $$arrayidx10) + (local.get $$add) + ) + (local.set $$arrayidx + (i32.add + (local.get $$n) + (local.get $$add) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (br $while-out) + (block + (local.set $$2 + (local.get $$4) + ) + (local.set $$l$0169 + (local.get $$add) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $$cmp160 + (i32.gt_u + (local.get $$add) + (i32.const 1) + ) + ) + (if + (local.get $$cmp160) + (block + (local.set $$add13165 + (i32.const 1) + ) + (local.set $$ip$0161 + (i32.const -1) + ) + (local.set $$jp$0162 + (i32.const 0) + ) + (local.set $$k$0163 + (i32.const 1) + ) + (local.set $$p$0164 + (i32.const 1) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$add15 + (i32.add + (local.get $$k$0163) + (local.get $$ip$0161) + ) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$n) + (local.get $$add15) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$arrayidx16) + ) + ) + (local.set $$arrayidx19 + (i32.add + (local.get $$n) + (local.get $$add13165) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$arrayidx19) + ) + ) + (local.set $$cmp21 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (block $do-once + (if + (local.get $$cmp21) + (block + (local.set $$cmp24 + (i32.eq + (local.get $$k$0163) + (local.get $$p$0164) + ) + ) + (if + (local.get $$cmp24) + (block + (local.set $$add27 + (i32.add + (local.get $$p$0164) + (local.get $$jp$0162) + ) + ) + (local.set $$ip$1 + (local.get $$ip$0161) + ) + (local.set $$jp$1 + (local.get $$add27) + ) + (local.set $$k$1 + (i32.const 1) + ) + (local.set $$p$1 + (local.get $$p$0164) + ) + (br $do-once) + ) + (block + (local.set $$inc28 + (i32.add + (local.get $$k$0163) + (i32.const 1) + ) + ) + (local.set $$ip$1 + (local.get $$ip$0161) + ) + (local.set $$jp$1 + (local.get $$jp$0162) + ) + (local.set $$k$1 + (local.get $$inc28) + ) + (local.set $$p$1 + (local.get $$p$0164) + ) + (br $do-once) + ) + ) + ) + (block + (local.set $$cmp37 + (i32.gt_s + (i32.and + (local.get $$5) + (i32.const 255) + ) + (i32.and + (local.get $$6) + (i32.const 255) + ) + ) + ) + (if + (local.get $$cmp37) + (block + (local.set $$sub + (i32.sub + (local.get $$add13165) + (local.get $$ip$0161) + ) + ) + (local.set $$ip$1 + (local.get $$ip$0161) + ) + (local.set $$jp$1 + (local.get $$add13165) + ) + (local.set $$k$1 + (i32.const 1) + ) + (local.set $$p$1 + (local.get $$sub) + ) + (br $do-once) + ) + (block + (local.set $$inc42 + (i32.add + (local.get $$jp$0162) + (i32.const 1) + ) + ) + (local.set $$ip$1 + (local.get $$jp$0162) + ) + (local.set $$jp$1 + (local.get $$inc42) + ) + (local.set $$k$1 + (i32.const 1) + ) + (local.set $$p$1 + (i32.const 1) + ) + (br $do-once) + ) + ) + ) + ) + ) + (local.set $$add13 + (i32.add + (local.get $$k$1) + (local.get $$jp$1) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$add13) + (local.get $$add) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$add13165 + (local.get $$add13) + ) + (local.set $$ip$0161 + (local.get $$ip$1) + ) + (local.set $$jp$0162 + (local.get $$jp$1) + ) + (local.set $$k$0163 + (local.get $$k$1) + ) + (local.set $$p$0164 + (local.get $$p$1) + ) + ) + (br $while-out0) + ) + (br $while-in1) + ) + ) + (if + (local.get $$cmp160) + (block + (local.set $$add46157 + (i32.const 1) + ) + (local.set $$ip$2153 + (i32.const -1) + ) + (local.set $$jp$2154 + (i32.const 0) + ) + (local.set $$k$2155 + (i32.const 1) + ) + (local.set $$p$2156 + (i32.const 1) + ) + (loop $while-in4 + (block $while-out3 + (local.set $$add50 + (i32.add + (local.get $$k$2155) + (local.get $$ip$2153) + ) + ) + (local.set $$arrayidx51 + (i32.add + (local.get $$n) + (local.get $$add50) + ) + ) + (local.set $$7 + (i32.load8_s + (local.get $$arrayidx51) + ) + ) + (local.set $$arrayidx54 + (i32.add + (local.get $$n) + (local.get $$add46157) + ) + ) + (local.set $$8 + (i32.load8_s + (local.get $$arrayidx54) + ) + ) + (local.set $$cmp56 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$7) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$8) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (block $do-once5 + (if + (local.get $$cmp56) + (block + (local.set $$cmp59 + (i32.eq + (local.get $$k$2155) + (local.get $$p$2156) + ) + ) + (if + (local.get $$cmp59) + (block + (local.set $$add62 + (i32.add + (local.get $$p$2156) + (local.get $$jp$2154) + ) + ) + (local.set $$ip$3 + (local.get $$ip$2153) + ) + (local.set $$jp$3 + (local.get $$add62) + ) + (local.set $$k$3 + (i32.const 1) + ) + (local.set $$p$3 + (local.get $$p$2156) + ) + (br $do-once5) + ) + (block + (local.set $$inc64 + (i32.add + (local.get $$k$2155) + (i32.const 1) + ) + ) + (local.set $$ip$3 + (local.get $$ip$2153) + ) + (local.set $$jp$3 + (local.get $$jp$2154) + ) + (local.set $$k$3 + (local.get $$inc64) + ) + (local.set $$p$3 + (local.get $$p$2156) + ) + (br $do-once5) + ) + ) + ) + (block + (local.set $$cmp73 + (i32.lt_s + (i32.and + (local.get $$7) + (i32.const 255) + ) + (i32.and + (local.get $$8) + (i32.const 255) + ) + ) + ) + (if + (local.get $$cmp73) + (block + (local.set $$sub77 + (i32.sub + (local.get $$add46157) + (local.get $$ip$2153) + ) + ) + (local.set $$ip$3 + (local.get $$ip$2153) + ) + (local.set $$jp$3 + (local.get $$add46157) + ) + (local.set $$k$3 + (i32.const 1) + ) + (local.set $$p$3 + (local.get $$sub77) + ) + (br $do-once5) + ) + (block + (local.set $$inc79 + (i32.add + (local.get $$jp$2154) + (i32.const 1) + ) + ) + (local.set $$ip$3 + (local.get $$jp$2154) + ) + (local.set $$jp$3 + (local.get $$inc79) + ) + (local.set $$k$3 + (i32.const 1) + ) + (local.set $$p$3 + (i32.const 1) + ) + (br $do-once5) + ) + ) + ) + ) + ) + (local.set $$add46 + (i32.add + (local.get $$k$3) + (local.get $$jp$3) + ) + ) + (local.set $$cmp47 + (i32.lt_u + (local.get $$add46) + (local.get $$add) + ) + ) + (if + (local.get $$cmp47) + (block + (local.set $$add46157 + (local.get $$add46) + ) + (local.set $$ip$2153 + (local.get $$ip$3) + ) + (local.set $$jp$2154 + (local.get $$jp$3) + ) + (local.set $$k$2155 + (local.get $$k$3) + ) + (local.set $$p$2156 + (local.get $$p$3) + ) + ) + (block + (local.set $$ip$0$lcssa179 + (local.get $$ip$1) + ) + (local.set $$ip$2$lcssa + (local.get $$ip$3) + ) + (local.set $$l$0$lcssa176178 + (local.get $$add) + ) + (local.set $$p$0$lcssa180 + (local.get $$p$1) + ) + (local.set $$p$2$lcssa + (local.get $$p$3) + ) + (local.set $label + (i32.const 25) + ) + (br $while-out3) + ) + ) + (br $while-in4) + ) + ) + ) + (block + (local.set $$ip$0$lcssa179 + (local.get $$ip$1) + ) + (local.set $$ip$2$lcssa + (i32.const -1) + ) + (local.set $$l$0$lcssa176178 + (local.get $$add) + ) + (local.set $$p$0$lcssa180 + (local.get $$p$1) + ) + (local.set $$p$2$lcssa + (i32.const 1) + ) + (local.set $label + (i32.const 25) + ) + ) + ) + ) + (block + (local.set $$ip$0$lcssa179 + (i32.const -1) + ) + (local.set $$ip$2$lcssa + (i32.const -1) + ) + (local.set $$l$0$lcssa176178 + (local.get $$add) + ) + (local.set $$p$0$lcssa180 + (i32.const 1) + ) + (local.set $$p$2$lcssa + (i32.const 1) + ) + (local.set $label + (i32.const 25) + ) + ) + ) + ) + ) + ) + (block $label$break$L34 + (if + (i32.eq + (local.get $label) + (i32.const 25) + ) + (block + (local.set $$add83 + (i32.add + (local.get $$ip$2$lcssa) + (i32.const 1) + ) + ) + (local.set $$add84 + (i32.add + (local.get $$ip$0$lcssa179) + (i32.const 1) + ) + ) + (local.set $$cmp85 + (i32.gt_u + (local.get $$add83) + (local.get $$add84) + ) + ) + (local.set $$p$2$p$0 + (if (result i32) + (local.get $$cmp85) + (local.get $$p$2$lcssa) + (local.get $$p$0$lcssa180) + ) + ) + (local.set $$ip$2$ip$0 + (if (result i32) + (local.get $$cmp85) + (local.get $$ip$2$lcssa) + (local.get $$ip$0$lcssa179) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$n) + (local.get $$p$2$p$0) + ) + ) + (local.set $$add90 + (i32.add + (local.get $$ip$2$ip$0) + (i32.const 1) + ) + ) + (local.set $$call + (call $_memcmp + (local.get $$n) + (local.get $$add$ptr) + (local.get $$add90) + ) + ) + (local.set $$tobool91 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool91) + (block + (local.set $$sub101 + (i32.sub + (local.get $$l$0$lcssa176178) + (local.get $$p$2$p$0) + ) + ) + (local.set $$mem0$0 + (local.get $$sub101) + ) + (local.set $$p$5 + (local.get $$p$2$p$0) + ) + (local.set $$sub148$pre$phiZ2D + (local.get $$sub101) + ) + ) + (block + (local.set $$sub93 + (i32.sub + (local.get $$l$0$lcssa176178) + (local.get $$ip$2$ip$0) + ) + ) + (local.set $$sub94 + (i32.add + (local.get $$sub93) + (i32.const -1) + ) + ) + (local.set $$cmp95 + (i32.gt_u + (local.get $$ip$2$ip$0) + (local.get $$sub94) + ) + ) + (local.set $$ip$2$ip$0$sub94 + (if (result i32) + (local.get $$cmp95) + (local.get $$ip$2$ip$0) + (local.get $$sub94) + ) + ) + (local.set $$add99 + (i32.add + (local.get $$ip$2$ip$0$sub94) + (i32.const 1) + ) + ) + (local.set $$$pre + (i32.sub + (local.get $$l$0$lcssa176178) + (local.get $$add99) + ) + ) + (local.set $$mem0$0 + (i32.const 0) + ) + (local.set $$p$5 + (local.get $$add99) + ) + (local.set $$sub148$pre$phiZ2D + (local.get $$$pre) + ) + ) + ) + (local.set $$or107 + (i32.or + (local.get $$l$0$lcssa176178) + (i32.const 63) + ) + ) + (local.set $$sub123 + (i32.add + (local.get $$l$0$lcssa176178) + (i32.const -1) + ) + ) + (local.set $$tobool142 + (i32.ne + (local.get $$mem0$0) + (i32.const 0) + ) + ) + (local.set $$h$addr$0 + (local.get $$h) + ) + (local.set $$mem$0 + (i32.const 0) + ) + (local.set $$z$0 + (local.get $$h) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$sub$ptr$lhs$cast + (local.get $$z$0) + ) + (local.set $$sub$ptr$rhs$cast + (local.get $$h$addr$0) + ) + (local.set $$sub$ptr$sub + (i32.sub + (local.get $$sub$ptr$lhs$cast) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (local.set $$cmp104 + (i32.lt_u + (local.get $$sub$ptr$sub) + (local.get $$l$0$lcssa176178) + ) + ) + (block $do-once10 + (if + (local.get $$cmp104) + (block + (local.set $$call108 + (call $_memchr + (local.get $$z$0) + (i32.const 0) + (local.get $$or107) + ) + ) + (local.set $$tobool109 + (i32.eq + (local.get $$call108) + (i32.const 0) + ) + ) + (if + (local.get $$tobool109) + (block + (local.set $$add$ptr119 + (i32.add + (local.get $$z$0) + (local.get $$or107) + ) + ) + (local.set $$z$3 + (local.get $$add$ptr119) + ) + (br $do-once10) + ) + (block + (local.set $$sub$ptr$lhs$cast111 + (local.get $$call108) + ) + (local.set $$sub$ptr$sub113 + (i32.sub + (local.get $$sub$ptr$lhs$cast111) + (local.get $$sub$ptr$rhs$cast) + ) + ) + (local.set $$cmp114 + (i32.lt_u + (local.get $$sub$ptr$sub113) + (local.get $$l$0$lcssa176178) + ) + ) + (if + (local.get $$cmp114) + (block + (local.set $$retval$3 + (i32.const 0) + ) + (br $label$break$L34) + ) + (block + (local.set $$z$3 + (local.get $$call108) + ) + (br $do-once10) + ) + ) + ) + ) + ) + (local.set $$z$3 + (local.get $$z$0) + ) + ) + ) + (local.set $$arrayidx124 + (i32.add + (local.get $$h$addr$0) + (local.get $$sub123) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$arrayidx124) + ) + ) + (local.set $$conv125 + (i32.and + (local.get $$9) + (i32.const 255) + ) + ) + (local.set $$div126 + (i32.shr_u + (local.get $$conv125) + (i32.const 5) + ) + ) + (local.set $$arrayidx127 + (i32.add + (local.get $$byteset) + (i32.shl + (local.get $$div126) + (i32.const 2) + ) + ) + ) + (local.set $$10 + (i32.load + (local.get $$arrayidx127) + ) + ) + (local.set $$rem131 + (i32.and + (local.get $$conv125) + (i32.const 31) + ) + ) + (local.set $$shl132 + (i32.shl + (i32.const 1) + (local.get $$rem131) + ) + ) + (local.set $$and + (i32.and + (local.get $$shl132) + (local.get $$10) + ) + ) + (local.set $$tobool133 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (block $label$break$L48 + (if + (local.get $$tobool133) + (block + (local.set $$k$4$sink + (local.get $$l$0$lcssa176178) + ) + (local.set $$mem$0$be + (i32.const 0) + ) + ) + (block + (local.set $$arrayidx138 + (i32.add + (local.get $$shift) + (i32.shl + (local.get $$conv125) + (i32.const 2) + ) + ) + ) + (local.set $$11 + (i32.load + (local.get $$arrayidx138) + ) + ) + (local.set $$sub139 + (i32.sub + (local.get $$l$0$lcssa176178) + (local.get $$11) + ) + ) + (local.set $$tobool140 + (i32.eq + (local.get $$sub139) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool140) + ) + (block + (local.set $$tobool143 + (i32.ne + (local.get $$mem$0) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$tobool142) + (local.get $$tobool143) + ) + ) + (local.set $$cmp145 + (i32.lt_u + (local.get $$sub139) + (local.get $$p$5) + ) + ) + (local.set $$or$cond140 + (i32.and + (local.get $$or$cond) + (local.get $$cmp145) + ) + ) + (local.set $$k$4 + (if (result i32) + (local.get $$or$cond140) + (local.get $$sub148$pre$phiZ2D) + (local.get $$sub139) + ) + ) + (local.set $$k$4$sink + (local.get $$k$4) + ) + (local.set $$mem$0$be + (i32.const 0) + ) + (br $label$break$L48) + ) + ) + (local.set $$cmp156 + (i32.gt_u + (local.get $$add90) + (local.get $$mem$0) + ) + ) + (local.set $$cond162 + (if (result i32) + (local.get $$cmp156) + (local.get $$add90) + (local.get $$mem$0) + ) + ) + (local.set $$arrayidx164146 + (i32.add + (local.get $$n) + (local.get $$cond162) + ) + ) + (local.set $$12 + (i32.load8_s + (local.get $$arrayidx164146) + ) + ) + (local.set $$tobool166147 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$12) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (block $label$break$L53 + (if + (i32.eqz + (local.get $$tobool166147) + ) + (block + (local.set $$14 + (local.get $$12) + ) + (local.set $$k$5148 + (local.get $$cond162) + ) + (loop $while-in15 + (block $while-out14 + (local.set $$arrayidx170 + (i32.add + (local.get $$h$addr$0) + (local.get $$k$5148) + ) + ) + (local.set $$13 + (i32.load8_s + (local.get $$arrayidx170) + ) + ) + (local.set $$cmp172 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$14) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$13) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp172) + ) + (br $while-out14) + ) + (local.set $$inc177 + (i32.add + (local.get $$k$5148) + (i32.const 1) + ) + ) + (local.set $$arrayidx164 + (i32.add + (local.get $$n) + (local.get $$inc177) + ) + ) + (local.set $$15 + (i32.load8_s + (local.get $$arrayidx164) + ) + ) + (local.set $$tobool166 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$15) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool166) + (br $label$break$L53) + (block + (local.set $$14 + (local.get $$15) + ) + (local.set $$k$5148 + (local.get $$inc177) + ) + ) + ) + (br $while-in15) + ) + ) + (local.set $$sub182 + (i32.sub + (local.get $$k$5148) + (local.get $$ip$2$ip$0) + ) + ) + (local.set $$k$4$sink + (local.get $$sub182) + ) + (local.set $$mem$0$be + (i32.const 0) + ) + (br $label$break$L48) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp156) + ) + (block + (local.set $$retval$3 + (local.get $$h$addr$0) + ) + (br $label$break$L34) + ) + ) + (local.set $$k$6150 + (local.get $$add90) + ) + (loop $while-in17 + (block $while-out16 + (local.set $$sub190 + (i32.add + (local.get $$k$6150) + (i32.const -1) + ) + ) + (local.set $$arrayidx191 + (i32.add + (local.get $$n) + (local.get $$sub190) + ) + ) + (local.set $$16 + (i32.load8_s + (local.get $$arrayidx191) + ) + ) + (local.set $$arrayidx194 + (i32.add + (local.get $$h$addr$0) + (local.get $$sub190) + ) + ) + (local.set $$17 + (i32.load8_s + (local.get $$arrayidx194) + ) + ) + (local.set $$cmp196 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$16) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$17) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp196) + ) + (block + (local.set $$k$4$sink + (local.get $$p$5) + ) + (local.set $$mem$0$be + (local.get $$mem0$0) + ) + (br $label$break$L48) + ) + ) + (local.set $$cmp187 + (i32.gt_u + (local.get $$sub190) + (local.get $$mem$0) + ) + ) + (if + (local.get $$cmp187) + (local.set $$k$6150 + (local.get $$sub190) + ) + (block + (local.set $$retval$3 + (local.get $$h$addr$0) + ) + (br $label$break$L34) + ) + ) + (br $while-in17) + ) + ) + ) + ) + ) + (local.set $$add$ptr150 + (i32.add + (local.get $$h$addr$0) + (local.get $$k$4$sink) + ) + ) + (local.set $$h$addr$0 + (local.get $$add$ptr150) + ) + (local.set $$mem$0 + (local.get $$mem$0$be) + ) + (local.set $$z$0 + (local.get $$z$3) + ) + (br $while-in9) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$3) + ) + ) + (func $_strrchr (; 630 ;) (param $$s i32) (param $$c i32) (result i32) + (local $$add i32) + (local $$call i32) + (local $$call1 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strlen + (local.get $$s) + ) + ) + (local.set $$add + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$call1 + (call $___memrchr + (local.get $$s) + (local.get $$c) + (local.get $$add) + ) + ) + (return + (local.get $$call1) + ) + ) + (func $___memrchr (; 631 ;) (param $$m i32) (param $$c i32) (param $$n i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$arrayidx i32) + (local $$arrayidx$le i32) + (local $$cmp i32) + (local $$dec8 i32) + (local $$dec8$in i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$tobool7 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$tobool7 + (i32.eq + (local.get $$n) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool7) + (local.set $$retval$0 + (i32.const 0) + ) + (block + (local.set $$0 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$dec8$in + (local.get $$n) + ) + (loop $while-in + (block $while-out + (local.set $$dec8 + (i32.add + (local.get $$dec8$in) + (i32.const -1) + ) + ) + (local.set $$arrayidx + (i32.add + (local.get $$m) + (local.get $$dec8) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx) + ) + ) + (local.set $$cmp + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (local.get $$cmp) + (br $while-out) + ) + (local.set $$tobool + (i32.eq + (local.get $$dec8) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (br $label$break$L1) + ) + (local.set $$dec8$in + (local.get $$dec8) + ) + ) + (br $while-in) + ) + ) + (local.set $$arrayidx$le + (i32.add + (local.get $$m) + (local.get $$dec8) + ) + ) + (local.set $$retval$0 + (local.get $$arrayidx$le) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_srand (; 632 ;) (param $$s i32) + (local $$conv i64) + (local $$seed i64) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$seed + (i64.const 0) + ) + (local.set $$sub + (i32.add + (local.get $$s) + (i32.const -1) + ) + ) + (local.set $$conv + (i64.extend_i32_u + (local.get $$sub) + ) + ) + (local.set $$seed + (local.get $$conv) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return) + ) + (func $_strcat (; 633 ;) (param $$dest i32) (param $$src i32) (result i32) + (local $$add$ptr i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strlen + (local.get $$dest) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$dest) + (local.get $$call) + ) + ) + (drop + (call $_strcpy + (local.get $$add$ptr) + (local.get $$src) + ) + ) + (return + (local.get $$dest) + ) + ) + (func $_fputc (; 634 ;) (param $$c i32) (param $$f i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$call i32) + (local $$call10 i32) + (local $$call28 i32) + (local $$cmp i32) + (local $$cmp15 i32) + (local $$cmp20 i32) + (local $$cmp3 i32) + (local $$cmp5 i32) + (local $$cond30 i32) + (local $$conv i32) + (local $$conv1 i32) + (local $$conv11 i32) + (local $$conv12 i32) + (local $$conv14 i32) + (local $$conv2 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr25 i32) + (local $$lbf i32) + (local $$lbf13 i32) + (local $$lock i32) + (local $$retval$0 i32) + (local $$tobool i32) + (local $$wend i32) + (local $$wend19 i32) + (local $$wpos i32) + (local $$wpos18 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$lock + (i32.add + (local.get $$f) + (i32.const 76) + ) + ) + (local.set $$0 + (i32.load + (local.get $$lock) + ) + ) + (local.set $$cmp + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $label + (i32.const 3) + ) + (block + (local.set $$call + (call $___lockfile + (local.get $$f) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $label + (i32.const 3) + ) + (block + (local.set $$conv11 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$conv12 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$lbf13 + (i32.add + (local.get $$f) + (i32.const 75) + ) + ) + (local.set $$4 + (i32.load8_s + (local.get $$lbf13) + ) + ) + (local.set $$conv14 + (i32.shr_s + (i32.shl + (local.get $$4) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$cmp15 + (i32.eq + (local.get $$conv12) + (local.get $$conv14) + ) + ) + (if + (local.get $$cmp15) + (local.set $label + (i32.const 10) + ) + (block + (local.set $$wpos18 + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$5 + (i32.load + (local.get $$wpos18) + ) + ) + (local.set $$wend19 + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (local.set $$6 + (i32.load + (local.get $$wend19) + ) + ) + (local.set $$cmp20 + (i32.lt_u + (local.get $$5) + (local.get $$6) + ) + ) + (if + (local.get $$cmp20) + (block + (local.set $$incdec$ptr25 + (i32.add + (local.get $$5) + (i32.const 1) + ) + ) + (i32.store + (local.get $$wpos18) + (local.get $$incdec$ptr25) + ) + (i32.store8 + (local.get $$5) + (local.get $$conv11) + ) + (local.set $$cond30 + (local.get $$conv12) + ) + ) + (local.set $label + (i32.const 10) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 10) + ) + (block + (local.set $$call28 + (call $___overflow + (local.get $$f) + (local.get $$c) + ) + ) + (local.set $$cond30 + (local.get $$call28) + ) + ) + ) + (call $___unlockfile + (local.get $$f) + ) + (local.set $$retval$0 + (local.get $$cond30) + ) + ) + ) + ) + ) + (block $do-once + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (block + (local.set $$conv + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$conv1 + (i32.and + (local.get $$c) + (i32.const 255) + ) + ) + (local.set $$lbf + (i32.add + (local.get $$f) + (i32.const 75) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$lbf) + ) + ) + (local.set $$conv2 + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$cmp3 + (i32.eq + (local.get $$conv1) + (local.get $$conv2) + ) + ) + (if + (i32.eqz + (local.get $$cmp3) + ) + (block + (local.set $$wpos + (i32.add + (local.get $$f) + (i32.const 20) + ) + ) + (local.set $$2 + (i32.load + (local.get $$wpos) + ) + ) + (local.set $$wend + (i32.add + (local.get $$f) + (i32.const 16) + ) + ) + (local.set $$3 + (i32.load + (local.get $$wend) + ) + ) + (local.set $$cmp5 + (i32.lt_u + (local.get $$2) + (local.get $$3) + ) + ) + (if + (local.get $$cmp5) + (block + (local.set $$incdec$ptr + (i32.add + (local.get $$2) + (i32.const 1) + ) + ) + (i32.store + (local.get $$wpos) + (local.get $$incdec$ptr) + ) + (i32.store8 + (local.get $$2) + (local.get $$conv) + ) + (local.set $$retval$0 + (local.get $$conv1) + ) + (br $do-once) + ) + ) + ) + ) + (local.set $$call10 + (call $___overflow + (local.get $$f) + (local.get $$c) + ) + ) + (local.set $$retval$0 + (local.get $$call10) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_vprintf (; 635 ;) (param $$fmt i32) (param $$ap i32) (result i32) + (local $$0 i32) + (local $$call i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.load + (i32.const 8012) + ) + ) + (local.set $$call + (call $_vfprintf + (local.get $$0) + (local.get $$fmt) + (local.get $$ap) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_strcspn (; 636 ;) (param $$s i32) (param $$c i32) (result i32) + (local $$0 i32) + (local $$1 i32) + (local $$2 i32) + (local $$3 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$and i32) + (local $$arrayidx1 i32) + (local $$arrayidx16 i32) + (local $$arrayidx8 i32) + (local $$byteset i32) + (local $$c$addr$019 i32) + (local $$call i32) + (local $$conv i32) + (local $$conv14 i32) + (local $$conv6 i32) + (local $$div i32) + (local $$div15 i32) + (local $$incdec$ptr i32) + (local $$incdec$ptr24 i32) + (local $$or i32) + (local $$rem i32) + (local $$rem18 i32) + (local $$s$addr$0$lcssa$sink i32) + (local $$s$addr$016 i32) + (local $$shl i32) + (local $$shl19 i32) + (local $$sub$ptr$lhs$cast26 i32) + (local $$sub$ptr$rhs$cast27 i32) + (local $$sub$ptr$sub28 i32) + (local $$tobool i32) + (local $$tobool12 i32) + (local $$tobool1215 i32) + (local $$tobool2 i32) + (local $$tobool20 i32) + (local $$tobool5 i32) + (local $$tobool518 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $$byteset + (local.get $sp_a) + ) + (local.set $$0 + (i32.load8_s + (local.get $$c) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool) + (local.set $label + (i32.const 3) + ) + (block + (local.set $$arrayidx1 + (i32.add + (local.get $$c) + (i32.const 1) + ) + ) + (local.set $$1 + (i32.load8_s + (local.get $$arrayidx1) + ) + ) + (local.set $$tobool2 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (local.set $label + (i32.const 3) + ) + (block + (drop + (call $_memset + (local.get $$byteset) + (i32.const 0) + (i32.const 32) + ) + ) + (local.set $$2 + (i32.load8_s + (local.get $$c) + ) + ) + (local.set $$tobool518 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$2) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool518) + ) + (block + (local.set $$3 + (local.get $$2) + ) + (local.set $$c$addr$019 + (local.get $$c) + ) + (loop $while-in + (block $while-out + (local.set $$conv6 + (i32.and + (local.get $$3) + (i32.const 255) + ) + ) + (local.set $$rem + (i32.and + (local.get $$conv6) + (i32.const 31) + ) + ) + (local.set $$shl + (i32.shl + (i32.const 1) + (local.get $$rem) + ) + ) + (local.set $$div + (i32.shr_u + (local.get $$conv6) + (i32.const 5) + ) + ) + (local.set $$arrayidx8 + (i32.add + (local.get $$byteset) + (i32.shl + (local.get $$div) + (i32.const 2) + ) + ) + ) + (local.set $$4 + (i32.load + (local.get $$arrayidx8) + ) + ) + (local.set $$or + (i32.or + (local.get $$4) + (local.get $$shl) + ) + ) + (i32.store + (local.get $$arrayidx8) + (local.get $$or) + ) + (local.set $$incdec$ptr + (i32.add + (local.get $$c$addr$019) + (i32.const 1) + ) + ) + (local.set $$5 + (i32.load8_s + (local.get $$incdec$ptr) + ) + ) + (local.set $$tobool5 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$5) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool5) + (br $while-out) + (block + (local.set $$3 + (local.get $$5) + ) + (local.set $$c$addr$019 + (local.get $$incdec$ptr) + ) + ) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $$6 + (i32.load8_s + (local.get $$s) + ) + ) + (local.set $$tobool1215 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$6) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool1215) + (local.set $$s$addr$0$lcssa$sink + (local.get $$s) + ) + (block + (local.set $$7 + (local.get $$6) + ) + (local.set $$s$addr$016 + (local.get $$s) + ) + (loop $while-in1 + (block $while-out0 + (local.set $$conv14 + (i32.and + (local.get $$7) + (i32.const 255) + ) + ) + (local.set $$div15 + (i32.shr_u + (local.get $$conv14) + (i32.const 5) + ) + ) + (local.set $$arrayidx16 + (i32.add + (local.get $$byteset) + (i32.shl + (local.get $$div15) + (i32.const 2) + ) + ) + ) + (local.set $$8 + (i32.load + (local.get $$arrayidx16) + ) + ) + (local.set $$rem18 + (i32.and + (local.get $$conv14) + (i32.const 31) + ) + ) + (local.set $$shl19 + (i32.shl + (i32.const 1) + (local.get $$rem18) + ) + ) + (local.set $$and + (i32.and + (local.get $$8) + (local.get $$shl19) + ) + ) + (local.set $$tobool20 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool20) + ) + (block + (local.set $$s$addr$0$lcssa$sink + (local.get $$s$addr$016) + ) + (br $label$break$L1) + ) + ) + (local.set $$incdec$ptr24 + (i32.add + (local.get $$s$addr$016) + (i32.const 1) + ) + ) + (local.set $$9 + (i32.load8_s + (local.get $$incdec$ptr24) + ) + ) + (local.set $$tobool12 + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$9) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (if + (local.get $$tobool12) + (block + (local.set $$s$addr$0$lcssa$sink + (local.get $$incdec$ptr24) + ) + (br $while-out0) + ) + (block + (local.set $$7 + (local.get $$9) + ) + (local.set $$s$addr$016 + (local.get $$incdec$ptr24) + ) + ) + ) + (br $while-in1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (block + (local.set $$conv + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (local.set $$call + (call $___strchrnul + (local.get $$s) + (local.get $$conv) + ) + ) + (local.set $$s$addr$0$lcssa$sink + (local.get $$call) + ) + ) + ) + (local.set $$sub$ptr$lhs$cast26 + (local.get $$s$addr$0$lcssa$sink) + ) + (local.set $$sub$ptr$rhs$cast27 + (local.get $$s) + ) + (local.set $$sub$ptr$sub28 + (i32.sub + (local.get $$sub$ptr$lhs$cast26) + (local.get $$sub$ptr$rhs$cast27) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$sub$ptr$sub28) + ) + ) + (func $_strpbrk (; 637 ;) (param $$s i32) (param $$b i32) (result i32) + (local $$0 i32) + (local $$add$ptr i32) + (local $$call i32) + (local $$cond i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strcspn + (local.get $$s) + (local.get $$b) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$s) + (local.get $$call) + ) + ) + (local.set $$0 + (i32.load8_s + (local.get $$add$ptr) + ) + ) + (local.set $$tobool + (i32.eq + (i32.shr_s + (i32.shl + (local.get $$0) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$tobool) + (i32.const 0) + (local.get $$add$ptr) + ) + ) + (return + (local.get $$cond) + ) + ) + (func $_cosf (; 638 ;) (param $$x f32) (result f32) + (local $$0 i32) + (local $$1 f64) + (local $$2 f64) + (local $$3 f64) + (local $$4 f64) + (local $$add17 f64) + (local $$and i32) + (local $$call f32) + (local $$call12 f32) + (local $$call18 f32) + (local $$call22 f32) + (local $$call39 f32) + (local $$call46 f32) + (local $$call50 f32) + (local $$call57 i32) + (local $$call59 f32) + (local $$call62 f32) + (local $$call64 f32) + (local $$call66 f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp24 i32) + (local $$cmp27 i32) + (local $$cmp4 i32) + (local $$cmp52 i32) + (local $$cmp7 i32) + (local $$cond f64) + (local $$cond$v f64) + (local $$cond38 f64) + (local $$cond38$v f64) + (local $$conv f64) + (local $$conv10 f64) + (local $$conv32 f64) + (local $$conv44 f64) + (local $$conv48 f64) + (local $$retval$0 f32) + (local $$shr i32) + (local $$sub13 f32) + (local $$sub21 f64) + (local $$sub43 f32) + (local $$sub45 f64) + (local $$sub49 f64) + (local $$sub55 f32) + (local $$sub61 f64) + (local $$sub65 f32) + (local $$tobool i32) + (local $$tobool30 i32) + (local $$trunc i32) + (local $$trunc$clear i32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$y + (local.get $sp_a) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$0) + (i32.const 31) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$and) + (i32.const 1061752795) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp) + (block + (local.set $$cmp1 + (i32.lt_u + (local.get $$and) + (i32.const 964689920) + ) + ) + (if + (local.get $$cmp1) + (local.set $$retval$0 + (f32.const 1) + ) + (block + (local.set $$conv + (f64.promote_f32 + (local.get $$x) + ) + ) + (local.set $$call + (call $___cosdf + (local.get $$conv) + ) + ) + (local.set $$retval$0 + (local.get $$call) + ) + ) + ) + ) + (block + (local.set $$cmp4 + (i32.lt_u + (local.get $$and) + (i32.const 1081824210) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$cmp7 + (i32.gt_u + (local.get $$and) + (i32.const 1075235811) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$conv10 + (f64.promote_f32 + (local.get $$x) + ) + ) + (if + (local.get $$cmp7) + (block + (local.set $$cond$v + (if (result f64) + (local.get $$tobool) + (f64.const 3.141592653589793) + (f64.const -3.141592653589793) + ) + ) + (local.set $$cond + (f64.add + (local.get $$cond$v) + (local.get $$conv10) + ) + ) + (local.set $$call12 + (call $___cosdf + (local.get $$cond) + ) + ) + (local.set $$sub13 + (f32.neg + (local.get $$call12) + ) + ) + (local.set $$retval$0 + (local.get $$sub13) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$add17 + (f64.add + (local.get $$conv10) + (f64.const 1.5707963267948966) + ) + ) + (local.set $$call18 + (call $___sindf + (local.get $$add17) + ) + ) + (local.set $$retval$0 + (local.get $$call18) + ) + (br $label$break$L1) + ) + (block + (local.set $$sub21 + (f64.sub + (f64.const 1.5707963267948966) + (local.get $$conv10) + ) + ) + (local.set $$call22 + (call $___sindf + (local.get $$sub21) + ) + ) + (local.set $$retval$0 + (local.get $$call22) + ) + (br $label$break$L1) + ) + ) + ) + ) + (local.set $$cmp24 + (i32.lt_u + (local.get $$and) + (i32.const 1088565718) + ) + ) + (if + (local.get $$cmp24) + (block + (local.set $$cmp27 + (i32.gt_u + (local.get $$and) + (i32.const 1085271519) + ) + ) + (local.set $$tobool30 + (i32.ne + (local.get $$shr) + (i32.const 0) + ) + ) + (if + (local.get $$cmp27) + (block + (local.set $$conv32 + (f64.promote_f32 + (local.get $$x) + ) + ) + (local.set $$cond38$v + (if (result f64) + (local.get $$tobool30) + (f64.const 6.283185307179586) + (f64.const -6.283185307179586) + ) + ) + (local.set $$cond38 + (f64.add + (local.get $$cond38$v) + (local.get $$conv32) + ) + ) + (local.set $$call39 + (call $___cosdf + (local.get $$cond38) + ) + ) + (local.set $$retval$0 + (local.get $$call39) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool30) + (block + (local.set $$sub43 + (f32.neg + (local.get $$x) + ) + ) + (local.set $$conv44 + (f64.promote_f32 + (local.get $$sub43) + ) + ) + (local.set $$sub45 + (f64.add + (local.get $$conv44) + (f64.const -4.71238898038469) + ) + ) + (local.set $$call46 + (call $___sindf + (local.get $$sub45) + ) + ) + (local.set $$retval$0 + (local.get $$call46) + ) + (br $label$break$L1) + ) + (block + (local.set $$conv48 + (f64.promote_f32 + (local.get $$x) + ) + ) + (local.set $$sub49 + (f64.add + (local.get $$conv48) + (f64.const -4.71238898038469) + ) + ) + (local.set $$call50 + (call $___sindf + (local.get $$sub49) + ) + ) + (local.set $$retval$0 + (local.get $$call50) + ) + (br $label$break$L1) + ) + ) + ) + ) + (local.set $$cmp52 + (i32.gt_u + (local.get $$and) + (i32.const 2139095039) + ) + ) + (if + (local.get $$cmp52) + (block + (local.set $$sub55 + (f32.sub + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$retval$0 + (local.get $$sub55) + ) + (br $label$break$L1) + ) + ) + (local.set $$call57 + (call $___rem_pio2f + (local.get $$x) + (local.get $$y) + ) + ) + (local.set $$trunc + (i32.and + (local.get $$call57) + (i32.const 255) + ) + ) + (local.set $$trunc$clear + (i32.and + (local.get $$trunc) + (i32.const 3) + ) + ) + (block $switch + (block $switch-default + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$1 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call59 + (call $___cosdf + (local.get $$1) + ) + ) + (local.set $$retval$0 + (local.get $$call59) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$2 + (f64.load + (local.get $$y) + ) + ) + (local.set $$sub61 + (f64.neg + (local.get $$2) + ) + ) + (local.set $$call62 + (call $___sindf + (local.get $$sub61) + ) + ) + (local.set $$retval$0 + (local.get $$call62) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$3 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call64 + (call $___cosdf + (local.get $$3) + ) + ) + (local.set $$sub65 + (f32.neg + (local.get $$call64) + ) + ) + (local.set $$retval$0 + (local.get $$sub65) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$4 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call66 + (call $___sindf + (local.get $$4) + ) + ) + (local.set $$retval$0 + (local.get $$call66) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_sinf (; 639 ;) (param $$x f32) (result f32) + (local $$0 i32) + (local $$1 f64) + (local $$2 f64) + (local $$3 f64) + (local $$4 f64) + (local $$add f64) + (local $$add35 f64) + (local $$and i32) + (local $$call f32) + (local $$call12 f32) + (local $$call15 f32) + (local $$call24 f32) + (local $$call36 f32) + (local $$call40 f32) + (local $$call52 f32) + (local $$call59 i32) + (local $$call61 f32) + (local $$call63 f32) + (local $$call66 f32) + (local $$call67 f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp26 i32) + (local $$cmp29 i32) + (local $$cmp4 i32) + (local $$cmp54 i32) + (local $$cmp7 i32) + (local $$cond f64) + (local $$cond$v f64) + (local $$cond$v$v f64) + (local $$cond51 f64) + (local $$cond51$v f64) + (local $$conv f64) + (local $$conv11 f64) + (local $$conv34 f64) + (local $$retval$0 f32) + (local $$shr i32) + (local $$sub f32) + (local $$sub14 f64) + (local $$sub39 f64) + (local $$sub41 f32) + (local $$sub57 f32) + (local $$sub65 f64) + (local $$sub68 f32) + (local $$tobool i32) + (local $$tobool32 i32) + (local $$trunc i32) + (local $$trunc$clear i32) + (local $$y i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$y + (local.get $sp_a) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$0) + (i32.const 31) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$and) + (i32.const 1061752795) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp) + (block + (local.set $$cmp1 + (i32.lt_u + (local.get $$and) + (i32.const 964689920) + ) + ) + (if + (local.get $$cmp1) + (local.set $$retval$0 + (local.get $$x) + ) + (block + (local.set $$conv + (f64.promote_f32 + (local.get $$x) + ) + ) + (local.set $$call + (call $___sindf + (local.get $$conv) + ) + ) + (local.set $$retval$0 + (local.get $$call) + ) + ) + ) + ) + (block + (local.set $$cmp4 + (i32.lt_u + (local.get $$and) + (i32.const 1081824210) + ) + ) + (if + (local.get $$cmp4) + (block + (local.set $$cmp7 + (i32.lt_u + (local.get $$and) + (i32.const 1075235812) + ) + ) + (local.set $$tobool + (i32.ne + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$conv11 + (f64.promote_f32 + (local.get $$x) + ) + ) + (if + (i32.eqz + (local.get $$cmp7) + ) + (block + (local.set $$cond$v$v + (if (result f64) + (local.get $$tobool) + (f64.const 3.141592653589793) + (f64.const -3.141592653589793) + ) + ) + (local.set $$cond$v + (f64.add + (local.get $$cond$v$v) + (local.get $$conv11) + ) + ) + (local.set $$cond + (f64.neg + (local.get $$cond$v) + ) + ) + (local.set $$call24 + (call $___sindf + (local.get $$cond) + ) + ) + (local.set $$retval$0 + (local.get $$call24) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$add + (f64.add + (local.get $$conv11) + (f64.const 1.5707963267948966) + ) + ) + (local.set $$call12 + (call $___cosdf + (local.get $$add) + ) + ) + (local.set $$sub + (f32.neg + (local.get $$call12) + ) + ) + (local.set $$retval$0 + (local.get $$sub) + ) + (br $label$break$L1) + ) + (block + (local.set $$sub14 + (f64.add + (local.get $$conv11) + (f64.const -1.5707963267948966) + ) + ) + (local.set $$call15 + (call $___cosdf + (local.get $$sub14) + ) + ) + (local.set $$retval$0 + (local.get $$call15) + ) + (br $label$break$L1) + ) + ) + ) + ) + (local.set $$cmp26 + (i32.lt_u + (local.get $$and) + (i32.const 1088565718) + ) + ) + (if + (local.get $$cmp26) + (block + (local.set $$cmp29 + (i32.lt_u + (local.get $$and) + (i32.const 1085271520) + ) + ) + (local.set $$tobool32 + (i32.ne + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$conv34 + (f64.promote_f32 + (local.get $$x) + ) + ) + (if + (i32.eqz + (local.get $$cmp29) + ) + (block + (local.set $$cond51$v + (if (result f64) + (local.get $$tobool32) + (f64.const 6.283185307179586) + (f64.const -6.283185307179586) + ) + ) + (local.set $$cond51 + (f64.add + (local.get $$cond51$v) + (local.get $$conv34) + ) + ) + (local.set $$call52 + (call $___sindf + (local.get $$cond51) + ) + ) + (local.set $$retval$0 + (local.get $$call52) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $$tobool32) + (block + (local.set $$add35 + (f64.add + (local.get $$conv34) + (f64.const 4.71238898038469) + ) + ) + (local.set $$call36 + (call $___cosdf + (local.get $$add35) + ) + ) + (local.set $$retval$0 + (local.get $$call36) + ) + (br $label$break$L1) + ) + (block + (local.set $$sub39 + (f64.add + (local.get $$conv34) + (f64.const -4.71238898038469) + ) + ) + (local.set $$call40 + (call $___cosdf + (local.get $$sub39) + ) + ) + (local.set $$sub41 + (f32.neg + (local.get $$call40) + ) + ) + (local.set $$retval$0 + (local.get $$sub41) + ) + (br $label$break$L1) + ) + ) + ) + ) + (local.set $$cmp54 + (i32.gt_u + (local.get $$and) + (i32.const 2139095039) + ) + ) + (if + (local.get $$cmp54) + (block + (local.set $$sub57 + (f32.sub + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$retval$0 + (local.get $$sub57) + ) + (br $label$break$L1) + ) + ) + (local.set $$call59 + (call $___rem_pio2f + (local.get $$x) + (local.get $$y) + ) + ) + (local.set $$trunc + (i32.and + (local.get $$call59) + (i32.const 255) + ) + ) + (local.set $$trunc$clear + (i32.and + (local.get $$trunc) + (i32.const 3) + ) + ) + (block $switch + (block $switch-default + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$1 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call61 + (call $___sindf + (local.get $$1) + ) + ) + (local.set $$retval$0 + (local.get $$call61) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$2 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call63 + (call $___cosdf + (local.get $$2) + ) + ) + (local.set $$retval$0 + (local.get $$call63) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$3 + (f64.load + (local.get $$y) + ) + ) + (local.set $$sub65 + (f64.neg + (local.get $$3) + ) + ) + (local.set $$call66 + (call $___sindf + (local.get $$sub65) + ) + ) + (local.set $$retval$0 + (local.get $$call66) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$4 + (f64.load + (local.get $$y) + ) + ) + (local.set $$call67 + (call $___cosdf + (local.get $$4) + ) + ) + (local.set $$sub68 + (f32.neg + (local.get $$call67) + ) + ) + (local.set $$retval$0 + (local.get $$sub68) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_acosf (; 640 ;) (param $$x f32) (result f32) + (local $$$ f32) + (local $$0 i32) + (local $$1 i32) + (local $$2 f32) + (local $$add f32) + (local $$add2$i f32) + (local $$add2$i38 f32) + (local $$add2$i46 f32) + (local $$add24 f32) + (local $$add46 f32) + (local $$add50 f32) + (local $$add51 f32) + (local $$add57$i f32) + (local $$add57$i41 f32) + (local $$add57$i49 f32) + (local $$add6$i f32) + (local $$add6$i36 f32) + (local $$add6$i44 f32) + (local $$and i32) + (local $$and39 i32) + (local $$call20 f32) + (local $$call30 f32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp6 i32) + (local $$cmp8 i32) + (local $$div f32) + (local $$div$i f32) + (local $$div$i42 f32) + (local $$div$i50 f32) + (local $$div47 f32) + (local $$mul f32) + (local $$mul$i f32) + (local $$mul$i35 f32) + (local $$mul$i43 f32) + (local $$mul1$i f32) + (local $$mul1$i37 f32) + (local $$mul1$i45 f32) + (local $$mul11 f32) + (local $$mul19 f32) + (local $$mul22 f32) + (local $$mul26 f32) + (local $$mul29 f32) + (local $$mul3$i f32) + (local $$mul3$i39 f32) + (local $$mul3$i47 f32) + (local $$mul4$i f32) + (local $$mul4$i40 f32) + (local $$mul4$i48 f32) + (local $$mul44 f32) + (local $$mul49 f32) + (local $$mul52 f32) + (local $$retval$0 f32) + (local $$sub f32) + (local $$sub12 f32) + (local $$sub13 f32) + (local $$sub14 f32) + (local $$sub23 f32) + (local $$sub25 f32) + (local $$sub28 f32) + (local $$sub45 f32) + (local $$tobool i32) + (local $$tobool17 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$and) + (i32.const 1065353215) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$cmp1 + (i32.eq + (local.get $$and) + (i32.const 1065353216) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$tobool + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (local.set $$$ + (if (result f32) + (local.get $$tobool) + (f32.const 3.141592502593994) + (f32.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$$) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$sub + (f32.sub + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$div + (f32.div + (f32.const 0) + (local.get $$sub) + ) + ) + (local.set $$retval$0 + (local.get $$div) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$cmp6 + (i32.lt_u + (local.get $$and) + (i32.const 1056964608) + ) + ) + (if + (local.get $$cmp6) + (block + (local.set $$cmp8 + (i32.lt_u + (local.get $$and) + (i32.const 847249409) + ) + ) + (if + (local.get $$cmp8) + (block + (local.set $$retval$0 + (f32.const 1.570796251296997) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$mul + (f32.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$mul$i + (f32.mul + (local.get $$mul) + (f32.const 0.008656363002955914) + ) + ) + (local.set $$add6$i + (f32.sub + (f32.const -0.04274342209100723) + (local.get $$mul$i) + ) + ) + (local.set $$mul1$i + (f32.mul + (local.get $$mul) + (local.get $$add6$i) + ) + ) + (local.set $$add2$i + (f32.add + (local.get $$mul1$i) + (f32.const 0.16666586697101593) + ) + ) + (local.set $$mul3$i + (f32.mul + (local.get $$mul) + (local.get $$add2$i) + ) + ) + (local.set $$mul4$i + (f32.mul + (local.get $$mul) + (f32.const 0.7066296339035034) + ) + ) + (local.set $$add57$i + (f32.sub + (f32.const 1) + (local.get $$mul4$i) + ) + ) + (local.set $$div$i + (f32.div + (local.get $$mul3$i) + (local.get $$add57$i) + ) + ) + (local.set $$mul11 + (f32.mul + (local.get $$div$i) + (local.get $$x) + ) + ) + (local.set $$sub12 + (f32.sub + (f32.const 7.549789415861596e-08) + (local.get $$mul11) + ) + ) + (local.set $$sub13 + (f32.sub + (local.get $$x) + (local.get $$sub12) + ) + ) + (local.set $$sub14 + (f32.sub + (f32.const 1.570796251296997) + (local.get $$sub13) + ) + ) + (local.set $$retval$0 + (local.get $$sub14) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$tobool17 + (i32.lt_s + (local.get $$0) + (i32.const 0) + ) + ) + (if + (local.get $$tobool17) + (block + (local.set $$add + (f32.add + (local.get $$x) + (f32.const 1) + ) + ) + (local.set $$mul19 + (f32.mul + (local.get $$add) + (f32.const 0.5) + ) + ) + (local.set $$call20 + (f32.sqrt + (local.get $$mul19) + ) + ) + (local.set $$mul$i43 + (f32.mul + (local.get $$mul19) + (f32.const 0.008656363002955914) + ) + ) + (local.set $$add6$i44 + (f32.sub + (f32.const -0.04274342209100723) + (local.get $$mul$i43) + ) + ) + (local.set $$mul1$i45 + (f32.mul + (local.get $$mul19) + (local.get $$add6$i44) + ) + ) + (local.set $$add2$i46 + (f32.add + (local.get $$mul1$i45) + (f32.const 0.16666586697101593) + ) + ) + (local.set $$mul3$i47 + (f32.mul + (local.get $$mul19) + (local.get $$add2$i46) + ) + ) + (local.set $$mul4$i48 + (f32.mul + (local.get $$mul19) + (f32.const 0.7066296339035034) + ) + ) + (local.set $$add57$i49 + (f32.sub + (f32.const 1) + (local.get $$mul4$i48) + ) + ) + (local.set $$div$i50 + (f32.div + (local.get $$mul3$i47) + (local.get $$add57$i49) + ) + ) + (local.set $$mul22 + (f32.mul + (local.get $$div$i50) + (local.get $$call20) + ) + ) + (local.set $$sub23 + (f32.add + (local.get $$mul22) + (f32.const -7.549789415861596e-08) + ) + ) + (local.set $$add24 + (f32.add + (local.get $$call20) + (local.get $$sub23) + ) + ) + (local.set $$sub25 + (f32.sub + (f32.const 1.570796251296997) + (local.get $$add24) + ) + ) + (local.set $$mul26 + (f32.mul + (local.get $$sub25) + (f32.const 2) + ) + ) + (local.set $$retval$0 + (local.get $$mul26) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$sub28 + (f32.sub + (f32.const 1) + (local.get $$x) + ) + ) + (local.set $$mul29 + (f32.mul + (local.get $$sub28) + (f32.const 0.5) + ) + ) + (local.set $$call30 + (f32.sqrt + (local.get $$mul29) + ) + ) + (local.set $$1 + (i32.reinterpret_f32 + (local.get $$call30) + ) + ) + (local.set $$and39 + (i32.and + (local.get $$1) + (i32.const -4096) + ) + ) + (local.set $$2 + (f32.reinterpret_i32 + (local.get $$and39) + ) + ) + (local.set $$mul44 + (f32.mul + (local.get $$2) + (local.get $$2) + ) + ) + (local.set $$sub45 + (f32.sub + (local.get $$mul29) + (local.get $$mul44) + ) + ) + (local.set $$add46 + (f32.add + (local.get $$call30) + (local.get $$2) + ) + ) + (local.set $$div47 + (f32.div + (local.get $$sub45) + (local.get $$add46) + ) + ) + (local.set $$mul$i35 + (f32.mul + (local.get $$mul29) + (f32.const 0.008656363002955914) + ) + ) + (local.set $$add6$i36 + (f32.sub + (f32.const -0.04274342209100723) + (local.get $$mul$i35) + ) + ) + (local.set $$mul1$i37 + (f32.mul + (local.get $$mul29) + (local.get $$add6$i36) + ) + ) + (local.set $$add2$i38 + (f32.add + (local.get $$mul1$i37) + (f32.const 0.16666586697101593) + ) + ) + (local.set $$mul3$i39 + (f32.mul + (local.get $$mul29) + (local.get $$add2$i38) + ) + ) + (local.set $$mul4$i40 + (f32.mul + (local.get $$mul29) + (f32.const 0.7066296339035034) + ) + ) + (local.set $$add57$i41 + (f32.sub + (f32.const 1) + (local.get $$mul4$i40) + ) + ) + (local.set $$div$i42 + (f32.div + (local.get $$mul3$i39) + (local.get $$add57$i41) + ) + ) + (local.set $$mul49 + (f32.mul + (local.get $$div$i42) + (local.get $$call30) + ) + ) + (local.set $$add50 + (f32.add + (local.get $$mul49) + (local.get $$div47) + ) + ) + (local.set $$add51 + (f32.add + (local.get $$add50) + (local.get $$2) + ) + ) + (local.set $$mul52 + (f32.mul + (local.get $$add51) + (f32.const 2) + ) + ) + (local.set $$retval$0 + (local.get $$mul52) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_atanf (; 641 ;) (param $$x f32) (result f32) + (local $$0 i32) + (local $$1 f32) + (local $$2 f32) + (local $$add36 f32) + (local $$add39 f32) + (local $$add48 f32) + (local $$add58 f32) + (local $$add60 f32) + (local $$add6345 f32) + (local $$add68 f32) + (local $$add72 f32) + (local $$and i32) + (local $$arrayidx i32) + (local $$arrayidx74 i32) + (local $$call28 f32) + (local $$cmp i32) + (local $$cmp17 i32) + (local $$cmp2 i32) + (local $$cmp20 i32) + (local $$cmp29 i32) + (local $$cmp32 i32) + (local $$cmp43 i32) + (local $$cmp65 i32) + (local $$cond f32) + (local $$cond83 f32) + (local $$div f32) + (local $$div40 f32) + (local $$div49 f32) + (local $$div51 f32) + (local $$id$0 i32) + (local $$mul f32) + (local $$mul47 f32) + (local $$mul55 f32) + (local $$mul56 f32) + (local $$mul57 f32) + (local $$mul59 f32) + (local $$mul61 f32) + (local $$mul62 f32) + (local $$mul64 f32) + (local $$mul69 f32) + (local $$mul73 f32) + (local $$retval$0 f32) + (local $$shr i32) + (local $$spec$select f32) + (local $$sub35 f32) + (local $$sub38 f32) + (local $$sub46 f32) + (local $$sub70 f32) + (local $$sub75 f32) + (local $$sub76 f32) + (local $$sub77 f32) + (local $$sub80 f32) + (local $$tobool i32) + (local $$tobool78 i32) + (local $$x$addr$0 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$0) + (i32.const 31) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$and) + (i32.const 1283457023) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$cmp2 + (i32.gt_u + (local.get $$and) + (i32.const 2139095040) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result f32) + (local.get $$tobool) + (f32.const 1.570796251296997) + (f32.const -1.570796251296997) + ) + ) + (local.set $$spec$select + (if (result f32) + (local.get $$cmp2) + (local.get $$x) + (local.get $$cond) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + (local.set $$cmp17 + (i32.lt_u + (local.get $$and) + (i32.const 1054867456) + ) + ) + (block $do-once + (if + (local.get $$cmp17) + (block + (local.set $$cmp20 + (i32.lt_u + (local.get $$and) + (i32.const 964689920) + ) + ) + (if + (local.get $$cmp20) + (block + (local.set $$retval$0 + (local.get $$x) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$id$0 + (i32.const -1) + ) + (local.set $$x$addr$0 + (local.get $$x) + ) + ) + ) + ) + (block + (local.set $$call28 + (f32.abs + (local.get $$x) + ) + ) + (local.set $$cmp29 + (i32.lt_u + (local.get $$and) + (i32.const 1066926080) + ) + ) + (if + (local.get $$cmp29) + (block + (local.set $$cmp32 + (i32.lt_u + (local.get $$and) + (i32.const 1060110336) + ) + ) + (if + (local.get $$cmp32) + (block + (local.set $$mul + (f32.mul + (local.get $$call28) + (f32.const 2) + ) + ) + (local.set $$sub35 + (f32.add + (local.get $$mul) + (f32.const -1) + ) + ) + (local.set $$add36 + (f32.add + (local.get $$call28) + (f32.const 2) + ) + ) + (local.set $$div + (f32.div + (local.get $$sub35) + (local.get $$add36) + ) + ) + (local.set $$id$0 + (i32.const 0) + ) + (local.set $$x$addr$0 + (local.get $$div) + ) + (br $do-once) + ) + (block + (local.set $$sub38 + (f32.add + (local.get $$call28) + (f32.const -1) + ) + ) + (local.set $$add39 + (f32.add + (local.get $$call28) + (f32.const 1) + ) + ) + (local.set $$div40 + (f32.div + (local.get $$sub38) + (local.get $$add39) + ) + ) + (local.set $$id$0 + (i32.const 1) + ) + (local.set $$x$addr$0 + (local.get $$div40) + ) + (br $do-once) + ) + ) + ) + (block + (local.set $$cmp43 + (i32.lt_u + (local.get $$and) + (i32.const 1075576832) + ) + ) + (if + (local.get $$cmp43) + (block + (local.set $$sub46 + (f32.add + (local.get $$call28) + (f32.const -1.5) + ) + ) + (local.set $$mul47 + (f32.mul + (local.get $$call28) + (f32.const 1.5) + ) + ) + (local.set $$add48 + (f32.add + (local.get $$mul47) + (f32.const 1) + ) + ) + (local.set $$div49 + (f32.div + (local.get $$sub46) + (local.get $$add48) + ) + ) + (local.set $$id$0 + (i32.const 2) + ) + (local.set $$x$addr$0 + (local.get $$div49) + ) + (br $do-once) + ) + (block + (local.set $$div51 + (f32.div + (f32.const -1) + (local.get $$call28) + ) + ) + (local.set $$id$0 + (i32.const 3) + ) + (local.set $$x$addr$0 + (local.get $$div51) + ) + (br $do-once) + ) + ) + ) + ) + ) + ) + ) + (local.set $$mul55 + (f32.mul + (local.get $$x$addr$0) + (local.get $$x$addr$0) + ) + ) + (local.set $$mul56 + (f32.mul + (local.get $$mul55) + (local.get $$mul55) + ) + ) + (local.set $$mul57 + (f32.mul + (local.get $$mul56) + (f32.const 0.06168760731816292) + ) + ) + (local.set $$add58 + (f32.add + (local.get $$mul57) + (f32.const 0.14253635704517365) + ) + ) + (local.set $$mul59 + (f32.mul + (local.get $$mul56) + (local.get $$add58) + ) + ) + (local.set $$add60 + (f32.add + (local.get $$mul59) + (f32.const 0.333333283662796) + ) + ) + (local.set $$mul61 + (f32.mul + (local.get $$mul55) + (local.get $$add60) + ) + ) + (local.set $$mul62 + (f32.mul + (local.get $$mul56) + (f32.const 0.106480173766613) + ) + ) + (local.set $$add6345 + (f32.sub + (f32.const -0.19999158382415771) + (local.get $$mul62) + ) + ) + (local.set $$mul64 + (f32.mul + (local.get $$mul56) + (local.get $$add6345) + ) + ) + (local.set $$cmp65 + (i32.lt_s + (local.get $$id$0) + (i32.const 0) + ) + ) + (if + (local.get $$cmp65) + (block + (local.set $$add68 + (f32.add + (local.get $$mul64) + (local.get $$mul61) + ) + ) + (local.set $$mul69 + (f32.mul + (local.get $$x$addr$0) + (local.get $$add68) + ) + ) + (local.set $$sub70 + (f32.sub + (local.get $$x$addr$0) + (local.get $$mul69) + ) + ) + (local.set $$retval$0 + (local.get $$sub70) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$arrayidx + (i32.add + (i32.const 7632) + (i32.shl + (local.get $$id$0) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (f32.load + (local.get $$arrayidx) + ) + ) + (local.set $$add72 + (f32.add + (local.get $$mul64) + (local.get $$mul61) + ) + ) + (local.set $$mul73 + (f32.mul + (local.get $$x$addr$0) + (local.get $$add72) + ) + ) + (local.set $$arrayidx74 + (i32.add + (i32.const 7648) + (i32.shl + (local.get $$id$0) + (i32.const 2) + ) + ) + ) + (local.set $$2 + (f32.load + (local.get $$arrayidx74) + ) + ) + (local.set $$sub75 + (f32.sub + (local.get $$mul73) + (local.get $$2) + ) + ) + (local.set $$sub76 + (f32.sub + (local.get $$sub75) + (local.get $$x$addr$0) + ) + ) + (local.set $$sub77 + (f32.sub + (local.get $$1) + (local.get $$sub76) + ) + ) + (local.set $$tobool78 + (i32.eq + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$sub80 + (f32.neg + (local.get $$sub77) + ) + ) + (local.set $$cond83 + (if (result f32) + (local.get $$tobool78) + (local.get $$sub77) + (local.get $$sub80) + ) + ) + (local.set $$retval$0 + (local.get $$cond83) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (func $_atan2f (; 642 ;) (param $$y f32) (param $$x f32) (result f32) + (local $$0 i32) + (local $$add f32) + (local $$add73 i32) + (local $$add86 i32) + (local $$and i32) + (local $$and13 i32) + (local $$and41 i32) + (local $$call37 f32) + (local $$call91 f32) + (local $$call92 f32) + (local $$cmp i32) + (local $$cmp14 i32) + (local $$cmp34 i32) + (local $$cmp44 i32) + (local $$cmp58 i32) + (local $$cmp74 i32) + (local $$cmp77 i32) + (local $$cmp87 i32) + (local $$cond f32) + (local $$cond82 f32) + (local $$div f32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond40 i32) + (local $$retval$0 f32) + (local $$shr i32) + (local $$shr40 i32) + (local $$sub f32) + (local $$sub100 f32) + (local $$sub97 f32) + (local $$sub98 f32) + (local $$sub99 f32) + (local $$switch$split2D i32) + (local $$tobool i32) + (local $$tobool81 i32) + (local $$tobool85 i32) + (local $$trunc i32) + (local $$trunc$clear i32) + (local $$trunc35 i32) + (local $$trunc35$clear i32) + (local $$trunc35$clear1 i32) + (local $$trunc36 i32) + (local $$trunc36$clear i32) + (local $$trunc41 i32) + (local $$trunc41$clear i32) + (local $$z$0 f32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$trunc41 + (i32.reinterpret_f32 + (local.get $$x) + ) + ) + (local.set $$and + (i32.and + (local.get $$trunc41) + (i32.const 2147483647) + ) + ) + (local.set $$cmp + (i32.gt_u + (local.get $$and) + (i32.const 2139095040) + ) + ) + (block $label$break$L1 + (if + (local.get $$cmp) + (local.set $label + (i32.const 3) + ) + (block + (local.set $$0 + (i32.reinterpret_f32 + (local.get $$y) + ) + ) + (local.set $$and13 + (i32.and + (local.get $$0) + (i32.const 2147483647) + ) + ) + (local.set $$cmp14 + (i32.gt_u + (local.get $$and13) + (i32.const 2139095040) + ) + ) + (if + (local.get $$cmp14) + (local.set $label + (i32.const 3) + ) + (block + (local.set $$cmp34 + (i32.eq + (local.get $$trunc41) + (i32.const 1065353216) + ) + ) + (if + (local.get $$cmp34) + (block + (local.set $$call37 + (call $_atanf + (local.get $$y) + ) + ) + (local.set $$retval$0 + (local.get $$call37) + ) + (br $label$break$L1) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$0) + (i32.const 31) + ) + ) + (local.set $$shr40 + (i32.shr_u + (local.get $$trunc41) + (i32.const 30) + ) + ) + (local.set $$and41 + (i32.and + (local.get $$shr40) + (i32.const 2) + ) + ) + (local.set $$or + (i32.or + (local.get $$and41) + (local.get $$shr) + ) + ) + (local.set $$cmp44 + (i32.eq + (local.get $$and13) + (i32.const 0) + ) + ) + (if + (local.get $$cmp44) + (block + (local.set $$trunc36 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (local.set $$trunc36$clear + (i32.and + (local.get $$trunc36) + (i32.const 3) + ) + ) + (block $switch-default + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-case $switch-case1 $switch-case2 $switch-default + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc36$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + ) + (block + (local.set $$retval$0 + (local.get $$y) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const 3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const -3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + ) + ) + (local.set $$trunc41$clear + (i32.and + (local.get $$trunc41) + (i32.const 2147483647) + ) + ) + (local.set $$switch$split2D + (i32.lt_s + (local.get $$trunc41$clear) + (i32.const 2139095040) + ) + ) + (block $label$break$L14 + (if + (local.get $$switch$split2D) + (block + (block $switch4 + (block $switch-default6 + (block $switch-case5 + (br_table $switch-case5 $switch-default6 + (i32.sub + (local.get $$trunc41$clear) + (i32.const 0) + ) + ) + ) + (br $switch4) + ) + (br $label$break$L14) + ) + (local.set $$tobool + (i32.eq + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$cond + (if (result f32) + (local.get $$tobool) + (f32.const 1.5707963705062866) + (f32.const -1.5707963705062866) + ) + ) + (local.set $$retval$0 + (local.get $$cond) + ) + (br $label$break$L1) + ) + (block + (block $switch7 + (block $switch-default9 + (block $switch-case8 + (br_table $switch-case8 $switch-default9 + (i32.sub + (local.get $$trunc41$clear) + (i32.const 2139095040) + ) + ) + ) + (br $switch7) + ) + (br $label$break$L14) + ) + (local.set $$cmp58 + (i32.eq + (local.get $$and13) + (i32.const 2139095040) + ) + ) + (local.set $$trunc35 + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (if + (local.get $$cmp58) + (block + (local.set $$trunc35$clear + (i32.and + (local.get $$trunc35) + (i32.const 3) + ) + ) + (block $switch-default15 + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (br_table $switch-case11 $switch-case12 $switch-case13 $switch-case14 $switch-default15 + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc35$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$retval$0 + (f32.const 0.7853981852531433) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const -0.7853981852531433) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const 2.356194496154785) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const -2.356194496154785) + ) + (br $label$break$L1) + ) + ) + ) + (block + (local.set $$trunc35$clear1 + (i32.and + (local.get $$trunc35) + (i32.const 3) + ) + ) + (block $switch-default21 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (br_table $switch-case17 $switch-case18 $switch-case19 $switch-case20 $switch-default21 + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc35$clear1) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$retval$0 + (f32.const 0) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const -0) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const 3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$retval$0 + (f32.const -3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + ) + ) + (local.set $$add73 + (i32.add + (local.get $$and) + (i32.const 218103808) + ) + ) + (local.set $$cmp74 + (i32.lt_u + (local.get $$add73) + (local.get $$and13) + ) + ) + (local.set $$cmp77 + (i32.eq + (local.get $$and13) + (i32.const 2139095040) + ) + ) + (local.set $$or$cond + (i32.or + (local.get $$cmp77) + (local.get $$cmp74) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$tobool81 + (i32.eq + (local.get $$shr) + (i32.const 0) + ) + ) + (local.set $$cond82 + (if (result f32) + (local.get $$tobool81) + (f32.const 1.5707963705062866) + (f32.const -1.5707963705062866) + ) + ) + (local.set $$retval$0 + (local.get $$cond82) + ) + (br $label$break$L1) + ) + ) + (local.set $$tobool85 + (i32.lt_s + (local.get $$trunc41) + (i32.const 0) + ) + ) + (local.set $$add86 + (i32.add + (local.get $$and13) + (i32.const 218103808) + ) + ) + (local.set $$cmp87 + (i32.lt_u + (local.get $$add86) + (local.get $$and) + ) + ) + (local.set $$or$cond40 + (i32.and + (local.get $$tobool85) + (local.get $$cmp87) + ) + ) + (if + (local.get $$or$cond40) + (local.set $$z$0 + (f32.const 0) + ) + (block + (local.set $$div + (f32.div + (local.get $$y) + (local.get $$x) + ) + ) + (local.set $$call91 + (f32.abs + (local.get $$div) + ) + ) + (local.set $$call92 + (call $_atanf + (local.get $$call91) + ) + ) + (local.set $$z$0 + (local.get $$call92) + ) + ) + ) + (local.set $$trunc + (i32.and + (local.get $$or) + (i32.const 255) + ) + ) + (local.set $$trunc$clear + (i32.and + (local.get $$trunc) + (i32.const 3) + ) + ) + (block $switch22 + (block $switch-default26 + (block $switch-case25 + (block $switch-case24 + (block $switch-case23 + (br_table $switch-case23 $switch-case24 $switch-case25 $switch-default26 + (i32.sub + (i32.shr_s + (i32.shl + (local.get $$trunc$clear) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $$retval$0 + (local.get $$z$0) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$sub + (f32.neg + (local.get $$z$0) + ) + ) + (local.set $$retval$0 + (local.get $$sub) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$sub97 + (f32.add + (local.get $$z$0) + (f32.const 8.742277657347586e-08) + ) + ) + (local.set $$sub98 + (f32.sub + (f32.const 3.1415927410125732) + (local.get $$sub97) + ) + ) + (local.set $$retval$0 + (local.get $$sub98) + ) + (br $label$break$L1) + ) + ) + (block + (local.set $$sub99 + (f32.add + (local.get $$z$0) + (f32.const 8.742277657347586e-08) + ) + ) + (local.set $$sub100 + (f32.add + (local.get $$sub99) + (f32.const -3.1415927410125732) + ) + ) + (local.set $$retval$0 + (local.get $$sub100) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 3) + ) + (block + (local.set $$add + (f32.add + (local.get $$y) + (local.get $$x) + ) + ) + (local.set $$retval$0 + (local.get $$add) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_pow (; 643 ;) (param $$x f64) (param $$y f64) (result f64) + (local $$$ f64) + (local $$$6 f64) + (local $$$pre f64) + (local $$$pre$phiZ2D i64) + (local $$$pre317 i64) + (local $$0 i64) + (local $$1 i64) + (local $$10 f64) + (local $$11 f64) + (local $$12 i64) + (local $$13 f64) + (local $$14 f64) + (local $$15 i64) + (local $$16 f64) + (local $$17 i64) + (local $$18 f64) + (local $$19 f64) + (local $$2 i32) + (local $$20 f64) + (local $$21 i64) + (local $$22 f64) + (local $$23 f64) + (local $$24 i64) + (local $$25 i32) + (local $$26 i32) + (local $$27 f64) + (local $$28 f64) + (local $$29 i64) + (local $$3 i32) + (local $$30 f64) + (local $$4 i32) + (local $$5 i32) + (local $$6 i64) + (local $$7 f64) + (local $$8 i64) + (local $$9 i64) + (local $$add f64) + (local $$add248 f64) + (local $$add277 i32) + (local $$add288 i32) + (local $$add306 f64) + (local $$add325 i32) + (local $$add327 i32) + (local $$add346 f64) + (local $$add348 f64) + (local $$add350 f64) + (local $$add352 f64) + (local $$add354 f64) + (local $$add356 f64) + (local $$add358 f64) + (local $$add360 f64) + (local $$add361 f64) + (local $$add377 f64) + (local $$add378 f64) + (local $$add393315 f64) + (local $$add395 f64) + (local $$add395$sink f64) + (local $$add397 f64) + (local $$add399 f64) + (local $$add400 f64) + (local $$add428 f64) + (local $$add430 f64) + (local $$add452 f64) + (local $$add488 i32) + (local $$add490 i32) + (local $$add534316 f64) + (local $$add535 f64) + (local $$add540 f64) + (local $$add542 f64) + (local $$add544 f64) + (local $$add546 f64) + (local $$add553 f64) + (local $$add566 i32) + (local $$and i32) + (local $$and14 i32) + (local $$and253 i64) + (local $$and278 i32) + (local $$and296 i64) + (local $$and313 i64) + (local $$and366 i64) + (local $$and383 i64) + (local $$and405 i64) + (local $$and420 i64) + (local $$and461 i32) + (local $$and482 i32) + (local $$and491 i32) + (local $$and500 i32) + (local $$and508 i32) + (local $$and524 i64) + (local $$and577 i64) + (local $$and59 i32) + (local $$and73 i32) + (local $$arrayidx i32) + (local $$arrayidx394 i32) + (local $$arrayidx398 i32) + (local $$ax$0 f64) + (local $$call f64) + (local $$call128 f64) + (local $$call571 f64) + (local $$cmp i32) + (local $$cmp107 i32) + (local $$cmp110 i32) + (local $$cmp115 i32) + (local $$cmp119 i32) + (local $$cmp122 i32) + (local $$cmp135 i32) + (local $$cmp141 i32) + (local $$cmp151 i32) + (local $$cmp158 i32) + (local $$cmp16 i32) + (local $$cmp18 i32) + (local $$cmp182 i32) + (local $$cmp185 i32) + (local $$cmp188 i32) + (local $$cmp191 i32) + (local $$cmp201 i32) + (local $$cmp209 i32) + (local $$cmp212 i32) + (local $$cmp22 i32) + (local $$cmp223 i32) + (local $$cmp226 i32) + (local $$cmp24 i32) + (local $$cmp261 i32) + (local $$cmp27 i32) + (local $$cmp280 i32) + (local $$cmp284 i32) + (local $$cmp30 i32) + (local $$cmp33 i32) + (local $$cmp36 i32) + (local $$cmp40 i32) + (local $$cmp43 i32) + (local $$cmp441 i32) + (local $$cmp446 i32) + (local $$cmp454 i32) + (local $$cmp46 i32) + (local $$cmp462 i32) + (local $$cmp467 i32) + (local $$cmp474 i32) + (local $$cmp485 i32) + (local $$cmp50 i32) + (local $$cmp512 i32) + (local $$cmp56 i32) + (local $$cmp568 i32) + (local $$cmp63 i32) + (local $$cmp70 i32) + (local $$cmp81 i32) + (local $$cmp89 i32) + (local $$cmp93 i32) + (local $$cmp96 i32) + (local $$cond f64) + (local $$cond105 f64) + (local $$cond221 f64) + (local $$cond235 f64) + (local $$conv i32) + (local $$conv11 i32) + (local $$conv271 i32) + (local $$conv297299 i64) + (local $$conv3 i32) + (local $$conv328300 i64) + (local $$conv396 f64) + (local $$conv436 i32) + (local $$conv438 i32) + (local $$conv501302 i64) + (local $$conv562 i32) + (local $$conv578301 i64) + (local $$conv9 i32) + (local $$div f64) + (local $$div144 f64) + (local $$div156 f64) + (local $$div175 f64) + (local $$div307 f64) + (local $$div551 f64) + (local $$ix$0 i32) + (local $$ix$1 i32) + (local $$k$0 i32) + (local $$mul f64) + (local $$mul215 f64) + (local $$mul216 f64) + (local $$mul218 f64) + (local $$mul219 f64) + (local $$mul229 f64) + (local $$mul230 f64) + (local $$mul232 f64) + (local $$mul233 f64) + (local $$mul238 f64) + (local $$mul239 f64) + (local $$mul241 f64) + (local $$mul243 f64) + (local $$mul244 f64) + (local $$mul245 f64) + (local $$mul246 f64) + (local $$mul264 f64) + (local $$mul308 f64) + (local $$mul338 f64) + (local $$mul340 f64) + (local $$mul342 f64) + (local $$mul343 f64) + (local $$mul344 f64) + (local $$mul345 f64) + (local $$mul347 f64) + (local $$mul349 f64) + (local $$mul351 f64) + (local $$mul353 f64) + (local $$mul355 f64) + (local $$mul357 f64) + (local $$mul359 f64) + (local $$mul374 f64) + (local $$mul375 f64) + (local $$mul376 f64) + (local $$mul390 f64) + (local $$mul391 f64) + (local $$mul392 f64) + (local $$mul426 f64) + (local $$mul427 f64) + (local $$mul429 f64) + (local $$mul449 f64) + (local $$mul450 f64) + (local $$mul457 f64) + (local $$mul458 f64) + (local $$mul470 f64) + (local $$mul471 f64) + (local $$mul477 f64) + (local $$mul478 f64) + (local $$mul529 f64) + (local $$mul532 f64) + (local $$mul533 f64) + (local $$mul538 f64) + (local $$mul539 f64) + (local $$mul541 f64) + (local $$mul543 f64) + (local $$mul545 f64) + (local $$mul547 f64) + (local $$mul549 f64) + (local $$mul552 f64) + (local $$mul586 f64) + (local $$n$1 i32) + (local $$n$3 i32) + (local $$neg i32) + (local $$not$cmp284 i32) + (local $$or i32) + (local $$or$cond i32) + (local $$or$cond1 i32) + (local $$or$cond2 i32) + (local $$or$cond3 i32) + (local $$or$cond7 i32) + (local $$or150 i32) + (local $$or279 i32) + (local $$or300 i64) + (local $$or324 i32) + (local $$or445 i32) + (local $$or466 i32) + (local $$or509 i32) + (local $$or581 i64) + (local $$or88 i32) + (local $$p_h$0 f64) + (local $$retval$0 f64) + (local $$s$0 f64) + (local $$shl i32) + (local $$shl298 i64) + (local $$shl326 i32) + (local $$shl329 i64) + (local $$shl502 i64) + (local $$shl565 i32) + (local $$shl579 i64) + (local $$shl69 i32) + (local $$shr i64) + (local $$shr270 i64) + (local $$shr275 i32) + (local $$shr323 i32) + (local $$shr435 i64) + (local $$shr489 i32) + (local $$shr511 i32) + (local $$shr54 i32) + (local $$shr561 i64) + (local $$shr67 i32) + (local $$shr8 i64) + (local $$spec$select f64) + (local $$spec$select303 i32) + (local $$spec$select309 i32) + (local $$spec$select310 i32) + (local $$spec$select311 f64) + (local $$spec$select312 i32) + (local $$spec$select313 i32) + (local $$spec$select314 i32) + (local $$sub103 f64) + (local $$sub149 i32) + (local $$sub154 f64) + (local $$sub161 f64) + (local $$sub173 f64) + (local $$sub237 f64) + (local $$sub240 f64) + (local $$sub242 f64) + (local $$sub247 f64) + (local $$sub258 f64) + (local $$sub276 i32) + (local $$sub289 i32) + (local $$sub304 f64) + (local $$sub336 f64) + (local $$sub337 f64) + (local $$sub339 f64) + (local $$sub341 f64) + (local $$sub371 f64) + (local $$sub372 f64) + (local $$sub373 f64) + (local $$sub388 f64) + (local $$sub389 f64) + (local $$sub410 f64) + (local $$sub412 f64) + (local $$sub413 f64) + (local $$sub413$sink f64) + (local $$sub414 f64) + (local $$sub425 f64) + (local $$sub444 i32) + (local $$sub453 f64) + (local $$sub465 i32) + (local $$sub473 f64) + (local $$sub493 i32) + (local $$sub510 i32) + (local $$sub515 i32) + (local $$sub517 f64) + (local $$sub53 i32) + (local $$sub530 f64) + (local $$sub531 f64) + (local $$sub536 f64) + (local $$sub537 f64) + (local $$sub548 f64) + (local $$sub550 f64) + (local $$sub554 f64) + (local $$sub555 f64) + (local $$sub556 f64) + (local $$sub60 i32) + (local $$sub66 i32) + (local $$sub74 i32) + (local $$sub87 i32) + (local $$t1$0 f64) + (local $$yisint$0 i32) + (local $$yisint$0305 i32) + (local $$yisint$0306 i32) + (local $$z$0 f64) + (local $$z$2 f64) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$0 + (i64.reinterpret_f64 + (local.get $$x) + ) + ) + (local.set $$shr + (i64.shr_u + (local.get $$0) + (i64.const 32) + ) + ) + (local.set $$conv + (i32.wrap_i64 + (local.get $$shr) + ) + ) + (local.set $$conv3 + (i32.wrap_i64 + (local.get $$0) + ) + ) + (local.set $$1 + (i64.reinterpret_f64 + (local.get $$y) + ) + ) + (local.set $$shr8 + (i64.shr_u + (local.get $$1) + (i64.const 32) + ) + ) + (local.set $$conv9 + (i32.wrap_i64 + (local.get $$shr8) + ) + ) + (local.set $$conv11 + (i32.wrap_i64 + (local.get $$1) + ) + ) + (local.set $$and + (i32.and + (local.get $$conv) + (i32.const 2147483647) + ) + ) + (local.set $$and14 + (i32.and + (local.get $$conv9) + (i32.const 2147483647) + ) + ) + (local.set $$or + (i32.or + (local.get $$and14) + (local.get $$conv11) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$or) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$retval$0 + (f64.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$conv) + (i32.const 1072693248) + ) + ) + (local.set $$cmp18 + (i32.eq + (local.get $$conv3) + (i32.const 0) + ) + ) + (local.set $$or$cond + (i32.and + (local.get $$cmp18) + (local.get $$cmp16) + ) + ) + (if + (local.get $$or$cond) + (block + (local.set $$retval$0 + (f64.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp22 + (i32.gt_u + (local.get $$and) + (i32.const 2146435072) + ) + ) + (if + (i32.eqz + (local.get $$cmp22) + ) + (block + (local.set $$cmp24 + (i32.eq + (local.get $$and) + (i32.const 2146435072) + ) + ) + (local.set $$cmp27 + (i32.ne + (local.get $$conv3) + (i32.const 0) + ) + ) + (local.set $$or$cond1 + (i32.and + (local.get $$cmp27) + (local.get $$cmp24) + ) + ) + (local.set $$cmp30 + (i32.gt_u + (local.get $$and14) + (i32.const 2146435072) + ) + ) + (local.set $$or$cond2 + (i32.or + (local.get $$or$cond1) + (local.get $$cmp30) + ) + ) + (if + (i32.eqz + (local.get $$or$cond2) + ) + (block + (local.set $$cmp33 + (i32.eq + (local.get $$and14) + (i32.const 2146435072) + ) + ) + (local.set $$cmp36 + (i32.ne + (local.get $$conv11) + (i32.const 0) + ) + ) + (local.set $$or$cond3 + (i32.and + (local.get $$cmp36) + (local.get $$cmp33) + ) + ) + (if + (i32.eqz + (local.get $$or$cond3) + ) + (block + (local.set $$cmp40 + (i32.lt_s + (local.get $$conv) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$cmp40) + (block + (local.set $$cmp43 + (i32.gt_u + (local.get $$and14) + (i32.const 1128267775) + ) + ) + (if + (local.get $$cmp43) + (block + (local.set $$yisint$0 + (i32.const 2) + ) + (local.set $label + (i32.const 14) + ) + ) + (block + (local.set $$cmp46 + (i32.gt_u + (local.get $$and14) + (i32.const 1072693247) + ) + ) + (if + (local.get $$cmp46) + (block + (local.set $$2 + (i32.shr_u + (local.get $$and14) + (i32.const 20) + ) + ) + (local.set $$cmp50 + (i32.gt_u + (local.get $$and14) + (i32.const 1094713343) + ) + ) + (if + (local.get $$cmp50) + (block + (local.set $$sub53 + (i32.sub + (i32.const 1075) + (local.get $$2) + ) + ) + (local.set $$shr54 + (i32.shr_u + (local.get $$conv11) + (local.get $$sub53) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr54) + (local.get $$sub53) + ) + ) + (local.set $$cmp56 + (i32.eq + (local.get $$shl) + (local.get $$conv11) + ) + ) + (local.set $$and59 + (i32.and + (local.get $$shr54) + (i32.const 1) + ) + ) + (local.set $$sub60 + (i32.sub + (i32.const 2) + (local.get $$and59) + ) + ) + (local.set $$spec$select309 + (if (result i32) + (local.get $$cmp56) + (local.get $$sub60) + (i32.const 0) + ) + ) + (local.set $$yisint$0 + (local.get $$spec$select309) + ) + (local.set $label + (i32.const 14) + ) + (br $do-once) + ) + ) + (local.set $$cmp63 + (i32.eq + (local.get $$conv11) + (i32.const 0) + ) + ) + (if + (local.get $$cmp63) + (block + (local.set $$sub66 + (i32.sub + (i32.const 1043) + (local.get $$2) + ) + ) + (local.set $$shr67 + (i32.shr_u + (local.get $$and14) + (local.get $$sub66) + ) + ) + (local.set $$shl69 + (i32.shl + (local.get $$shr67) + (local.get $$sub66) + ) + ) + (local.set $$cmp70 + (i32.eq + (local.get $$shl69) + (local.get $$and14) + ) + ) + (local.set $$and73 + (i32.and + (local.get $$shr67) + (i32.const 1) + ) + ) + (local.set $$sub74 + (i32.sub + (i32.const 2) + (local.get $$and73) + ) + ) + (local.set $$spec$select310 + (if (result i32) + (local.get $$cmp70) + (local.get $$sub74) + (i32.const 0) + ) + ) + (local.set $$yisint$0306 + (local.get $$spec$select310) + ) + (local.set $label + (i32.const 15) + ) + ) + (local.set $$yisint$0305 + (i32.const 0) + ) + ) + ) + (block + (local.set $$yisint$0 + (i32.const 0) + ) + (local.set $label + (i32.const 14) + ) + ) + ) + ) + ) + ) + (block + (local.set $$yisint$0 + (i32.const 0) + ) + (local.set $label + (i32.const 14) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 14) + ) + (block + (local.set $$cmp81 + (i32.eq + (local.get $$conv11) + (i32.const 0) + ) + ) + (if + (local.get $$cmp81) + (block + (local.set $$yisint$0306 + (local.get $$yisint$0) + ) + (local.set $label + (i32.const 15) + ) + ) + (local.set $$yisint$0305 + (local.get $$yisint$0) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 15) + ) + (block + (if + (local.get $$cmp33) + (block + (local.set $$sub87 + (i32.add + (local.get $$and) + (i32.const -1072693248) + ) + ) + (local.set $$or88 + (i32.or + (local.get $$sub87) + (local.get $$conv3) + ) + ) + (local.set $$cmp89 + (i32.eq + (local.get $$or88) + (i32.const 0) + ) + ) + (if + (local.get $$cmp89) + (block + (local.set $$retval$0 + (f64.const 1) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp93 + (i32.gt_u + (local.get $$and) + (i32.const 1072693247) + ) + ) + (local.set $$cmp96 + (i32.gt_s + (local.get $$conv9) + (i32.const -1) + ) + ) + (if + (local.get $$cmp93) + (block + (local.set $$cond + (if (result f64) + (local.get $$cmp96) + (local.get $$y) + (f64.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$cond) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$sub103 + (f64.neg + (local.get $$y) + ) + ) + (local.set $$cond105 + (if (result f64) + (local.get $$cmp96) + (f64.const 0) + (local.get $$sub103) + ) + ) + (local.set $$retval$0 + (local.get $$cond105) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$cmp107 + (i32.eq + (local.get $$and14) + (i32.const 1072693248) + ) + ) + (if + (local.get $$cmp107) + (block + (local.set $$cmp110 + (i32.gt_s + (local.get $$conv9) + (i32.const -1) + ) + ) + (local.set $$div + (f64.div + (f64.const 1) + (local.get $$x) + ) + ) + (local.set $$spec$select311 + (if (result f64) + (local.get $$cmp110) + (local.get $$x) + (local.get $$div) + ) + ) + (return + (local.get $$spec$select311) + ) + ) + ) + (local.set $$cmp115 + (i32.eq + (local.get $$conv9) + (i32.const 1073741824) + ) + ) + (if + (local.get $$cmp115) + (block + (local.set $$mul + (f64.mul + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$retval$0 + (local.get $$mul) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp119 + (i32.eq + (local.get $$conv9) + (i32.const 1071644672) + ) + ) + (local.set $$cmp122 + (i32.gt_s + (local.get $$conv) + (i32.const -1) + ) + ) + (local.set $$or$cond7 + (i32.and + (local.get $$cmp122) + (local.get $$cmp119) + ) + ) + (if + (local.get $$or$cond7) + (block + (local.set $$call + (f64.sqrt + (local.get $$x) + ) + ) + (local.set $$retval$0 + (local.get $$call) + ) + (return + (local.get $$retval$0) + ) + ) + (local.set $$yisint$0305 + (local.get $$yisint$0306) + ) + ) + ) + ) + (local.set $$call128 + (f64.abs + (local.get $$x) + ) + ) + (if + (local.get $$cmp18) + (block + (local.set $$cmp135 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (local.set $$3 + (i32.or + (local.get $$and) + (i32.const 1073741824) + ) + ) + (local.set $$4 + (i32.eq + (local.get $$3) + (i32.const 2146435072) + ) + ) + (local.set $$5 + (i32.or + (local.get $$cmp135) + (local.get $$4) + ) + ) + (if + (local.get $$5) + (block + (local.set $$cmp141 + (i32.lt_s + (local.get $$conv9) + (i32.const 0) + ) + ) + (local.set $$div144 + (f64.div + (f64.const 1) + (local.get $$call128) + ) + ) + (local.set $$z$0 + (if (result f64) + (local.get $$cmp141) + (local.get $$div144) + (local.get $$call128) + ) + ) + (if + (i32.eqz + (local.get $$cmp40) + ) + (block + (local.set $$retval$0 + (local.get $$z$0) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$sub149 + (i32.add + (local.get $$and) + (i32.const -1072693248) + ) + ) + (local.set $$or150 + (i32.or + (local.get $$yisint$0305) + (local.get $$sub149) + ) + ) + (local.set $$cmp151 + (i32.eq + (local.get $$or150) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp151) + ) + (block + (local.set $$cmp158 + (i32.eq + (local.get $$yisint$0305) + (i32.const 1) + ) + ) + (local.set $$sub161 + (f64.neg + (local.get $$z$0) + ) + ) + (local.set $$spec$select + (if (result f64) + (local.get $$cmp158) + (local.get $$sub161) + (local.get $$z$0) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + (local.set $$sub154 + (f64.sub + (local.get $$z$0) + (local.get $$z$0) + ) + ) + (local.set $$div156 + (f64.div + (local.get $$sub154) + (local.get $$sub154) + ) + ) + (local.set $$retval$0 + (local.get $$div156) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (block $label$break$L55 + (if + (local.get $$cmp40) + (block + (block $switch + (block $switch-default + (block $switch-case1 + (block $switch-case + (br_table $switch-case $switch-case1 $switch-default + (i32.sub + (local.get $$yisint$0305) + (i32.const 0) + ) + ) + ) + (br $switch) + ) + (block + (local.set $$s$0 + (f64.const -1) + ) + (br $label$break$L55) + ) + ) + (block + (local.set $$s$0 + (f64.const 1) + ) + (br $label$break$L55) + ) + ) + (local.set $$sub173 + (f64.sub + (local.get $$x) + (local.get $$x) + ) + ) + (local.set $$div175 + (f64.div + (local.get $$sub173) + (local.get $$sub173) + ) + ) + (local.set $$retval$0 + (local.get $$div175) + ) + (return + (local.get $$retval$0) + ) + ) + (local.set $$s$0 + (f64.const 1) + ) + ) + ) + (local.set $$cmp182 + (i32.gt_u + (local.get $$and14) + (i32.const 1105199104) + ) + ) + (block $do-once2 + (if + (local.get $$cmp182) + (block + (local.set $$cmp185 + (i32.gt_u + (local.get $$and14) + (i32.const 1139802112) + ) + ) + (if + (local.get $$cmp185) + (block + (local.set $$cmp188 + (i32.lt_u + (local.get $$and) + (i32.const 1072693248) + ) + ) + (if + (local.get $$cmp188) + (block + (local.set $$cmp191 + (i32.lt_s + (local.get $$conv9) + (i32.const 0) + ) + ) + (local.set $$$ + (if (result f64) + (local.get $$cmp191) + (global.get $inf) + (f64.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$$) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$cmp201 + (i32.gt_s + (local.get $$conv9) + (i32.const 0) + ) + ) + (local.set $$$6 + (if (result f64) + (local.get $$cmp201) + (global.get $inf) + (f64.const 0) + ) + ) + (local.set $$retval$0 + (local.get $$$6) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$cmp209 + (i32.lt_u + (local.get $$and) + (i32.const 1072693247) + ) + ) + (if + (local.get $$cmp209) + (block + (local.set $$cmp212 + (i32.lt_s + (local.get $$conv9) + (i32.const 0) + ) + ) + (local.set $$mul215 + (f64.mul + (local.get $$s$0) + (f64.const 1.e+300) + ) + ) + (local.set $$mul216 + (f64.mul + (local.get $$mul215) + (f64.const 1.e+300) + ) + ) + (local.set $$mul218 + (f64.mul + (local.get $$s$0) + (f64.const 1e-300) + ) + ) + (local.set $$mul219 + (f64.mul + (local.get $$mul218) + (f64.const 1e-300) + ) + ) + (local.set $$cond221 + (if (result f64) + (local.get $$cmp212) + (local.get $$mul216) + (local.get $$mul219) + ) + ) + (local.set $$retval$0 + (local.get $$cond221) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$cmp223 + (i32.gt_u + (local.get $$and) + (i32.const 1072693248) + ) + ) + (if + (i32.eqz + (local.get $$cmp223) + ) + (block + (local.set $$sub237 + (f64.add + (local.get $$call128) + (f64.const -1) + ) + ) + (local.set $$mul238 + (f64.mul + (local.get $$sub237) + (local.get $$sub237) + ) + ) + (local.set $$mul239 + (f64.mul + (local.get $$sub237) + (f64.const 0.25) + ) + ) + (local.set $$sub240 + (f64.sub + (f64.const 0.3333333333333333) + (local.get $$mul239) + ) + ) + (local.set $$mul241 + (f64.mul + (local.get $$sub237) + (local.get $$sub240) + ) + ) + (local.set $$sub242 + (f64.sub + (f64.const 0.5) + (local.get $$mul241) + ) + ) + (local.set $$mul243 + (f64.mul + (local.get $$mul238) + (local.get $$sub242) + ) + ) + (local.set $$mul244 + (f64.mul + (local.get $$sub237) + (f64.const 1.4426950216293335) + ) + ) + (local.set $$mul245 + (f64.mul + (local.get $$sub237) + (f64.const 1.9259629911266175e-08) + ) + ) + (local.set $$mul246 + (f64.mul + (local.get $$mul243) + (f64.const 1.4426950408889634) + ) + ) + (local.set $$sub247 + (f64.sub + (local.get $$mul245) + (local.get $$mul246) + ) + ) + (local.set $$add248 + (f64.add + (local.get $$mul244) + (local.get $$sub247) + ) + ) + (local.set $$6 + (i64.reinterpret_f64 + (local.get $$add248) + ) + ) + (local.set $$and253 + (i64.and + (local.get $$6) + (i64.const -4294967296) + ) + ) + (local.set $$7 + (f64.reinterpret_i64 + (local.get $$and253) + ) + ) + (local.set $$sub258 + (f64.sub + (local.get $$7) + (local.get $$mul244) + ) + ) + (local.set $$add395$sink + (local.get $$sub247) + ) + (local.set $$sub413$sink + (local.get $$sub258) + ) + (local.set $$t1$0 + (local.get $$7) + ) + (br $do-once2) + ) + ) + (local.set $$cmp226 + (i32.gt_s + (local.get $$conv9) + (i32.const 0) + ) + ) + (local.set $$mul229 + (f64.mul + (local.get $$s$0) + (f64.const 1.e+300) + ) + ) + (local.set $$mul230 + (f64.mul + (local.get $$mul229) + (f64.const 1.e+300) + ) + ) + (local.set $$mul232 + (f64.mul + (local.get $$s$0) + (f64.const 1e-300) + ) + ) + (local.set $$mul233 + (f64.mul + (local.get $$mul232) + (f64.const 1e-300) + ) + ) + (local.set $$cond235 + (if (result f64) + (local.get $$cmp226) + (local.get $$mul230) + (local.get $$mul233) + ) + ) + (local.set $$retval$0 + (local.get $$cond235) + ) + (return + (local.get $$retval$0) + ) + ) + (block + (local.set $$cmp261 + (i32.lt_u + (local.get $$and) + (i32.const 1048576) + ) + ) + (local.set $$mul264 + (f64.mul + (local.get $$call128) + (f64.const 9007199254740992) + ) + ) + (local.set $$8 + (i64.reinterpret_f64 + (local.get $$mul264) + ) + ) + (local.set $$shr270 + (i64.shr_u + (local.get $$8) + (i64.const 32) + ) + ) + (local.set $$conv271 + (i32.wrap_i64 + (local.get $$shr270) + ) + ) + (local.set $$ix$0 + (if (result i32) + (local.get $$cmp261) + (local.get $$conv271) + (local.get $$and) + ) + ) + (local.set $$ax$0 + (if (result f64) + (local.get $$cmp261) + (local.get $$mul264) + (local.get $$call128) + ) + ) + (local.set $$shr275 + (i32.shr_s + (local.get $$ix$0) + (i32.const 20) + ) + ) + (local.set $$sub276 + (if (result i32) + (local.get $$cmp261) + (i32.const -1076) + (i32.const -1023) + ) + ) + (local.set $$add277 + (i32.add + (local.get $$sub276) + (local.get $$shr275) + ) + ) + (local.set $$and278 + (i32.and + (local.get $$ix$0) + (i32.const 1048575) + ) + ) + (local.set $$or279 + (i32.or + (local.get $$and278) + (i32.const 1072693248) + ) + ) + (local.set $$cmp280 + (i32.lt_u + (local.get $$and278) + (i32.const 235663) + ) + ) + (if + (local.get $$cmp280) + (block + (local.set $$ix$1 + (local.get $$or279) + ) + (local.set $$k$0 + (i32.const 0) + ) + (local.set $$n$1 + (local.get $$add277) + ) + ) + (block + (local.set $$cmp284 + (i32.lt_u + (local.get $$and278) + (i32.const 767610) + ) + ) + (local.set $$sub289 + (i32.add + (local.get $$or279) + (i32.const -1048576) + ) + ) + (local.set $$spec$select312 + (if (result i32) + (local.get $$cmp284) + (local.get $$or279) + (local.get $$sub289) + ) + ) + (local.set $$not$cmp284 + (i32.xor + (local.get $$cmp284) + (i32.const 1) + ) + ) + (local.set $$add288 + (i32.and + (local.get $$not$cmp284) + (i32.const 1) + ) + ) + (local.set $$spec$select313 + (i32.add + (local.get $$add277) + (local.get $$add288) + ) + ) + (local.set $$spec$select314 + (i32.and + (local.get $$cmp284) + (i32.const 1) + ) + ) + (local.set $$ix$1 + (local.get $$spec$select312) + ) + (local.set $$k$0 + (local.get $$spec$select314) + ) + (local.set $$n$1 + (local.get $$spec$select313) + ) + ) + ) + (local.set $$9 + (i64.reinterpret_f64 + (local.get $$ax$0) + ) + ) + (local.set $$and296 + (i64.and + (local.get $$9) + (i64.const 4294967295) + ) + ) + (local.set $$conv297299 + (i64.extend_i32_u + (local.get $$ix$1) + ) + ) + (local.set $$shl298 + (i64.shl + (local.get $$conv297299) + (i64.const 32) + ) + ) + (local.set $$or300 + (i64.or + (local.get $$shl298) + (local.get $$and296) + ) + ) + (local.set $$10 + (f64.reinterpret_i64 + (local.get $$or300) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 7664) + (i32.shl + (local.get $$k$0) + (i32.const 3) + ) + ) + ) + (local.set $$11 + (f64.load + (local.get $$arrayidx) + ) + ) + (local.set $$sub304 + (f64.sub + (local.get $$10) + (local.get $$11) + ) + ) + (local.set $$add306 + (f64.add + (local.get $$11) + (local.get $$10) + ) + ) + (local.set $$div307 + (f64.div + (f64.const 1) + (local.get $$add306) + ) + ) + (local.set $$mul308 + (f64.mul + (local.get $$sub304) + (local.get $$div307) + ) + ) + (local.set $$12 + (i64.reinterpret_f64 + (local.get $$mul308) + ) + ) + (local.set $$and313 + (i64.and + (local.get $$12) + (i64.const -4294967296) + ) + ) + (local.set $$13 + (f64.reinterpret_i64 + (local.get $$and313) + ) + ) + (local.set $$shr323 + (i32.shr_s + (local.get $$ix$1) + (i32.const 1) + ) + ) + (local.set $$or324 + (i32.or + (local.get $$shr323) + (i32.const 536870912) + ) + ) + (local.set $$add325 + (i32.add + (local.get $$or324) + (i32.const 524288) + ) + ) + (local.set $$shl326 + (i32.shl + (local.get $$k$0) + (i32.const 18) + ) + ) + (local.set $$add327 + (i32.add + (local.get $$add325) + (local.get $$shl326) + ) + ) + (local.set $$conv328300 + (i64.extend_i32_u + (local.get $$add327) + ) + ) + (local.set $$shl329 + (i64.shl + (local.get $$conv328300) + (i64.const 32) + ) + ) + (local.set $$14 + (f64.reinterpret_i64 + (local.get $$shl329) + ) + ) + (local.set $$sub336 + (f64.sub + (local.get $$14) + (local.get $$11) + ) + ) + (local.set $$sub337 + (f64.sub + (local.get $$10) + (local.get $$sub336) + ) + ) + (local.set $$mul338 + (f64.mul + (local.get $$14) + (local.get $$13) + ) + ) + (local.set $$sub339 + (f64.sub + (local.get $$sub304) + (local.get $$mul338) + ) + ) + (local.set $$mul340 + (f64.mul + (local.get $$sub337) + (local.get $$13) + ) + ) + (local.set $$sub341 + (f64.sub + (local.get $$sub339) + (local.get $$mul340) + ) + ) + (local.set $$mul342 + (f64.mul + (local.get $$div307) + (local.get $$sub341) + ) + ) + (local.set $$mul343 + (f64.mul + (local.get $$mul308) + (local.get $$mul308) + ) + ) + (local.set $$mul344 + (f64.mul + (local.get $$mul343) + (local.get $$mul343) + ) + ) + (local.set $$mul345 + (f64.mul + (local.get $$mul343) + (f64.const 0.20697501780033842) + ) + ) + (local.set $$add346 + (f64.add + (local.get $$mul345) + (f64.const 0.23066074577556175) + ) + ) + (local.set $$mul347 + (f64.mul + (local.get $$mul343) + (local.get $$add346) + ) + ) + (local.set $$add348 + (f64.add + (local.get $$mul347) + (f64.const 0.272728123808534) + ) + ) + (local.set $$mul349 + (f64.mul + (local.get $$mul343) + (local.get $$add348) + ) + ) + (local.set $$add350 + (f64.add + (local.get $$mul349) + (f64.const 0.33333332981837743) + ) + ) + (local.set $$mul351 + (f64.mul + (local.get $$mul343) + (local.get $$add350) + ) + ) + (local.set $$add352 + (f64.add + (local.get $$mul351) + (f64.const 0.4285714285785502) + ) + ) + (local.set $$mul353 + (f64.mul + (local.get $$mul343) + (local.get $$add352) + ) + ) + (local.set $$add354 + (f64.add + (local.get $$mul353) + (f64.const 0.5999999999999946) + ) + ) + (local.set $$mul355 + (f64.mul + (local.get $$mul344) + (local.get $$add354) + ) + ) + (local.set $$add356 + (f64.add + (local.get $$mul308) + (local.get $$13) + ) + ) + (local.set $$mul357 + (f64.mul + (local.get $$add356) + (local.get $$mul342) + ) + ) + (local.set $$add358 + (f64.add + (local.get $$mul357) + (local.get $$mul355) + ) + ) + (local.set $$mul359 + (f64.mul + (local.get $$13) + (local.get $$13) + ) + ) + (local.set $$add360 + (f64.add + (local.get $$mul359) + (f64.const 3) + ) + ) + (local.set $$add361 + (f64.add + (local.get $$add360) + (local.get $$add358) + ) + ) + (local.set $$15 + (i64.reinterpret_f64 + (local.get $$add361) + ) + ) + (local.set $$and366 + (i64.and + (local.get $$15) + (i64.const -4294967296) + ) + ) + (local.set $$16 + (f64.reinterpret_i64 + (local.get $$and366) + ) + ) + (local.set $$sub371 + (f64.add + (local.get $$16) + (f64.const -3) + ) + ) + (local.set $$sub372 + (f64.sub + (local.get $$sub371) + (local.get $$mul359) + ) + ) + (local.set $$sub373 + (f64.sub + (local.get $$add358) + (local.get $$sub372) + ) + ) + (local.set $$mul374 + (f64.mul + (local.get $$13) + (local.get $$16) + ) + ) + (local.set $$mul375 + (f64.mul + (local.get $$mul342) + (local.get $$16) + ) + ) + (local.set $$mul376 + (f64.mul + (local.get $$mul308) + (local.get $$sub373) + ) + ) + (local.set $$add377 + (f64.add + (local.get $$mul375) + (local.get $$mul376) + ) + ) + (local.set $$add378 + (f64.add + (local.get $$mul374) + (local.get $$add377) + ) + ) + (local.set $$17 + (i64.reinterpret_f64 + (local.get $$add378) + ) + ) + (local.set $$and383 + (i64.and + (local.get $$17) + (i64.const -4294967296) + ) + ) + (local.set $$18 + (f64.reinterpret_i64 + (local.get $$and383) + ) + ) + (local.set $$sub388 + (f64.sub + (local.get $$18) + (local.get $$mul374) + ) + ) + (local.set $$sub389 + (f64.sub + (local.get $$add377) + (local.get $$sub388) + ) + ) + (local.set $$mul390 + (f64.mul + (local.get $$18) + (f64.const 0.9617967009544373) + ) + ) + (local.set $$mul391 + (f64.mul + (local.get $$18) + (f64.const 7.028461650952758e-09) + ) + ) + (local.set $$mul392 + (f64.mul + (local.get $$sub389) + (f64.const 0.9617966939259756) + ) + ) + (local.set $$add393315 + (f64.sub + (local.get $$mul392) + (local.get $$mul391) + ) + ) + (local.set $$arrayidx394 + (i32.add + (i32.const 7680) + (i32.shl + (local.get $$k$0) + (i32.const 3) + ) + ) + ) + (local.set $$19 + (f64.load + (local.get $$arrayidx394) + ) + ) + (local.set $$add395 + (f64.add + (local.get $$19) + (local.get $$add393315) + ) + ) + (local.set $$conv396 + (f64.convert_i32_s + (local.get $$n$1) + ) + ) + (local.set $$add397 + (f64.add + (local.get $$mul390) + (local.get $$add395) + ) + ) + (local.set $$arrayidx398 + (i32.add + (i32.const 7696) + (i32.shl + (local.get $$k$0) + (i32.const 3) + ) + ) + ) + (local.set $$20 + (f64.load + (local.get $$arrayidx398) + ) + ) + (local.set $$add399 + (f64.add + (local.get $$20) + (local.get $$add397) + ) + ) + (local.set $$add400 + (f64.add + (local.get $$add399) + (local.get $$conv396) + ) + ) + (local.set $$21 + (i64.reinterpret_f64 + (local.get $$add400) + ) + ) + (local.set $$and405 + (i64.and + (local.get $$21) + (i64.const -4294967296) + ) + ) + (local.set $$22 + (f64.reinterpret_i64 + (local.get $$and405) + ) + ) + (local.set $$sub410 + (f64.sub + (local.get $$22) + (local.get $$conv396) + ) + ) + (local.set $$sub412 + (f64.sub + (local.get $$sub410) + (local.get $$20) + ) + ) + (local.set $$sub413 + (f64.sub + (local.get $$sub412) + (local.get $$mul390) + ) + ) + (local.set $$add395$sink + (local.get $$add395) + ) + (local.set $$sub413$sink + (local.get $$sub413) + ) + (local.set $$t1$0 + (local.get $$22) + ) + ) + ) + ) + (local.set $$sub414 + (f64.sub + (local.get $$add395$sink) + (local.get $$sub413$sink) + ) + ) + (local.set $$and420 + (i64.and + (local.get $$1) + (i64.const -4294967296) + ) + ) + (local.set $$23 + (f64.reinterpret_i64 + (local.get $$and420) + ) + ) + (local.set $$sub425 + (f64.sub + (local.get $$y) + (local.get $$23) + ) + ) + (local.set $$mul426 + (f64.mul + (local.get $$sub425) + (local.get $$t1$0) + ) + ) + (local.set $$mul427 + (f64.mul + (local.get $$sub414) + (local.get $$y) + ) + ) + (local.set $$add428 + (f64.add + (local.get $$mul427) + (local.get $$mul426) + ) + ) + (local.set $$mul429 + (f64.mul + (local.get $$t1$0) + (local.get $$23) + ) + ) + (local.set $$add430 + (f64.add + (local.get $$mul429) + (local.get $$add428) + ) + ) + (local.set $$24 + (i64.reinterpret_f64 + (local.get $$add430) + ) + ) + (local.set $$shr435 + (i64.shr_u + (local.get $$24) + (i64.const 32) + ) + ) + (local.set $$conv436 + (i32.wrap_i64 + (local.get $$shr435) + ) + ) + (local.set $$conv438 + (i32.wrap_i64 + (local.get $$24) + ) + ) + (local.set $$cmp441 + (i32.gt_s + (local.get $$conv436) + (i32.const 1083179007) + ) + ) + (if + (local.get $$cmp441) + (block + (local.set $$sub444 + (i32.add + (local.get $$conv436) + (i32.const -1083179008) + ) + ) + (local.set $$or445 + (i32.or + (local.get $$sub444) + (local.get $$conv438) + ) + ) + (local.set $$cmp446 + (i32.eq + (local.get $$or445) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp446) + ) + (block + (local.set $$mul449 + (f64.mul + (local.get $$s$0) + (f64.const 1.e+300) + ) + ) + (local.set $$mul450 + (f64.mul + (local.get $$mul449) + (f64.const 1.e+300) + ) + ) + (local.set $$retval$0 + (local.get $$mul450) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$add452 + (f64.add + (local.get $$add428) + (f64.const 8.008566259537294e-17) + ) + ) + (local.set $$sub453 + (f64.sub + (local.get $$add430) + (local.get $$mul429) + ) + ) + (local.set $$cmp454 + (f64.gt + (local.get $$add452) + (local.get $$sub453) + ) + ) + (if + (local.get $$cmp454) + (block + (local.set $$mul457 + (f64.mul + (local.get $$s$0) + (f64.const 1.e+300) + ) + ) + (local.set $$mul458 + (f64.mul + (local.get $$mul457) + (f64.const 1.e+300) + ) + ) + (local.set $$retval$0 + (local.get $$mul458) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (block + (local.set $$and461 + (i32.and + (local.get $$conv436) + (i32.const 2147482624) + ) + ) + (local.set $$cmp462 + (i32.gt_u + (local.get $$and461) + (i32.const 1083231231) + ) + ) + (if + (local.get $$cmp462) + (block + (local.set $$sub465 + (i32.add + (local.get $$conv436) + (i32.const 1064252416) + ) + ) + (local.set $$or466 + (i32.or + (local.get $$sub465) + (local.get $$conv438) + ) + ) + (local.set $$cmp467 + (i32.eq + (local.get $$or466) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp467) + ) + (block + (local.set $$mul470 + (f64.mul + (local.get $$s$0) + (f64.const 1e-300) + ) + ) + (local.set $$mul471 + (f64.mul + (local.get $$mul470) + (f64.const 1e-300) + ) + ) + (local.set $$retval$0 + (local.get $$mul471) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$sub473 + (f64.sub + (local.get $$add430) + (local.get $$mul429) + ) + ) + (local.set $$cmp474 + (i32.eqz + (f64.le + (local.get $$add428) + (local.get $$sub473) + ) + ) + ) + (if + (i32.eqz + (local.get $$cmp474) + ) + (block + (local.set $$mul477 + (f64.mul + (local.get $$s$0) + (f64.const 1e-300) + ) + ) + (local.set $$mul478 + (f64.mul + (local.get $$mul477) + (f64.const 1e-300) + ) + ) + (local.set $$retval$0 + (local.get $$mul478) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + ) + ) + (local.set $$and482 + (i32.and + (local.get $$conv436) + (i32.const 2147483647) + ) + ) + (local.set $$cmp485 + (i32.gt_u + (local.get $$and482) + (i32.const 1071644672) + ) + ) + (if + (local.get $$cmp485) + (block + (local.set $$25 + (i32.shr_u + (local.get $$and482) + (i32.const 20) + ) + ) + (local.set $$add488 + (i32.add + (local.get $$25) + (i32.const -1022) + ) + ) + (local.set $$shr489 + (i32.shr_u + (i32.const 1048576) + (local.get $$add488) + ) + ) + (local.set $$add490 + (i32.add + (local.get $$shr489) + (local.get $$conv436) + ) + ) + (local.set $$and491 + (i32.shr_u + (local.get $$add490) + (i32.const 20) + ) + ) + (local.set $$26 + (i32.and + (local.get $$and491) + (i32.const 2047) + ) + ) + (local.set $$sub493 + (i32.add + (local.get $$26) + (i32.const -1023) + ) + ) + (local.set $$neg + (i32.shr_s + (i32.const -1048576) + (local.get $$sub493) + ) + ) + (local.set $$and500 + (i32.and + (local.get $$neg) + (local.get $$add490) + ) + ) + (local.set $$conv501302 + (i64.extend_i32_u + (local.get $$and500) + ) + ) + (local.set $$shl502 + (i64.shl + (local.get $$conv501302) + (i64.const 32) + ) + ) + (local.set $$27 + (f64.reinterpret_i64 + (local.get $$shl502) + ) + ) + (local.set $$and508 + (i32.and + (local.get $$add490) + (i32.const 1048575) + ) + ) + (local.set $$or509 + (i32.or + (local.get $$and508) + (i32.const 1048576) + ) + ) + (local.set $$sub510 + (i32.sub + (i32.const 1043) + (local.get $$26) + ) + ) + (local.set $$shr511 + (i32.shr_u + (local.get $$or509) + (local.get $$sub510) + ) + ) + (local.set $$cmp512 + (i32.lt_s + (local.get $$conv436) + (i32.const 0) + ) + ) + (local.set $$sub515 + (i32.sub + (i32.const 0) + (local.get $$shr511) + ) + ) + (local.set $$spec$select303 + (if (result i32) + (local.get $$cmp512) + (local.get $$sub515) + (local.get $$shr511) + ) + ) + (local.set $$sub517 + (f64.sub + (local.get $$mul429) + (local.get $$27) + ) + ) + (local.set $$$pre + (f64.add + (local.get $$add428) + (local.get $$sub517) + ) + ) + (local.set $$$pre317 + (i64.reinterpret_f64 + (local.get $$$pre) + ) + ) + (local.set $$$pre$phiZ2D + (local.get $$$pre317) + ) + (local.set $$n$3 + (local.get $$spec$select303) + ) + (local.set $$p_h$0 + (local.get $$sub517) + ) + ) + (block + (local.set $$$pre$phiZ2D + (local.get $$24) + ) + (local.set $$n$3 + (i32.const 0) + ) + (local.set $$p_h$0 + (local.get $$mul429) + ) + ) + ) + (local.set $$and524 + (i64.and + (local.get $$$pre$phiZ2D) + (i64.const -4294967296) + ) + ) + (local.set $$28 + (f64.reinterpret_i64 + (local.get $$and524) + ) + ) + (local.set $$mul529 + (f64.mul + (local.get $$28) + (f64.const 0.6931471824645996) + ) + ) + (local.set $$sub530 + (f64.sub + (local.get $$28) + (local.get $$p_h$0) + ) + ) + (local.set $$sub531 + (f64.sub + (local.get $$add428) + (local.get $$sub530) + ) + ) + (local.set $$mul532 + (f64.mul + (local.get $$sub531) + (f64.const 0.6931471805599453) + ) + ) + (local.set $$mul533 + (f64.mul + (local.get $$28) + (f64.const 1.904654299957768e-09) + ) + ) + (local.set $$add534316 + (f64.sub + (local.get $$mul532) + (local.get $$mul533) + ) + ) + (local.set $$add535 + (f64.add + (local.get $$mul529) + (local.get $$add534316) + ) + ) + (local.set $$sub536 + (f64.sub + (local.get $$add535) + (local.get $$mul529) + ) + ) + (local.set $$sub537 + (f64.sub + (local.get $$add534316) + (local.get $$sub536) + ) + ) + (local.set $$mul538 + (f64.mul + (local.get $$add535) + (local.get $$add535) + ) + ) + (local.set $$mul539 + (f64.mul + (local.get $$mul538) + (f64.const 4.1381367970572385e-08) + ) + ) + (local.set $$add540 + (f64.add + (local.get $$mul539) + (f64.const -1.6533902205465252e-06) + ) + ) + (local.set $$mul541 + (f64.mul + (local.get $$mul538) + (local.get $$add540) + ) + ) + (local.set $$add542 + (f64.add + (local.get $$mul541) + (f64.const 6.613756321437934e-05) + ) + ) + (local.set $$mul543 + (f64.mul + (local.get $$mul538) + (local.get $$add542) + ) + ) + (local.set $$add544 + (f64.add + (local.get $$mul543) + (f64.const -2.7777777777015593e-03) + ) + ) + (local.set $$mul545 + (f64.mul + (local.get $$mul538) + (local.get $$add544) + ) + ) + (local.set $$add546 + (f64.add + (local.get $$mul545) + (f64.const 0.16666666666666602) + ) + ) + (local.set $$mul547 + (f64.mul + (local.get $$mul538) + (local.get $$add546) + ) + ) + (local.set $$sub548 + (f64.sub + (local.get $$add535) + (local.get $$mul547) + ) + ) + (local.set $$mul549 + (f64.mul + (local.get $$add535) + (local.get $$sub548) + ) + ) + (local.set $$sub550 + (f64.add + (local.get $$sub548) + (f64.const -2) + ) + ) + (local.set $$div551 + (f64.div + (local.get $$mul549) + (local.get $$sub550) + ) + ) + (local.set $$mul552 + (f64.mul + (local.get $$add535) + (local.get $$sub537) + ) + ) + (local.set $$add553 + (f64.add + (local.get $$sub537) + (local.get $$mul552) + ) + ) + (local.set $$sub554 + (f64.sub + (local.get $$div551) + (local.get $$add553) + ) + ) + (local.set $$sub555 + (f64.sub + (local.get $$sub554) + (local.get $$add535) + ) + ) + (local.set $$sub556 + (f64.sub + (f64.const 1) + (local.get $$sub555) + ) + ) + (local.set $$29 + (i64.reinterpret_f64 + (local.get $$sub556) + ) + ) + (local.set $$shr561 + (i64.shr_u + (local.get $$29) + (i64.const 32) + ) + ) + (local.set $$conv562 + (i32.wrap_i64 + (local.get $$shr561) + ) + ) + (local.set $$shl565 + (i32.shl + (local.get $$n$3) + (i32.const 20) + ) + ) + (local.set $$add566 + (i32.add + (local.get $$shl565) + (local.get $$conv562) + ) + ) + (local.set $$cmp568 + (i32.lt_s + (local.get $$add566) + (i32.const 1048576) + ) + ) + (if + (local.get $$cmp568) + (block + (local.set $$call571 + (call $_scalbn + (local.get $$sub556) + (local.get $$n$3) + ) + ) + (local.set $$z$2 + (local.get $$call571) + ) + ) + (block + (local.set $$and577 + (i64.and + (local.get $$29) + (i64.const 4294967295) + ) + ) + (local.set $$conv578301 + (i64.extend_i32_u + (local.get $$add566) + ) + ) + (local.set $$shl579 + (i64.shl + (local.get $$conv578301) + (i64.const 32) + ) + ) + (local.set $$or581 + (i64.or + (local.get $$shl579) + (local.get $$and577) + ) + ) + (local.set $$30 + (f64.reinterpret_i64 + (local.get $$or581) + ) + ) + (local.set $$z$2 + (local.get $$30) + ) + ) + ) + (local.set $$mul586 + (f64.mul + (local.get $$s$0) + (local.get $$z$2) + ) + ) + (local.set $$retval$0 + (local.get $$mul586) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + ) + ) + (local.set $$add + (f64.add + (local.get $$x) + (local.get $$y) + ) + ) + (local.set $$retval$0 + (local.get $$add) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_emscripten_GetProcAddress (; 644 ;) (param $$name_ i32) (result i32) + (local $$add i32) + (local $$call i32) + (local $$call1 i32) + (local $$call12 i32) + (local $$call16 i32) + (local $$call20 i32) + (local $$call23 i32) + (local $$call3 i32) + (local $$call4 i32) + (local $$call8 i32) + (local $$ptr$0 i32) + (local $$tobool i32) + (local $$tobool13 i32) + (local $$tobool17 i32) + (local $$tobool21 i32) + (local $$tobool5 i32) + (local $$tobool9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strlen + (local.get $$name_) + ) + ) + (local.set $$add + (i32.add + (local.get $$call) + (i32.const 1) + ) + ) + (local.set $$call1 + (call $_malloc + (local.get $$add) + ) + ) + (drop + (call $_strcpy + (local.get $$call1) + (local.get $$name_) + ) + ) + (local.set $$call3 + (call $_strstr + (local.get $$call1) + (i32.const 16655) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call3) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool) + ) + (i32.store8 + (local.get $$call3) + (i32.const 0) + ) + ) + (local.set $$call4 + (call $_strstr + (local.get $$call1) + (i32.const 16659) + ) + ) + (local.set $$tobool5 + (i32.eq + (local.get $$call4) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool5) + ) + (i32.store8 + (local.get $$call4) + (i32.const 0) + ) + ) + (local.set $$call8 + (call $_strstr + (local.get $$call1) + (i32.const 16663) + ) + ) + (local.set $$tobool9 + (i32.eq + (local.get $$call8) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool9) + ) + (i32.store8 + (local.get $$call8) + (i32.const 0) + ) + ) + (local.set $$call12 + (call $_strstr + (local.get $$call1) + (i32.const 16667) + ) + ) + (local.set $$tobool13 + (i32.eq + (local.get $$call12) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool13) + ) + (i32.store8 + (local.get $$call12) + (i32.const 0) + ) + ) + (local.set $$call16 + (call $_strstr + (local.get $$call1) + (i32.const 16673) + ) + ) + (local.set $$tobool17 + (i32.eq + (local.get $$call16) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool17) + ) + (i32.store8 + (local.get $$call16) + (i32.const 0) + ) + ) + (local.set $$call20 + (call $_emscripten_webgl1_get_proc_address + (local.get $$call1) + ) + ) + (local.set $$tobool21 + (i32.eq + (local.get $$call20) + (i32.const 0) + ) + ) + (if + (local.get $$tobool21) + (block + (local.set $$call23 + (call $__webgl1_match_ext_proc_address_without_suffix + (local.get $$call1) + ) + ) + (local.set $$ptr$0 + (local.get $$call23) + ) + ) + (local.set $$ptr$0 + (local.get $$call20) + ) + ) + (call $_free + (local.get $$call1) + ) + (return + (local.get $$ptr$0) + ) + ) + (func $_emscripten_webgl1_get_proc_address (; 645 ;) (param $$name i32) (result i32) + (local $$call i32) + (local $$call1 i32) + (local $$call101 i32) + (local $$call105 i32) + (local $$call109 i32) + (local $$call113 i32) + (local $$call117 i32) + (local $$call121 i32) + (local $$call125 i32) + (local $$call129 i32) + (local $$call13 i32) + (local $$call133 i32) + (local $$call137 i32) + (local $$call141 i32) + (local $$call145 i32) + (local $$call149 i32) + (local $$call153 i32) + (local $$call157 i32) + (local $$call161 i32) + (local $$call165 i32) + (local $$call169 i32) + (local $$call17 i32) + (local $$call173 i32) + (local $$call177 i32) + (local $$call181 i32) + (local $$call185 i32) + (local $$call189 i32) + (local $$call193 i32) + (local $$call197 i32) + (local $$call201 i32) + (local $$call205 i32) + (local $$call209 i32) + (local $$call21 i32) + (local $$call213 i32) + (local $$call217 i32) + (local $$call221 i32) + (local $$call225 i32) + (local $$call229 i32) + (local $$call233 i32) + (local $$call237 i32) + (local $$call241 i32) + (local $$call245 i32) + (local $$call249 i32) + (local $$call25 i32) + (local $$call253 i32) + (local $$call257 i32) + (local $$call261 i32) + (local $$call265 i32) + (local $$call269 i32) + (local $$call273 i32) + (local $$call277 i32) + (local $$call281 i32) + (local $$call285 i32) + (local $$call289 i32) + (local $$call29 i32) + (local $$call293 i32) + (local $$call297 i32) + (local $$call301 i32) + (local $$call305 i32) + (local $$call309 i32) + (local $$call313 i32) + (local $$call317 i32) + (local $$call321 i32) + (local $$call325 i32) + (local $$call329 i32) + (local $$call33 i32) + (local $$call333 i32) + (local $$call337 i32) + (local $$call341 i32) + (local $$call345 i32) + (local $$call349 i32) + (local $$call353 i32) + (local $$call357 i32) + (local $$call361 i32) + (local $$call365 i32) + (local $$call369 i32) + (local $$call37 i32) + (local $$call373 i32) + (local $$call377 i32) + (local $$call381 i32) + (local $$call385 i32) + (local $$call389 i32) + (local $$call393 i32) + (local $$call397 i32) + (local $$call401 i32) + (local $$call405 i32) + (local $$call409 i32) + (local $$call41 i32) + (local $$call413 i32) + (local $$call417 i32) + (local $$call421 i32) + (local $$call425 i32) + (local $$call429 i32) + (local $$call433 i32) + (local $$call437 i32) + (local $$call441 i32) + (local $$call445 i32) + (local $$call449 i32) + (local $$call45 i32) + (local $$call453 i32) + (local $$call457 i32) + (local $$call461 i32) + (local $$call465 i32) + (local $$call469 i32) + (local $$call473 i32) + (local $$call477 i32) + (local $$call481 i32) + (local $$call485 i32) + (local $$call489 i32) + (local $$call49 i32) + (local $$call493 i32) + (local $$call497 i32) + (local $$call5 i32) + (local $$call501 i32) + (local $$call505 i32) + (local $$call509 i32) + (local $$call513 i32) + (local $$call517 i32) + (local $$call521 i32) + (local $$call525 i32) + (local $$call529 i32) + (local $$call53 i32) + (local $$call533 i32) + (local $$call537 i32) + (local $$call541 i32) + (local $$call545 i32) + (local $$call549 i32) + (local $$call553 i32) + (local $$call557 i32) + (local $$call561 i32) + (local $$call565 i32) + (local $$call569 i32) + (local $$call57 i32) + (local $$call573 i32) + (local $$call577 i32) + (local $$call581 i32) + (local $$call585 i32) + (local $$call589 i32) + (local $$call593 i32) + (local $$call597 i32) + (local $$call601 i32) + (local $$call605 i32) + (local $$call609 i32) + (local $$call61 i32) + (local $$call613 i32) + (local $$call617 i32) + (local $$call621 i32) + (local $$call625 i32) + (local $$call629 i32) + (local $$call633 i32) + (local $$call637 i32) + (local $$call65 i32) + (local $$call69 i32) + (local $$call73 i32) + (local $$call77 i32) + (local $$call81 i32) + (local $$call85 i32) + (local $$call89 i32) + (local $$call9 i32) + (local $$call93 i32) + (local $$call97 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool102 i32) + (local $$tobool106 i32) + (local $$tobool110 i32) + (local $$tobool114 i32) + (local $$tobool118 i32) + (local $$tobool122 i32) + (local $$tobool126 i32) + (local $$tobool130 i32) + (local $$tobool134 i32) + (local $$tobool138 i32) + (local $$tobool14 i32) + (local $$tobool142 i32) + (local $$tobool146 i32) + (local $$tobool150 i32) + (local $$tobool154 i32) + (local $$tobool158 i32) + (local $$tobool162 i32) + (local $$tobool166 i32) + (local $$tobool170 i32) + (local $$tobool174 i32) + (local $$tobool178 i32) + (local $$tobool18 i32) + (local $$tobool182 i32) + (local $$tobool186 i32) + (local $$tobool190 i32) + (local $$tobool194 i32) + (local $$tobool198 i32) + (local $$tobool2 i32) + (local $$tobool202 i32) + (local $$tobool206 i32) + (local $$tobool210 i32) + (local $$tobool214 i32) + (local $$tobool218 i32) + (local $$tobool22 i32) + (local $$tobool222 i32) + (local $$tobool226 i32) + (local $$tobool230 i32) + (local $$tobool234 i32) + (local $$tobool238 i32) + (local $$tobool242 i32) + (local $$tobool246 i32) + (local $$tobool250 i32) + (local $$tobool254 i32) + (local $$tobool258 i32) + (local $$tobool26 i32) + (local $$tobool262 i32) + (local $$tobool266 i32) + (local $$tobool270 i32) + (local $$tobool274 i32) + (local $$tobool278 i32) + (local $$tobool282 i32) + (local $$tobool286 i32) + (local $$tobool290 i32) + (local $$tobool294 i32) + (local $$tobool298 i32) + (local $$tobool30 i32) + (local $$tobool302 i32) + (local $$tobool306 i32) + (local $$tobool310 i32) + (local $$tobool314 i32) + (local $$tobool318 i32) + (local $$tobool322 i32) + (local $$tobool326 i32) + (local $$tobool330 i32) + (local $$tobool334 i32) + (local $$tobool338 i32) + (local $$tobool34 i32) + (local $$tobool342 i32) + (local $$tobool346 i32) + (local $$tobool350 i32) + (local $$tobool354 i32) + (local $$tobool358 i32) + (local $$tobool362 i32) + (local $$tobool366 i32) + (local $$tobool370 i32) + (local $$tobool374 i32) + (local $$tobool378 i32) + (local $$tobool38 i32) + (local $$tobool382 i32) + (local $$tobool386 i32) + (local $$tobool390 i32) + (local $$tobool394 i32) + (local $$tobool398 i32) + (local $$tobool402 i32) + (local $$tobool406 i32) + (local $$tobool410 i32) + (local $$tobool414 i32) + (local $$tobool418 i32) + (local $$tobool42 i32) + (local $$tobool422 i32) + (local $$tobool426 i32) + (local $$tobool430 i32) + (local $$tobool434 i32) + (local $$tobool438 i32) + (local $$tobool442 i32) + (local $$tobool446 i32) + (local $$tobool450 i32) + (local $$tobool454 i32) + (local $$tobool458 i32) + (local $$tobool46 i32) + (local $$tobool462 i32) + (local $$tobool466 i32) + (local $$tobool470 i32) + (local $$tobool474 i32) + (local $$tobool478 i32) + (local $$tobool482 i32) + (local $$tobool486 i32) + (local $$tobool490 i32) + (local $$tobool494 i32) + (local $$tobool498 i32) + (local $$tobool50 i32) + (local $$tobool502 i32) + (local $$tobool506 i32) + (local $$tobool510 i32) + (local $$tobool514 i32) + (local $$tobool518 i32) + (local $$tobool522 i32) + (local $$tobool526 i32) + (local $$tobool530 i32) + (local $$tobool534 i32) + (local $$tobool538 i32) + (local $$tobool54 i32) + (local $$tobool542 i32) + (local $$tobool546 i32) + (local $$tobool550 i32) + (local $$tobool554 i32) + (local $$tobool558 i32) + (local $$tobool562 i32) + (local $$tobool566 i32) + (local $$tobool570 i32) + (local $$tobool574 i32) + (local $$tobool578 i32) + (local $$tobool58 i32) + (local $$tobool582 i32) + (local $$tobool586 i32) + (local $$tobool590 i32) + (local $$tobool594 i32) + (local $$tobool598 i32) + (local $$tobool6 i32) + (local $$tobool602 i32) + (local $$tobool606 i32) + (local $$tobool610 i32) + (local $$tobool614 i32) + (local $$tobool618 i32) + (local $$tobool62 i32) + (local $$tobool622 i32) + (local $$tobool626 i32) + (local $$tobool630 i32) + (local $$tobool634 i32) + (local $$tobool638 i32) + (local $$tobool66 i32) + (local $$tobool70 i32) + (local $$tobool74 i32) + (local $$tobool78 i32) + (local $$tobool82 i32) + (local $$tobool86 i32) + (local $$tobool90 i32) + (local $$tobool94 i32) + (local $$tobool98 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strcmp + (local.get $$name) + (i32.const 17007) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (block $do-once + (if + (local.get $$tobool) + (local.set $$retval$0 + (i32.const 36) + ) + (block + (local.set $$call1 + (call $_strcmp + (local.get $$name) + (i32.const 17023) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (local.set $$retval$0 + (i32.const 37) + ) + (block + (local.set $$call5 + (call $_strcmp + (local.get $$name) + (i32.const 17038) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$call5) + (i32.const 0) + ) + ) + (if + (local.get $$tobool6) + (local.set $$retval$0 + (i32.const 38) + ) + (block + (local.set $$call9 + (call $_strcmp + (local.get $$name) + (i32.const 17059) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$call9) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (local.set $$retval$0 + (i32.const 39) + ) + (block + (local.set $$call13 + (call $_strcmp + (local.get $$name) + (i32.const 17072) + ) + ) + (local.set $$tobool14 + (i32.eq + (local.get $$call13) + (i32.const 0) + ) + ) + (if + (local.get $$tobool14) + (local.set $$retval$0 + (i32.const 40) + ) + (block + (local.set $$call17 + (call $_strcmp + (local.get $$name) + (i32.const 17090) + ) + ) + (local.set $$tobool18 + (i32.eq + (local.get $$call17) + (i32.const 0) + ) + ) + (if + (local.get $$tobool18) + (local.set $$retval$0 + (i32.const 41) + ) + (block + (local.set $$call21 + (call $_strcmp + (local.get $$name) + (i32.const 17109) + ) + ) + (local.set $$tobool22 + (i32.eq + (local.get $$call21) + (i32.const 0) + ) + ) + (if + (local.get $$tobool22) + (local.set $$retval$0 + (i32.const 42) + ) + (block + (local.set $$call25 + (call $_strcmp + (local.get $$name) + (i32.const 17123) + ) + ) + (local.set $$tobool26 + (i32.eq + (local.get $$call25) + (i32.const 0) + ) + ) + (if + (local.get $$tobool26) + (local.set $$retval$0 + (i32.const 43) + ) + (block + (local.set $$call29 + (call $_strcmp + (local.get $$name) + (i32.const 17136) + ) + ) + (local.set $$tobool30 + (i32.eq + (local.get $$call29) + (i32.const 0) + ) + ) + (if + (local.get $$tobool30) + (local.set $$retval$0 + (i32.const 44) + ) + (block + (local.set $$call33 + (call $_strcmp + (local.get $$name) + (i32.const 17152) + ) + ) + (local.set $$tobool34 + (i32.eq + (local.get $$call33) + (i32.const 0) + ) + ) + (if + (local.get $$tobool34) + (local.set $$retval$0 + (i32.const 45) + ) + (block + (local.set $$call37 + (call $_strcmp + (local.get $$name) + (i32.const 17176) + ) + ) + (local.set $$tobool38 + (i32.eq + (local.get $$call37) + (i32.const 0) + ) + ) + (if + (local.get $$tobool38) + (local.set $$retval$0 + (i32.const 46) + ) + (block + (local.set $$call41 + (call $_strcmp + (local.get $$name) + (i32.const 17188) + ) + ) + (local.set $$tobool42 + (i32.eq + (local.get $$call41) + (i32.const 0) + ) + ) + (if + (local.get $$tobool42) + (local.set $$retval$0 + (i32.const 47) + ) + (block + (local.set $$call45 + (call $_strcmp + (local.get $$name) + (i32.const 17208) + ) + ) + (local.set $$tobool46 + (i32.eq + (local.get $$call45) + (i32.const 0) + ) + ) + (if + (local.get $$tobool46) + (local.set $$retval$0 + (i32.const 48) + ) + (block + (local.set $$call49 + (call $_strcmp + (local.get $$name) + (i32.const 17221) + ) + ) + (local.set $$tobool50 + (i32.eq + (local.get $$call49) + (i32.const 0) + ) + ) + (if + (local.get $$tobool50) + (local.set $$retval$0 + (i32.const 49) + ) + (block + (local.set $$call53 + (call $_strcmp + (local.get $$name) + (i32.const 17237) + ) + ) + (local.set $$tobool54 + (i32.eq + (local.get $$call53) + (i32.const 0) + ) + ) + (if + (local.get $$tobool54) + (local.set $$retval$0 + (i32.const 50) + ) + (block + (local.set $$call57 + (call $_strcmp + (local.get $$name) + (i32.const 17262) + ) + ) + (local.set $$tobool58 + (i32.eq + (local.get $$call57) + (i32.const 0) + ) + ) + (if + (local.get $$tobool58) + (local.set $$retval$0 + (i32.const 51) + ) + (block + (local.set $$call61 + (call $_strcmp + (local.get $$name) + (i32.const 17270) + ) + ) + (local.set $$tobool62 + (i32.eq + (local.get $$call61) + (i32.const 0) + ) + ) + (if + (local.get $$tobool62) + (local.set $$retval$0 + (i32.const 52) + ) + (block + (local.set $$call65 + (call $_strcmp + (local.get $$name) + (i32.const 17283) + ) + ) + (local.set $$tobool66 + (i32.eq + (local.get $$call65) + (i32.const 0) + ) + ) + (if + (local.get $$tobool66) + (local.set $$retval$0 + (i32.const 53) + ) + (block + (local.set $$call69 + (call $_strcmp + (local.get $$name) + (i32.const 17297) + ) + ) + (local.set $$tobool70 + (i32.eq + (local.get $$call69) + (i32.const 0) + ) + ) + (if + (local.get $$tobool70) + (local.set $$retval$0 + (i32.const 54) + ) + (block + (local.set $$call73 + (call $_strcmp + (local.get $$name) + (i32.const 17312) + ) + ) + (local.set $$tobool74 + (i32.eq + (local.get $$call73) + (i32.const 0) + ) + ) + (if + (local.get $$tobool74) + (block + (local.set $$retval$0 + (i32.const 55) + ) + (br $do-once) + ) + ) + (local.set $$call77 + (call $_strcmp + (local.get $$name) + (i32.const 17324) + ) + ) + (local.set $$tobool78 + (i32.eq + (local.get $$call77) + (i32.const 0) + ) + ) + (if + (local.get $$tobool78) + (block + (local.set $$retval$0 + (i32.const 56) + ) + (br $do-once) + ) + ) + (local.set $$call81 + (call $_strcmp + (local.get $$name) + (i32.const 17340) + ) + ) + (local.set $$tobool82 + (i32.eq + (local.get $$call81) + (i32.const 0) + ) + ) + (if + (local.get $$tobool82) + (block + (local.set $$retval$0 + (i32.const 57) + ) + (br $do-once) + ) + ) + (local.set $$call85 + (call $_strcmp + (local.get $$name) + (i32.const 17363) + ) + ) + (local.set $$tobool86 + (i32.eq + (local.get $$call85) + (i32.const 0) + ) + ) + (if + (local.get $$tobool86) + (block + (local.set $$retval$0 + (i32.const 58) + ) + (br $do-once) + ) + ) + (local.set $$call89 + (call $_strcmp + (local.get $$name) + (i32.const 17389) + ) + ) + (local.set $$tobool90 + (i32.eq + (local.get $$call89) + (i32.const 0) + ) + ) + (if + (local.get $$tobool90) + (block + (local.set $$retval$0 + (i32.const 59) + ) + (br $do-once) + ) + ) + (local.set $$call93 + (call $_strcmp + (local.get $$name) + (i32.const 17406) + ) + ) + (local.set $$tobool94 + (i32.eq + (local.get $$call93) + (i32.const 0) + ) + ) + (if + (local.get $$tobool94) + (block + (local.set $$retval$0 + (i32.const 60) + ) + (br $do-once) + ) + ) + (local.set $$call97 + (call $_strcmp + (local.get $$name) + (i32.const 17426) + ) + ) + (local.set $$tobool98 + (i32.eq + (local.get $$call97) + (i32.const 0) + ) + ) + (if + (local.get $$tobool98) + (block + (local.set $$retval$0 + (i32.const 61) + ) + (br $do-once) + ) + ) + (local.set $$call101 + (call $_strcmp + (local.get $$name) + (i32.const 17442) + ) + ) + (local.set $$tobool102 + (i32.eq + (local.get $$call101) + (i32.const 0) + ) + ) + (if + (local.get $$tobool102) + (block + (local.set $$retval$0 + (i32.const 62) + ) + (br $do-once) + ) + ) + (local.set $$call105 + (call $_strcmp + (local.get $$name) + (i32.const 17457) + ) + ) + (local.set $$tobool106 + (i32.eq + (local.get $$call105) + (i32.const 0) + ) + ) + (if + (local.get $$tobool106) + (block + (local.set $$retval$0 + (i32.const 63) + ) + (br $do-once) + ) + ) + (local.set $$call109 + (call $_strcmp + (local.get $$name) + (i32.const 17468) + ) + ) + (local.set $$tobool110 + (i32.eq + (local.get $$call109) + (i32.const 0) + ) + ) + (if + (local.get $$tobool110) + (block + (local.set $$retval$0 + (i32.const 64) + ) + (br $do-once) + ) + ) + (local.set $$call113 + (call $_strcmp + (local.get $$name) + (i32.const 17484) + ) + ) + (local.set $$tobool114 + (i32.eq + (local.get $$call113) + (i32.const 0) + ) + ) + (if + (local.get $$tobool114) + (block + (local.set $$retval$0 + (i32.const 65) + ) + (br $do-once) + ) + ) + (local.set $$call117 + (call $_strcmp + (local.get $$name) + (i32.const 17505) + ) + ) + (local.set $$tobool118 + (i32.eq + (local.get $$call117) + (i32.const 0) + ) + ) + (if + (local.get $$tobool118) + (block + (local.set $$retval$0 + (i32.const 66) + ) + (br $do-once) + ) + ) + (local.set $$call121 + (call $_strcmp + (local.get $$name) + (i32.const 17521) + ) + ) + (local.set $$tobool122 + (i32.eq + (local.get $$call121) + (i32.const 0) + ) + ) + (if + (local.get $$tobool122) + (block + (local.set $$retval$0 + (i32.const 67) + ) + (br $do-once) + ) + ) + (local.set $$call125 + (call $_strcmp + (local.get $$name) + (i32.const 17543) + ) + ) + (local.set $$tobool126 + (i32.eq + (local.get $$call125) + (i32.const 0) + ) + ) + (if + (local.get $$tobool126) + (block + (local.set $$retval$0 + (i32.const 68) + ) + (br $do-once) + ) + ) + (local.set $$call129 + (call $_strcmp + (local.get $$name) + (i32.const 17558) + ) + ) + (local.set $$tobool130 + (i32.eq + (local.get $$call129) + (i32.const 0) + ) + ) + (if + (local.get $$tobool130) + (block + (local.set $$retval$0 + (i32.const 69) + ) + (br $do-once) + ) + ) + (local.set $$call133 + (call $_strcmp + (local.get $$name) + (i32.const 17575) + ) + ) + (local.set $$tobool134 + (i32.eq + (local.get $$call133) + (i32.const 0) + ) + ) + (if + (local.get $$tobool134) + (block + (local.set $$retval$0 + (i32.const 70) + ) + (br $do-once) + ) + ) + (local.set $$call137 + (call $_strcmp + (local.get $$name) + (i32.const 17587) + ) + ) + (local.set $$tobool138 + (i32.eq + (local.get $$call137) + (i32.const 0) + ) + ) + (if + (local.get $$tobool138) + (block + (local.set $$retval$0 + (i32.const 71) + ) + (br $do-once) + ) + ) + (local.set $$call141 + (call $_strcmp + (local.get $$name) + (i32.const 17599) + ) + ) + (local.set $$tobool142 + (i32.eq + (local.get $$call141) + (i32.const 0) + ) + ) + (if + (local.get $$tobool142) + (block + (local.set $$retval$0 + (i32.const 72) + ) + (br $do-once) + ) + ) + (local.set $$call145 + (call $_strcmp + (local.get $$name) + (i32.const 17613) + ) + ) + (local.set $$tobool146 + (i32.eq + (local.get $$call145) + (i32.const 0) + ) + ) + (if + (local.get $$tobool146) + (block + (local.set $$retval$0 + (i32.const 73) + ) + (br $do-once) + ) + ) + (local.set $$call149 + (call $_strcmp + (local.get $$name) + (i32.const 17628) + ) + ) + (local.set $$tobool150 + (i32.eq + (local.get $$call149) + (i32.const 0) + ) + ) + (if + (local.get $$tobool150) + (block + (local.set $$retval$0 + (i32.const 74) + ) + (br $do-once) + ) + ) + (local.set $$call153 + (call $_strcmp + (local.get $$name) + (i32.const 17638) + ) + ) + (local.set $$tobool154 + (i32.eq + (local.get $$call153) + (i32.const 0) + ) + ) + (if + (local.get $$tobool154) + (block + (local.set $$retval$0 + (i32.const 75) + ) + (br $do-once) + ) + ) + (local.set $$call157 + (call $_strcmp + (local.get $$name) + (i32.const 17665) + ) + ) + (local.set $$tobool158 + (i32.eq + (local.get $$call157) + (i32.const 0) + ) + ) + (if + (local.get $$tobool158) + (block + (local.set $$retval$0 + (i32.const 76) + ) + (br $do-once) + ) + ) + (local.set $$call161 + (call $_strcmp + (local.get $$name) + (i32.const 17678) + ) + ) + (local.set $$tobool162 + (i32.eq + (local.get $$call161) + (i32.const 0) + ) + ) + (if + (local.get $$tobool162) + (block + (local.set $$retval$0 + (i32.const 77) + ) + (br $do-once) + ) + ) + (local.set $$call165 + (call $_strcmp + (local.get $$name) + (i32.const 17693) + ) + ) + (local.set $$tobool166 + (i32.eq + (local.get $$call165) + (i32.const 0) + ) + ) + (if + (local.get $$tobool166) + (block + (local.set $$retval$0 + (i32.const 78) + ) + (br $do-once) + ) + ) + (local.set $$call169 + (call $_strcmp + (local.get $$name) + (i32.const 17702) + ) + ) + (local.set $$tobool170 + (i32.eq + (local.get $$call169) + (i32.const 0) + ) + ) + (if + (local.get $$tobool170) + (block + (local.set $$retval$0 + (i32.const 79) + ) + (br $do-once) + ) + ) + (local.set $$call173 + (call $_strcmp + (local.get $$name) + (i32.const 17728) + ) + ) + (local.set $$tobool174 + (i32.eq + (local.get $$call173) + (i32.const 0) + ) + ) + (if + (local.get $$tobool174) + (block + (local.set $$retval$0 + (i32.const 80) + ) + (br $do-once) + ) + ) + (local.set $$call177 + (call $_strcmp + (local.get $$name) + (i32.const 17737) + ) + ) + (local.set $$tobool178 + (i32.eq + (local.get $$call177) + (i32.const 0) + ) + ) + (if + (local.get $$tobool178) + (block + (local.set $$retval$0 + (i32.const 81) + ) + (br $do-once) + ) + ) + (local.set $$call181 + (call $_strcmp + (local.get $$name) + (i32.const 17745) + ) + ) + (local.set $$tobool182 + (i32.eq + (local.get $$call181) + (i32.const 0) + ) + ) + (if + (local.get $$tobool182) + (block + (local.set $$retval$0 + (i32.const 82) + ) + (br $do-once) + ) + ) + (local.set $$call185 + (call $_strcmp + (local.get $$name) + (i32.const 17771) + ) + ) + (local.set $$tobool186 + (i32.eq + (local.get $$call185) + (i32.const 0) + ) + ) + (if + (local.get $$tobool186) + (block + (local.set $$retval$0 + (i32.const 83) + ) + (br $do-once) + ) + ) + (local.set $$call189 + (call $_strcmp + (local.get $$name) + (i32.const 17794) + ) + ) + (local.set $$tobool190 + (i32.eq + (local.get $$call189) + (i32.const 0) + ) + ) + (if + (local.get $$tobool190) + (block + (local.set $$retval$0 + (i32.const 84) + ) + (br $do-once) + ) + ) + (local.set $$call193 + (call $_strcmp + (local.get $$name) + (i32.const 17806) + ) + ) + (local.set $$tobool194 + (i32.eq + (local.get $$call193) + (i32.const 0) + ) + ) + (if + (local.get $$tobool194) + (block + (local.set $$retval$0 + (i32.const 85) + ) + (br $do-once) + ) + ) + (local.set $$call197 + (call $_strcmp + (local.get $$name) + (i32.const 17819) + ) + ) + (local.set $$tobool198 + (i32.eq + (local.get $$call197) + (i32.const 0) + ) + ) + (if + (local.get $$tobool198) + (block + (local.set $$retval$0 + (i32.const 86) + ) + (br $do-once) + ) + ) + (local.set $$call201 + (call $_strcmp + (local.get $$name) + (i32.const 17836) + ) + ) + (local.set $$tobool202 + (i32.eq + (local.get $$call201) + (i32.const 0) + ) + ) + (if + (local.get $$tobool202) + (block + (local.set $$retval$0 + (i32.const 87) + ) + (br $do-once) + ) + ) + (local.set $$call205 + (call $_strcmp + (local.get $$name) + (i32.const 17854) + ) + ) + (local.set $$tobool206 + (i32.eq + (local.get $$call205) + (i32.const 0) + ) + ) + (if + (local.get $$tobool206) + (block + (local.set $$retval$0 + (i32.const 88) + ) + (br $do-once) + ) + ) + (local.set $$call209 + (call $_strcmp + (local.get $$name) + (i32.const 17873) + ) + ) + (local.set $$tobool210 + (i32.eq + (local.get $$call209) + (i32.const 0) + ) + ) + (if + (local.get $$tobool210) + (block + (local.set $$retval$0 + (i32.const 89) + ) + (br $do-once) + ) + ) + (local.set $$call213 + (call $_strcmp + (local.get $$name) + (i32.const 17887) + ) + ) + (local.set $$tobool214 + (i32.eq + (local.get $$call213) + (i32.const 0) + ) + ) + (if + (local.get $$tobool214) + (block + (local.set $$retval$0 + (i32.const 90) + ) + (br $do-once) + ) + ) + (local.set $$call217 + (call $_strcmp + (local.get $$name) + (i32.const 17905) + ) + ) + (local.set $$tobool218 + (i32.eq + (local.get $$call217) + (i32.const 0) + ) + ) + (if + (local.get $$tobool218) + (block + (local.set $$retval$0 + (i32.const 91) + ) + (br $do-once) + ) + ) + (local.set $$call221 + (call $_strcmp + (local.get $$name) + (i32.const 17924) + ) + ) + (local.set $$tobool222 + (i32.eq + (local.get $$call221) + (i32.const 0) + ) + ) + (if + (local.get $$tobool222) + (block + (local.set $$retval$0 + (i32.const 92) + ) + (br $do-once) + ) + ) + (local.set $$call225 + (call $_strcmp + (local.get $$name) + (i32.const 17945) + ) + ) + (local.set $$tobool226 + (i32.eq + (local.get $$call225) + (i32.const 0) + ) + ) + (if + (local.get $$tobool226) + (block + (local.set $$retval$0 + (i32.const 93) + ) + (br $do-once) + ) + ) + (local.set $$call229 + (call $_strcmp + (local.get $$name) + (i32.const 17965) + ) + ) + (local.set $$tobool230 + (i32.eq + (local.get $$call229) + (i32.const 0) + ) + ) + (if + (local.get $$tobool230) + (block + (local.set $$retval$0 + (i32.const 94) + ) + (br $do-once) + ) + ) + (local.set $$call233 + (call $_strcmp + (local.get $$name) + (i32.const 17979) + ) + ) + (local.set $$tobool234 + (i32.eq + (local.get $$call233) + (i32.const 0) + ) + ) + (if + (local.get $$tobool234) + (block + (local.set $$retval$0 + (i32.const 95) + ) + (br $do-once) + ) + ) + (local.set $$call237 + (call $_strcmp + (local.get $$name) + (i32.const 18002) + ) + ) + (local.set $$tobool238 + (i32.eq + (local.get $$call237) + (i32.const 0) + ) + ) + (if + (local.get $$tobool238) + (block + (local.set $$retval$0 + (i32.const 96) + ) + (br $do-once) + ) + ) + (local.set $$call241 + (call $_strcmp + (local.get $$name) + (i32.const 18013) + ) + ) + (local.set $$tobool242 + (i32.eq + (local.get $$call241) + (i32.const 0) + ) + ) + (if + (local.get $$tobool242) + (block + (local.set $$retval$0 + (i32.const 97) + ) + (br $do-once) + ) + ) + (local.set $$call245 + (call $_strcmp + (local.get $$name) + (i32.const 18025) + ) + ) + (local.set $$tobool246 + (i32.eq + (local.get $$call245) + (i32.const 0) + ) + ) + (if + (local.get $$tobool246) + (block + (local.set $$retval$0 + (i32.const 98) + ) + (br $do-once) + ) + ) + (local.set $$call249 + (call $_strcmp + (local.get $$name) + (i32.const 18063) + ) + ) + (local.set $$tobool250 + (i32.eq + (local.get $$call249) + (i32.const 0) + ) + ) + (if + (local.get $$tobool250) + (block + (local.set $$retval$0 + (i32.const 99) + ) + (br $do-once) + ) + ) + (local.set $$call253 + (call $_strcmp + (local.get $$name) + (i32.const 18077) + ) + ) + (local.set $$tobool254 + (i32.eq + (local.get $$call253) + (i32.const 0) + ) + ) + (if + (local.get $$tobool254) + (block + (local.set $$retval$0 + (i32.const 100) + ) + (br $do-once) + ) + ) + (local.set $$call257 + (call $_strcmp + (local.get $$name) + (i32.const 18092) + ) + ) + (local.set $$tobool258 + (i32.eq + (local.get $$call257) + (i32.const 0) + ) + ) + (if + (local.get $$tobool258) + (block + (local.set $$retval$0 + (i32.const 101) + ) + (br $do-once) + ) + ) + (local.set $$call261 + (call $_strcmp + (local.get $$name) + (i32.const 18112) + ) + ) + (local.set $$tobool262 + (i32.eq + (local.get $$call261) + (i32.const 0) + ) + ) + (if + (local.get $$tobool262) + (block + (local.set $$retval$0 + (i32.const 102) + ) + (br $do-once) + ) + ) + (local.set $$call265 + (call $_strcmp + (local.get $$name) + (i32.const 18141) + ) + ) + (local.set $$tobool266 + (i32.eq + (local.get $$call265) + (i32.const 0) + ) + ) + (if + (local.get $$tobool266) + (block + (local.set $$retval$0 + (i32.const 103) + ) + (br $do-once) + ) + ) + (local.set $$call269 + (call $_strcmp + (local.get $$name) + (i32.const 18155) + ) + ) + (local.set $$tobool270 + (i32.eq + (local.get $$call269) + (i32.const 0) + ) + ) + (if + (local.get $$tobool270) + (block + (local.set $$retval$0 + (i32.const 104) + ) + (br $do-once) + ) + ) + (local.set $$call273 + (call $_strcmp + (local.get $$name) + (i32.const 18174) + ) + ) + (local.set $$tobool274 + (i32.eq + (local.get $$call273) + (i32.const 0) + ) + ) + (if + (local.get $$tobool274) + (block + (local.set $$retval$0 + (i32.const 105) + ) + (br $do-once) + ) + ) + (local.set $$call277 + (call $_strcmp + (local.get $$name) + (i32.const 18201) + ) + ) + (local.set $$tobool278 + (i32.eq + (local.get $$call277) + (i32.const 0) + ) + ) + (if + (local.get $$tobool278) + (block + (local.set $$retval$0 + (i32.const 106) + ) + (br $do-once) + ) + ) + (local.set $$call281 + (call $_strcmp + (local.get $$name) + (i32.const 18219) + ) + ) + (local.set $$tobool282 + (i32.eq + (local.get $$call281) + (i32.const 0) + ) + ) + (if + (local.get $$tobool282) + (block + (local.set $$retval$0 + (i32.const 107) + ) + (br $do-once) + ) + ) + (local.set $$call285 + (call $_strcmp + (local.get $$name) + (i32.const 18231) + ) + ) + (local.set $$tobool286 + (i32.eq + (local.get $$call285) + (i32.const 0) + ) + ) + (if + (local.get $$tobool286) + (block + (local.set $$retval$0 + (i32.const 108) + ) + (br $do-once) + ) + ) + (local.set $$call289 + (call $_strcmp + (local.get $$name) + (i32.const 18251) + ) + ) + (local.set $$tobool290 + (i32.eq + (local.get $$call289) + (i32.const 0) + ) + ) + (if + (local.get $$tobool290) + (block + (local.set $$retval$0 + (i32.const 109) + ) + (br $do-once) + ) + ) + (local.set $$call293 + (call $_strcmp + (local.get $$name) + (i32.const 18271) + ) + ) + (local.set $$tobool294 + (i32.eq + (local.get $$call293) + (i32.const 0) + ) + ) + (if + (local.get $$tobool294) + (block + (local.set $$retval$0 + (i32.const 110) + ) + (br $do-once) + ) + ) + (local.set $$call297 + (call $_strcmp + (local.get $$name) + (i32.const 18286) + ) + ) + (local.set $$tobool298 + (i32.eq + (local.get $$call297) + (i32.const 0) + ) + ) + (if + (local.get $$tobool298) + (block + (local.set $$retval$0 + (i32.const 111) + ) + (br $do-once) + ) + ) + (local.set $$call301 + (call $_strcmp + (local.get $$name) + (i32.const 18301) + ) + ) + (local.set $$tobool302 + (i32.eq + (local.get $$call301) + (i32.const 0) + ) + ) + (if + (local.get $$tobool302) + (block + (local.set $$retval$0 + (i32.const 112) + ) + (br $do-once) + ) + ) + (local.set $$call305 + (call $_strcmp + (local.get $$name) + (i32.const 18322) + ) + ) + (local.set $$tobool306 + (i32.eq + (local.get $$call305) + (i32.const 0) + ) + ) + (if + (local.get $$tobool306) + (block + (local.set $$retval$0 + (i32.const 113) + ) + (br $do-once) + ) + ) + (local.set $$call309 + (call $_strcmp + (local.get $$name) + (i32.const 18342) + ) + ) + (local.set $$tobool310 + (i32.eq + (local.get $$call309) + (i32.const 0) + ) + ) + (if + (local.get $$tobool310) + (block + (local.set $$retval$0 + (i32.const 114) + ) + (br $do-once) + ) + ) + (local.set $$call313 + (call $_strcmp + (local.get $$name) + (i32.const 18362) + ) + ) + (local.set $$tobool314 + (i32.eq + (local.get $$call313) + (i32.const 0) + ) + ) + (if + (local.get $$tobool314) + (block + (local.set $$retval$0 + (i32.const 115) + ) + (br $do-once) + ) + ) + (local.set $$call317 + (call $_strcmp + (local.get $$name) + (i32.const 18388) + ) + ) + (local.set $$tobool318 + (i32.eq + (local.get $$call317) + (i32.const 0) + ) + ) + (if + (local.get $$tobool318) + (block + (local.set $$retval$0 + (i32.const 116) + ) + (br $do-once) + ) + ) + (local.set $$call321 + (call $_strcmp + (local.get $$name) + (i32.const 18395) + ) + ) + (local.set $$tobool322 + (i32.eq + (local.get $$call321) + (i32.const 0) + ) + ) + (if + (local.get $$tobool322) + (block + (local.set $$retval$0 + (i32.const 117) + ) + (br $do-once) + ) + ) + (local.set $$call325 + (call $_strcmp + (local.get $$name) + (i32.const 18406) + ) + ) + (local.set $$tobool326 + (i32.eq + (local.get $$call325) + (i32.const 0) + ) + ) + (if + (local.get $$tobool326) + (block + (local.set $$retval$0 + (i32.const 118) + ) + (br $do-once) + ) + ) + (local.set $$call329 + (call $_strcmp + (local.get $$name) + (i32.const 18418) + ) + ) + (local.set $$tobool330 + (i32.eq + (local.get $$call329) + (i32.const 0) + ) + ) + (if + (local.get $$tobool330) + (block + (local.set $$retval$0 + (i32.const 119) + ) + (br $do-once) + ) + ) + (local.set $$call333 + (call $_strcmp + (local.get $$name) + (i32.const 18434) + ) + ) + (local.set $$tobool334 + (i32.eq + (local.get $$call333) + (i32.const 0) + ) + ) + (if + (local.get $$tobool334) + (block + (local.set $$retval$0 + (i32.const 120) + ) + (br $do-once) + ) + ) + (local.set $$call337 + (call $_strcmp + (local.get $$name) + (i32.const 18446) + ) + ) + (local.set $$tobool338 + (i32.eq + (local.get $$call337) + (i32.const 0) + ) + ) + (if + (local.get $$tobool338) + (block + (local.set $$retval$0 + (i32.const 121) + ) + (br $do-once) + ) + ) + (local.set $$call341 + (call $_strcmp + (local.get $$name) + (i32.const 18463) + ) + ) + (local.set $$tobool342 + (i32.eq + (local.get $$call341) + (i32.const 0) + ) + ) + (if + (local.get $$tobool342) + (block + (local.set $$retval$0 + (i32.const 122) + ) + (br $do-once) + ) + ) + (local.set $$call345 + (call $_strcmp + (local.get $$name) + (i32.const 18474) + ) + ) + (local.set $$tobool346 + (i32.eq + (local.get $$call345) + (i32.const 0) + ) + ) + (if + (local.get $$tobool346) + (block + (local.set $$retval$0 + (i32.const 123) + ) + (br $do-once) + ) + ) + (local.set $$call349 + (call $_strcmp + (local.get $$name) + (i32.const 18486) + ) + ) + (local.set $$tobool350 + (i32.eq + (local.get $$call349) + (i32.const 0) + ) + ) + (if + (local.get $$tobool350) + (block + (local.set $$retval$0 + (i32.const 124) + ) + (br $do-once) + ) + ) + (local.set $$call353 + (call $_strcmp + (local.get $$name) + (i32.const 18498) + ) + ) + (local.set $$tobool354 + (i32.eq + (local.get $$call353) + (i32.const 0) + ) + ) + (if + (local.get $$tobool354) + (block + (local.set $$retval$0 + (i32.const 125) + ) + (br $do-once) + ) + ) + (local.set $$call357 + (call $_strcmp + (local.get $$name) + (i32.const 18512) + ) + ) + (local.set $$tobool358 + (i32.eq + (local.get $$call357) + (i32.const 0) + ) + ) + (if + (local.get $$tobool358) + (block + (local.set $$retval$0 + (i32.const 126) + ) + (br $do-once) + ) + ) + (local.set $$call361 + (call $_strcmp + (local.get $$name) + (i32.const 18526) + ) + ) + (local.set $$tobool362 + (i32.eq + (local.get $$call361) + (i32.const 0) + ) + ) + (if + (local.get $$tobool362) + (block + (local.set $$retval$0 + (i32.const 127) + ) + (br $do-once) + ) + ) + (local.set $$call365 + (call $_strcmp + (local.get $$name) + (i32.const 18542) + ) + ) + (local.set $$tobool366 + (i32.eq + (local.get $$call365) + (i32.const 0) + ) + ) + (if + (local.get $$tobool366) + (block + (local.set $$retval$0 + (i32.const 128) + ) + (br $do-once) + ) + ) + (local.set $$call369 + (call $_strcmp + (local.get $$name) + (i32.const 18555) + ) + ) + (local.set $$tobool370 + (i32.eq + (local.get $$call369) + (i32.const 0) + ) + ) + (if + (local.get $$tobool370) + (block + (local.set $$retval$0 + (i32.const 129) + ) + (br $do-once) + ) + ) + (local.set $$call373 + (call $_strcmp + (local.get $$name) + (i32.const 18579) + ) + ) + (local.set $$tobool374 + (i32.eq + (local.get $$call373) + (i32.const 0) + ) + ) + (if + (local.get $$tobool374) + (block + (local.set $$retval$0 + (i32.const 130) + ) + (br $do-once) + ) + ) + (local.set $$call377 + (call $_strcmp + (local.get $$name) + (i32.const 18601) + ) + ) + (local.set $$tobool378 + (i32.eq + (local.get $$call377) + (i32.const 0) + ) + ) + (if + (local.get $$tobool378) + (block + (local.set $$retval$0 + (i32.const 131) + ) + (br $do-once) + ) + ) + (local.set $$call381 + (call $_strcmp + (local.get $$name) + (i32.const 18618) + ) + ) + (local.set $$tobool382 + (i32.eq + (local.get $$call381) + (i32.const 0) + ) + ) + (if + (local.get $$tobool382) + (block + (local.set $$retval$0 + (i32.const 132) + ) + (br $do-once) + ) + ) + (local.set $$call385 + (call $_strcmp + (local.get $$name) + (i32.const 18628) + ) + ) + (local.set $$tobool386 + (i32.eq + (local.get $$call385) + (i32.const 0) + ) + ) + (if + (local.get $$tobool386) + (block + (local.set $$retval$0 + (i32.const 133) + ) + (br $do-once) + ) + ) + (local.set $$call389 + (call $_strcmp + (local.get $$name) + (i32.const 18643) + ) + ) + (local.set $$tobool390 + (i32.eq + (local.get $$call389) + (i32.const 0) + ) + ) + (if + (local.get $$tobool390) + (block + (local.set $$retval$0 + (i32.const 134) + ) + (br $do-once) + ) + ) + (local.set $$call393 + (call $_strcmp + (local.get $$name) + (i32.const 18658) + ) + ) + (local.set $$tobool394 + (i32.eq + (local.get $$call393) + (i32.const 0) + ) + ) + (if + (local.get $$tobool394) + (block + (local.set $$retval$0 + (i32.const 135) + ) + (br $do-once) + ) + ) + (local.set $$call397 + (call $_strcmp + (local.get $$name) + (i32.const 18672) + ) + ) + (local.set $$tobool398 + (i32.eq + (local.get $$call397) + (i32.const 0) + ) + ) + (if + (local.get $$tobool398) + (block + (local.set $$retval$0 + (i32.const 136) + ) + (br $do-once) + ) + ) + (local.set $$call401 + (call $_strcmp + (local.get $$name) + (i32.const 18694) + ) + ) + (local.set $$tobool402 + (i32.eq + (local.get $$call401) + (i32.const 0) + ) + ) + (if + (local.get $$tobool402) + (block + (local.set $$retval$0 + (i32.const 137) + ) + (br $do-once) + ) + ) + (local.set $$call405 + (call $_strcmp + (local.get $$name) + (i32.const 18708) + ) + ) + (local.set $$tobool406 + (i32.eq + (local.get $$call405) + (i32.const 0) + ) + ) + (if + (local.get $$tobool406) + (block + (local.set $$retval$0 + (i32.const 138) + ) + (br $do-once) + ) + ) + (local.set $$call409 + (call $_strcmp + (local.get $$name) + (i32.const 18730) + ) + ) + (local.set $$tobool410 + (i32.eq + (local.get $$call409) + (i32.const 0) + ) + ) + (if + (local.get $$tobool410) + (block + (local.set $$retval$0 + (i32.const 139) + ) + (br $do-once) + ) + ) + (local.set $$call413 + (call $_strcmp + (local.get $$name) + (i32.const 18742) + ) + ) + (local.set $$tobool414 + (i32.eq + (local.get $$call413) + (i32.const 0) + ) + ) + (if + (local.get $$tobool414) + (block + (local.set $$retval$0 + (i32.const 140) + ) + (br $do-once) + ) + ) + (local.set $$call417 + (call $_strcmp + (local.get $$name) + (i32.const 18762) + ) + ) + (local.set $$tobool418 + (i32.eq + (local.get $$call417) + (i32.const 0) + ) + ) + (if + (local.get $$tobool418) + (block + (local.set $$retval$0 + (i32.const 141) + ) + (br $do-once) + ) + ) + (local.set $$call421 + (call $_strcmp + (local.get $$name) + (i32.const 18775) + ) + ) + (local.set $$tobool422 + (i32.eq + (local.get $$call421) + (i32.const 0) + ) + ) + (if + (local.get $$tobool422) + (block + (local.set $$retval$0 + (i32.const 142) + ) + (br $do-once) + ) + ) + (local.set $$call425 + (call $_strcmp + (local.get $$name) + (i32.const 18791) + ) + ) + (local.set $$tobool426 + (i32.eq + (local.get $$call425) + (i32.const 0) + ) + ) + (if + (local.get $$tobool426) + (block + (local.set $$retval$0 + (i32.const 143) + ) + (br $do-once) + ) + ) + (local.set $$call429 + (call $_strcmp + (local.get $$name) + (i32.const 18808) + ) + ) + (local.set $$tobool430 + (i32.eq + (local.get $$call429) + (i32.const 0) + ) + ) + (if + (local.get $$tobool430) + (block + (local.set $$retval$0 + (i32.const 144) + ) + (br $do-once) + ) + ) + (local.set $$call433 + (call $_strcmp + (local.get $$name) + (i32.const 18824) + ) + ) + (local.set $$tobool434 + (i32.eq + (local.get $$call433) + (i32.const 0) + ) + ) + (if + (local.get $$tobool434) + (block + (local.set $$retval$0 + (i32.const 145) + ) + (br $do-once) + ) + ) + (local.set $$call437 + (call $_strcmp + (local.get $$name) + (i32.const 18841) + ) + ) + (local.set $$tobool438 + (i32.eq + (local.get $$call437) + (i32.const 0) + ) + ) + (if + (local.get $$tobool438) + (block + (local.set $$retval$0 + (i32.const 146) + ) + (br $do-once) + ) + ) + (local.set $$call441 + (call $_strcmp + (local.get $$name) + (i32.const 18857) + ) + ) + (local.set $$tobool442 + (i32.eq + (local.get $$call441) + (i32.const 0) + ) + ) + (if + (local.get $$tobool442) + (block + (local.set $$retval$0 + (i32.const 147) + ) + (br $do-once) + ) + ) + (local.set $$call445 + (call $_strcmp + (local.get $$name) + (i32.const 18869) + ) + ) + (local.set $$tobool446 + (i32.eq + (local.get $$call445) + (i32.const 0) + ) + ) + (if + (local.get $$tobool446) + (block + (local.set $$retval$0 + (i32.const 148) + ) + (br $do-once) + ) + ) + (local.set $$call449 + (call $_strcmp + (local.get $$name) + (i32.const 18882) + ) + ) + (local.set $$tobool450 + (i32.eq + (local.get $$call449) + (i32.const 0) + ) + ) + (if + (local.get $$tobool450) + (block + (local.set $$retval$0 + (i32.const 149) + ) + (br $do-once) + ) + ) + (local.set $$call453 + (call $_strcmp + (local.get $$name) + (i32.const 18894) + ) + ) + (local.set $$tobool454 + (i32.eq + (local.get $$call453) + (i32.const 0) + ) + ) + (if + (local.get $$tobool454) + (block + (local.set $$retval$0 + (i32.const 150) + ) + (br $do-once) + ) + ) + (local.set $$call457 + (call $_strcmp + (local.get $$name) + (i32.const 18907) + ) + ) + (local.set $$tobool458 + (i32.eq + (local.get $$call457) + (i32.const 0) + ) + ) + (if + (local.get $$tobool458) + (block + (local.set $$retval$0 + (i32.const 151) + ) + (br $do-once) + ) + ) + (local.set $$call461 + (call $_strcmp + (local.get $$name) + (i32.const 18919) + ) + ) + (local.set $$tobool462 + (i32.eq + (local.get $$call461) + (i32.const 0) + ) + ) + (if + (local.get $$tobool462) + (block + (local.set $$retval$0 + (i32.const 152) + ) + (br $do-once) + ) + ) + (local.set $$call465 + (call $_strcmp + (local.get $$name) + (i32.const 18932) + ) + ) + (local.set $$tobool466 + (i32.eq + (local.get $$call465) + (i32.const 0) + ) + ) + (if + (local.get $$tobool466) + (block + (local.set $$retval$0 + (i32.const 153) + ) + (br $do-once) + ) + ) + (local.set $$call469 + (call $_strcmp + (local.get $$name) + (i32.const 18944) + ) + ) + (local.set $$tobool470 + (i32.eq + (local.get $$call469) + (i32.const 0) + ) + ) + (if + (local.get $$tobool470) + (block + (local.set $$retval$0 + (i32.const 154) + ) + (br $do-once) + ) + ) + (local.set $$call473 + (call $_strcmp + (local.get $$name) + (i32.const 18957) + ) + ) + (local.set $$tobool474 + (i32.eq + (local.get $$call473) + (i32.const 0) + ) + ) + (if + (local.get $$tobool474) + (block + (local.set $$retval$0 + (i32.const 155) + ) + (br $do-once) + ) + ) + (local.set $$call477 + (call $_strcmp + (local.get $$name) + (i32.const 18969) + ) + ) + (local.set $$tobool478 + (i32.eq + (local.get $$call477) + (i32.const 0) + ) + ) + (if + (local.get $$tobool478) + (block + (local.set $$retval$0 + (i32.const 156) + ) + (br $do-once) + ) + ) + (local.set $$call481 + (call $_strcmp + (local.get $$name) + (i32.const 18982) + ) + ) + (local.set $$tobool482 + (i32.eq + (local.get $$call481) + (i32.const 0) + ) + ) + (if + (local.get $$tobool482) + (block + (local.set $$retval$0 + (i32.const 157) + ) + (br $do-once) + ) + ) + (local.set $$call485 + (call $_strcmp + (local.get $$name) + (i32.const 18994) + ) + ) + (local.set $$tobool486 + (i32.eq + (local.get $$call485) + (i32.const 0) + ) + ) + (if + (local.get $$tobool486) + (block + (local.set $$retval$0 + (i32.const 158) + ) + (br $do-once) + ) + ) + (local.set $$call489 + (call $_strcmp + (local.get $$name) + (i32.const 19007) + ) + ) + (local.set $$tobool490 + (i32.eq + (local.get $$call489) + (i32.const 0) + ) + ) + (if + (local.get $$tobool490) + (block + (local.set $$retval$0 + (i32.const 159) + ) + (br $do-once) + ) + ) + (local.set $$call493 + (call $_strcmp + (local.get $$name) + (i32.const 19019) + ) + ) + (local.set $$tobool494 + (i32.eq + (local.get $$call493) + (i32.const 0) + ) + ) + (if + (local.get $$tobool494) + (block + (local.set $$retval$0 + (i32.const 160) + ) + (br $do-once) + ) + ) + (local.set $$call497 + (call $_strcmp + (local.get $$name) + (i32.const 19032) + ) + ) + (local.set $$tobool498 + (i32.eq + (local.get $$call497) + (i32.const 0) + ) + ) + (if + (local.get $$tobool498) + (block + (local.set $$retval$0 + (i32.const 161) + ) + (br $do-once) + ) + ) + (local.set $$call501 + (call $_strcmp + (local.get $$name) + (i32.const 19044) + ) + ) + (local.set $$tobool502 + (i32.eq + (local.get $$call501) + (i32.const 0) + ) + ) + (if + (local.get $$tobool502) + (block + (local.set $$retval$0 + (i32.const 162) + ) + (br $do-once) + ) + ) + (local.set $$call505 + (call $_strcmp + (local.get $$name) + (i32.const 19057) + ) + ) + (local.set $$tobool506 + (i32.eq + (local.get $$call505) + (i32.const 0) + ) + ) + (if + (local.get $$tobool506) + (block + (local.set $$retval$0 + (i32.const 163) + ) + (br $do-once) + ) + ) + (local.set $$call509 + (call $_strcmp + (local.get $$name) + (i32.const 19076) + ) + ) + (local.set $$tobool510 + (i32.eq + (local.get $$call509) + (i32.const 0) + ) + ) + (if + (local.get $$tobool510) + (block + (local.set $$retval$0 + (i32.const 164) + ) + (br $do-once) + ) + ) + (local.set $$call513 + (call $_strcmp + (local.get $$name) + (i32.const 19095) + ) + ) + (local.set $$tobool514 + (i32.eq + (local.get $$call513) + (i32.const 0) + ) + ) + (if + (local.get $$tobool514) + (block + (local.set $$retval$0 + (i32.const 165) + ) + (br $do-once) + ) + ) + (local.set $$call517 + (call $_strcmp + (local.get $$name) + (i32.const 19114) + ) + ) + (local.set $$tobool518 + (i32.eq + (local.get $$call517) + (i32.const 0) + ) + ) + (if + (local.get $$tobool518) + (block + (local.set $$retval$0 + (i32.const 166) + ) + (br $do-once) + ) + ) + (local.set $$call521 + (call $_strcmp + (local.get $$name) + (i32.const 19127) + ) + ) + (local.set $$tobool522 + (i32.eq + (local.get $$call521) + (i32.const 0) + ) + ) + (if + (local.get $$tobool522) + (block + (local.set $$retval$0 + (i32.const 167) + ) + (br $do-once) + ) + ) + (local.set $$call525 + (call $_strcmp + (local.get $$name) + (i32.const 19145) + ) + ) + (local.set $$tobool526 + (i32.eq + (local.get $$call525) + (i32.const 0) + ) + ) + (if + (local.get $$tobool526) + (block + (local.set $$retval$0 + (i32.const 168) + ) + (br $do-once) + ) + ) + (local.set $$call529 + (call $_strcmp + (local.get $$name) + (i32.const 19162) + ) + ) + (local.set $$tobool530 + (i32.eq + (local.get $$call529) + (i32.const 0) + ) + ) + (if + (local.get $$tobool530) + (block + (local.set $$retval$0 + (i32.const 169) + ) + (br $do-once) + ) + ) + (local.set $$call533 + (call $_strcmp + (local.get $$name) + (i32.const 19180) + ) + ) + (local.set $$tobool534 + (i32.eq + (local.get $$call533) + (i32.const 0) + ) + ) + (if + (local.get $$tobool534) + (block + (local.set $$retval$0 + (i32.const 170) + ) + (br $do-once) + ) + ) + (local.set $$call537 + (call $_strcmp + (local.get $$name) + (i32.const 19197) + ) + ) + (local.set $$tobool538 + (i32.eq + (local.get $$call537) + (i32.const 0) + ) + ) + (if + (local.get $$tobool538) + (block + (local.set $$retval$0 + (i32.const 171) + ) + (br $do-once) + ) + ) + (local.set $$call541 + (call $_strcmp + (local.get $$name) + (i32.const 19215) + ) + ) + (local.set $$tobool542 + (i32.eq + (local.get $$call541) + (i32.const 0) + ) + ) + (if + (local.get $$tobool542) + (block + (local.set $$retval$0 + (i32.const 172) + ) + (br $do-once) + ) + ) + (local.set $$call545 + (call $_strcmp + (local.get $$name) + (i32.const 19232) + ) + ) + (local.set $$tobool546 + (i32.eq + (local.get $$call545) + (i32.const 0) + ) + ) + (if + (local.get $$tobool546) + (block + (local.set $$retval$0 + (i32.const 173) + ) + (br $do-once) + ) + ) + (local.set $$call549 + (call $_strcmp + (local.get $$name) + (i32.const 19250) + ) + ) + (local.set $$tobool550 + (i32.eq + (local.get $$call549) + (i32.const 0) + ) + ) + (if + (local.get $$tobool550) + (block + (local.set $$retval$0 + (i32.const 174) + ) + (br $do-once) + ) + ) + (local.set $$call553 + (call $_strcmp + (local.get $$name) + (i32.const 19267) + ) + ) + (local.set $$tobool554 + (i32.eq + (local.get $$call553) + (i32.const 0) + ) + ) + (if + (local.get $$tobool554) + (block + (local.set $$retval$0 + (i32.const 175) + ) + (br $do-once) + ) + ) + (local.set $$call557 + (call $_strcmp + (local.get $$name) + (i32.const 19285) + ) + ) + (local.set $$tobool558 + (i32.eq + (local.get $$call557) + (i32.const 0) + ) + ) + (if + (local.get $$tobool558) + (block + (local.set $$retval$0 + (i32.const 176) + ) + (br $do-once) + ) + ) + (local.set $$call561 + (call $_strcmp + (local.get $$name) + (i32.const 19307) + ) + ) + (local.set $$tobool562 + (i32.eq + (local.get $$call561) + (i32.const 0) + ) + ) + (if + (local.get $$tobool562) + (block + (local.set $$retval$0 + (i32.const 177) + ) + (br $do-once) + ) + ) + (local.set $$call565 + (call $_strcmp + (local.get $$name) + (i32.const 19318) + ) + ) + (local.set $$tobool566 + (i32.eq + (local.get $$call565) + (i32.const 0) + ) + ) + (if + (local.get $$tobool566) + (block + (local.set $$retval$0 + (i32.const 178) + ) + (br $do-once) + ) + ) + (local.set $$call569 + (call $_strcmp + (local.get $$name) + (i32.const 19334) + ) + ) + (local.set $$tobool570 + (i32.eq + (local.get $$call569) + (i32.const 0) + ) + ) + (if + (local.get $$tobool570) + (block + (local.set $$retval$0 + (i32.const 179) + ) + (br $do-once) + ) + ) + (local.set $$call573 + (call $_strcmp + (local.get $$name) + (i32.const 19353) + ) + ) + (local.set $$tobool574 + (i32.eq + (local.get $$call573) + (i32.const 0) + ) + ) + (if + (local.get $$tobool574) + (block + (local.set $$retval$0 + (i32.const 180) + ) + (br $do-once) + ) + ) + (local.set $$call577 + (call $_strcmp + (local.get $$name) + (i32.const 19366) + ) + ) + (local.set $$tobool578 + (i32.eq + (local.get $$call577) + (i32.const 0) + ) + ) + (if + (local.get $$tobool578) + (block + (local.set $$retval$0 + (i32.const 181) + ) + (br $do-once) + ) + ) + (local.set $$call581 + (call $_strcmp + (local.get $$name) + (i32.const 19382) + ) + ) + (local.set $$tobool582 + (i32.eq + (local.get $$call581) + (i32.const 0) + ) + ) + (if + (local.get $$tobool582) + (block + (local.set $$retval$0 + (i32.const 182) + ) + (br $do-once) + ) + ) + (local.set $$call585 + (call $_strcmp + (local.get $$name) + (i32.const 19396) + ) + ) + (local.set $$tobool586 + (i32.eq + (local.get $$call585) + (i32.const 0) + ) + ) + (if + (local.get $$tobool586) + (block + (local.set $$retval$0 + (i32.const 183) + ) + (br $do-once) + ) + ) + (local.set $$call589 + (call $_strcmp + (local.get $$name) + (i32.const 19414) + ) + ) + (local.set $$tobool590 + (i32.eq + (local.get $$call589) + (i32.const 0) + ) + ) + (if + (local.get $$tobool590) + (block + (local.set $$retval$0 + (i32.const 184) + ) + (br $do-once) + ) + ) + (local.set $$call593 + (call $_strcmp + (local.get $$name) + (i32.const 19430) + ) + ) + (local.set $$tobool594 + (i32.eq + (local.get $$call593) + (i32.const 0) + ) + ) + (if + (local.get $$tobool594) + (block + (local.set $$retval$0 + (i32.const 185) + ) + (br $do-once) + ) + ) + (local.set $$call597 + (call $_strcmp + (local.get $$name) + (i32.const 19452) + ) + ) + (local.set $$tobool598 + (i32.eq + (local.get $$call597) + (i32.const 0) + ) + ) + (if + (local.get $$tobool598) + (block + (local.set $$retval$0 + (i32.const 186) + ) + (br $do-once) + ) + ) + (local.set $$call601 + (call $_strcmp + (local.get $$name) + (i32.const 19475) + ) + ) + (local.set $$tobool602 + (i32.eq + (local.get $$call601) + (i32.const 0) + ) + ) + (if + (local.get $$tobool602) + (block + (local.set $$retval$0 + (i32.const 187) + ) + (br $do-once) + ) + ) + (local.set $$call605 + (call $_strcmp + (local.get $$name) + (i32.const 19499) + ) + ) + (local.set $$tobool606 + (i32.eq + (local.get $$call605) + (i32.const 0) + ) + ) + (if + (local.get $$tobool606) + (block + (local.set $$retval$0 + (i32.const 188) + ) + (br $do-once) + ) + ) + (local.set $$call609 + (call $_strcmp + (local.get $$name) + (i32.const 19524) + ) + ) + (local.set $$tobool610 + (i32.eq + (local.get $$call609) + (i32.const 0) + ) + ) + (if + (local.get $$tobool610) + (block + (local.set $$retval$0 + (i32.const 189) + ) + (br $do-once) + ) + ) + (local.set $$call613 + (call $_strcmp + (local.get $$name) + (i32.const 19545) + ) + ) + (local.set $$tobool614 + (i32.eq + (local.get $$call613) + (i32.const 0) + ) + ) + (if + (local.get $$tobool614) + (block + (local.set $$retval$0 + (i32.const 190) + ) + (br $do-once) + ) + ) + (local.set $$call617 + (call $_strcmp + (local.get $$name) + (i32.const 19569) + ) + ) + (local.set $$tobool618 + (i32.eq + (local.get $$call617) + (i32.const 0) + ) + ) + (if + (local.get $$tobool618) + (block + (local.set $$retval$0 + (i32.const 191) + ) + (br $do-once) + ) + ) + (local.set $$call621 + (call $_strcmp + (local.get $$name) + (i32.const 19590) + ) + ) + (local.set $$tobool622 + (i32.eq + (local.get $$call621) + (i32.const 0) + ) + ) + (if + (local.get $$tobool622) + (block + (local.set $$retval$0 + (i32.const 192) + ) + (br $do-once) + ) + ) + (local.set $$call625 + (call $_strcmp + (local.get $$name) + (i32.const 19609) + ) + ) + (local.set $$tobool626 + (i32.eq + (local.get $$call625) + (i32.const 0) + ) + ) + (if + (local.get $$tobool626) + (block + (local.set $$retval$0 + (i32.const 193) + ) + (br $do-once) + ) + ) + (local.set $$call629 + (call $_strcmp + (local.get $$name) + (i32.const 19628) + ) + ) + (local.set $$tobool630 + (i32.eq + (local.get $$call629) + (i32.const 0) + ) + ) + (if + (local.get $$tobool630) + (block + (local.set $$retval$0 + (i32.const 194) + ) + (br $do-once) + ) + ) + (local.set $$call633 + (call $_strcmp + (local.get $$name) + (i32.const 19655) + ) + ) + (local.set $$tobool634 + (i32.eq + (local.get $$call633) + (i32.const 0) + ) + ) + (if + (local.get $$tobool634) + (block + (local.set $$retval$0 + (i32.const 195) + ) + (br $do-once) + ) + ) + (local.set $$call637 + (call $_strcmp + (local.get $$name) + (i32.const 19684) + ) + ) + (local.set $$tobool638 + (i32.eq + (local.get $$call637) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool638) + (i32.const 35) + (i32.const 0) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $__webgl1_match_ext_proc_address_without_suffix (; 646 ;) (param $$name i32) (result i32) + (local $$call i32) + (local $$call1 i32) + (local $$call13 i32) + (local $$call17 i32) + (local $$call21 i32) + (local $$call25 i32) + (local $$call29 i32) + (local $$call33 i32) + (local $$call37 i32) + (local $$call41 i32) + (local $$call45 i32) + (local $$call49 i32) + (local $$call5 i32) + (local $$call53 i32) + (local $$call57 i32) + (local $$call61 i32) + (local $$call65 i32) + (local $$call69 i32) + (local $$call9 i32) + (local $$retval$0 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $$tobool10 i32) + (local $$tobool14 i32) + (local $$tobool18 i32) + (local $$tobool2 i32) + (local $$tobool22 i32) + (local $$tobool26 i32) + (local $$tobool30 i32) + (local $$tobool34 i32) + (local $$tobool38 i32) + (local $$tobool42 i32) + (local $$tobool46 i32) + (local $$tobool50 i32) + (local $$tobool54 i32) + (local $$tobool58 i32) + (local $$tobool6 i32) + (local $$tobool62 i32) + (local $$tobool66 i32) + (local $$tobool70 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$call + (call $_strcmp + (local.get $$name) + (i32.const 16679) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (local.set $$retval$0 + (i32.const 178) + ) + (block + (local.set $$call1 + (call $_strcmp + (local.get $$name) + (i32.const 16692) + ) + ) + (local.set $$tobool2 + (i32.eq + (local.get $$call1) + (i32.const 0) + ) + ) + (if + (local.get $$tobool2) + (local.set $$retval$0 + (i32.const 179) + ) + (block + (local.set $$call5 + (call $_strcmp + (local.get $$name) + (i32.const 16708) + ) + ) + (local.set $$tobool6 + (i32.eq + (local.get $$call5) + (i32.const 0) + ) + ) + (if + (local.get $$tobool6) + (local.set $$retval$0 + (i32.const 180) + ) + (block + (local.set $$call9 + (call $_strcmp + (local.get $$name) + (i32.const 16718) + ) + ) + (local.set $$tobool10 + (i32.eq + (local.get $$call9) + (i32.const 0) + ) + ) + (if + (local.get $$tobool10) + (local.set $$retval$0 + (i32.const 181) + ) + (block + (local.set $$call13 + (call $_strcmp + (local.get $$name) + (i32.const 16731) + ) + ) + (local.set $$tobool14 + (i32.eq + (local.get $$call13) + (i32.const 0) + ) + ) + (if + (local.get $$tobool14) + (local.set $$retval$0 + (i32.const 182) + ) + (block + (local.set $$call17 + (call $_strcmp + (local.get $$name) + (i32.const 16742) + ) + ) + (local.set $$tobool18 + (i32.eq + (local.get $$call17) + (i32.const 0) + ) + ) + (if + (local.get $$tobool18) + (local.set $$retval$0 + (i32.const 183) + ) + (block + (local.set $$call21 + (call $_strcmp + (local.get $$name) + (i32.const 16757) + ) + ) + (local.set $$tobool22 + (i32.eq + (local.get $$call21) + (i32.const 0) + ) + ) + (if + (local.get $$tobool22) + (local.set $$retval$0 + (i32.const 184) + ) + (block + (local.set $$call25 + (call $_strcmp + (local.get $$name) + (i32.const 16770) + ) + ) + (local.set $$tobool26 + (i32.eq + (local.get $$call25) + (i32.const 0) + ) + ) + (if + (local.get $$tobool26) + (local.set $$retval$0 + (i32.const 185) + ) + (block + (local.set $$call29 + (call $_strcmp + (local.get $$name) + (i32.const 16789) + ) + ) + (local.set $$tobool30 + (i32.eq + (local.get $$call29) + (i32.const 0) + ) + ) + (if + (local.get $$tobool30) + (local.set $$retval$0 + (i32.const 186) + ) + (block + (local.set $$call33 + (call $_strcmp + (local.get $$name) + (i32.const 16809) + ) + ) + (local.set $$tobool34 + (i32.eq + (local.get $$call33) + (i32.const 0) + ) + ) + (if + (local.get $$tobool34) + (local.set $$retval$0 + (i32.const 187) + ) + (block + (local.set $$call37 + (call $_strcmp + (local.get $$name) + (i32.const 16830) + ) + ) + (local.set $$tobool38 + (i32.eq + (local.get $$call37) + (i32.const 0) + ) + ) + (if + (local.get $$tobool38) + (local.set $$retval$0 + (i32.const 188) + ) + (block + (local.set $$call41 + (call $_strcmp + (local.get $$name) + (i32.const 16852) + ) + ) + (local.set $$tobool42 + (i32.eq + (local.get $$call41) + (i32.const 0) + ) + ) + (if + (local.get $$tobool42) + (local.set $$retval$0 + (i32.const 189) + ) + (block + (local.set $$call45 + (call $_strcmp + (local.get $$name) + (i32.const 16870) + ) + ) + (local.set $$tobool46 + (i32.eq + (local.get $$call45) + (i32.const 0) + ) + ) + (if + (local.get $$tobool46) + (local.set $$retval$0 + (i32.const 190) + ) + (block + (local.set $$call49 + (call $_strcmp + (local.get $$name) + (i32.const 16891) + ) + ) + (local.set $$tobool50 + (i32.eq + (local.get $$call49) + (i32.const 0) + ) + ) + (if + (local.get $$tobool50) + (local.set $$retval$0 + (i32.const 191) + ) + (block + (local.set $$call53 + (call $_strcmp + (local.get $$name) + (i32.const 16909) + ) + ) + (local.set $$tobool54 + (i32.eq + (local.get $$call53) + (i32.const 0) + ) + ) + (if + (local.get $$tobool54) + (local.set $$retval$0 + (i32.const 192) + ) + (block + (local.set $$call57 + (call $_strcmp + (local.get $$name) + (i32.const 16925) + ) + ) + (local.set $$tobool58 + (i32.eq + (local.get $$call57) + (i32.const 0) + ) + ) + (if + (local.get $$tobool58) + (local.set $$retval$0 + (i32.const 193) + ) + (block + (local.set $$call61 + (call $_strcmp + (local.get $$name) + (i32.const 16939) + ) + ) + (local.set $$tobool62 + (i32.eq + (local.get $$call61) + (i32.const 0) + ) + ) + (if + (local.get $$tobool62) + (local.set $$retval$0 + (i32.const 194) + ) + (block + (local.set $$call65 + (call $_strcmp + (local.get $$name) + (i32.const 16961) + ) + ) + (local.set $$tobool66 + (i32.eq + (local.get $$call65) + (i32.const 0) + ) + ) + (if + (local.get $$tobool66) + (local.set $$retval$0 + (i32.const 195) + ) + (block + (local.set $$call69 + (call $_strcmp + (local.get $$name) + (i32.const 16985) + ) + ) + (local.set $$tobool70 + (i32.eq + (local.get $$call69) + (i32.const 0) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$tobool70) + (i32.const 35) + (i32.const 0) + ) + ) + (return + (local.get $$spec$select) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_malloc (; 647 ;) (param $$bytes i32) (result i32) + (local $$$pre i32) + (local $$$pre$i i32) + (local $$$pre$i$i i32) + (local $$$pre$i184 i32) + (local $$$pre$i187 i32) + (local $$$pre$i47$i i32) + (local $$$pre$phi$i$iZ2D i32) + (local $$$pre$phi$i185Z2D i32) + (local $$$pre$phi$i48$iZ2D i32) + (local $$$pre$phi$iZ2D i32) + (local $$$pre$phiZ2D i32) + (local $$$pre14$i$i i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$100 i32) + (local $$101 i32) + (local $$102 i32) + (local $$103 i32) + (local $$104 i32) + (local $$105 i32) + (local $$106 i32) + (local $$107 i32) + (local $$108 i32) + (local $$109 i32) + (local $$11 i32) + (local $$110 i32) + (local $$111 i32) + (local $$112 i32) + (local $$113 i32) + (local $$114 i32) + (local $$115 i32) + (local $$116 i32) + (local $$117 i32) + (local $$118 i32) + (local $$119 i32) + (local $$12 i32) + (local $$120 i32) + (local $$121 i32) + (local $$122 i32) + (local $$123 i32) + (local $$124 i32) + (local $$125 i32) + (local $$126 i32) + (local $$127 i32) + (local $$128 i32) + (local $$129 i32) + (local $$13 i32) + (local $$130 i32) + (local $$131 i32) + (local $$132 i32) + (local $$133 i32) + (local $$134 i32) + (local $$135 i32) + (local $$136 i32) + (local $$137 i32) + (local $$138 i32) + (local $$139 i32) + (local $$14 i32) + (local $$140 i32) + (local $$141 i32) + (local $$142 i32) + (local $$143 i32) + (local $$144 i32) + (local $$145 i32) + (local $$146 i32) + (local $$147 i32) + (local $$148 i32) + (local $$149 i32) + (local $$15 i32) + (local $$150 i32) + (local $$151 i32) + (local $$152 i32) + (local $$153 i32) + (local $$154 i32) + (local $$155 i32) + (local $$156 i32) + (local $$157 i32) + (local $$158 i32) + (local $$159 i32) + (local $$16 i32) + (local $$160 i32) + (local $$161 i32) + (local $$162 i32) + (local $$163 i32) + (local $$164 i32) + (local $$165 i32) + (local $$166 i32) + (local $$167 i32) + (local $$168 i32) + (local $$169 i32) + (local $$17 i32) + (local $$170 i32) + (local $$171 i32) + (local $$172 i32) + (local $$173 i32) + (local $$174 i32) + (local $$175 i32) + (local $$176 i32) + (local $$177 i32) + (local $$178 i32) + (local $$179 i32) + (local $$18 i32) + (local $$180 i32) + (local $$181 i32) + (local $$182 i32) + (local $$183 i32) + (local $$184 i32) + (local $$185 i32) + (local $$186 i32) + (local $$187 i32) + (local $$188 i32) + (local $$189 i32) + (local $$19 i32) + (local $$190 i32) + (local $$191 i32) + (local $$192 i32) + (local $$193 i32) + (local $$194 i32) + (local $$195 i32) + (local $$196 i32) + (local $$197 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$58 i32) + (local $$59 i32) + (local $$6 i32) + (local $$60 i32) + (local $$61 i32) + (local $$62 i32) + (local $$63 i32) + (local $$64 i32) + (local $$65 i32) + (local $$66 i32) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 i32) + (local $$70 i32) + (local $$71 i32) + (local $$72 i32) + (local $$73 i32) + (local $$74 i32) + (local $$75 i32) + (local $$76 i32) + (local $$77 i32) + (local $$78 i32) + (local $$79 i32) + (local $$8 i32) + (local $$80 i32) + (local $$81 i32) + (local $$82 i32) + (local $$83 i32) + (local $$84 i32) + (local $$85 i32) + (local $$86 i32) + (local $$87 i32) + (local $$88 i32) + (local $$89 i32) + (local $$9 i32) + (local $$90 i32) + (local $$91 i32) + (local $$92 i32) + (local $$93 i32) + (local $$94 i32) + (local $$95 i32) + (local $$96 i32) + (local $$97 i32) + (local $$98 i32) + (local $$99 i32) + (local $$F$0$i$i i32) + (local $$F104$0 i32) + (local $$F197$0$i i32) + (local $$F224$0$i$i i32) + (local $$F290$0$i i32) + (local $$I252$0$i$i i32) + (local $$I316$0$i i32) + (local $$I57$0$i$i i32) + (local $$K105$011$i$i i32) + (local $$K305$010$i$i i32) + (local $$K373$017$i i32) + (local $$R$1$i i32) + (local $$R$1$i$be i32) + (local $$R$1$i$i i32) + (local $$R$1$i$i$be i32) + (local $$R$1$i$i$ph i32) + (local $$R$1$i$ph i32) + (local $$R$1$i173 i32) + (local $$R$1$i173$be i32) + (local $$R$1$i173$ph i32) + (local $$R$3$i i32) + (local $$R$3$i$i i32) + (local $$R$3$i177 i32) + (local $$RP$1$i i32) + (local $$RP$1$i$be i32) + (local $$RP$1$i$i i32) + (local $$RP$1$i$i$be i32) + (local $$RP$1$i$i$ph i32) + (local $$RP$1$i$ph i32) + (local $$RP$1$i172 i32) + (local $$RP$1$i172$be i32) + (local $$RP$1$i172$ph i32) + (local $$T$0$lcssa$i i32) + (local $$T$0$lcssa$i$i i32) + (local $$T$0$lcssa$i50$i i32) + (local $$T$010$i$i i32) + (local $$T$016$i i32) + (local $$T$09$i$i i32) + (local $$add$i i32) + (local $$add$i$i i32) + (local $$add$i148 i32) + (local $$add$i188 i32) + (local $$add$ptr i32) + (local $$add$ptr$i i32) + (local $$add$ptr$i$i i32) + (local $$add$ptr$i$i$i i32) + (local $$add$ptr$i16$i i32) + (local $$add$ptr$i164 i32) + (local $$add$ptr$i201 i32) + (local $$add$ptr$i22$i i32) + (local $$add$ptr$i3$i$i i32) + (local $$add$ptr$i51$i i32) + (local $$add$ptr14$i$i i32) + (local $$add$ptr15$i$i i32) + (local $$add$ptr16$i$i i32) + (local $$add$ptr166 i32) + (local $$add$ptr169 i32) + (local $$add$ptr17$i$i i32) + (local $$add$ptr178 i32) + (local $$add$ptr181$i i32) + (local $$add$ptr182 i32) + (local $$add$ptr189$i i32) + (local $$add$ptr190$i i32) + (local $$add$ptr193 i32) + (local $$add$ptr199 i32) + (local $$add$ptr2$i$i i32) + (local $$add$ptr205$i$i i32) + (local $$add$ptr212$i$i i32) + (local $$add$ptr225$i i32) + (local $$add$ptr227$i i32) + (local $$add$ptr24$i$i i32) + (local $$add$ptr262$i i32) + (local $$add$ptr269$i i32) + (local $$add$ptr273$i i32) + (local $$add$ptr282$i i32) + (local $$add$ptr3$i$i i32) + (local $$add$ptr30$i$i i32) + (local $$add$ptr369$i$i i32) + (local $$add$ptr4$i$i i32) + (local $$add$ptr4$i$i$i i32) + (local $$add$ptr4$i28$i i32) + (local $$add$ptr4$i57$i i32) + (local $$add$ptr441$i i32) + (local $$add$ptr5$i$i i32) + (local $$add$ptr6$i$i i32) + (local $$add$ptr6$i$i$i i32) + (local $$add$ptr6$i61$i i32) + (local $$add$ptr7$i$i i32) + (local $$add$ptr81$i$i i32) + (local $$add$ptr95 i32) + (local $$add$ptr98 i32) + (local $$add10$i i32) + (local $$add101$i i32) + (local $$add110$i i32) + (local $$add13$i i32) + (local $$add14$i i32) + (local $$add140$i i32) + (local $$add144 i32) + (local $$add150$i i32) + (local $$add17$i i32) + (local $$add17$i191 i32) + (local $$add177$i i32) + (local $$add18$i i32) + (local $$add19$i i32) + (local $$add2 i32) + (local $$add20$i i32) + (local $$add206$i$i i32) + (local $$add212$i i32) + (local $$add215$i i32) + (local $$add22$i i32) + (local $$add246$i i32) + (local $$add26$i$i i32) + (local $$add268$i i32) + (local $$add269$i$i i32) + (local $$add274$i$i i32) + (local $$add278$i$i i32) + (local $$add280$i$i i32) + (local $$add283$i$i i32) + (local $$add337$i i32) + (local $$add342$i i32) + (local $$add346$i i32) + (local $$add348$i i32) + (local $$add351$i i32) + (local $$add46$i i32) + (local $$add50 i32) + (local $$add51$i i32) + (local $$add54 i32) + (local $$add54$i i32) + (local $$add58 i32) + (local $$add62 i32) + (local $$add64 i32) + (local $$add74$i$i i32) + (local $$add77$i i32) + (local $$add78$i i32) + (local $$add79$i$i i32) + (local $$add8 i32) + (local $$add82$i i32) + (local $$add83$i$i i32) + (local $$add85$i$i i32) + (local $$add86$i i32) + (local $$add88$i$i i32) + (local $$add9$i i32) + (local $$add90$i i32) + (local $$add92$i i32) + (local $$and i32) + (local $$and$i i32) + (local $$and$i$i i32) + (local $$and$i$i$i i32) + (local $$and$i145 i32) + (local $$and$i17$i i32) + (local $$and$i23$i i32) + (local $$and$i52$i i32) + (local $$and100$i i32) + (local $$and103$i i32) + (local $$and104$i i32) + (local $$and106 i32) + (local $$and11$i i32) + (local $$and119$i$i i32) + (local $$and1198$i$i i32) + (local $$and12$i i32) + (local $$and13$i i32) + (local $$and13$i$i i32) + (local $$and133$i$i i32) + (local $$and14 i32) + (local $$and145 i32) + (local $$and17$i i32) + (local $$and194$i i32) + (local $$and194$i214 i32) + (local $$and199$i i32) + (local $$and209$i$i i32) + (local $$and21$i i32) + (local $$and21$i151 i32) + (local $$and227$i$i i32) + (local $$and236$i i32) + (local $$and264$i$i i32) + (local $$and268$i$i i32) + (local $$and273$i$i i32) + (local $$and282$i$i i32) + (local $$and29$i i32) + (local $$and292$i i32) + (local $$and295$i$i i32) + (local $$and3$i i32) + (local $$and3$i$i i32) + (local $$and3$i$i$i i32) + (local $$and3$i26$i i32) + (local $$and3$i55$i i32) + (local $$and30$i i32) + (local $$and318$i$i i32) + (local $$and3187$i$i i32) + (local $$and32$i i32) + (local $$and32$i$i i32) + (local $$and33$i$i i32) + (local $$and331$i i32) + (local $$and336$i i32) + (local $$and341$i i32) + (local $$and350$i i32) + (local $$and363$i i32) + (local $$and37$i$i i32) + (local $$and387$i i32) + (local $$and38714$i i32) + (local $$and4 i32) + (local $$and40$i$i i32) + (local $$and41 i32) + (local $$and42$i i32) + (local $$and43 i32) + (local $$and46 i32) + (local $$and49 i32) + (local $$and49$i i32) + (local $$and49$i$i i32) + (local $$and53 i32) + (local $$and57 i32) + (local $$and6$i i32) + (local $$and6$i$i i32) + (local $$and6$i13$i i32) + (local $$and6$i29$i i32) + (local $$and61 i32) + (local $$and64$i i32) + (local $$and68$i i32) + (local $$and69$i$i i32) + (local $$and7 i32) + (local $$and73$i i32) + (local $$and73$i$i i32) + (local $$and74 i32) + (local $$and77$i i32) + (local $$and78$i$i i32) + (local $$and8$i i32) + (local $$and80$i i32) + (local $$and81$i i32) + (local $$and85$i i32) + (local $$and87$i$i i32) + (local $$and89$i i32) + (local $$and9$i i32) + (local $$and96$i$i i32) + (local $$arrayidx i32) + (local $$arrayidx$i i32) + (local $$arrayidx$i$i i32) + (local $$arrayidx$i152 i32) + (local $$arrayidx$i39$i i32) + (local $$arrayidx103 i32) + (local $$arrayidx103$i$i i32) + (local $$arrayidx106$i i32) + (local $$arrayidx107$i$i i32) + (local $$arrayidx113$i i32) + (local $$arrayidx113$i162 i32) + (local $$arrayidx121$i i32) + (local $$arrayidx121$i$sink i32) + (local $$arrayidx123$i$i i32) + (local $$arrayidx126$i$i i32) + (local $$arrayidx137$i i32) + (local $$arrayidx143$i$i i32) + (local $$arrayidx148$i i32) + (local $$arrayidx151$i i32) + (local $$arrayidx151$i$i i32) + (local $$arrayidx151$i$i$sink i32) + (local $$arrayidx154$i i32) + (local $$arrayidx155$i i32) + (local $$arrayidx161$i i32) + (local $$arrayidx165$i i32) + (local $$arrayidx165$i174 i32) + (local $$arrayidx178$i$i i32) + (local $$arrayidx184$i i32) + (local $$arrayidx184$i$i i32) + (local $$arrayidx195$i$i i32) + (local $$arrayidx196$i i32) + (local $$arrayidx204$i i32) + (local $$arrayidx212$i i32) + (local $$arrayidx212$i$sink i32) + (local $$arrayidx223$i$i i32) + (local $$arrayidx228$i i32) + (local $$arrayidx23$i i32) + (local $$arrayidx239$i i32) + (local $$arrayidx245$i i32) + (local $$arrayidx256$i i32) + (local $$arrayidx27$i i32) + (local $$arrayidx287$i$i i32) + (local $$arrayidx289$i i32) + (local $$arrayidx290$i$i i32) + (local $$arrayidx325$i$i i32) + (local $$arrayidx355$i i32) + (local $$arrayidx358$i i32) + (local $$arrayidx394$i i32) + (local $$arrayidx40$i i32) + (local $$arrayidx44$i i32) + (local $$arrayidx61$i i32) + (local $$arrayidx65$i i32) + (local $$arrayidx66 i32) + (local $$arrayidx71$i i32) + (local $$arrayidx75$i i32) + (local $$arrayidx91$i$i i32) + (local $$arrayidx92$i$i i32) + (local $$arrayidx94$i i32) + (local $$arrayidx94$i158 i32) + (local $$arrayidx96$i$i i32) + (local $$bk i32) + (local $$bk$i i32) + (local $$bk$i$i i32) + (local $$bk$i166 i32) + (local $$bk$i37$i i32) + (local $$bk102$i$i i32) + (local $$bk122 i32) + (local $$bk124 i32) + (local $$bk136$i i32) + (local $$bk139$i$i i32) + (local $$bk158$i$i i32) + (local $$bk161$i$i i32) + (local $$bk218$i i32) + (local $$bk220$i i32) + (local $$bk246$i$i i32) + (local $$bk248$i$i i32) + (local $$bk302$i$i i32) + (local $$bk311$i i32) + (local $$bk313$i i32) + (local $$bk338$i$i i32) + (local $$bk357$i$i i32) + (local $$bk360$i$i i32) + (local $$bk370$i i32) + (local $$bk407$i i32) + (local $$bk429$i i32) + (local $$bk43$i$i i32) + (local $$bk432$i i32) + (local $$bk47$i i32) + (local $$bk55$i$i i32) + (local $$bk67$i$i i32) + (local $$bk74$i$i i32) + (local $$bk78 i32) + (local $$bk82$i$i i32) + (local $$br$2$ph$i i32) + (local $$call107$i i32) + (local $$call131$i i32) + (local $$call132$i i32) + (local $$call275$i i32) + (local $$call37$i i32) + (local $$call68$i i32) + (local $$call83$i i32) + (local $$child$i$i i32) + (local $$child166$i$i i32) + (local $$child289$i$i i32) + (local $$child357$i i32) + (local $$cmp i32) + (local $$cmp$i i32) + (local $$cmp$i$i$i i32) + (local $$cmp$i12$i i32) + (local $$cmp$i14$i i32) + (local $$cmp$i142 i32) + (local $$cmp$i18$i i32) + (local $$cmp$i186 i32) + (local $$cmp$i24$i i32) + (local $$cmp$i4$i$i i32) + (local $$cmp$i53$i i32) + (local $$cmp1 i32) + (local $$cmp1$i i32) + (local $$cmp10 i32) + (local $$cmp100$i$i i32) + (local $$cmp102$i i32) + (local $$cmp104$i$i i32) + (local $$cmp105$i i32) + (local $$cmp106$i$i i32) + (local $$cmp107$i i32) + (local $$cmp107$i160 i32) + (local $$cmp108$i i32) + (local $$cmp108$i$i i32) + (local $$cmp112$i$i i32) + (local $$cmp113 i32) + (local $$cmp114$i i32) + (local $$cmp116$i i32) + (local $$cmp118$i i32) + (local $$cmp119$i i32) + (local $$cmp12$i i32) + (local $$cmp120$i$i i32) + (local $$cmp120$i44$i i32) + (local $$cmp1209$i$i i32) + (local $$cmp121$i i32) + (local $$cmp123$i i32) + (local $$cmp124$i$i i32) + (local $$cmp126$i i32) + (local $$cmp127$i i32) + (local $$cmp128 i32) + (local $$cmp128$i i32) + (local $$cmp128$i$i i32) + (local $$cmp130$i i32) + (local $$cmp133$i i32) + (local $$cmp133$i$i i32) + (local $$cmp133$i204 i32) + (local $$cmp135$i i32) + (local $$cmp137$i i32) + (local $$cmp137$i$i i32) + (local $$cmp137$i205 i32) + (local $$cmp138$i i32) + (local $$cmp139 i32) + (local $$cmp140$i i32) + (local $$cmp141$i i32) + (local $$cmp142$i i32) + (local $$cmp144$i$i i32) + (local $$cmp146 i32) + (local $$cmp147$i i32) + (local $$cmp147103$i i32) + (local $$cmp15 i32) + (local $$cmp15$i i32) + (local $$cmp150$i$i i32) + (local $$cmp151$i i32) + (local $$cmp152$i i32) + (local $$cmp153$i$i i32) + (local $$cmp155$i i32) + (local $$cmp156 i32) + (local $$cmp156$i i32) + (local $$cmp156$i$i i32) + (local $$cmp157$i i32) + (local $$cmp159$i i32) + (local $$cmp159$i207 i32) + (local $$cmp16 i32) + (local $$cmp160$i$i i32) + (local $$cmp162 i32) + (local $$cmp162$i i32) + (local $$cmp162$i208 i32) + (local $$cmp166$i i32) + (local $$cmp168$i$i i32) + (local $$cmp171$i i32) + (local $$cmp172$i$i i32) + (local $$cmp174$i i32) + (local $$cmp180$i i32) + (local $$cmp185$i i32) + (local $$cmp185$i$i i32) + (local $$cmp186 i32) + (local $$cmp186$i i32) + (local $$cmp189$i$i i32) + (local $$cmp19$i i32) + (local $$cmp190$i i32) + (local $$cmp191$i i32) + (local $$cmp198$i i32) + (local $$cmp2$i$i i32) + (local $$cmp2$i$i$i i32) + (local $$cmp20$i$i i32) + (local $$cmp203$i i32) + (local $$cmp205$i i32) + (local $$cmp208$i i32) + (local $$cmp209$i i32) + (local $$cmp21$i i32) + (local $$cmp215$i$i i32) + (local $$cmp217$i i32) + (local $$cmp218$i i32) + (local $$cmp221$i i32) + (local $$cmp224$i i32) + (local $$cmp228$i i32) + (local $$cmp229$i i32) + (local $$cmp233$i i32) + (local $$cmp236$i$i i32) + (local $$cmp24$i i32) + (local $$cmp24$i$i i32) + (local $$cmp246$i i32) + (local $$cmp250$i i32) + (local $$cmp254$i$i i32) + (local $$cmp257$i i32) + (local $$cmp258$i$i i32) + (local $$cmp26$i i32) + (local $$cmp265$i i32) + (local $$cmp27$i$i i32) + (local $$cmp28$i i32) + (local $$cmp28$i$i i32) + (local $$cmp284$i i32) + (local $$cmp29 i32) + (local $$cmp3$i$i i32) + (local $$cmp301$i i32) + (local $$cmp306$i$i i32) + (local $$cmp31 i32) + (local $$cmp319$i i32) + (local $$cmp319$i$i i32) + (local $$cmp3198$i$i i32) + (local $$cmp32$i i32) + (local $$cmp32$i192 i32) + (local $$cmp323$i i32) + (local $$cmp327$i$i i32) + (local $$cmp33$i i32) + (local $$cmp332$i$i i32) + (local $$cmp34$i i32) + (local $$cmp34$i$i i32) + (local $$cmp346$i$i i32) + (local $$cmp35$i i32) + (local $$cmp350$i$i i32) + (local $$cmp36$i i32) + (local $$cmp36$i$i i32) + (local $$cmp374$i i32) + (local $$cmp38$i i32) + (local $$cmp38$i$i i32) + (local $$cmp388$i i32) + (local $$cmp38815$i i32) + (local $$cmp396$i i32) + (local $$cmp40$i i32) + (local $$cmp401$i i32) + (local $$cmp41$i$i i32) + (local $$cmp418$i i32) + (local $$cmp42$i$i i32) + (local $$cmp422$i i32) + (local $$cmp43$i i32) + (local $$cmp44$i$i i32) + (local $$cmp45$i i32) + (local $$cmp45$i157 i32) + (local $$cmp46$i i32) + (local $$cmp46$i$i i32) + (local $$cmp46$i40$i i32) + (local $$cmp48$i i32) + (local $$cmp49$i i32) + (local $$cmp5 i32) + (local $$cmp51$i i32) + (local $$cmp54$i$i i32) + (local $$cmp55$i i32) + (local $$cmp55$i193 i32) + (local $$cmp57$i i32) + (local $$cmp57$i$i i32) + (local $$cmp57$i194 i32) + (local $$cmp59$i$i i32) + (local $$cmp60$i i32) + (local $$cmp60$i$i i32) + (local $$cmp62$i i32) + (local $$cmp63$i i32) + (local $$cmp63$i$i i32) + (local $$cmp65$i i32) + (local $$cmp66$i i32) + (local $$cmp66$i197 i32) + (local $$cmp69$i i32) + (local $$cmp7$i$i i32) + (local $$cmp70 i32) + (local $$cmp72$i i32) + (local $$cmp75$i$i i32) + (local $$cmp76 i32) + (local $$cmp76$i i32) + (local $$cmp79 i32) + (local $$cmp81$i i32) + (local $$cmp81$i$i i32) + (local $$cmp81$i199 i32) + (local $$cmp83$i$i i32) + (local $$cmp85$i i32) + (local $$cmp86$i$i i32) + (local $$cmp89$i i32) + (local $$cmp9$i$i i32) + (local $$cmp90$i i32) + (local $$cmp91$i i32) + (local $$cmp93$i i32) + (local $$cmp95$i i32) + (local $$cmp96$i i32) + (local $$cmp97$i i32) + (local $$cmp97$i$i i32) + (local $$cmp9718$i i32) + (local $$cmp99 i32) + (local $$cond i32) + (local $$cond$i i32) + (local $$cond$i$i i32) + (local $$cond$i$i$i i32) + (local $$cond$i20$i i32) + (local $$cond$i27$i i32) + (local $$cond$i56$i i32) + (local $$cond115$i i32) + (local $$cond115$i$i i32) + (local $$cond13$i$i i32) + (local $$cond15$i$i i32) + (local $$cond3$i i32) + (local $$cond3$i$i i32) + (local $$cond315$i$i i32) + (local $$cond383$i i32) + (local $$cond5$i i32) + (local $$cond5$i179 i32) + (local $$fd$i i32) + (local $$fd$i$i i32) + (local $$fd$i167 i32) + (local $$fd103$i$i i32) + (local $$fd123 i32) + (local $$fd139$i i32) + (local $$fd140$i$i i32) + (local $$fd148$i$i i32) + (local $$fd160$i$i i32) + (local $$fd219$i i32) + (local $$fd247$i$i i32) + (local $$fd303$i$i i32) + (local $$fd312$i i32) + (local $$fd339$i$i i32) + (local $$fd344$i$i i32) + (local $$fd359$i$i i32) + (local $$fd371$i i32) + (local $$fd408$i i32) + (local $$fd416$i i32) + (local $$fd431$i i32) + (local $$fd50$i i32) + (local $$fd54$i$i i32) + (local $$fd59$i$i i32) + (local $$fd68$pre$phi$i$iZ2D i32) + (local $$fd69 i32) + (local $$fd78$i$i i32) + (local $$fd85$i$i i32) + (local $$fd9 i32) + (local $$head i32) + (local $$head$i i32) + (local $$head$i$i i32) + (local $$head$i$i$i i32) + (local $$head$i156 i32) + (local $$head$i21$i i32) + (local $$head$i33$i i32) + (local $$head$i60$i i32) + (local $$head118$i$i i32) + (local $$head1187$i$i i32) + (local $$head168 i32) + (local $$head173 i32) + (local $$head177 i32) + (local $$head179 i32) + (local $$head179$i i32) + (local $$head182$i i32) + (local $$head187$i i32) + (local $$head189$i i32) + (local $$head195 i32) + (local $$head198 i32) + (local $$head208$i$i i32) + (local $$head211$i$i i32) + (local $$head23$i$i i32) + (local $$head25 i32) + (local $$head26$i$i i32) + (local $$head265$i i32) + (local $$head268$i i32) + (local $$head271$i i32) + (local $$head274$i i32) + (local $$head279$i i32) + (local $$head281$i i32) + (local $$head29$i i32) + (local $$head29$i$i i32) + (local $$head317$i$i i32) + (local $$head3176$i$i i32) + (local $$head32$i$i i32) + (local $$head34$i$i i32) + (local $$head386$i i32) + (local $$head38613$i i32) + (local $$head7$i$i i32) + (local $$head7$i$i$i i32) + (local $$head7$i62$i i32) + (local $$head94 i32) + (local $$head97 i32) + (local $$head99$i i32) + (local $$idx$0$i i32) + (local $$index$i i32) + (local $$index$i$i i32) + (local $$index$i178 i32) + (local $$index$i45$i i32) + (local $$index288$i$i i32) + (local $$index356$i i32) + (local $$magic$i$i i32) + (local $$nb$0 i32) + (local $$neg i32) + (local $$neg$i i32) + (local $$neg$i$i i32) + (local $$neg$i180 i32) + (local $$neg$i190 i32) + (local $$neg103$i i32) + (local $$neg13 i32) + (local $$neg132$i$i i32) + (local $$neg48$i i32) + (local $$neg73 i32) + (local $$next$i i32) + (local $$next$i$i i32) + (local $$next$i$i$i i32) + (local $$next231$i i32) + (local $$not$cmp141$i i32) + (local $$oldfirst$0$i$i i32) + (local $$or$cond$i i32) + (local $$or$cond$i195 i32) + (local $$or$cond1$i i32) + (local $$or$cond101$i i32) + (local $$or$cond102$i i32) + (local $$or$cond11$i i32) + (local $$or$cond2$i i32) + (local $$or$cond2$i198 i32) + (local $$or$cond4$i i32) + (local $$or$cond5$i i32) + (local $$or$cond7$i i32) + (local $$or$cond8$i i32) + (local $$or$cond8$not$i i32) + (local $$or$i i32) + (local $$or$i$i i32) + (local $$or$i$i$i i32) + (local $$or$i203 i32) + (local $$or$i59$i i32) + (local $$or101$i$i i32) + (local $$or110 i32) + (local $$or167 i32) + (local $$or172 i32) + (local $$or176 i32) + (local $$or178$i i32) + (local $$or180 i32) + (local $$or183$i i32) + (local $$or186$i i32) + (local $$or188$i i32) + (local $$or19$i$i i32) + (local $$or194 i32) + (local $$or197 i32) + (local $$or204$i i32) + (local $$or210$i$i i32) + (local $$or22$i$i i32) + (local $$or23 i32) + (local $$or232$i$i i32) + (local $$or26 i32) + (local $$or264$i i32) + (local $$or267$i i32) + (local $$or270$i i32) + (local $$or275$i i32) + (local $$or278$i i32) + (local $$or28$i$i i32) + (local $$or280$i i32) + (local $$or297$i i32) + (local $$or300$i$i i32) + (local $$or33$i$i i32) + (local $$or368$i i32) + (local $$or40 i32) + (local $$or44$i$i i32) + (local $$or93 i32) + (local $$or96 i32) + (local $$parent$i i32) + (local $$parent$i$i i32) + (local $$parent$i165 i32) + (local $$parent$i42$i i32) + (local $$parent135$i i32) + (local $$parent138$i$i i32) + (local $$parent149$i i32) + (local $$parent162$i$i i32) + (local $$parent165$i$i i32) + (local $$parent166$i i32) + (local $$parent179$i$i i32) + (local $$parent196$i$i i32) + (local $$parent226$i i32) + (local $$parent240$i i32) + (local $$parent257$i i32) + (local $$parent301$i$i i32) + (local $$parent337$i$i i32) + (local $$parent361$i$i i32) + (local $$parent369$i i32) + (local $$parent406$i i32) + (local $$parent433$i i32) + (local $$qsize$0$i$i i32) + (local $$retval$0 i32) + (local $$rsize$0$i i32) + (local $$rsize$0$i154 i32) + (local $$rsize$1$i i32) + (local $$rsize$3$i i32) + (local $$rsize$4$lcssa$i i32) + (local $$rsize$420$i i32) + (local $$rsize$420$i$ph i32) + (local $$rst$0$i i32) + (local $$rst$1$i i32) + (local $$sflags193$i i32) + (local $$sflags235$i i32) + (local $$shl i32) + (local $$shl$i i32) + (local $$shl$i$i i32) + (local $$shl$i146 i32) + (local $$shl$i38$i i32) + (local $$shl102 i32) + (local $$shl105 i32) + (local $$shl116$i$i i32) + (local $$shl12 i32) + (local $$shl127$i$i i32) + (local $$shl131$i$i i32) + (local $$shl15$i i32) + (local $$shl18$i i32) + (local $$shl192$i i32) + (local $$shl195$i i32) + (local $$shl198$i i32) + (local $$shl22 i32) + (local $$shl222$i$i i32) + (local $$shl226$i$i i32) + (local $$shl265$i$i i32) + (local $$shl270$i$i i32) + (local $$shl276$i$i i32) + (local $$shl279$i$i i32) + (local $$shl288$i i32) + (local $$shl291$i i32) + (local $$shl294$i$i i32) + (local $$shl31$i i32) + (local $$shl316$i$i i32) + (local $$shl326$i$i i32) + (local $$shl333$i i32) + (local $$shl338$i i32) + (local $$shl344$i i32) + (local $$shl347$i i32) + (local $$shl35 i32) + (local $$shl362$i i32) + (local $$shl37 i32) + (local $$shl384$i i32) + (local $$shl39$i$i i32) + (local $$shl395$i i32) + (local $$shl48$i$i i32) + (local $$shl60$i i32) + (local $$shl65 i32) + (local $$shl70$i$i i32) + (local $$shl72 i32) + (local $$shl75$i$i i32) + (local $$shl81$i$i i32) + (local $$shl84$i$i i32) + (local $$shl9$i i32) + (local $$shl90 i32) + (local $$shl95$i$i i32) + (local $$shr i32) + (local $$shr$i i32) + (local $$shr$i$i i32) + (local $$shr$i141 i32) + (local $$shr$i36$i i32) + (local $$shr101 i32) + (local $$shr11$i i32) + (local $$shr11$i149 i32) + (local $$shr110$i$i i32) + (local $$shr12$i i32) + (local $$shr124$i$i i32) + (local $$shr15$i i32) + (local $$shr16$i i32) + (local $$shr16$i150 i32) + (local $$shr19$i i32) + (local $$shr194$i i32) + (local $$shr20$i i32) + (local $$shr214$i$i i32) + (local $$shr253$i$i i32) + (local $$shr263$i$i i32) + (local $$shr267$i$i i32) + (local $$shr27$i i32) + (local $$shr272$i$i i32) + (local $$shr277$i$i i32) + (local $$shr281$i$i i32) + (local $$shr283$i i32) + (local $$shr3 i32) + (local $$shr310$i$i i32) + (local $$shr318$i i32) + (local $$shr323$i$i i32) + (local $$shr330$i i32) + (local $$shr335$i i32) + (local $$shr340$i i32) + (local $$shr345$i i32) + (local $$shr349$i i32) + (local $$shr378$i i32) + (local $$shr392$i i32) + (local $$shr4$i i32) + (local $$shr42$i i32) + (local $$shr45 i32) + (local $$shr47 i32) + (local $$shr48 i32) + (local $$shr5$i i32) + (local $$shr5$i144 i32) + (local $$shr51 i32) + (local $$shr52 i32) + (local $$shr55 i32) + (local $$shr56 i32) + (local $$shr58$i$i i32) + (local $$shr59 i32) + (local $$shr60 i32) + (local $$shr63 i32) + (local $$shr68$i$i i32) + (local $$shr7$i i32) + (local $$shr7$i147 i32) + (local $$shr72$i i32) + (local $$shr72$i$i i32) + (local $$shr75$i i32) + (local $$shr76$i i32) + (local $$shr77$i$i i32) + (local $$shr79$i i32) + (local $$shr8$i i32) + (local $$shr80$i i32) + (local $$shr82$i$i i32) + (local $$shr83$i i32) + (local $$shr84$i i32) + (local $$shr86$i$i i32) + (local $$shr87$i i32) + (local $$shr88$i i32) + (local $$shr91$i i32) + (local $$size$i$i i32) + (local $$size$i$i$i i32) + (local $$size$i$i$le i32) + (local $$size188$i i32) + (local $$size188$i$le i32) + (local $$size245$i i32) + (local $$sizebits$0$i i32) + (local $$sp$0$i$i i32) + (local $$sp$0$i$i$i i32) + (local $$sp$0116$i i32) + (local $$sp$1115$i i32) + (local $$spec$select$i i32) + (local $$spec$select$i159 i32) + (local $$spec$select1$i i32) + (local $$spec$select100$i i32) + (local $$spec$select3$i i32) + (local $$spec$select7$i i32) + (local $$spec$select9$i i32) + (local $$ssize$2$ph$i i32) + (local $$sub i32) + (local $$sub$i i32) + (local $$sub$i$i i32) + (local $$sub$i$i$i i32) + (local $$sub$i140 i32) + (local $$sub$i189 i32) + (local $$sub$i19$i i32) + (local $$sub$i25$i i32) + (local $$sub$i54$i i32) + (local $$sub$ptr$lhs$cast$i i32) + (local $$sub$ptr$lhs$cast$i$i i32) + (local $$sub$ptr$lhs$cast$i30$i i32) + (local $$sub$ptr$rhs$cast$i i32) + (local $$sub$ptr$rhs$cast$i$i i32) + (local $$sub$ptr$rhs$cast$i31$i i32) + (local $$sub$ptr$sub$i i32) + (local $$sub$ptr$sub$i$i i32) + (local $$sub$ptr$sub$i32$i i32) + (local $$sub10$i i32) + (local $$sub101$i i32) + (local $$sub112$i i32) + (local $$sub113$i$i i32) + (local $$sub118$i i32) + (local $$sub12$i$i i32) + (local $$sub14$i i32) + (local $$sub16$i$i i32) + (local $$sub160 i32) + (local $$sub172$i i32) + (local $$sub18$i$i i32) + (local $$sub190 i32) + (local $$sub2$i i32) + (local $$sub22$i i32) + (local $$sub260$i i32) + (local $$sub262$i$i i32) + (local $$sub266$i$i i32) + (local $$sub271$i$i i32) + (local $$sub275$i$i i32) + (local $$sub30$i i32) + (local $$sub31$i i32) + (local $$sub313$i$i i32) + (local $$sub329$i i32) + (local $$sub33$i i32) + (local $$sub334$i i32) + (local $$sub339$i i32) + (local $$sub343$i i32) + (local $$sub381$i i32) + (local $$sub4$i i32) + (local $$sub41$i i32) + (local $$sub42 i32) + (local $$sub44 i32) + (local $$sub5$i$i i32) + (local $$sub5$i$i$i i32) + (local $$sub5$i58$i i32) + (local $$sub50$i i32) + (local $$sub6$i i32) + (local $$sub63$i i32) + (local $$sub67$i i32) + (local $$sub67$i$i i32) + (local $$sub70$i i32) + (local $$sub71$i$i i32) + (local $$sub76$i$i i32) + (local $$sub80$i$i i32) + (local $$sub91 i32) + (local $$sub99$i i32) + (local $$t$0$i i32) + (local $$t$0$i153 i32) + (local $$t$2$i i32) + (local $$t$4$i i32) + (local $$t$519$i i32) + (local $$t$519$i$ph i32) + (local $$tbase$799$i i32) + (local $$tobool$i$i i32) + (local $$tobool107 i32) + (local $$tobool195$i i32) + (local $$tobool200$i i32) + (local $$tobool228$i$i i32) + (local $$tobool237$i i32) + (local $$tobool293$i i32) + (local $$tobool296$i$i i32) + (local $$tobool30$i i32) + (local $$tobool364$i i32) + (local $$tobool97$i$i i32) + (local $$tsize$2687886$i i32) + (local $$tsize$4$i i32) + (local $$tsize$798$i i32) + (local $$v$0$i i32) + (local $$v$0$i155 i32) + (local $$v$1$i i32) + (local $$v$3$i i32) + (local $$v$3$i222 i32) + (local $$v$4$lcssa$i i32) + (local $$v$421$i i32) + (local $$v$421$i$ph i32) + (local $$xor$i$i i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $sp_a + (block (result i32) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $$magic$i$i + (local.get $sp_a) + ) + (local.set $$cmp + (i32.lt_u + (local.get $$bytes) + (i32.const 245) + ) + ) + (block $do-once + (if + (local.get $$cmp) + (block + (local.set $$cmp1 + (i32.lt_u + (local.get $$bytes) + (i32.const 11) + ) + ) + (local.set $$add2 + (i32.add + (local.get $$bytes) + (i32.const 11) + ) + ) + (local.set $$and + (i32.and + (local.get $$add2) + (i32.const -8) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp1) + (i32.const 16) + (local.get $$and) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$cond) + (i32.const 3) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shr3 + (i32.shr_u + (local.get $$0) + (local.get $$shr) + ) + ) + (local.set $$and4 + (i32.and + (local.get $$shr3) + (i32.const 3) + ) + ) + (local.set $$cmp5 + (i32.eq + (local.get $$and4) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp5) + ) + (block + (local.set $$neg + (i32.and + (local.get $$shr3) + (i32.const 1) + ) + ) + (local.set $$and7 + (i32.xor + (local.get $$neg) + (i32.const 1) + ) + ) + (local.set $$add8 + (i32.add + (local.get $$and7) + (local.get $$shr) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$add8) + (i32.const 1) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl) + (i32.const 2) + ) + ) + ) + (local.set $$1 + (i32.add + (local.get $$arrayidx) + (i32.const 8) + ) + ) + (local.set $$2 + (i32.load + (local.get $$1) + ) + ) + (local.set $$fd9 + (i32.add + (local.get $$2) + (i32.const 8) + ) + ) + (local.set $$3 + (i32.load + (local.get $$fd9) + ) + ) + (local.set $$cmp10 + (i32.eq + (local.get $$3) + (local.get $$arrayidx) + ) + ) + (block $do-once0 + (if + (local.get $$cmp10) + (block + (local.set $$shl12 + (i32.shl + (i32.const 1) + (local.get $$add8) + ) + ) + (local.set $$neg13 + (i32.xor + (local.get $$shl12) + (i32.const -1) + ) + ) + (local.set $$and14 + (i32.and + (local.get $$0) + (local.get $$neg13) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and14) + ) + ) + (block + (local.set $$4 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp15 + (i32.gt_u + (local.get $$4) + (local.get $$3) + ) + ) + (if + (local.get $$cmp15) + (call $_abort) + ) + (local.set $$bk + (i32.add + (local.get $$3) + (i32.const 12) + ) + ) + (local.set $$5 + (i32.load + (local.get $$bk) + ) + ) + (local.set $$cmp16 + (i32.eq + (local.get $$5) + (local.get $$2) + ) + ) + (if + (local.get $$cmp16) + (block + (i32.store + (local.get $$bk) + (local.get $$arrayidx) + ) + (i32.store + (local.get $$1) + (local.get $$3) + ) + (br $do-once0) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$shl22 + (i32.shl + (local.get $$add8) + (i32.const 3) + ) + ) + (local.set $$or23 + (i32.or + (local.get $$shl22) + (i32.const 3) + ) + ) + (local.set $$head + (i32.add + (local.get $$2) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or23) + ) + (local.set $$add$ptr + (i32.add + (local.get $$2) + (local.get $$shl22) + ) + ) + (local.set $$head25 + (i32.add + (local.get $$add$ptr) + (i32.const 4) + ) + ) + (local.set $$6 + (i32.load + (local.get $$head25) + ) + ) + (local.set $$or26 + (i32.or + (local.get $$6) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head25) + (local.get $$or26) + ) + (local.set $$retval$0 + (local.get $$fd9) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$cmp29 + (i32.gt_u + (local.get $$cond) + (local.get $$7) + ) + ) + (if + (local.get $$cmp29) + (block + (local.set $$cmp31 + (i32.eq + (local.get $$shr3) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp31) + ) + (block + (local.set $$shl35 + (i32.shl + (local.get $$shr3) + (local.get $$shr) + ) + ) + (local.set $$shl37 + (i32.shl + (i32.const 2) + (local.get $$shr) + ) + ) + (local.set $$sub + (i32.sub + (i32.const 0) + (local.get $$shl37) + ) + ) + (local.set $$or40 + (i32.or + (local.get $$shl37) + (local.get $$sub) + ) + ) + (local.set $$and41 + (i32.and + (local.get $$shl35) + (local.get $$or40) + ) + ) + (local.set $$sub42 + (i32.sub + (i32.const 0) + (local.get $$and41) + ) + ) + (local.set $$and43 + (i32.and + (local.get $$and41) + (local.get $$sub42) + ) + ) + (local.set $$sub44 + (i32.add + (local.get $$and43) + (i32.const -1) + ) + ) + (local.set $$shr45 + (i32.shr_u + (local.get $$sub44) + (i32.const 12) + ) + ) + (local.set $$and46 + (i32.and + (local.get $$shr45) + (i32.const 16) + ) + ) + (local.set $$shr47 + (i32.shr_u + (local.get $$sub44) + (local.get $$and46) + ) + ) + (local.set $$shr48 + (i32.shr_u + (local.get $$shr47) + (i32.const 5) + ) + ) + (local.set $$and49 + (i32.and + (local.get $$shr48) + (i32.const 8) + ) + ) + (local.set $$add50 + (i32.or + (local.get $$and49) + (local.get $$and46) + ) + ) + (local.set $$shr51 + (i32.shr_u + (local.get $$shr47) + (local.get $$and49) + ) + ) + (local.set $$shr52 + (i32.shr_u + (local.get $$shr51) + (i32.const 2) + ) + ) + (local.set $$and53 + (i32.and + (local.get $$shr52) + (i32.const 4) + ) + ) + (local.set $$add54 + (i32.or + (local.get $$add50) + (local.get $$and53) + ) + ) + (local.set $$shr55 + (i32.shr_u + (local.get $$shr51) + (local.get $$and53) + ) + ) + (local.set $$shr56 + (i32.shr_u + (local.get $$shr55) + (i32.const 1) + ) + ) + (local.set $$and57 + (i32.and + (local.get $$shr56) + (i32.const 2) + ) + ) + (local.set $$add58 + (i32.or + (local.get $$add54) + (local.get $$and57) + ) + ) + (local.set $$shr59 + (i32.shr_u + (local.get $$shr55) + (local.get $$and57) + ) + ) + (local.set $$shr60 + (i32.shr_u + (local.get $$shr59) + (i32.const 1) + ) + ) + (local.set $$and61 + (i32.and + (local.get $$shr60) + (i32.const 1) + ) + ) + (local.set $$add62 + (i32.or + (local.get $$add58) + (local.get $$and61) + ) + ) + (local.set $$shr63 + (i32.shr_u + (local.get $$shr59) + (local.get $$and61) + ) + ) + (local.set $$add64 + (i32.add + (local.get $$add62) + (local.get $$shr63) + ) + ) + (local.set $$shl65 + (i32.shl + (local.get $$add64) + (i32.const 1) + ) + ) + (local.set $$arrayidx66 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl65) + (i32.const 2) + ) + ) + ) + (local.set $$8 + (i32.add + (local.get $$arrayidx66) + (i32.const 8) + ) + ) + (local.set $$9 + (i32.load + (local.get $$8) + ) + ) + (local.set $$fd69 + (i32.add + (local.get $$9) + (i32.const 8) + ) + ) + (local.set $$10 + (i32.load + (local.get $$fd69) + ) + ) + (local.set $$cmp70 + (i32.eq + (local.get $$10) + (local.get $$arrayidx66) + ) + ) + (block $do-once2 + (if + (local.get $$cmp70) + (block + (local.set $$shl72 + (i32.shl + (i32.const 1) + (local.get $$add64) + ) + ) + (local.set $$neg73 + (i32.xor + (local.get $$shl72) + (i32.const -1) + ) + ) + (local.set $$and74 + (i32.and + (local.get $$0) + (local.get $$neg73) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and74) + ) + (local.set $$14 + (local.get $$and74) + ) + ) + (block + (local.set $$11 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp76 + (i32.gt_u + (local.get $$11) + (local.get $$10) + ) + ) + (if + (local.get $$cmp76) + (call $_abort) + ) + (local.set $$bk78 + (i32.add + (local.get $$10) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$bk78) + ) + ) + (local.set $$cmp79 + (i32.eq + (local.get $$12) + (local.get $$9) + ) + ) + (if + (local.get $$cmp79) + (block + (i32.store + (local.get $$bk78) + (local.get $$arrayidx66) + ) + (i32.store + (local.get $$8) + (local.get $$10) + ) + (local.set $$14 + (local.get $$0) + ) + (br $do-once2) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$shl90 + (i32.shl + (local.get $$add64) + (i32.const 3) + ) + ) + (local.set $$sub91 + (i32.sub + (local.get $$shl90) + (local.get $$cond) + ) + ) + (local.set $$or93 + (i32.or + (local.get $$cond) + (i32.const 3) + ) + ) + (local.set $$head94 + (i32.add + (local.get $$9) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head94) + (local.get $$or93) + ) + (local.set $$add$ptr95 + (i32.add + (local.get $$9) + (local.get $$cond) + ) + ) + (local.set $$or96 + (i32.or + (local.get $$sub91) + (i32.const 1) + ) + ) + (local.set $$head97 + (i32.add + (local.get $$add$ptr95) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head97) + (local.get $$or96) + ) + (local.set $$add$ptr98 + (i32.add + (local.get $$9) + (local.get $$shl90) + ) + ) + (i32.store + (local.get $$add$ptr98) + (local.get $$sub91) + ) + (local.set $$cmp99 + (i32.eq + (local.get $$7) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp99) + ) + (block + (local.set $$13 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$shr101 + (i32.shr_u + (local.get $$7) + (i32.const 3) + ) + ) + (local.set $$shl102 + (i32.shl + (local.get $$shr101) + (i32.const 1) + ) + ) + (local.set $$arrayidx103 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl102) + (i32.const 2) + ) + ) + ) + (local.set $$shl105 + (i32.shl + (i32.const 1) + (local.get $$shr101) + ) + ) + (local.set $$and106 + (i32.and + (local.get $$14) + (local.get $$shl105) + ) + ) + (local.set $$tobool107 + (i32.eq + (local.get $$and106) + (i32.const 0) + ) + ) + (if + (local.get $$tobool107) + (block + (local.set $$or110 + (i32.or + (local.get $$14) + (local.get $$shl105) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or110) + ) + (local.set $$$pre + (i32.add + (local.get $$arrayidx103) + (i32.const 8) + ) + ) + (local.set $$$pre$phiZ2D + (local.get $$$pre) + ) + (local.set $$F104$0 + (local.get $$arrayidx103) + ) + ) + (block + (local.set $$15 + (i32.add + (local.get $$arrayidx103) + (i32.const 8) + ) + ) + (local.set $$16 + (i32.load + (local.get $$15) + ) + ) + (local.set $$17 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp113 + (i32.gt_u + (local.get $$17) + (local.get $$16) + ) + ) + (if + (local.get $$cmp113) + (call $_abort) + (block + (local.set $$$pre$phiZ2D + (local.get $$15) + ) + (local.set $$F104$0 + (local.get $$16) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phiZ2D) + (local.get $$13) + ) + (local.set $$bk122 + (i32.add + (local.get $$F104$0) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk122) + (local.get $$13) + ) + (local.set $$fd123 + (i32.add + (local.get $$13) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd123) + (local.get $$F104$0) + ) + (local.set $$bk124 + (i32.add + (local.get $$13) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk124) + (local.get $$arrayidx103) + ) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$sub91) + ) + (i32.store + (i32.const 29424) + (local.get $$add$ptr95) + ) + (local.set $$retval$0 + (local.get $$fd69) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$18 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$cmp128 + (i32.eq + (local.get $$18) + (i32.const 0) + ) + ) + (if + (local.get $$cmp128) + (local.set $$nb$0 + (local.get $$cond) + ) + (block + (local.set $$sub$i + (i32.sub + (i32.const 0) + (local.get $$18) + ) + ) + (local.set $$and$i + (i32.and + (local.get $$18) + (local.get $$sub$i) + ) + ) + (local.set $$sub2$i + (i32.add + (local.get $$and$i) + (i32.const -1) + ) + ) + (local.set $$shr$i + (i32.shr_u + (local.get $$sub2$i) + (i32.const 12) + ) + ) + (local.set $$and3$i + (i32.and + (local.get $$shr$i) + (i32.const 16) + ) + ) + (local.set $$shr4$i + (i32.shr_u + (local.get $$sub2$i) + (local.get $$and3$i) + ) + ) + (local.set $$shr5$i + (i32.shr_u + (local.get $$shr4$i) + (i32.const 5) + ) + ) + (local.set $$and6$i + (i32.and + (local.get $$shr5$i) + (i32.const 8) + ) + ) + (local.set $$add$i + (i32.or + (local.get $$and6$i) + (local.get $$and3$i) + ) + ) + (local.set $$shr7$i + (i32.shr_u + (local.get $$shr4$i) + (local.get $$and6$i) + ) + ) + (local.set $$shr8$i + (i32.shr_u + (local.get $$shr7$i) + (i32.const 2) + ) + ) + (local.set $$and9$i + (i32.and + (local.get $$shr8$i) + (i32.const 4) + ) + ) + (local.set $$add10$i + (i32.or + (local.get $$add$i) + (local.get $$and9$i) + ) + ) + (local.set $$shr11$i + (i32.shr_u + (local.get $$shr7$i) + (local.get $$and9$i) + ) + ) + (local.set $$shr12$i + (i32.shr_u + (local.get $$shr11$i) + (i32.const 1) + ) + ) + (local.set $$and13$i + (i32.and + (local.get $$shr12$i) + (i32.const 2) + ) + ) + (local.set $$add14$i + (i32.or + (local.get $$add10$i) + (local.get $$and13$i) + ) + ) + (local.set $$shr15$i + (i32.shr_u + (local.get $$shr11$i) + (local.get $$and13$i) + ) + ) + (local.set $$shr16$i + (i32.shr_u + (local.get $$shr15$i) + (i32.const 1) + ) + ) + (local.set $$and17$i + (i32.and + (local.get $$shr16$i) + (i32.const 1) + ) + ) + (local.set $$add18$i + (i32.or + (local.get $$add14$i) + (local.get $$and17$i) + ) + ) + (local.set $$shr19$i + (i32.shr_u + (local.get $$shr15$i) + (local.get $$and17$i) + ) + ) + (local.set $$add20$i + (i32.add + (local.get $$add18$i) + (local.get $$shr19$i) + ) + ) + (local.set $$arrayidx$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$add20$i) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx$i) + ) + ) + (local.set $$head$i + (i32.add + (local.get $$19) + (i32.const 4) + ) + ) + (local.set $$20 + (i32.load + (local.get $$head$i) + ) + ) + (local.set $$and21$i + (i32.and + (local.get $$20) + (i32.const -8) + ) + ) + (local.set $$sub22$i + (i32.sub + (local.get $$and21$i) + (local.get $$cond) + ) + ) + (local.set $$rsize$0$i + (local.get $$sub22$i) + ) + (local.set $$t$0$i + (local.get $$19) + ) + (local.set $$v$0$i + (local.get $$19) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx23$i + (i32.add + (local.get $$t$0$i) + (i32.const 16) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx23$i) + ) + ) + (local.set $$cmp$i + (i32.eq + (local.get $$21) + (i32.const 0) + ) + ) + (if + (local.get $$cmp$i) + (block + (local.set $$arrayidx27$i + (i32.add + (local.get $$t$0$i) + (i32.const 20) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx27$i) + ) + ) + (local.set $$cmp28$i + (i32.eq + (local.get $$22) + (i32.const 0) + ) + ) + (if + (local.get $$cmp28$i) + (br $while-out) + (local.set $$cond5$i + (local.get $$22) + ) + ) + ) + (local.set $$cond5$i + (local.get $$21) + ) + ) + (local.set $$head29$i + (i32.add + (local.get $$cond5$i) + (i32.const 4) + ) + ) + (local.set $$23 + (i32.load + (local.get $$head29$i) + ) + ) + (local.set $$and30$i + (i32.and + (local.get $$23) + (i32.const -8) + ) + ) + (local.set $$sub31$i + (i32.sub + (local.get $$and30$i) + (local.get $$cond) + ) + ) + (local.set $$cmp32$i + (i32.lt_u + (local.get $$sub31$i) + (local.get $$rsize$0$i) + ) + ) + (local.set $$spec$select$i + (if (result i32) + (local.get $$cmp32$i) + (local.get $$sub31$i) + (local.get $$rsize$0$i) + ) + ) + (local.set $$spec$select1$i + (if (result i32) + (local.get $$cmp32$i) + (local.get $$cond5$i) + (local.get $$v$0$i) + ) + ) + (local.set $$rsize$0$i + (local.get $$spec$select$i) + ) + (local.set $$t$0$i + (local.get $$cond5$i) + ) + (local.set $$v$0$i + (local.get $$spec$select1$i) + ) + (br $while-in) + ) + ) + (local.set $$24 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp33$i + (i32.gt_u + (local.get $$24) + (local.get $$v$0$i) + ) + ) + (if + (local.get $$cmp33$i) + (call $_abort) + ) + (local.set $$add$ptr$i + (i32.add + (local.get $$v$0$i) + (local.get $$cond) + ) + ) + (local.set $$cmp35$i + (i32.gt_u + (local.get $$add$ptr$i) + (local.get $$v$0$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp35$i) + ) + (call $_abort) + ) + (local.set $$parent$i + (i32.add + (local.get $$v$0$i) + (i32.const 24) + ) + ) + (local.set $$25 + (i32.load + (local.get $$parent$i) + ) + ) + (local.set $$bk$i + (i32.add + (local.get $$v$0$i) + (i32.const 12) + ) + ) + (local.set $$26 + (i32.load + (local.get $$bk$i) + ) + ) + (local.set $$cmp40$i + (i32.eq + (local.get $$26) + (local.get $$v$0$i) + ) + ) + (block $do-once4 + (if + (local.get $$cmp40$i) + (block + (local.set $$arrayidx61$i + (i32.add + (local.get $$v$0$i) + (i32.const 20) + ) + ) + (local.set $$30 + (i32.load + (local.get $$arrayidx61$i) + ) + ) + (local.set $$cmp62$i + (i32.eq + (local.get $$30) + (i32.const 0) + ) + ) + (if + (local.get $$cmp62$i) + (block + (local.set $$arrayidx65$i + (i32.add + (local.get $$v$0$i) + (i32.const 16) + ) + ) + (local.set $$31 + (i32.load + (local.get $$arrayidx65$i) + ) + ) + (local.set $$cmp66$i + (i32.eq + (local.get $$31) + (i32.const 0) + ) + ) + (if + (local.get $$cmp66$i) + (block + (local.set $$R$3$i + (i32.const 0) + ) + (br $do-once4) + ) + (block + (local.set $$R$1$i$ph + (local.get $$31) + ) + (local.set $$RP$1$i$ph + (local.get $$arrayidx65$i) + ) + ) + ) + ) + (block + (local.set $$R$1$i$ph + (local.get $$30) + ) + (local.set $$RP$1$i$ph + (local.get $$arrayidx61$i) + ) + ) + ) + (local.set $$R$1$i + (local.get $$R$1$i$ph) + ) + (local.set $$RP$1$i + (local.get $$RP$1$i$ph) + ) + (loop $while-in7 + (block $while-out6 + (local.set $$arrayidx71$i + (i32.add + (local.get $$R$1$i) + (i32.const 20) + ) + ) + (local.set $$32 + (i32.load + (local.get $$arrayidx71$i) + ) + ) + (local.set $$cmp72$i + (i32.eq + (local.get $$32) + (i32.const 0) + ) + ) + (if + (local.get $$cmp72$i) + (block + (local.set $$arrayidx75$i + (i32.add + (local.get $$R$1$i) + (i32.const 16) + ) + ) + (local.set $$33 + (i32.load + (local.get $$arrayidx75$i) + ) + ) + (local.set $$cmp76$i + (i32.eq + (local.get $$33) + (i32.const 0) + ) + ) + (if + (local.get $$cmp76$i) + (br $while-out6) + (block + (local.set $$R$1$i$be + (local.get $$33) + ) + (local.set $$RP$1$i$be + (local.get $$arrayidx75$i) + ) + ) + ) + ) + (block + (local.set $$R$1$i$be + (local.get $$32) + ) + (local.set $$RP$1$i$be + (local.get $$arrayidx71$i) + ) + ) + ) + (local.set $$R$1$i + (local.get $$R$1$i$be) + ) + (local.set $$RP$1$i + (local.get $$RP$1$i$be) + ) + (br $while-in7) + ) + ) + (local.set $$cmp81$i + (i32.gt_u + (local.get $$24) + (local.get $$RP$1$i) + ) + ) + (if + (local.get $$cmp81$i) + (call $_abort) + (block + (i32.store + (local.get $$RP$1$i) + (i32.const 0) + ) + (local.set $$R$3$i + (local.get $$R$1$i) + ) + (br $do-once4) + ) + ) + ) + (block + (local.set $$fd$i + (i32.add + (local.get $$v$0$i) + (i32.const 8) + ) + ) + (local.set $$27 + (i32.load + (local.get $$fd$i) + ) + ) + (local.set $$cmp45$i + (i32.gt_u + (local.get $$24) + (local.get $$27) + ) + ) + (if + (local.get $$cmp45$i) + (call $_abort) + ) + (local.set $$bk47$i + (i32.add + (local.get $$27) + (i32.const 12) + ) + ) + (local.set $$28 + (i32.load + (local.get $$bk47$i) + ) + ) + (local.set $$cmp48$i + (i32.eq + (local.get $$28) + (local.get $$v$0$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp48$i) + ) + (call $_abort) + ) + (local.set $$fd50$i + (i32.add + (local.get $$26) + (i32.const 8) + ) + ) + (local.set $$29 + (i32.load + (local.get $$fd50$i) + ) + ) + (local.set $$cmp51$i + (i32.eq + (local.get $$29) + (local.get $$v$0$i) + ) + ) + (if + (local.get $$cmp51$i) + (block + (i32.store + (local.get $$bk47$i) + (local.get $$26) + ) + (i32.store + (local.get $$fd50$i) + (local.get $$27) + ) + (local.set $$R$3$i + (local.get $$26) + ) + (br $do-once4) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp90$i + (i32.eq + (local.get $$25) + (i32.const 0) + ) + ) + (block $label$break$L78 + (if + (i32.eqz + (local.get $$cmp90$i) + ) + (block + (local.set $$index$i + (i32.add + (local.get $$v$0$i) + (i32.const 28) + ) + ) + (local.set $$34 + (i32.load + (local.get $$index$i) + ) + ) + (local.set $$arrayidx94$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$34) + (i32.const 2) + ) + ) + ) + (local.set $$35 + (i32.load + (local.get $$arrayidx94$i) + ) + ) + (local.set $$cmp95$i + (i32.eq + (local.get $$v$0$i) + (local.get $$35) + ) + ) + (block $do-once9 + (if + (local.get $$cmp95$i) + (block + (i32.store + (local.get $$arrayidx94$i) + (local.get $$R$3$i) + ) + (local.set $$cond3$i + (i32.eq + (local.get $$R$3$i) + (i32.const 0) + ) + ) + (if + (local.get $$cond3$i) + (block + (local.set $$shl$i + (i32.shl + (i32.const 1) + (local.get $$34) + ) + ) + (local.set $$neg$i + (i32.xor + (local.get $$shl$i) + (i32.const -1) + ) + ) + (local.set $$and103$i + (i32.and + (local.get $$18) + (local.get $$neg$i) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and103$i) + ) + (br $label$break$L78) + ) + ) + ) + (block + (local.set $$36 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp107$i + (i32.gt_u + (local.get $$36) + (local.get $$25) + ) + ) + (if + (local.get $$cmp107$i) + (call $_abort) + (block + (local.set $$arrayidx113$i + (i32.add + (local.get $$25) + (i32.const 16) + ) + ) + (local.set $$37 + (i32.load + (local.get $$arrayidx113$i) + ) + ) + (local.set $$cmp114$i + (i32.eq + (local.get $$37) + (local.get $$v$0$i) + ) + ) + (local.set $$arrayidx121$i + (i32.add + (local.get $$25) + (i32.const 20) + ) + ) + (local.set $$arrayidx121$i$sink + (if (result i32) + (local.get $$cmp114$i) + (local.get $$arrayidx113$i) + (local.get $$arrayidx121$i) + ) + ) + (i32.store + (local.get $$arrayidx121$i$sink) + (local.get $$R$3$i) + ) + (local.set $$cmp126$i + (i32.eq + (local.get $$R$3$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp126$i) + (br $label$break$L78) + (br $do-once9) + ) + ) + ) + ) + ) + ) + (local.set $$38 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp130$i + (i32.gt_u + (local.get $$38) + (local.get $$R$3$i) + ) + ) + (if + (local.get $$cmp130$i) + (call $_abort) + ) + (local.set $$parent135$i + (i32.add + (local.get $$R$3$i) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent135$i) + (local.get $$25) + ) + (local.set $$arrayidx137$i + (i32.add + (local.get $$v$0$i) + (i32.const 16) + ) + ) + (local.set $$39 + (i32.load + (local.get $$arrayidx137$i) + ) + ) + (local.set $$cmp138$i + (i32.eq + (local.get $$39) + (i32.const 0) + ) + ) + (block $do-once11 + (if + (i32.eqz + (local.get $$cmp138$i) + ) + (block + (local.set $$cmp142$i + (i32.gt_u + (local.get $$38) + (local.get $$39) + ) + ) + (if + (local.get $$cmp142$i) + (call $_abort) + (block + (local.set $$arrayidx148$i + (i32.add + (local.get $$R$3$i) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx148$i) + (local.get $$39) + ) + (local.set $$parent149$i + (i32.add + (local.get $$39) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent149$i) + (local.get $$R$3$i) + ) + (br $do-once11) + ) + ) + ) + ) + ) + (local.set $$arrayidx154$i + (i32.add + (local.get $$v$0$i) + (i32.const 20) + ) + ) + (local.set $$40 + (i32.load + (local.get $$arrayidx154$i) + ) + ) + (local.set $$cmp155$i + (i32.eq + (local.get $$40) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp155$i) + ) + (block + (local.set $$41 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp159$i + (i32.gt_u + (local.get $$41) + (local.get $$40) + ) + ) + (if + (local.get $$cmp159$i) + (call $_abort) + (block + (local.set $$arrayidx165$i + (i32.add + (local.get $$R$3$i) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx165$i) + (local.get $$40) + ) + (local.set $$parent166$i + (i32.add + (local.get $$40) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent166$i) + (local.get $$R$3$i) + ) + (br $label$break$L78) + ) + ) + ) + ) + ) + ) + ) + (local.set $$cmp174$i + (i32.lt_u + (local.get $$rsize$0$i) + (i32.const 16) + ) + ) + (if + (local.get $$cmp174$i) + (block + (local.set $$add177$i + (i32.add + (local.get $$rsize$0$i) + (local.get $$cond) + ) + ) + (local.set $$or178$i + (i32.or + (local.get $$add177$i) + (i32.const 3) + ) + ) + (local.set $$head179$i + (i32.add + (local.get $$v$0$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head179$i) + (local.get $$or178$i) + ) + (local.set $$add$ptr181$i + (i32.add + (local.get $$v$0$i) + (local.get $$add177$i) + ) + ) + (local.set $$head182$i + (i32.add + (local.get $$add$ptr181$i) + (i32.const 4) + ) + ) + (local.set $$42 + (i32.load + (local.get $$head182$i) + ) + ) + (local.set $$or183$i + (i32.or + (local.get $$42) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head182$i) + (local.get $$or183$i) + ) + ) + (block + (local.set $$or186$i + (i32.or + (local.get $$cond) + (i32.const 3) + ) + ) + (local.set $$head187$i + (i32.add + (local.get $$v$0$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head187$i) + (local.get $$or186$i) + ) + (local.set $$or188$i + (i32.or + (local.get $$rsize$0$i) + (i32.const 1) + ) + ) + (local.set $$head189$i + (i32.add + (local.get $$add$ptr$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head189$i) + (local.get $$or188$i) + ) + (local.set $$add$ptr190$i + (i32.add + (local.get $$add$ptr$i) + (local.get $$rsize$0$i) + ) + ) + (i32.store + (local.get $$add$ptr190$i) + (local.get $$rsize$0$i) + ) + (local.set $$cmp191$i + (i32.eq + (local.get $$7) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp191$i) + ) + (block + (local.set $$43 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$shr194$i + (i32.shr_u + (local.get $$7) + (i32.const 3) + ) + ) + (local.set $$shl195$i + (i32.shl + (local.get $$shr194$i) + (i32.const 1) + ) + ) + (local.set $$arrayidx196$i + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl195$i) + (i32.const 2) + ) + ) + ) + (local.set $$shl198$i + (i32.shl + (i32.const 1) + (local.get $$shr194$i) + ) + ) + (local.set $$and199$i + (i32.and + (local.get $$shl198$i) + (local.get $$0) + ) + ) + (local.set $$tobool200$i + (i32.eq + (local.get $$and199$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool200$i) + (block + (local.set $$or204$i + (i32.or + (local.get $$shl198$i) + (local.get $$0) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or204$i) + ) + (local.set $$$pre$i + (i32.add + (local.get $$arrayidx196$i) + (i32.const 8) + ) + ) + (local.set $$$pre$phi$iZ2D + (local.get $$$pre$i) + ) + (local.set $$F197$0$i + (local.get $$arrayidx196$i) + ) + ) + (block + (local.set $$44 + (i32.add + (local.get $$arrayidx196$i) + (i32.const 8) + ) + ) + (local.set $$45 + (i32.load + (local.get $$44) + ) + ) + (local.set $$46 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp208$i + (i32.gt_u + (local.get $$46) + (local.get $$45) + ) + ) + (if + (local.get $$cmp208$i) + (call $_abort) + (block + (local.set $$$pre$phi$iZ2D + (local.get $$44) + ) + (local.set $$F197$0$i + (local.get $$45) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phi$iZ2D) + (local.get $$43) + ) + (local.set $$bk218$i + (i32.add + (local.get $$F197$0$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk218$i) + (local.get $$43) + ) + (local.set $$fd219$i + (i32.add + (local.get $$43) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd219$i) + (local.get $$F197$0$i) + ) + (local.set $$bk220$i + (i32.add + (local.get $$43) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk220$i) + (local.get $$arrayidx196$i) + ) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$rsize$0$i) + ) + (i32.store + (i32.const 29424) + (local.get $$add$ptr$i) + ) + ) + ) + (local.set $$add$ptr225$i + (i32.add + (local.get $$v$0$i) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr225$i) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + (local.set $$nb$0 + (local.get $$cond) + ) + ) + ) + (block + (local.set $$cmp139 + (i32.gt_u + (local.get $$bytes) + (i32.const -65) + ) + ) + (if + (local.get $$cmp139) + (local.set $$nb$0 + (i32.const -1) + ) + (block + (local.set $$add144 + (i32.add + (local.get $$bytes) + (i32.const 11) + ) + ) + (local.set $$and145 + (i32.and + (local.get $$add144) + (i32.const -8) + ) + ) + (local.set $$47 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$cmp146 + (i32.eq + (local.get $$47) + (i32.const 0) + ) + ) + (if + (local.get $$cmp146) + (local.set $$nb$0 + (local.get $$and145) + ) + (block + (local.set $$sub$i140 + (i32.sub + (i32.const 0) + (local.get $$and145) + ) + ) + (local.set $$shr$i141 + (i32.shr_u + (local.get $$add144) + (i32.const 8) + ) + ) + (local.set $$cmp$i142 + (i32.eq + (local.get $$shr$i141) + (i32.const 0) + ) + ) + (if + (local.get $$cmp$i142) + (local.set $$idx$0$i + (i32.const 0) + ) + (block + (local.set $$cmp1$i + (i32.gt_u + (local.get $$and145) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp1$i) + (local.set $$idx$0$i + (i32.const 31) + ) + (block + (local.set $$sub4$i + (i32.add + (local.get $$shr$i141) + (i32.const 1048320) + ) + ) + (local.set $$shr5$i144 + (i32.shr_u + (local.get $$sub4$i) + (i32.const 16) + ) + ) + (local.set $$and$i145 + (i32.and + (local.get $$shr5$i144) + (i32.const 8) + ) + ) + (local.set $$shl$i146 + (i32.shl + (local.get $$shr$i141) + (local.get $$and$i145) + ) + ) + (local.set $$sub6$i + (i32.add + (local.get $$shl$i146) + (i32.const 520192) + ) + ) + (local.set $$shr7$i147 + (i32.shr_u + (local.get $$sub6$i) + (i32.const 16) + ) + ) + (local.set $$and8$i + (i32.and + (local.get $$shr7$i147) + (i32.const 4) + ) + ) + (local.set $$add$i148 + (i32.or + (local.get $$and8$i) + (local.get $$and$i145) + ) + ) + (local.set $$shl9$i + (i32.shl + (local.get $$shl$i146) + (local.get $$and8$i) + ) + ) + (local.set $$sub10$i + (i32.add + (local.get $$shl9$i) + (i32.const 245760) + ) + ) + (local.set $$shr11$i149 + (i32.shr_u + (local.get $$sub10$i) + (i32.const 16) + ) + ) + (local.set $$and12$i + (i32.and + (local.get $$shr11$i149) + (i32.const 2) + ) + ) + (local.set $$add13$i + (i32.or + (local.get $$add$i148) + (local.get $$and12$i) + ) + ) + (local.set $$sub14$i + (i32.sub + (i32.const 14) + (local.get $$add13$i) + ) + ) + (local.set $$shl15$i + (i32.shl + (local.get $$shl9$i) + (local.get $$and12$i) + ) + ) + (local.set $$shr16$i150 + (i32.shr_u + (local.get $$shl15$i) + (i32.const 15) + ) + ) + (local.set $$add17$i + (i32.add + (local.get $$sub14$i) + (local.get $$shr16$i150) + ) + ) + (local.set $$shl18$i + (i32.shl + (local.get $$add17$i) + (i32.const 1) + ) + ) + (local.set $$add19$i + (i32.add + (local.get $$add17$i) + (i32.const 7) + ) + ) + (local.set $$shr20$i + (i32.shr_u + (local.get $$and145) + (local.get $$add19$i) + ) + ) + (local.set $$and21$i151 + (i32.and + (local.get $$shr20$i) + (i32.const 1) + ) + ) + (local.set $$add22$i + (i32.or + (local.get $$and21$i151) + (local.get $$shl18$i) + ) + ) + (local.set $$idx$0$i + (local.get $$add22$i) + ) + ) + ) + ) + ) + (local.set $$arrayidx$i152 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$idx$0$i) + (i32.const 2) + ) + ) + ) + (local.set $$48 + (i32.load + (local.get $$arrayidx$i152) + ) + ) + (local.set $$cmp24$i + (i32.eq + (local.get $$48) + (i32.const 0) + ) + ) + (block $label$break$L122 + (if + (local.get $$cmp24$i) + (block + (local.set $$rsize$3$i + (local.get $$sub$i140) + ) + (local.set $$t$2$i + (i32.const 0) + ) + (local.set $$v$3$i + (i32.const 0) + ) + (local.set $label + (i32.const 85) + ) + ) + (block + (local.set $$cmp26$i + (i32.eq + (local.get $$idx$0$i) + (i32.const 31) + ) + ) + (local.set $$shr27$i + (i32.shr_u + (local.get $$idx$0$i) + (i32.const 1) + ) + ) + (local.set $$sub30$i + (i32.sub + (i32.const 25) + (local.get $$shr27$i) + ) + ) + (local.set $$cond$i + (if (result i32) + (local.get $$cmp26$i) + (i32.const 0) + (local.get $$sub30$i) + ) + ) + (local.set $$shl31$i + (i32.shl + (local.get $$and145) + (local.get $$cond$i) + ) + ) + (local.set $$rsize$0$i154 + (local.get $$sub$i140) + ) + (local.set $$rst$0$i + (i32.const 0) + ) + (local.set $$sizebits$0$i + (local.get $$shl31$i) + ) + (local.set $$t$0$i153 + (local.get $$48) + ) + (local.set $$v$0$i155 + (i32.const 0) + ) + (loop $while-in15 + (block $while-out14 + (local.set $$head$i156 + (i32.add + (local.get $$t$0$i153) + (i32.const 4) + ) + ) + (local.set $$49 + (i32.load + (local.get $$head$i156) + ) + ) + (local.set $$and32$i + (i32.and + (local.get $$49) + (i32.const -8) + ) + ) + (local.set $$sub33$i + (i32.sub + (local.get $$and32$i) + (local.get $$and145) + ) + ) + (local.set $$cmp34$i + (i32.lt_u + (local.get $$sub33$i) + (local.get $$rsize$0$i154) + ) + ) + (if + (local.get $$cmp34$i) + (block + (local.set $$cmp36$i + (i32.eq + (local.get $$sub33$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp36$i) + (block + (local.set $$rsize$420$i$ph + (i32.const 0) + ) + (local.set $$t$519$i$ph + (local.get $$t$0$i153) + ) + (local.set $$v$421$i$ph + (local.get $$t$0$i153) + ) + (local.set $label + (i32.const 89) + ) + (br $label$break$L122) + ) + (block + (local.set $$rsize$1$i + (local.get $$sub33$i) + ) + (local.set $$v$1$i + (local.get $$t$0$i153) + ) + ) + ) + ) + (block + (local.set $$rsize$1$i + (local.get $$rsize$0$i154) + ) + (local.set $$v$1$i + (local.get $$v$0$i155) + ) + ) + ) + (local.set $$arrayidx40$i + (i32.add + (local.get $$t$0$i153) + (i32.const 20) + ) + ) + (local.set $$50 + (i32.load + (local.get $$arrayidx40$i) + ) + ) + (local.set $$shr42$i + (i32.shr_u + (local.get $$sizebits$0$i) + (i32.const 31) + ) + ) + (local.set $$arrayidx44$i + (i32.add + (i32.add + (local.get $$t$0$i153) + (i32.const 16) + ) + (i32.shl + (local.get $$shr42$i) + (i32.const 2) + ) + ) + ) + (local.set $$51 + (i32.load + (local.get $$arrayidx44$i) + ) + ) + (local.set $$cmp45$i157 + (i32.eq + (local.get $$50) + (i32.const 0) + ) + ) + (local.set $$cmp46$i + (i32.eq + (local.get $$50) + (local.get $$51) + ) + ) + (local.set $$or$cond2$i + (i32.or + (local.get $$cmp45$i157) + (local.get $$cmp46$i) + ) + ) + (local.set $$rst$1$i + (if (result i32) + (local.get $$or$cond2$i) + (local.get $$rst$0$i) + (local.get $$50) + ) + ) + (local.set $$cmp49$i + (i32.eq + (local.get $$51) + (i32.const 0) + ) + ) + (local.set $$spec$select7$i + (i32.shl + (local.get $$sizebits$0$i) + (i32.const 1) + ) + ) + (if + (local.get $$cmp49$i) + (block + (local.set $$rsize$3$i + (local.get $$rsize$1$i) + ) + (local.set $$t$2$i + (local.get $$rst$1$i) + ) + (local.set $$v$3$i + (local.get $$v$1$i) + ) + (local.set $label + (i32.const 85) + ) + (br $while-out14) + ) + (block + (local.set $$rsize$0$i154 + (local.get $$rsize$1$i) + ) + (local.set $$rst$0$i + (local.get $$rst$1$i) + ) + (local.set $$sizebits$0$i + (local.get $$spec$select7$i) + ) + (local.set $$t$0$i153 + (local.get $$51) + ) + (local.set $$v$0$i155 + (local.get $$v$1$i) + ) + ) + ) + (br $while-in15) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 85) + ) + (block + (local.set $$cmp55$i + (i32.eq + (local.get $$t$2$i) + (i32.const 0) + ) + ) + (local.set $$cmp57$i + (i32.eq + (local.get $$v$3$i) + (i32.const 0) + ) + ) + (local.set $$or$cond$i + (i32.and + (local.get $$cmp55$i) + (local.get $$cmp57$i) + ) + ) + (if + (local.get $$or$cond$i) + (block + (local.set $$shl60$i + (i32.shl + (i32.const 2) + (local.get $$idx$0$i) + ) + ) + (local.set $$sub63$i + (i32.sub + (i32.const 0) + (local.get $$shl60$i) + ) + ) + (local.set $$or$i + (i32.or + (local.get $$shl60$i) + (local.get $$sub63$i) + ) + ) + (local.set $$and64$i + (i32.and + (local.get $$or$i) + (local.get $$47) + ) + ) + (local.set $$cmp65$i + (i32.eq + (local.get $$and64$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp65$i) + (block + (local.set $$nb$0 + (local.get $$and145) + ) + (br $do-once) + ) + ) + (local.set $$sub67$i + (i32.sub + (i32.const 0) + (local.get $$and64$i) + ) + ) + (local.set $$and68$i + (i32.and + (local.get $$and64$i) + (local.get $$sub67$i) + ) + ) + (local.set $$sub70$i + (i32.add + (local.get $$and68$i) + (i32.const -1) + ) + ) + (local.set $$shr72$i + (i32.shr_u + (local.get $$sub70$i) + (i32.const 12) + ) + ) + (local.set $$and73$i + (i32.and + (local.get $$shr72$i) + (i32.const 16) + ) + ) + (local.set $$shr75$i + (i32.shr_u + (local.get $$sub70$i) + (local.get $$and73$i) + ) + ) + (local.set $$shr76$i + (i32.shr_u + (local.get $$shr75$i) + (i32.const 5) + ) + ) + (local.set $$and77$i + (i32.and + (local.get $$shr76$i) + (i32.const 8) + ) + ) + (local.set $$add78$i + (i32.or + (local.get $$and77$i) + (local.get $$and73$i) + ) + ) + (local.set $$shr79$i + (i32.shr_u + (local.get $$shr75$i) + (local.get $$and77$i) + ) + ) + (local.set $$shr80$i + (i32.shr_u + (local.get $$shr79$i) + (i32.const 2) + ) + ) + (local.set $$and81$i + (i32.and + (local.get $$shr80$i) + (i32.const 4) + ) + ) + (local.set $$add82$i + (i32.or + (local.get $$add78$i) + (local.get $$and81$i) + ) + ) + (local.set $$shr83$i + (i32.shr_u + (local.get $$shr79$i) + (local.get $$and81$i) + ) + ) + (local.set $$shr84$i + (i32.shr_u + (local.get $$shr83$i) + (i32.const 1) + ) + ) + (local.set $$and85$i + (i32.and + (local.get $$shr84$i) + (i32.const 2) + ) + ) + (local.set $$add86$i + (i32.or + (local.get $$add82$i) + (local.get $$and85$i) + ) + ) + (local.set $$shr87$i + (i32.shr_u + (local.get $$shr83$i) + (local.get $$and85$i) + ) + ) + (local.set $$shr88$i + (i32.shr_u + (local.get $$shr87$i) + (i32.const 1) + ) + ) + (local.set $$and89$i + (i32.and + (local.get $$shr88$i) + (i32.const 1) + ) + ) + (local.set $$add90$i + (i32.or + (local.get $$add86$i) + (local.get $$and89$i) + ) + ) + (local.set $$shr91$i + (i32.shr_u + (local.get $$shr87$i) + (local.get $$and89$i) + ) + ) + (local.set $$add92$i + (i32.add + (local.get $$add90$i) + (local.get $$shr91$i) + ) + ) + (local.set $$arrayidx94$i158 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$add92$i) + (i32.const 2) + ) + ) + ) + (local.set $$52 + (i32.load + (local.get $$arrayidx94$i158) + ) + ) + (local.set $$t$4$i + (local.get $$52) + ) + (local.set $$v$3$i222 + (i32.const 0) + ) + ) + (block + (local.set $$t$4$i + (local.get $$t$2$i) + ) + (local.set $$v$3$i222 + (local.get $$v$3$i) + ) + ) + ) + (local.set $$cmp9718$i + (i32.eq + (local.get $$t$4$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp9718$i) + (block + (local.set $$rsize$4$lcssa$i + (local.get $$rsize$3$i) + ) + (local.set $$v$4$lcssa$i + (local.get $$v$3$i222) + ) + ) + (block + (local.set $$rsize$420$i$ph + (local.get $$rsize$3$i) + ) + (local.set $$t$519$i$ph + (local.get $$t$4$i) + ) + (local.set $$v$421$i$ph + (local.get $$v$3$i222) + ) + (local.set $label + (i32.const 89) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 89) + ) + (block + (local.set $$rsize$420$i + (local.get $$rsize$420$i$ph) + ) + (local.set $$t$519$i + (local.get $$t$519$i$ph) + ) + (local.set $$v$421$i + (local.get $$v$421$i$ph) + ) + (loop $while-in17 + (block $while-out16 + (local.set $$head99$i + (i32.add + (local.get $$t$519$i) + (i32.const 4) + ) + ) + (local.set $$53 + (i32.load + (local.get $$head99$i) + ) + ) + (local.set $$and100$i + (i32.and + (local.get $$53) + (i32.const -8) + ) + ) + (local.set $$sub101$i + (i32.sub + (local.get $$and100$i) + (local.get $$and145) + ) + ) + (local.set $$cmp102$i + (i32.lt_u + (local.get $$sub101$i) + (local.get $$rsize$420$i) + ) + ) + (local.set $$spec$select$i159 + (if (result i32) + (local.get $$cmp102$i) + (local.get $$sub101$i) + (local.get $$rsize$420$i) + ) + ) + (local.set $$spec$select3$i + (if (result i32) + (local.get $$cmp102$i) + (local.get $$t$519$i) + (local.get $$v$421$i) + ) + ) + (local.set $$arrayidx106$i + (i32.add + (local.get $$t$519$i) + (i32.const 16) + ) + ) + (local.set $$54 + (i32.load + (local.get $$arrayidx106$i) + ) + ) + (local.set $$cmp107$i160 + (i32.eq + (local.get $$54) + (i32.const 0) + ) + ) + (if + (local.get $$cmp107$i160) + (block + (local.set $$arrayidx113$i162 + (i32.add + (local.get $$t$519$i) + (i32.const 20) + ) + ) + (local.set $$55 + (i32.load + (local.get $$arrayidx113$i162) + ) + ) + (local.set $$cond115$i + (local.get $$55) + ) + ) + (local.set $$cond115$i + (local.get $$54) + ) + ) + (local.set $$cmp97$i + (i32.eq + (local.get $$cond115$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp97$i) + (block + (local.set $$rsize$4$lcssa$i + (local.get $$spec$select$i159) + ) + (local.set $$v$4$lcssa$i + (local.get $$spec$select3$i) + ) + (br $while-out16) + ) + (block + (local.set $$rsize$420$i + (local.get $$spec$select$i159) + ) + (local.set $$t$519$i + (local.get $$cond115$i) + ) + (local.set $$v$421$i + (local.get $$spec$select3$i) + ) + ) + ) + (br $while-in17) + ) + ) + ) + ) + (local.set $$cmp116$i + (i32.eq + (local.get $$v$4$lcssa$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp116$i) + (local.set $$nb$0 + (local.get $$and145) + ) + (block + (local.set $$56 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$sub118$i + (i32.sub + (local.get $$56) + (local.get $$and145) + ) + ) + (local.set $$cmp119$i + (i32.lt_u + (local.get $$rsize$4$lcssa$i) + (local.get $$sub118$i) + ) + ) + (if + (local.get $$cmp119$i) + (block + (local.set $$57 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp121$i + (i32.gt_u + (local.get $$57) + (local.get $$v$4$lcssa$i) + ) + ) + (if + (local.get $$cmp121$i) + (call $_abort) + ) + (local.set $$add$ptr$i164 + (i32.add + (local.get $$v$4$lcssa$i) + (local.get $$and145) + ) + ) + (local.set $$cmp123$i + (i32.gt_u + (local.get $$add$ptr$i164) + (local.get $$v$4$lcssa$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp123$i) + ) + (call $_abort) + ) + (local.set $$parent$i165 + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 24) + ) + ) + (local.set $$58 + (i32.load + (local.get $$parent$i165) + ) + ) + (local.set $$bk$i166 + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 12) + ) + ) + (local.set $$59 + (i32.load + (local.get $$bk$i166) + ) + ) + (local.set $$cmp128$i + (i32.eq + (local.get $$59) + (local.get $$v$4$lcssa$i) + ) + ) + (block $do-once18 + (if + (local.get $$cmp128$i) + (block + (local.set $$arrayidx151$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 20) + ) + ) + (local.set $$63 + (i32.load + (local.get $$arrayidx151$i) + ) + ) + (local.set $$cmp152$i + (i32.eq + (local.get $$63) + (i32.const 0) + ) + ) + (if + (local.get $$cmp152$i) + (block + (local.set $$arrayidx155$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 16) + ) + ) + (local.set $$64 + (i32.load + (local.get $$arrayidx155$i) + ) + ) + (local.set $$cmp156$i + (i32.eq + (local.get $$64) + (i32.const 0) + ) + ) + (if + (local.get $$cmp156$i) + (block + (local.set $$R$3$i177 + (i32.const 0) + ) + (br $do-once18) + ) + (block + (local.set $$R$1$i173$ph + (local.get $$64) + ) + (local.set $$RP$1$i172$ph + (local.get $$arrayidx155$i) + ) + ) + ) + ) + (block + (local.set $$R$1$i173$ph + (local.get $$63) + ) + (local.set $$RP$1$i172$ph + (local.get $$arrayidx151$i) + ) + ) + ) + (local.set $$R$1$i173 + (local.get $$R$1$i173$ph) + ) + (local.set $$RP$1$i172 + (local.get $$RP$1$i172$ph) + ) + (loop $while-in21 + (block $while-out20 + (local.set $$arrayidx161$i + (i32.add + (local.get $$R$1$i173) + (i32.const 20) + ) + ) + (local.set $$65 + (i32.load + (local.get $$arrayidx161$i) + ) + ) + (local.set $$cmp162$i + (i32.eq + (local.get $$65) + (i32.const 0) + ) + ) + (if + (local.get $$cmp162$i) + (block + (local.set $$arrayidx165$i174 + (i32.add + (local.get $$R$1$i173) + (i32.const 16) + ) + ) + (local.set $$66 + (i32.load + (local.get $$arrayidx165$i174) + ) + ) + (local.set $$cmp166$i + (i32.eq + (local.get $$66) + (i32.const 0) + ) + ) + (if + (local.get $$cmp166$i) + (br $while-out20) + (block + (local.set $$R$1$i173$be + (local.get $$66) + ) + (local.set $$RP$1$i172$be + (local.get $$arrayidx165$i174) + ) + ) + ) + ) + (block + (local.set $$R$1$i173$be + (local.get $$65) + ) + (local.set $$RP$1$i172$be + (local.get $$arrayidx161$i) + ) + ) + ) + (local.set $$R$1$i173 + (local.get $$R$1$i173$be) + ) + (local.set $$RP$1$i172 + (local.get $$RP$1$i172$be) + ) + (br $while-in21) + ) + ) + (local.set $$cmp171$i + (i32.gt_u + (local.get $$57) + (local.get $$RP$1$i172) + ) + ) + (if + (local.get $$cmp171$i) + (call $_abort) + (block + (i32.store + (local.get $$RP$1$i172) + (i32.const 0) + ) + (local.set $$R$3$i177 + (local.get $$R$1$i173) + ) + (br $do-once18) + ) + ) + ) + (block + (local.set $$fd$i167 + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 8) + ) + ) + (local.set $$60 + (i32.load + (local.get $$fd$i167) + ) + ) + (local.set $$cmp133$i + (i32.gt_u + (local.get $$57) + (local.get $$60) + ) + ) + (if + (local.get $$cmp133$i) + (call $_abort) + ) + (local.set $$bk136$i + (i32.add + (local.get $$60) + (i32.const 12) + ) + ) + (local.set $$61 + (i32.load + (local.get $$bk136$i) + ) + ) + (local.set $$cmp137$i + (i32.eq + (local.get $$61) + (local.get $$v$4$lcssa$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp137$i) + ) + (call $_abort) + ) + (local.set $$fd139$i + (i32.add + (local.get $$59) + (i32.const 8) + ) + ) + (local.set $$62 + (i32.load + (local.get $$fd139$i) + ) + ) + (local.set $$cmp140$i + (i32.eq + (local.get $$62) + (local.get $$v$4$lcssa$i) + ) + ) + (if + (local.get $$cmp140$i) + (block + (i32.store + (local.get $$bk136$i) + (local.get $$59) + ) + (i32.store + (local.get $$fd139$i) + (local.get $$60) + ) + (local.set $$R$3$i177 + (local.get $$59) + ) + (br $do-once18) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp180$i + (i32.eq + (local.get $$58) + (i32.const 0) + ) + ) + (block $label$break$L176 + (if + (local.get $$cmp180$i) + (local.set $$80 + (local.get $$47) + ) + (block + (local.set $$index$i178 + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 28) + ) + ) + (local.set $$67 + (i32.load + (local.get $$index$i178) + ) + ) + (local.set $$arrayidx184$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$67) + (i32.const 2) + ) + ) + ) + (local.set $$68 + (i32.load + (local.get $$arrayidx184$i) + ) + ) + (local.set $$cmp185$i + (i32.eq + (local.get $$v$4$lcssa$i) + (local.get $$68) + ) + ) + (block $do-once23 + (if + (local.get $$cmp185$i) + (block + (i32.store + (local.get $$arrayidx184$i) + (local.get $$R$3$i177) + ) + (local.set $$cond5$i179 + (i32.eq + (local.get $$R$3$i177) + (i32.const 0) + ) + ) + (if + (local.get $$cond5$i179) + (block + (local.set $$shl192$i + (i32.shl + (i32.const 1) + (local.get $$67) + ) + ) + (local.set $$neg$i180 + (i32.xor + (local.get $$shl192$i) + (i32.const -1) + ) + ) + (local.set $$and194$i + (i32.and + (local.get $$47) + (local.get $$neg$i180) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and194$i) + ) + (local.set $$80 + (local.get $$and194$i) + ) + (br $label$break$L176) + ) + ) + ) + (block + (local.set $$69 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp198$i + (i32.gt_u + (local.get $$69) + (local.get $$58) + ) + ) + (if + (local.get $$cmp198$i) + (call $_abort) + (block + (local.set $$arrayidx204$i + (i32.add + (local.get $$58) + (i32.const 16) + ) + ) + (local.set $$70 + (i32.load + (local.get $$arrayidx204$i) + ) + ) + (local.set $$cmp205$i + (i32.eq + (local.get $$70) + (local.get $$v$4$lcssa$i) + ) + ) + (local.set $$arrayidx212$i + (i32.add + (local.get $$58) + (i32.const 20) + ) + ) + (local.set $$arrayidx212$i$sink + (if (result i32) + (local.get $$cmp205$i) + (local.get $$arrayidx204$i) + (local.get $$arrayidx212$i) + ) + ) + (i32.store + (local.get $$arrayidx212$i$sink) + (local.get $$R$3$i177) + ) + (local.set $$cmp217$i + (i32.eq + (local.get $$R$3$i177) + (i32.const 0) + ) + ) + (if + (local.get $$cmp217$i) + (block + (local.set $$80 + (local.get $$47) + ) + (br $label$break$L176) + ) + (br $do-once23) + ) + ) + ) + ) + ) + ) + (local.set $$71 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp221$i + (i32.gt_u + (local.get $$71) + (local.get $$R$3$i177) + ) + ) + (if + (local.get $$cmp221$i) + (call $_abort) + ) + (local.set $$parent226$i + (i32.add + (local.get $$R$3$i177) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent226$i) + (local.get $$58) + ) + (local.set $$arrayidx228$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 16) + ) + ) + (local.set $$72 + (i32.load + (local.get $$arrayidx228$i) + ) + ) + (local.set $$cmp229$i + (i32.eq + (local.get $$72) + (i32.const 0) + ) + ) + (block $do-once25 + (if + (i32.eqz + (local.get $$cmp229$i) + ) + (block + (local.set $$cmp233$i + (i32.gt_u + (local.get $$71) + (local.get $$72) + ) + ) + (if + (local.get $$cmp233$i) + (call $_abort) + (block + (local.set $$arrayidx239$i + (i32.add + (local.get $$R$3$i177) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx239$i) + (local.get $$72) + ) + (local.set $$parent240$i + (i32.add + (local.get $$72) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent240$i) + (local.get $$R$3$i177) + ) + (br $do-once25) + ) + ) + ) + ) + ) + (local.set $$arrayidx245$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 20) + ) + ) + (local.set $$73 + (i32.load + (local.get $$arrayidx245$i) + ) + ) + (local.set $$cmp246$i + (i32.eq + (local.get $$73) + (i32.const 0) + ) + ) + (if + (local.get $$cmp246$i) + (local.set $$80 + (local.get $$47) + ) + (block + (local.set $$74 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp250$i + (i32.gt_u + (local.get $$74) + (local.get $$73) + ) + ) + (if + (local.get $$cmp250$i) + (call $_abort) + (block + (local.set $$arrayidx256$i + (i32.add + (local.get $$R$3$i177) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx256$i) + (local.get $$73) + ) + (local.set $$parent257$i + (i32.add + (local.get $$73) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent257$i) + (local.get $$R$3$i177) + ) + (local.set $$80 + (local.get $$47) + ) + (br $label$break$L176) + ) + ) + ) + ) + ) + ) + ) + (local.set $$cmp265$i + (i32.lt_u + (local.get $$rsize$4$lcssa$i) + (i32.const 16) + ) + ) + (block $label$break$L200 + (if + (local.get $$cmp265$i) + (block + (local.set $$add268$i + (i32.add + (local.get $$rsize$4$lcssa$i) + (local.get $$and145) + ) + ) + (local.set $$or270$i + (i32.or + (local.get $$add268$i) + (i32.const 3) + ) + ) + (local.set $$head271$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head271$i) + (local.get $$or270$i) + ) + (local.set $$add$ptr273$i + (i32.add + (local.get $$v$4$lcssa$i) + (local.get $$add268$i) + ) + ) + (local.set $$head274$i + (i32.add + (local.get $$add$ptr273$i) + (i32.const 4) + ) + ) + (local.set $$75 + (i32.load + (local.get $$head274$i) + ) + ) + (local.set $$or275$i + (i32.or + (local.get $$75) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head274$i) + (local.get $$or275$i) + ) + ) + (block + (local.set $$or278$i + (i32.or + (local.get $$and145) + (i32.const 3) + ) + ) + (local.set $$head279$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head279$i) + (local.get $$or278$i) + ) + (local.set $$or280$i + (i32.or + (local.get $$rsize$4$lcssa$i) + (i32.const 1) + ) + ) + (local.set $$head281$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head281$i) + (local.get $$or280$i) + ) + (local.set $$add$ptr282$i + (i32.add + (local.get $$add$ptr$i164) + (local.get $$rsize$4$lcssa$i) + ) + ) + (i32.store + (local.get $$add$ptr282$i) + (local.get $$rsize$4$lcssa$i) + ) + (local.set $$shr283$i + (i32.shr_u + (local.get $$rsize$4$lcssa$i) + (i32.const 3) + ) + ) + (local.set $$cmp284$i + (i32.lt_u + (local.get $$rsize$4$lcssa$i) + (i32.const 256) + ) + ) + (if + (local.get $$cmp284$i) + (block + (local.set $$shl288$i + (i32.shl + (local.get $$shr283$i) + (i32.const 1) + ) + ) + (local.set $$arrayidx289$i + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl288$i) + (i32.const 2) + ) + ) + ) + (local.set $$76 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shl291$i + (i32.shl + (i32.const 1) + (local.get $$shr283$i) + ) + ) + (local.set $$and292$i + (i32.and + (local.get $$76) + (local.get $$shl291$i) + ) + ) + (local.set $$tobool293$i + (i32.eq + (local.get $$and292$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool293$i) + (block + (local.set $$or297$i + (i32.or + (local.get $$76) + (local.get $$shl291$i) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or297$i) + ) + (local.set $$$pre$i184 + (i32.add + (local.get $$arrayidx289$i) + (i32.const 8) + ) + ) + (local.set $$$pre$phi$i185Z2D + (local.get $$$pre$i184) + ) + (local.set $$F290$0$i + (local.get $$arrayidx289$i) + ) + ) + (block + (local.set $$77 + (i32.add + (local.get $$arrayidx289$i) + (i32.const 8) + ) + ) + (local.set $$78 + (i32.load + (local.get $$77) + ) + ) + (local.set $$79 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp301$i + (i32.gt_u + (local.get $$79) + (local.get $$78) + ) + ) + (if + (local.get $$cmp301$i) + (call $_abort) + (block + (local.set $$$pre$phi$i185Z2D + (local.get $$77) + ) + (local.set $$F290$0$i + (local.get $$78) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phi$i185Z2D) + (local.get $$add$ptr$i164) + ) + (local.set $$bk311$i + (i32.add + (local.get $$F290$0$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk311$i) + (local.get $$add$ptr$i164) + ) + (local.set $$fd312$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd312$i) + (local.get $$F290$0$i) + ) + (local.set $$bk313$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk313$i) + (local.get $$arrayidx289$i) + ) + (br $label$break$L200) + ) + ) + (local.set $$shr318$i + (i32.shr_u + (local.get $$rsize$4$lcssa$i) + (i32.const 8) + ) + ) + (local.set $$cmp319$i + (i32.eq + (local.get $$shr318$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp319$i) + (local.set $$I316$0$i + (i32.const 0) + ) + (block + (local.set $$cmp323$i + (i32.gt_u + (local.get $$rsize$4$lcssa$i) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp323$i) + (local.set $$I316$0$i + (i32.const 31) + ) + (block + (local.set $$sub329$i + (i32.add + (local.get $$shr318$i) + (i32.const 1048320) + ) + ) + (local.set $$shr330$i + (i32.shr_u + (local.get $$sub329$i) + (i32.const 16) + ) + ) + (local.set $$and331$i + (i32.and + (local.get $$shr330$i) + (i32.const 8) + ) + ) + (local.set $$shl333$i + (i32.shl + (local.get $$shr318$i) + (local.get $$and331$i) + ) + ) + (local.set $$sub334$i + (i32.add + (local.get $$shl333$i) + (i32.const 520192) + ) + ) + (local.set $$shr335$i + (i32.shr_u + (local.get $$sub334$i) + (i32.const 16) + ) + ) + (local.set $$and336$i + (i32.and + (local.get $$shr335$i) + (i32.const 4) + ) + ) + (local.set $$add337$i + (i32.or + (local.get $$and336$i) + (local.get $$and331$i) + ) + ) + (local.set $$shl338$i + (i32.shl + (local.get $$shl333$i) + (local.get $$and336$i) + ) + ) + (local.set $$sub339$i + (i32.add + (local.get $$shl338$i) + (i32.const 245760) + ) + ) + (local.set $$shr340$i + (i32.shr_u + (local.get $$sub339$i) + (i32.const 16) + ) + ) + (local.set $$and341$i + (i32.and + (local.get $$shr340$i) + (i32.const 2) + ) + ) + (local.set $$add342$i + (i32.or + (local.get $$add337$i) + (local.get $$and341$i) + ) + ) + (local.set $$sub343$i + (i32.sub + (i32.const 14) + (local.get $$add342$i) + ) + ) + (local.set $$shl344$i + (i32.shl + (local.get $$shl338$i) + (local.get $$and341$i) + ) + ) + (local.set $$shr345$i + (i32.shr_u + (local.get $$shl344$i) + (i32.const 15) + ) + ) + (local.set $$add346$i + (i32.add + (local.get $$sub343$i) + (local.get $$shr345$i) + ) + ) + (local.set $$shl347$i + (i32.shl + (local.get $$add346$i) + (i32.const 1) + ) + ) + (local.set $$add348$i + (i32.add + (local.get $$add346$i) + (i32.const 7) + ) + ) + (local.set $$shr349$i + (i32.shr_u + (local.get $$rsize$4$lcssa$i) + (local.get $$add348$i) + ) + ) + (local.set $$and350$i + (i32.and + (local.get $$shr349$i) + (i32.const 1) + ) + ) + (local.set $$add351$i + (i32.or + (local.get $$and350$i) + (local.get $$shl347$i) + ) + ) + (local.set $$I316$0$i + (local.get $$add351$i) + ) + ) + ) + ) + ) + (local.set $$arrayidx355$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$I316$0$i) + (i32.const 2) + ) + ) + ) + (local.set $$index356$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 28) + ) + ) + (i32.store + (local.get $$index356$i) + (local.get $$I316$0$i) + ) + (local.set $$child357$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 16) + ) + ) + (local.set $$arrayidx358$i + (i32.add + (local.get $$child357$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$arrayidx358$i) + (i32.const 0) + ) + (i32.store + (local.get $$child357$i) + (i32.const 0) + ) + (local.set $$shl362$i + (i32.shl + (i32.const 1) + (local.get $$I316$0$i) + ) + ) + (local.set $$and363$i + (i32.and + (local.get $$80) + (local.get $$shl362$i) + ) + ) + (local.set $$tobool364$i + (i32.eq + (local.get $$and363$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool364$i) + (block + (local.set $$or368$i + (i32.or + (local.get $$80) + (local.get $$shl362$i) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$or368$i) + ) + (i32.store + (local.get $$arrayidx355$i) + (local.get $$add$ptr$i164) + ) + (local.set $$parent369$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent369$i) + (local.get $$arrayidx355$i) + ) + (local.set $$bk370$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk370$i) + (local.get $$add$ptr$i164) + ) + (local.set $$fd371$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd371$i) + (local.get $$add$ptr$i164) + ) + (br $label$break$L200) + ) + ) + (local.set $$81 + (i32.load + (local.get $$arrayidx355$i) + ) + ) + (local.set $$head38613$i + (i32.add + (local.get $$81) + (i32.const 4) + ) + ) + (local.set $$82 + (i32.load + (local.get $$head38613$i) + ) + ) + (local.set $$and38714$i + (i32.and + (local.get $$82) + (i32.const -8) + ) + ) + (local.set $$cmp38815$i + (i32.eq + (local.get $$and38714$i) + (local.get $$rsize$4$lcssa$i) + ) + ) + (block $label$break$L218 + (if + (local.get $$cmp38815$i) + (local.set $$T$0$lcssa$i + (local.get $$81) + ) + (block + (local.set $$cmp374$i + (i32.eq + (local.get $$I316$0$i) + (i32.const 31) + ) + ) + (local.set $$shr378$i + (i32.shr_u + (local.get $$I316$0$i) + (i32.const 1) + ) + ) + (local.set $$sub381$i + (i32.sub + (i32.const 25) + (local.get $$shr378$i) + ) + ) + (local.set $$cond383$i + (if (result i32) + (local.get $$cmp374$i) + (i32.const 0) + (local.get $$sub381$i) + ) + ) + (local.set $$shl384$i + (i32.shl + (local.get $$rsize$4$lcssa$i) + (local.get $$cond383$i) + ) + ) + (local.set $$K373$017$i + (local.get $$shl384$i) + ) + (local.set $$T$016$i + (local.get $$81) + ) + (loop $while-in30 + (block $while-out29 + (local.set $$shr392$i + (i32.shr_u + (local.get $$K373$017$i) + (i32.const 31) + ) + ) + (local.set $$arrayidx394$i + (i32.add + (i32.add + (local.get $$T$016$i) + (i32.const 16) + ) + (i32.shl + (local.get $$shr392$i) + (i32.const 2) + ) + ) + ) + (local.set $$83 + (i32.load + (local.get $$arrayidx394$i) + ) + ) + (local.set $$cmp396$i + (i32.eq + (local.get $$83) + (i32.const 0) + ) + ) + (if + (local.get $$cmp396$i) + (br $while-out29) + ) + (local.set $$shl395$i + (i32.shl + (local.get $$K373$017$i) + (i32.const 1) + ) + ) + (local.set $$head386$i + (i32.add + (local.get $$83) + (i32.const 4) + ) + ) + (local.set $$84 + (i32.load + (local.get $$head386$i) + ) + ) + (local.set $$and387$i + (i32.and + (local.get $$84) + (i32.const -8) + ) + ) + (local.set $$cmp388$i + (i32.eq + (local.get $$and387$i) + (local.get $$rsize$4$lcssa$i) + ) + ) + (if + (local.get $$cmp388$i) + (block + (local.set $$T$0$lcssa$i + (local.get $$83) + ) + (br $label$break$L218) + ) + (block + (local.set $$K373$017$i + (local.get $$shl395$i) + ) + (local.set $$T$016$i + (local.get $$83) + ) + ) + ) + (br $while-in30) + ) + ) + (local.set $$85 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp401$i + (i32.gt_u + (local.get $$85) + (local.get $$arrayidx394$i) + ) + ) + (if + (local.get $$cmp401$i) + (call $_abort) + (block + (i32.store + (local.get $$arrayidx394$i) + (local.get $$add$ptr$i164) + ) + (local.set $$parent406$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent406$i) + (local.get $$T$016$i) + ) + (local.set $$bk407$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk407$i) + (local.get $$add$ptr$i164) + ) + (local.set $$fd408$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd408$i) + (local.get $$add$ptr$i164) + ) + (br $label$break$L200) + ) + ) + ) + ) + ) + (local.set $$fd416$i + (i32.add + (local.get $$T$0$lcssa$i) + (i32.const 8) + ) + ) + (local.set $$86 + (i32.load + (local.get $$fd416$i) + ) + ) + (local.set $$87 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp418$i + (i32.le_u + (local.get $$87) + (local.get $$T$0$lcssa$i) + ) + ) + (local.set $$cmp422$i + (i32.le_u + (local.get $$87) + (local.get $$86) + ) + ) + (local.set $$88 + (i32.and + (local.get $$cmp422$i) + (local.get $$cmp418$i) + ) + ) + (if + (local.get $$88) + (block + (local.set $$bk429$i + (i32.add + (local.get $$86) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk429$i) + (local.get $$add$ptr$i164) + ) + (i32.store + (local.get $$fd416$i) + (local.get $$add$ptr$i164) + ) + (local.set $$fd431$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd431$i) + (local.get $$86) + ) + (local.set $$bk432$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk432$i) + (local.get $$T$0$lcssa$i) + ) + (local.set $$parent433$i + (i32.add + (local.get $$add$ptr$i164) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent433$i) + (i32.const 0) + ) + (br $label$break$L200) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$add$ptr441$i + (i32.add + (local.get $$v$4$lcssa$i) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr441$i) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (local.set $$nb$0 + (local.get $$and145) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$89 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$cmp156 + (i32.lt_u + (local.get $$89) + (local.get $$nb$0) + ) + ) + (if + (i32.eqz + (local.get $$cmp156) + ) + (block + (local.set $$sub160 + (i32.sub + (local.get $$89) + (local.get $$nb$0) + ) + ) + (local.set $$90 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp162 + (i32.gt_u + (local.get $$sub160) + (i32.const 15) + ) + ) + (if + (local.get $$cmp162) + (block + (local.set $$add$ptr166 + (i32.add + (local.get $$90) + (local.get $$nb$0) + ) + ) + (i32.store + (i32.const 29424) + (local.get $$add$ptr166) + ) + (i32.store + (i32.const 29412) + (local.get $$sub160) + ) + (local.set $$or167 + (i32.or + (local.get $$sub160) + (i32.const 1) + ) + ) + (local.set $$head168 + (i32.add + (local.get $$add$ptr166) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head168) + (local.get $$or167) + ) + (local.set $$add$ptr169 + (i32.add + (local.get $$90) + (local.get $$89) + ) + ) + (i32.store + (local.get $$add$ptr169) + (local.get $$sub160) + ) + (local.set $$or172 + (i32.or + (local.get $$nb$0) + (i32.const 3) + ) + ) + (local.set $$head173 + (i32.add + (local.get $$90) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head173) + (local.get $$or172) + ) + ) + (block + (i32.store + (i32.const 29412) + (i32.const 0) + ) + (i32.store + (i32.const 29424) + (i32.const 0) + ) + (local.set $$or176 + (i32.or + (local.get $$89) + (i32.const 3) + ) + ) + (local.set $$head177 + (i32.add + (local.get $$90) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head177) + (local.get $$or176) + ) + (local.set $$add$ptr178 + (i32.add + (local.get $$90) + (local.get $$89) + ) + ) + (local.set $$head179 + (i32.add + (local.get $$add$ptr178) + (i32.const 4) + ) + ) + (local.set $$91 + (i32.load + (local.get $$head179) + ) + ) + (local.set $$or180 + (i32.or + (local.get $$91) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head179) + (local.get $$or180) + ) + ) + ) + (local.set $$add$ptr182 + (i32.add + (local.get $$90) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr182) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$92 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$cmp186 + (i32.gt_u + (local.get $$92) + (local.get $$nb$0) + ) + ) + (if + (local.get $$cmp186) + (block + (local.set $$sub190 + (i32.sub + (local.get $$92) + (local.get $$nb$0) + ) + ) + (i32.store + (i32.const 29416) + (local.get $$sub190) + ) + (local.set $$93 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$add$ptr193 + (i32.add + (local.get $$93) + (local.get $$nb$0) + ) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr193) + ) + (local.set $$or194 + (i32.or + (local.get $$sub190) + (i32.const 1) + ) + ) + (local.set $$head195 + (i32.add + (local.get $$add$ptr193) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head195) + (local.get $$or194) + ) + (local.set $$or197 + (i32.or + (local.get $$nb$0) + (i32.const 3) + ) + ) + (local.set $$head198 + (i32.add + (local.get $$93) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head198) + (local.get $$or197) + ) + (local.set $$add$ptr199 + (i32.add + (local.get $$93) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr199) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$94 + (i32.load + (i32.const 29876) + ) + ) + (local.set $$cmp$i186 + (i32.eq + (local.get $$94) + (i32.const 0) + ) + ) + (if + (local.get $$cmp$i186) + (block + (i32.store + (i32.const 29884) + (i32.const 4096) + ) + (i32.store + (i32.const 29880) + (i32.const 4096) + ) + (i32.store + (i32.const 29888) + (i32.const -1) + ) + (i32.store + (i32.const 29892) + (i32.const -1) + ) + (i32.store + (i32.const 29896) + (i32.const 0) + ) + (i32.store + (i32.const 29848) + (i32.const 0) + ) + (local.set $$95 + (local.get $$magic$i$i) + ) + (local.set $$xor$i$i + (i32.and + (local.get $$95) + (i32.const -16) + ) + ) + (local.set $$and6$i$i + (i32.xor + (local.get $$xor$i$i) + (i32.const 1431655768) + ) + ) + (i32.store + (i32.const 29876) + (local.get $$and6$i$i) + ) + (local.set $$96 + (i32.const 4096) + ) + ) + (block + (local.set $$$pre$i187 + (i32.load + (i32.const 29884) + ) + ) + (local.set $$96 + (local.get $$$pre$i187) + ) + ) + ) + (local.set $$add$i188 + (i32.add + (local.get $$nb$0) + (i32.const 48) + ) + ) + (local.set $$sub$i189 + (i32.add + (local.get $$nb$0) + (i32.const 47) + ) + ) + (local.set $$add9$i + (i32.add + (local.get $$96) + (local.get $$sub$i189) + ) + ) + (local.set $$neg$i190 + (i32.sub + (i32.const 0) + (local.get $$96) + ) + ) + (local.set $$and11$i + (i32.and + (local.get $$add9$i) + (local.get $$neg$i190) + ) + ) + (local.set $$cmp12$i + (i32.gt_u + (local.get $$and11$i) + (local.get $$nb$0) + ) + ) + (if + (i32.eqz + (local.get $$cmp12$i) + ) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + (local.set $$97 + (i32.load + (i32.const 29844) + ) + ) + (local.set $$cmp15$i + (i32.eq + (local.get $$97) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp15$i) + ) + (block + (local.set $$98 + (i32.load + (i32.const 29836) + ) + ) + (local.set $$add17$i191 + (i32.add + (local.get $$98) + (local.get $$and11$i) + ) + ) + (local.set $$cmp19$i + (i32.le_u + (local.get $$add17$i191) + (local.get $$98) + ) + ) + (local.set $$cmp21$i + (i32.gt_u + (local.get $$add17$i191) + (local.get $$97) + ) + ) + (local.set $$or$cond1$i + (i32.or + (local.get $$cmp19$i) + (local.get $$cmp21$i) + ) + ) + (if + (local.get $$or$cond1$i) + (block + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$99 + (i32.load + (i32.const 29848) + ) + ) + (local.set $$and29$i + (i32.and + (local.get $$99) + (i32.const 4) + ) + ) + (local.set $$tobool30$i + (i32.eq + (local.get $$and29$i) + (i32.const 0) + ) + ) + (block $label$break$L257 + (if + (local.get $$tobool30$i) + (block + (local.set $$100 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$cmp32$i192 + (i32.eq + (local.get $$100) + (i32.const 0) + ) + ) + (block $label$break$L259 + (if + (local.get $$cmp32$i192) + (local.set $label + (i32.const 173) + ) + (block + (local.set $$sp$0$i$i + (i32.const 29852) + ) + (loop $while-in34 + (block $while-out33 + (local.set $$101 + (i32.load + (local.get $$sp$0$i$i) + ) + ) + (local.set $$cmp$i14$i + (i32.gt_u + (local.get $$101) + (local.get $$100) + ) + ) + (if + (i32.eqz + (local.get $$cmp$i14$i) + ) + (block + (local.set $$size$i$i + (i32.add + (local.get $$sp$0$i$i) + (i32.const 4) + ) + ) + (local.set $$102 + (i32.load + (local.get $$size$i$i) + ) + ) + (local.set $$add$ptr$i$i + (i32.add + (local.get $$101) + (local.get $$102) + ) + ) + (local.set $$cmp2$i$i + (i32.gt_u + (local.get $$add$ptr$i$i) + (local.get $$100) + ) + ) + (if + (local.get $$cmp2$i$i) + (br $while-out33) + ) + ) + ) + (local.set $$next$i$i + (i32.add + (local.get $$sp$0$i$i) + (i32.const 8) + ) + ) + (local.set $$103 + (i32.load + (local.get $$next$i$i) + ) + ) + (local.set $$cmp3$i$i + (i32.eq + (local.get $$103) + (i32.const 0) + ) + ) + (if + (local.get $$cmp3$i$i) + (block + (local.set $label + (i32.const 173) + ) + (br $label$break$L259) + ) + (local.set $$sp$0$i$i + (local.get $$103) + ) + ) + (br $while-in34) + ) + ) + (local.set $$add77$i + (i32.sub + (local.get $$add9$i) + (local.get $$92) + ) + ) + (local.set $$and80$i + (i32.and + (local.get $$add77$i) + (local.get $$neg$i190) + ) + ) + (local.set $$cmp81$i199 + (i32.lt_u + (local.get $$and80$i) + (i32.const 2147483647) + ) + ) + (if + (local.get $$cmp81$i199) + (block + (local.set $$size$i$i$le + (i32.add + (local.get $$sp$0$i$i) + (i32.const 4) + ) + ) + (local.set $$call83$i + (call $_sbrk + (local.get $$and80$i) + ) + ) + (local.set $$108 + (i32.load + (local.get $$sp$0$i$i) + ) + ) + (local.set $$109 + (i32.load + (local.get $$size$i$i$le) + ) + ) + (local.set $$add$ptr$i201 + (i32.add + (local.get $$108) + (local.get $$109) + ) + ) + (local.set $$cmp85$i + (i32.eq + (local.get $$call83$i) + (local.get $$add$ptr$i201) + ) + ) + (if + (local.get $$cmp85$i) + (block + (local.set $$cmp89$i + (i32.eq + (local.get $$call83$i) + (i32.const -1) + ) + ) + (if + (local.get $$cmp89$i) + (local.set $$tsize$2687886$i + (local.get $$and80$i) + ) + (block + (local.set $$tbase$799$i + (local.get $$call83$i) + ) + (local.set $$tsize$798$i + (local.get $$and80$i) + ) + (local.set $label + (i32.const 190) + ) + (br $label$break$L257) + ) + ) + ) + (block + (local.set $$br$2$ph$i + (local.get $$call83$i) + ) + (local.set $$ssize$2$ph$i + (local.get $$and80$i) + ) + (local.set $label + (i32.const 181) + ) + ) + ) + ) + (local.set $$tsize$2687886$i + (i32.const 0) + ) + ) + ) + ) + ) + (block $do-once35 + (if + (i32.eq + (local.get $label) + (i32.const 173) + ) + (block + (local.set $$call37$i + (call $_sbrk + (i32.const 0) + ) + ) + (local.set $$cmp38$i + (i32.eq + (local.get $$call37$i) + (i32.const -1) + ) + ) + (if + (local.get $$cmp38$i) + (local.set $$tsize$2687886$i + (i32.const 0) + ) + (block + (local.set $$104 + (local.get $$call37$i) + ) + (local.set $$105 + (i32.load + (i32.const 29880) + ) + ) + (local.set $$sub41$i + (i32.add + (local.get $$105) + (i32.const -1) + ) + ) + (local.set $$and42$i + (i32.and + (local.get $$sub41$i) + (local.get $$104) + ) + ) + (local.set $$cmp43$i + (i32.eq + (local.get $$and42$i) + (i32.const 0) + ) + ) + (local.set $$add46$i + (i32.add + (local.get $$sub41$i) + (local.get $$104) + ) + ) + (local.set $$neg48$i + (i32.sub + (i32.const 0) + (local.get $$105) + ) + ) + (local.set $$and49$i + (i32.and + (local.get $$add46$i) + (local.get $$neg48$i) + ) + ) + (local.set $$sub50$i + (i32.sub + (local.get $$and49$i) + (local.get $$104) + ) + ) + (local.set $$add51$i + (if (result i32) + (local.get $$cmp43$i) + (i32.const 0) + (local.get $$sub50$i) + ) + ) + (local.set $$spec$select100$i + (i32.add + (local.get $$add51$i) + (local.get $$and11$i) + ) + ) + (local.set $$106 + (i32.load + (i32.const 29836) + ) + ) + (local.set $$add54$i + (i32.add + (local.get $$spec$select100$i) + (local.get $$106) + ) + ) + (local.set $$cmp55$i193 + (i32.gt_u + (local.get $$spec$select100$i) + (local.get $$nb$0) + ) + ) + (local.set $$cmp57$i194 + (i32.lt_u + (local.get $$spec$select100$i) + (i32.const 2147483647) + ) + ) + (local.set $$or$cond$i195 + (i32.and + (local.get $$cmp55$i193) + (local.get $$cmp57$i194) + ) + ) + (if + (local.get $$or$cond$i195) + (block + (local.set $$107 + (i32.load + (i32.const 29844) + ) + ) + (local.set $$cmp60$i + (i32.eq + (local.get $$107) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp60$i) + ) + (block + (local.set $$cmp63$i + (i32.le_u + (local.get $$add54$i) + (local.get $$106) + ) + ) + (local.set $$cmp66$i197 + (i32.gt_u + (local.get $$add54$i) + (local.get $$107) + ) + ) + (local.set $$or$cond2$i198 + (i32.or + (local.get $$cmp63$i) + (local.get $$cmp66$i197) + ) + ) + (if + (local.get $$or$cond2$i198) + (block + (local.set $$tsize$2687886$i + (i32.const 0) + ) + (br $do-once35) + ) + ) + ) + ) + (local.set $$call68$i + (call $_sbrk + (local.get $$spec$select100$i) + ) + ) + (local.set $$cmp69$i + (i32.eq + (local.get $$call68$i) + (local.get $$call37$i) + ) + ) + (if + (local.get $$cmp69$i) + (block + (local.set $$tbase$799$i + (local.get $$call37$i) + ) + (local.set $$tsize$798$i + (local.get $$spec$select100$i) + ) + (local.set $label + (i32.const 190) + ) + (br $label$break$L257) + ) + (block + (local.set $$br$2$ph$i + (local.get $$call68$i) + ) + (local.set $$ssize$2$ph$i + (local.get $$spec$select100$i) + ) + (local.set $label + (i32.const 181) + ) + ) + ) + ) + (local.set $$tsize$2687886$i + (i32.const 0) + ) + ) + ) + ) + ) + ) + ) + (block $do-once37 + (if + (i32.eq + (local.get $label) + (i32.const 181) + ) + (block + (local.set $$sub112$i + (i32.sub + (i32.const 0) + (local.get $$ssize$2$ph$i) + ) + ) + (local.set $$cmp91$i + (i32.ne + (local.get $$br$2$ph$i) + (i32.const -1) + ) + ) + (local.set $$cmp93$i + (i32.lt_u + (local.get $$ssize$2$ph$i) + (i32.const 2147483647) + ) + ) + (local.set $$or$cond5$i + (i32.and + (local.get $$cmp93$i) + (local.get $$cmp91$i) + ) + ) + (local.set $$cmp96$i + (i32.gt_u + (local.get $$add$i188) + (local.get $$ssize$2$ph$i) + ) + ) + (local.set $$or$cond7$i + (i32.and + (local.get $$cmp96$i) + (local.get $$or$cond5$i) + ) + ) + (if + (i32.eqz + (local.get $$or$cond7$i) + ) + (block + (local.set $$cmp118$i + (i32.eq + (local.get $$br$2$ph$i) + (i32.const -1) + ) + ) + (if + (local.get $$cmp118$i) + (block + (local.set $$tsize$2687886$i + (i32.const 0) + ) + (br $do-once37) + ) + (block + (local.set $$tbase$799$i + (local.get $$br$2$ph$i) + ) + (local.set $$tsize$798$i + (local.get $$ssize$2$ph$i) + ) + (local.set $label + (i32.const 190) + ) + (br $label$break$L257) + ) + ) + ) + ) + (local.set $$110 + (i32.load + (i32.const 29884) + ) + ) + (local.set $$sub99$i + (i32.sub + (local.get $$sub$i189) + (local.get $$ssize$2$ph$i) + ) + ) + (local.set $$add101$i + (i32.add + (local.get $$sub99$i) + (local.get $$110) + ) + ) + (local.set $$neg103$i + (i32.sub + (i32.const 0) + (local.get $$110) + ) + ) + (local.set $$and104$i + (i32.and + (local.get $$add101$i) + (local.get $$neg103$i) + ) + ) + (local.set $$cmp105$i + (i32.lt_u + (local.get $$and104$i) + (i32.const 2147483647) + ) + ) + (if + (i32.eqz + (local.get $$cmp105$i) + ) + (block + (local.set $$tbase$799$i + (local.get $$br$2$ph$i) + ) + (local.set $$tsize$798$i + (local.get $$ssize$2$ph$i) + ) + (local.set $label + (i32.const 190) + ) + (br $label$break$L257) + ) + ) + (local.set $$call107$i + (call $_sbrk + (local.get $$and104$i) + ) + ) + (local.set $$cmp108$i + (i32.eq + (local.get $$call107$i) + (i32.const -1) + ) + ) + (if + (local.get $$cmp108$i) + (block + (drop + (call $_sbrk + (local.get $$sub112$i) + ) + ) + (local.set $$tsize$2687886$i + (i32.const 0) + ) + (br $do-once37) + ) + (block + (local.set $$add110$i + (i32.add + (local.get $$and104$i) + (local.get $$ssize$2$ph$i) + ) + ) + (local.set $$tbase$799$i + (local.get $$br$2$ph$i) + ) + (local.set $$tsize$798$i + (local.get $$add110$i) + ) + (local.set $label + (i32.const 190) + ) + (br $label$break$L257) + ) + ) + ) + ) + ) + (local.set $$111 + (i32.load + (i32.const 29848) + ) + ) + (local.set $$or$i203 + (i32.or + (local.get $$111) + (i32.const 4) + ) + ) + (i32.store + (i32.const 29848) + (local.get $$or$i203) + ) + (local.set $$tsize$4$i + (local.get $$tsize$2687886$i) + ) + (local.set $label + (i32.const 188) + ) + ) + (block + (local.set $$tsize$4$i + (i32.const 0) + ) + (local.set $label + (i32.const 188) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 188) + ) + (block + (local.set $$cmp127$i + (i32.lt_u + (local.get $$and11$i) + (i32.const 2147483647) + ) + ) + (if + (local.get $$cmp127$i) + (block + (local.set $$call131$i + (call $_sbrk + (local.get $$and11$i) + ) + ) + (local.set $$call132$i + (call $_sbrk + (i32.const 0) + ) + ) + (local.set $$cmp133$i204 + (i32.ne + (local.get $$call131$i) + (i32.const -1) + ) + ) + (local.set $$cmp135$i + (i32.ne + (local.get $$call132$i) + (i32.const -1) + ) + ) + (local.set $$or$cond4$i + (i32.and + (local.get $$cmp133$i204) + (local.get $$cmp135$i) + ) + ) + (local.set $$cmp137$i205 + (i32.lt_u + (local.get $$call131$i) + (local.get $$call132$i) + ) + ) + (local.set $$or$cond8$i + (i32.and + (local.get $$cmp137$i205) + (local.get $$or$cond4$i) + ) + ) + (local.set $$sub$ptr$lhs$cast$i + (local.get $$call132$i) + ) + (local.set $$sub$ptr$rhs$cast$i + (local.get $$call131$i) + ) + (local.set $$sub$ptr$sub$i + (i32.sub + (local.get $$sub$ptr$lhs$cast$i) + (local.get $$sub$ptr$rhs$cast$i) + ) + ) + (local.set $$add140$i + (i32.add + (local.get $$nb$0) + (i32.const 40) + ) + ) + (local.set $$cmp141$i + (i32.gt_u + (local.get $$sub$ptr$sub$i) + (local.get $$add140$i) + ) + ) + (local.set $$spec$select9$i + (if (result i32) + (local.get $$cmp141$i) + (local.get $$sub$ptr$sub$i) + (local.get $$tsize$4$i) + ) + ) + (local.set $$or$cond8$not$i + (i32.xor + (local.get $$or$cond8$i) + (i32.const 1) + ) + ) + (local.set $$cmp147103$i + (i32.eq + (local.get $$call131$i) + (i32.const -1) + ) + ) + (local.set $$not$cmp141$i + (i32.xor + (local.get $$cmp141$i) + (i32.const 1) + ) + ) + (local.set $$cmp147$i + (i32.or + (local.get $$cmp147103$i) + (local.get $$not$cmp141$i) + ) + ) + (local.set $$or$cond101$i + (i32.or + (local.get $$cmp147$i) + (local.get $$or$cond8$not$i) + ) + ) + (if + (i32.eqz + (local.get $$or$cond101$i) + ) + (block + (local.set $$tbase$799$i + (local.get $$call131$i) + ) + (local.set $$tsize$798$i + (local.get $$spec$select9$i) + ) + (local.set $label + (i32.const 190) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 190) + ) + (block + (local.set $$112 + (i32.load + (i32.const 29836) + ) + ) + (local.set $$add150$i + (i32.add + (local.get $$112) + (local.get $$tsize$798$i) + ) + ) + (i32.store + (i32.const 29836) + (local.get $$add150$i) + ) + (local.set $$113 + (i32.load + (i32.const 29840) + ) + ) + (local.set $$cmp151$i + (i32.gt_u + (local.get $$add150$i) + (local.get $$113) + ) + ) + (if + (local.get $$cmp151$i) + (i32.store + (i32.const 29840) + (local.get $$add150$i) + ) + ) + (local.set $$114 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$cmp157$i + (i32.eq + (local.get $$114) + (i32.const 0) + ) + ) + (block $label$break$L294 + (if + (local.get $$cmp157$i) + (block + (local.set $$115 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp159$i207 + (i32.eq + (local.get $$115) + (i32.const 0) + ) + ) + (local.set $$cmp162$i208 + (i32.lt_u + (local.get $$tbase$799$i) + (local.get $$115) + ) + ) + (local.set $$or$cond11$i + (i32.or + (local.get $$cmp159$i207) + (local.get $$cmp162$i208) + ) + ) + (if + (local.get $$or$cond11$i) + (i32.store + (i32.const 29420) + (local.get $$tbase$799$i) + ) + ) + (i32.store + (i32.const 29852) + (local.get $$tbase$799$i) + ) + (i32.store + (i32.const 29856) + (local.get $$tsize$798$i) + ) + (i32.store + (i32.const 29864) + (i32.const 0) + ) + (local.set $$116 + (i32.load + (i32.const 29876) + ) + ) + (i32.store + (i32.const 29440) + (local.get $$116) + ) + (i32.store + (i32.const 29436) + (i32.const -1) + ) + (i32.store + (i32.const 29456) + (i32.const 29444) + ) + (i32.store + (i32.const 29452) + (i32.const 29444) + ) + (i32.store + (i32.const 29464) + (i32.const 29452) + ) + (i32.store + (i32.const 29460) + (i32.const 29452) + ) + (i32.store + (i32.const 29472) + (i32.const 29460) + ) + (i32.store + (i32.const 29468) + (i32.const 29460) + ) + (i32.store + (i32.const 29480) + (i32.const 29468) + ) + (i32.store + (i32.const 29476) + (i32.const 29468) + ) + (i32.store + (i32.const 29488) + (i32.const 29476) + ) + (i32.store + (i32.const 29484) + (i32.const 29476) + ) + (i32.store + (i32.const 29496) + (i32.const 29484) + ) + (i32.store + (i32.const 29492) + (i32.const 29484) + ) + (i32.store + (i32.const 29504) + (i32.const 29492) + ) + (i32.store + (i32.const 29500) + (i32.const 29492) + ) + (i32.store + (i32.const 29512) + (i32.const 29500) + ) + (i32.store + (i32.const 29508) + (i32.const 29500) + ) + (i32.store + (i32.const 29520) + (i32.const 29508) + ) + (i32.store + (i32.const 29516) + (i32.const 29508) + ) + (i32.store + (i32.const 29528) + (i32.const 29516) + ) + (i32.store + (i32.const 29524) + (i32.const 29516) + ) + (i32.store + (i32.const 29536) + (i32.const 29524) + ) + (i32.store + (i32.const 29532) + (i32.const 29524) + ) + (i32.store + (i32.const 29544) + (i32.const 29532) + ) + (i32.store + (i32.const 29540) + (i32.const 29532) + ) + (i32.store + (i32.const 29552) + (i32.const 29540) + ) + (i32.store + (i32.const 29548) + (i32.const 29540) + ) + (i32.store + (i32.const 29560) + (i32.const 29548) + ) + (i32.store + (i32.const 29556) + (i32.const 29548) + ) + (i32.store + (i32.const 29568) + (i32.const 29556) + ) + (i32.store + (i32.const 29564) + (i32.const 29556) + ) + (i32.store + (i32.const 29576) + (i32.const 29564) + ) + (i32.store + (i32.const 29572) + (i32.const 29564) + ) + (i32.store + (i32.const 29584) + (i32.const 29572) + ) + (i32.store + (i32.const 29580) + (i32.const 29572) + ) + (i32.store + (i32.const 29592) + (i32.const 29580) + ) + (i32.store + (i32.const 29588) + (i32.const 29580) + ) + (i32.store + (i32.const 29600) + (i32.const 29588) + ) + (i32.store + (i32.const 29596) + (i32.const 29588) + ) + (i32.store + (i32.const 29608) + (i32.const 29596) + ) + (i32.store + (i32.const 29604) + (i32.const 29596) + ) + (i32.store + (i32.const 29616) + (i32.const 29604) + ) + (i32.store + (i32.const 29612) + (i32.const 29604) + ) + (i32.store + (i32.const 29624) + (i32.const 29612) + ) + (i32.store + (i32.const 29620) + (i32.const 29612) + ) + (i32.store + (i32.const 29632) + (i32.const 29620) + ) + (i32.store + (i32.const 29628) + (i32.const 29620) + ) + (i32.store + (i32.const 29640) + (i32.const 29628) + ) + (i32.store + (i32.const 29636) + (i32.const 29628) + ) + (i32.store + (i32.const 29648) + (i32.const 29636) + ) + (i32.store + (i32.const 29644) + (i32.const 29636) + ) + (i32.store + (i32.const 29656) + (i32.const 29644) + ) + (i32.store + (i32.const 29652) + (i32.const 29644) + ) + (i32.store + (i32.const 29664) + (i32.const 29652) + ) + (i32.store + (i32.const 29660) + (i32.const 29652) + ) + (i32.store + (i32.const 29672) + (i32.const 29660) + ) + (i32.store + (i32.const 29668) + (i32.const 29660) + ) + (i32.store + (i32.const 29680) + (i32.const 29668) + ) + (i32.store + (i32.const 29676) + (i32.const 29668) + ) + (i32.store + (i32.const 29688) + (i32.const 29676) + ) + (i32.store + (i32.const 29684) + (i32.const 29676) + ) + (i32.store + (i32.const 29696) + (i32.const 29684) + ) + (i32.store + (i32.const 29692) + (i32.const 29684) + ) + (i32.store + (i32.const 29704) + (i32.const 29692) + ) + (i32.store + (i32.const 29700) + (i32.const 29692) + ) + (local.set $$sub172$i + (i32.add + (local.get $$tsize$798$i) + (i32.const -40) + ) + ) + (local.set $$add$ptr$i16$i + (i32.add + (local.get $$tbase$799$i) + (i32.const 8) + ) + ) + (local.set $$117 + (local.get $$add$ptr$i16$i) + ) + (local.set $$and$i17$i + (i32.and + (local.get $$117) + (i32.const 7) + ) + ) + (local.set $$cmp$i18$i + (i32.eq + (local.get $$and$i17$i) + (i32.const 0) + ) + ) + (local.set $$sub$i19$i + (i32.sub + (i32.const 0) + (local.get $$117) + ) + ) + (local.set $$and3$i$i + (i32.and + (local.get $$sub$i19$i) + (i32.const 7) + ) + ) + (local.set $$cond$i20$i + (if (result i32) + (local.get $$cmp$i18$i) + (i32.const 0) + (local.get $$and3$i$i) + ) + ) + (local.set $$add$ptr4$i$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$cond$i20$i) + ) + ) + (local.set $$sub5$i$i + (i32.sub + (local.get $$sub172$i) + (local.get $$cond$i20$i) + ) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr4$i$i) + ) + (i32.store + (i32.const 29416) + (local.get $$sub5$i$i) + ) + (local.set $$or$i$i + (i32.or + (local.get $$sub5$i$i) + (i32.const 1) + ) + ) + (local.set $$head$i21$i + (i32.add + (local.get $$add$ptr4$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head$i21$i) + (local.get $$or$i$i) + ) + (local.set $$add$ptr6$i$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$sub172$i) + ) + ) + (local.set $$head7$i$i + (i32.add + (local.get $$add$ptr6$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head7$i$i) + (i32.const 40) + ) + (local.set $$118 + (i32.load + (i32.const 29892) + ) + ) + (i32.store + (i32.const 29432) + (local.get $$118) + ) + ) + (block + (local.set $$sp$0116$i + (i32.const 29852) + ) + (loop $while-in41 + (block $while-out40 + (local.set $$119 + (i32.load + (local.get $$sp$0116$i) + ) + ) + (local.set $$size188$i + (i32.add + (local.get $$sp$0116$i) + (i32.const 4) + ) + ) + (local.set $$120 + (i32.load + (local.get $$size188$i) + ) + ) + (local.set $$add$ptr189$i + (i32.add + (local.get $$119) + (local.get $$120) + ) + ) + (local.set $$cmp190$i + (i32.eq + (local.get $$tbase$799$i) + (local.get $$add$ptr189$i) + ) + ) + (if + (local.get $$cmp190$i) + (block + (local.set $label + (i32.const 199) + ) + (br $while-out40) + ) + ) + (local.set $$next$i + (i32.add + (local.get $$sp$0116$i) + (i32.const 8) + ) + ) + (local.set $$121 + (i32.load + (local.get $$next$i) + ) + ) + (local.set $$cmp186$i + (i32.eq + (local.get $$121) + (i32.const 0) + ) + ) + (if + (local.get $$cmp186$i) + (br $while-out40) + (local.set $$sp$0116$i + (local.get $$121) + ) + ) + (br $while-in41) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 199) + ) + (block + (local.set $$size188$i$le + (i32.add + (local.get $$sp$0116$i) + (i32.const 4) + ) + ) + (local.set $$sflags193$i + (i32.add + (local.get $$sp$0116$i) + (i32.const 12) + ) + ) + (local.set $$122 + (i32.load + (local.get $$sflags193$i) + ) + ) + (local.set $$and194$i214 + (i32.and + (local.get $$122) + (i32.const 8) + ) + ) + (local.set $$tobool195$i + (i32.eq + (local.get $$and194$i214) + (i32.const 0) + ) + ) + (if + (local.get $$tobool195$i) + (block + (local.set $$cmp203$i + (i32.le_u + (local.get $$119) + (local.get $$114) + ) + ) + (local.set $$cmp209$i + (i32.gt_u + (local.get $$tbase$799$i) + (local.get $$114) + ) + ) + (local.set $$or$cond102$i + (i32.and + (local.get $$cmp209$i) + (local.get $$cmp203$i) + ) + ) + (if + (local.get $$or$cond102$i) + (block + (local.set $$add212$i + (i32.add + (local.get $$120) + (local.get $$tsize$798$i) + ) + ) + (i32.store + (local.get $$size188$i$le) + (local.get $$add212$i) + ) + (local.set $$123 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$add215$i + (i32.add + (local.get $$123) + (local.get $$tsize$798$i) + ) + ) + (local.set $$add$ptr$i51$i + (i32.add + (local.get $$114) + (i32.const 8) + ) + ) + (local.set $$124 + (local.get $$add$ptr$i51$i) + ) + (local.set $$and$i52$i + (i32.and + (local.get $$124) + (i32.const 7) + ) + ) + (local.set $$cmp$i53$i + (i32.eq + (local.get $$and$i52$i) + (i32.const 0) + ) + ) + (local.set $$sub$i54$i + (i32.sub + (i32.const 0) + (local.get $$124) + ) + ) + (local.set $$and3$i55$i + (i32.and + (local.get $$sub$i54$i) + (i32.const 7) + ) + ) + (local.set $$cond$i56$i + (if (result i32) + (local.get $$cmp$i53$i) + (i32.const 0) + (local.get $$and3$i55$i) + ) + ) + (local.set $$add$ptr4$i57$i + (i32.add + (local.get $$114) + (local.get $$cond$i56$i) + ) + ) + (local.set $$sub5$i58$i + (i32.sub + (local.get $$add215$i) + (local.get $$cond$i56$i) + ) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr4$i57$i) + ) + (i32.store + (i32.const 29416) + (local.get $$sub5$i58$i) + ) + (local.set $$or$i59$i + (i32.or + (local.get $$sub5$i58$i) + (i32.const 1) + ) + ) + (local.set $$head$i60$i + (i32.add + (local.get $$add$ptr4$i57$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head$i60$i) + (local.get $$or$i59$i) + ) + (local.set $$add$ptr6$i61$i + (i32.add + (local.get $$114) + (local.get $$add215$i) + ) + ) + (local.set $$head7$i62$i + (i32.add + (local.get $$add$ptr6$i61$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head7$i62$i) + (i32.const 40) + ) + (local.set $$125 + (i32.load + (i32.const 29892) + ) + ) + (i32.store + (i32.const 29432) + (local.get $$125) + ) + (br $label$break$L294) + ) + ) + ) + ) + ) + ) + (local.set $$126 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp218$i + (i32.lt_u + (local.get $$tbase$799$i) + (local.get $$126) + ) + ) + (if + (local.get $$cmp218$i) + (block + (i32.store + (i32.const 29420) + (local.get $$tbase$799$i) + ) + (local.set $$139 + (local.get $$tbase$799$i) + ) + ) + (local.set $$139 + (local.get $$126) + ) + ) + (local.set $$add$ptr227$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$tsize$798$i) + ) + ) + (local.set $$sp$1115$i + (i32.const 29852) + ) + (loop $while-in43 + (block $while-out42 + (local.set $$127 + (i32.load + (local.get $$sp$1115$i) + ) + ) + (local.set $$cmp228$i + (i32.eq + (local.get $$127) + (local.get $$add$ptr227$i) + ) + ) + (if + (local.get $$cmp228$i) + (block + (local.set $label + (i32.const 207) + ) + (br $while-out42) + ) + ) + (local.set $$next231$i + (i32.add + (local.get $$sp$1115$i) + (i32.const 8) + ) + ) + (local.set $$128 + (i32.load + (local.get $$next231$i) + ) + ) + (local.set $$cmp224$i + (i32.eq + (local.get $$128) + (i32.const 0) + ) + ) + (if + (local.get $$cmp224$i) + (br $while-out42) + (local.set $$sp$1115$i + (local.get $$128) + ) + ) + (br $while-in43) + ) + ) + (if + (i32.eq + (local.get $label) + (i32.const 207) + ) + (block + (local.set $$sflags235$i + (i32.add + (local.get $$sp$1115$i) + (i32.const 12) + ) + ) + (local.set $$129 + (i32.load + (local.get $$sflags235$i) + ) + ) + (local.set $$and236$i + (i32.and + (local.get $$129) + (i32.const 8) + ) + ) + (local.set $$tobool237$i + (i32.eq + (local.get $$and236$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool237$i) + (block + (i32.store + (local.get $$sp$1115$i) + (local.get $$tbase$799$i) + ) + (local.set $$size245$i + (i32.add + (local.get $$sp$1115$i) + (i32.const 4) + ) + ) + (local.set $$130 + (i32.load + (local.get $$size245$i) + ) + ) + (local.set $$add246$i + (i32.add + (local.get $$130) + (local.get $$tsize$798$i) + ) + ) + (i32.store + (local.get $$size245$i) + (local.get $$add246$i) + ) + (local.set $$add$ptr$i22$i + (i32.add + (local.get $$tbase$799$i) + (i32.const 8) + ) + ) + (local.set $$131 + (local.get $$add$ptr$i22$i) + ) + (local.set $$and$i23$i + (i32.and + (local.get $$131) + (i32.const 7) + ) + ) + (local.set $$cmp$i24$i + (i32.eq + (local.get $$and$i23$i) + (i32.const 0) + ) + ) + (local.set $$sub$i25$i + (i32.sub + (i32.const 0) + (local.get $$131) + ) + ) + (local.set $$and3$i26$i + (i32.and + (local.get $$sub$i25$i) + (i32.const 7) + ) + ) + (local.set $$cond$i27$i + (if (result i32) + (local.get $$cmp$i24$i) + (i32.const 0) + (local.get $$and3$i26$i) + ) + ) + (local.set $$add$ptr4$i28$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$cond$i27$i) + ) + ) + (local.set $$add$ptr5$i$i + (i32.add + (local.get $$add$ptr227$i) + (i32.const 8) + ) + ) + (local.set $$132 + (local.get $$add$ptr5$i$i) + ) + (local.set $$and6$i29$i + (i32.and + (local.get $$132) + (i32.const 7) + ) + ) + (local.set $$cmp7$i$i + (i32.eq + (local.get $$and6$i29$i) + (i32.const 0) + ) + ) + (local.set $$sub12$i$i + (i32.sub + (i32.const 0) + (local.get $$132) + ) + ) + (local.set $$and13$i$i + (i32.and + (local.get $$sub12$i$i) + (i32.const 7) + ) + ) + (local.set $$cond15$i$i + (if (result i32) + (local.get $$cmp7$i$i) + (i32.const 0) + (local.get $$and13$i$i) + ) + ) + (local.set $$add$ptr16$i$i + (i32.add + (local.get $$add$ptr227$i) + (local.get $$cond15$i$i) + ) + ) + (local.set $$sub$ptr$lhs$cast$i30$i + (local.get $$add$ptr16$i$i) + ) + (local.set $$sub$ptr$rhs$cast$i31$i + (local.get $$add$ptr4$i28$i) + ) + (local.set $$sub$ptr$sub$i32$i + (i32.sub + (local.get $$sub$ptr$lhs$cast$i30$i) + (local.get $$sub$ptr$rhs$cast$i31$i) + ) + ) + (local.set $$add$ptr17$i$i + (i32.add + (local.get $$add$ptr4$i28$i) + (local.get $$nb$0) + ) + ) + (local.set $$sub18$i$i + (i32.sub + (local.get $$sub$ptr$sub$i32$i) + (local.get $$nb$0) + ) + ) + (local.set $$or19$i$i + (i32.or + (local.get $$nb$0) + (i32.const 3) + ) + ) + (local.set $$head$i33$i + (i32.add + (local.get $$add$ptr4$i28$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head$i33$i) + (local.get $$or19$i$i) + ) + (local.set $$cmp20$i$i + (i32.eq + (local.get $$114) + (local.get $$add$ptr16$i$i) + ) + ) + (block $label$break$L317 + (if + (local.get $$cmp20$i$i) + (block + (local.set $$133 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$add$i$i + (i32.add + (local.get $$133) + (local.get $$sub18$i$i) + ) + ) + (i32.store + (i32.const 29416) + (local.get $$add$i$i) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr17$i$i) + ) + (local.set $$or22$i$i + (i32.or + (local.get $$add$i$i) + (i32.const 1) + ) + ) + (local.set $$head23$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head23$i$i) + (local.get $$or22$i$i) + ) + ) + (block + (local.set $$134 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp24$i$i + (i32.eq + (local.get $$134) + (local.get $$add$ptr16$i$i) + ) + ) + (if + (local.get $$cmp24$i$i) + (block + (local.set $$135 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$add26$i$i + (i32.add + (local.get $$135) + (local.get $$sub18$i$i) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$add26$i$i) + ) + (i32.store + (i32.const 29424) + (local.get $$add$ptr17$i$i) + ) + (local.set $$or28$i$i + (i32.or + (local.get $$add26$i$i) + (i32.const 1) + ) + ) + (local.set $$head29$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head29$i$i) + (local.get $$or28$i$i) + ) + (local.set $$add$ptr30$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (local.get $$add26$i$i) + ) + ) + (i32.store + (local.get $$add$ptr30$i$i) + (local.get $$add26$i$i) + ) + (br $label$break$L317) + ) + ) + (local.set $$head32$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 4) + ) + ) + (local.set $$136 + (i32.load + (local.get $$head32$i$i) + ) + ) + (local.set $$and33$i$i + (i32.and + (local.get $$136) + (i32.const 3) + ) + ) + (local.set $$cmp34$i$i + (i32.eq + (local.get $$and33$i$i) + (i32.const 1) + ) + ) + (if + (local.get $$cmp34$i$i) + (block + (local.set $$and37$i$i + (i32.and + (local.get $$136) + (i32.const -8) + ) + ) + (local.set $$shr$i36$i + (i32.shr_u + (local.get $$136) + (i32.const 3) + ) + ) + (local.set $$cmp38$i$i + (i32.lt_u + (local.get $$136) + (i32.const 256) + ) + ) + (block $label$break$L325 + (if + (local.get $$cmp38$i$i) + (block + (local.set $$fd$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 8) + ) + ) + (local.set $$137 + (i32.load + (local.get $$fd$i$i) + ) + ) + (local.set $$bk$i37$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 12) + ) + ) + (local.set $$138 + (i32.load + (local.get $$bk$i37$i) + ) + ) + (local.set $$shl$i38$i + (i32.shl + (local.get $$shr$i36$i) + (i32.const 1) + ) + ) + (local.set $$arrayidx$i39$i + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl$i38$i) + (i32.const 2) + ) + ) + ) + (local.set $$cmp41$i$i + (i32.eq + (local.get $$137) + (local.get $$arrayidx$i39$i) + ) + ) + (block $do-once46 + (if + (i32.eqz + (local.get $$cmp41$i$i) + ) + (block + (local.set $$cmp42$i$i + (i32.gt_u + (local.get $$139) + (local.get $$137) + ) + ) + (if + (local.get $$cmp42$i$i) + (call $_abort) + ) + (local.set $$bk43$i$i + (i32.add + (local.get $$137) + (i32.const 12) + ) + ) + (local.set $$140 + (i32.load + (local.get $$bk43$i$i) + ) + ) + (local.set $$cmp44$i$i + (i32.eq + (local.get $$140) + (local.get $$add$ptr16$i$i) + ) + ) + (if + (local.get $$cmp44$i$i) + (br $do-once46) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp46$i40$i + (i32.eq + (local.get $$138) + (local.get $$137) + ) + ) + (if + (local.get $$cmp46$i40$i) + (block + (local.set $$shl48$i$i + (i32.shl + (i32.const 1) + (local.get $$shr$i36$i) + ) + ) + (local.set $$neg$i$i + (i32.xor + (local.get $$shl48$i$i) + (i32.const -1) + ) + ) + (local.set $$141 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and49$i$i + (i32.and + (local.get $$141) + (local.get $$neg$i$i) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and49$i$i) + ) + (br $label$break$L325) + ) + ) + (local.set $$cmp54$i$i + (i32.eq + (local.get $$138) + (local.get $$arrayidx$i39$i) + ) + ) + (block $do-once48 + (if + (local.get $$cmp54$i$i) + (block + (local.set $$$pre14$i$i + (i32.add + (local.get $$138) + (i32.const 8) + ) + ) + (local.set $$fd68$pre$phi$i$iZ2D + (local.get $$$pre14$i$i) + ) + ) + (block + (local.set $$cmp57$i$i + (i32.gt_u + (local.get $$139) + (local.get $$138) + ) + ) + (if + (local.get $$cmp57$i$i) + (call $_abort) + ) + (local.set $$fd59$i$i + (i32.add + (local.get $$138) + (i32.const 8) + ) + ) + (local.set $$142 + (i32.load + (local.get $$fd59$i$i) + ) + ) + (local.set $$cmp60$i$i + (i32.eq + (local.get $$142) + (local.get $$add$ptr16$i$i) + ) + ) + (if + (local.get $$cmp60$i$i) + (block + (local.set $$fd68$pre$phi$i$iZ2D + (local.get $$fd59$i$i) + ) + (br $do-once48) + ) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk67$i$i + (i32.add + (local.get $$137) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk67$i$i) + (local.get $$138) + ) + (i32.store + (local.get $$fd68$pre$phi$i$iZ2D) + (local.get $$137) + ) + ) + (block + (local.set $$parent$i42$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 24) + ) + ) + (local.set $$143 + (i32.load + (local.get $$parent$i42$i) + ) + ) + (local.set $$bk74$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 12) + ) + ) + (local.set $$144 + (i32.load + (local.get $$bk74$i$i) + ) + ) + (local.set $$cmp75$i$i + (i32.eq + (local.get $$144) + (local.get $$add$ptr16$i$i) + ) + ) + (block $do-once50 + (if + (local.get $$cmp75$i$i) + (block + (local.set $$child$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 16) + ) + ) + (local.set $$arrayidx96$i$i + (i32.add + (local.get $$child$i$i) + (i32.const 4) + ) + ) + (local.set $$148 + (i32.load + (local.get $$arrayidx96$i$i) + ) + ) + (local.set $$cmp97$i$i + (i32.eq + (local.get $$148) + (i32.const 0) + ) + ) + (if + (local.get $$cmp97$i$i) + (block + (local.set $$149 + (i32.load + (local.get $$child$i$i) + ) + ) + (local.set $$cmp100$i$i + (i32.eq + (local.get $$149) + (i32.const 0) + ) + ) + (if + (local.get $$cmp100$i$i) + (block + (local.set $$R$3$i$i + (i32.const 0) + ) + (br $do-once50) + ) + (block + (local.set $$R$1$i$i$ph + (local.get $$149) + ) + (local.set $$RP$1$i$i$ph + (local.get $$child$i$i) + ) + ) + ) + ) + (block + (local.set $$R$1$i$i$ph + (local.get $$148) + ) + (local.set $$RP$1$i$i$ph + (local.get $$arrayidx96$i$i) + ) + ) + ) + (local.set $$R$1$i$i + (local.get $$R$1$i$i$ph) + ) + (local.set $$RP$1$i$i + (local.get $$RP$1$i$i$ph) + ) + (loop $while-in53 + (block $while-out52 + (local.set $$arrayidx103$i$i + (i32.add + (local.get $$R$1$i$i) + (i32.const 20) + ) + ) + (local.set $$150 + (i32.load + (local.get $$arrayidx103$i$i) + ) + ) + (local.set $$cmp104$i$i + (i32.eq + (local.get $$150) + (i32.const 0) + ) + ) + (if + (local.get $$cmp104$i$i) + (block + (local.set $$arrayidx107$i$i + (i32.add + (local.get $$R$1$i$i) + (i32.const 16) + ) + ) + (local.set $$151 + (i32.load + (local.get $$arrayidx107$i$i) + ) + ) + (local.set $$cmp108$i$i + (i32.eq + (local.get $$151) + (i32.const 0) + ) + ) + (if + (local.get $$cmp108$i$i) + (br $while-out52) + (block + (local.set $$R$1$i$i$be + (local.get $$151) + ) + (local.set $$RP$1$i$i$be + (local.get $$arrayidx107$i$i) + ) + ) + ) + ) + (block + (local.set $$R$1$i$i$be + (local.get $$150) + ) + (local.set $$RP$1$i$i$be + (local.get $$arrayidx103$i$i) + ) + ) + ) + (local.set $$R$1$i$i + (local.get $$R$1$i$i$be) + ) + (local.set $$RP$1$i$i + (local.get $$RP$1$i$i$be) + ) + (br $while-in53) + ) + ) + (local.set $$cmp112$i$i + (i32.gt_u + (local.get $$139) + (local.get $$RP$1$i$i) + ) + ) + (if + (local.get $$cmp112$i$i) + (call $_abort) + (block + (i32.store + (local.get $$RP$1$i$i) + (i32.const 0) + ) + (local.set $$R$3$i$i + (local.get $$R$1$i$i) + ) + (br $do-once50) + ) + ) + ) + (block + (local.set $$fd78$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 8) + ) + ) + (local.set $$145 + (i32.load + (local.get $$fd78$i$i) + ) + ) + (local.set $$cmp81$i$i + (i32.gt_u + (local.get $$139) + (local.get $$145) + ) + ) + (if + (local.get $$cmp81$i$i) + (call $_abort) + ) + (local.set $$bk82$i$i + (i32.add + (local.get $$145) + (i32.const 12) + ) + ) + (local.set $$146 + (i32.load + (local.get $$bk82$i$i) + ) + ) + (local.set $$cmp83$i$i + (i32.eq + (local.get $$146) + (local.get $$add$ptr16$i$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp83$i$i) + ) + (call $_abort) + ) + (local.set $$fd85$i$i + (i32.add + (local.get $$144) + (i32.const 8) + ) + ) + (local.set $$147 + (i32.load + (local.get $$fd85$i$i) + ) + ) + (local.set $$cmp86$i$i + (i32.eq + (local.get $$147) + (local.get $$add$ptr16$i$i) + ) + ) + (if + (local.get $$cmp86$i$i) + (block + (i32.store + (local.get $$bk82$i$i) + (local.get $$144) + ) + (i32.store + (local.get $$fd85$i$i) + (local.get $$145) + ) + (local.set $$R$3$i$i + (local.get $$144) + ) + (br $do-once50) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp120$i44$i + (i32.eq + (local.get $$143) + (i32.const 0) + ) + ) + (if + (local.get $$cmp120$i44$i) + (br $label$break$L325) + ) + (local.set $$index$i45$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 28) + ) + ) + (local.set $$152 + (i32.load + (local.get $$index$i45$i) + ) + ) + (local.set $$arrayidx123$i$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$152) + (i32.const 2) + ) + ) + ) + (local.set $$153 + (i32.load + (local.get $$arrayidx123$i$i) + ) + ) + (local.set $$cmp124$i$i + (i32.eq + (local.get $$153) + (local.get $$add$ptr16$i$i) + ) + ) + (block $do-once54 + (if + (local.get $$cmp124$i$i) + (block + (i32.store + (local.get $$arrayidx123$i$i) + (local.get $$R$3$i$i) + ) + (local.set $$cond3$i$i + (i32.eq + (local.get $$R$3$i$i) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cond3$i$i) + ) + (br $do-once54) + ) + (local.set $$shl131$i$i + (i32.shl + (i32.const 1) + (local.get $$152) + ) + ) + (local.set $$neg132$i$i + (i32.xor + (local.get $$shl131$i$i) + (i32.const -1) + ) + ) + (local.set $$154 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and133$i$i + (i32.and + (local.get $$154) + (local.get $$neg132$i$i) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and133$i$i) + ) + (br $label$break$L325) + ) + (block + (local.set $$155 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp137$i$i + (i32.gt_u + (local.get $$155) + (local.get $$143) + ) + ) + (if + (local.get $$cmp137$i$i) + (call $_abort) + (block + (local.set $$arrayidx143$i$i + (i32.add + (local.get $$143) + (i32.const 16) + ) + ) + (local.set $$156 + (i32.load + (local.get $$arrayidx143$i$i) + ) + ) + (local.set $$cmp144$i$i + (i32.eq + (local.get $$156) + (local.get $$add$ptr16$i$i) + ) + ) + (local.set $$arrayidx151$i$i + (i32.add + (local.get $$143) + (i32.const 20) + ) + ) + (local.set $$arrayidx151$i$i$sink + (if (result i32) + (local.get $$cmp144$i$i) + (local.get $$arrayidx143$i$i) + (local.get $$arrayidx151$i$i) + ) + ) + (i32.store + (local.get $$arrayidx151$i$i$sink) + (local.get $$R$3$i$i) + ) + (local.set $$cmp156$i$i + (i32.eq + (local.get $$R$3$i$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp156$i$i) + (br $label$break$L325) + (br $do-once54) + ) + ) + ) + ) + ) + ) + (local.set $$157 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp160$i$i + (i32.gt_u + (local.get $$157) + (local.get $$R$3$i$i) + ) + ) + (if + (local.get $$cmp160$i$i) + (call $_abort) + ) + (local.set $$parent165$i$i + (i32.add + (local.get $$R$3$i$i) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent165$i$i) + (local.get $$143) + ) + (local.set $$child166$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (i32.const 16) + ) + ) + (local.set $$158 + (i32.load + (local.get $$child166$i$i) + ) + ) + (local.set $$cmp168$i$i + (i32.eq + (local.get $$158) + (i32.const 0) + ) + ) + (block $do-once56 + (if + (i32.eqz + (local.get $$cmp168$i$i) + ) + (block + (local.set $$cmp172$i$i + (i32.gt_u + (local.get $$157) + (local.get $$158) + ) + ) + (if + (local.get $$cmp172$i$i) + (call $_abort) + (block + (local.set $$arrayidx178$i$i + (i32.add + (local.get $$R$3$i$i) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx178$i$i) + (local.get $$158) + ) + (local.set $$parent179$i$i + (i32.add + (local.get $$158) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent179$i$i) + (local.get $$R$3$i$i) + ) + (br $do-once56) + ) + ) + ) + ) + ) + (local.set $$arrayidx184$i$i + (i32.add + (local.get $$child166$i$i) + (i32.const 4) + ) + ) + (local.set $$159 + (i32.load + (local.get $$arrayidx184$i$i) + ) + ) + (local.set $$cmp185$i$i + (i32.eq + (local.get $$159) + (i32.const 0) + ) + ) + (if + (local.get $$cmp185$i$i) + (br $label$break$L325) + ) + (local.set $$160 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp189$i$i + (i32.gt_u + (local.get $$160) + (local.get $$159) + ) + ) + (if + (local.get $$cmp189$i$i) + (call $_abort) + (block + (local.set $$arrayidx195$i$i + (i32.add + (local.get $$R$3$i$i) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx195$i$i) + (local.get $$159) + ) + (local.set $$parent196$i$i + (i32.add + (local.get $$159) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent196$i$i) + (local.get $$R$3$i$i) + ) + (br $label$break$L325) + ) + ) + ) + ) + ) + (local.set $$add$ptr205$i$i + (i32.add + (local.get $$add$ptr16$i$i) + (local.get $$and37$i$i) + ) + ) + (local.set $$add206$i$i + (i32.add + (local.get $$and37$i$i) + (local.get $$sub18$i$i) + ) + ) + (local.set $$oldfirst$0$i$i + (local.get $$add$ptr205$i$i) + ) + (local.set $$qsize$0$i$i + (local.get $$add206$i$i) + ) + ) + (block + (local.set $$oldfirst$0$i$i + (local.get $$add$ptr16$i$i) + ) + (local.set $$qsize$0$i$i + (local.get $$sub18$i$i) + ) + ) + ) + (local.set $$head208$i$i + (i32.add + (local.get $$oldfirst$0$i$i) + (i32.const 4) + ) + ) + (local.set $$161 + (i32.load + (local.get $$head208$i$i) + ) + ) + (local.set $$and209$i$i + (i32.and + (local.get $$161) + (i32.const -2) + ) + ) + (i32.store + (local.get $$head208$i$i) + (local.get $$and209$i$i) + ) + (local.set $$or210$i$i + (i32.or + (local.get $$qsize$0$i$i) + (i32.const 1) + ) + ) + (local.set $$head211$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head211$i$i) + (local.get $$or210$i$i) + ) + (local.set $$add$ptr212$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (local.get $$qsize$0$i$i) + ) + ) + (i32.store + (local.get $$add$ptr212$i$i) + (local.get $$qsize$0$i$i) + ) + (local.set $$shr214$i$i + (i32.shr_u + (local.get $$qsize$0$i$i) + (i32.const 3) + ) + ) + (local.set $$cmp215$i$i + (i32.lt_u + (local.get $$qsize$0$i$i) + (i32.const 256) + ) + ) + (if + (local.get $$cmp215$i$i) + (block + (local.set $$shl222$i$i + (i32.shl + (local.get $$shr214$i$i) + (i32.const 1) + ) + ) + (local.set $$arrayidx223$i$i + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl222$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$162 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shl226$i$i + (i32.shl + (i32.const 1) + (local.get $$shr214$i$i) + ) + ) + (local.set $$and227$i$i + (i32.and + (local.get $$162) + (local.get $$shl226$i$i) + ) + ) + (local.set $$tobool228$i$i + (i32.eq + (local.get $$and227$i$i) + (i32.const 0) + ) + ) + (block $do-once58 + (if + (local.get $$tobool228$i$i) + (block + (local.set $$or232$i$i + (i32.or + (local.get $$162) + (local.get $$shl226$i$i) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or232$i$i) + ) + (local.set $$$pre$i47$i + (i32.add + (local.get $$arrayidx223$i$i) + (i32.const 8) + ) + ) + (local.set $$$pre$phi$i48$iZ2D + (local.get $$$pre$i47$i) + ) + (local.set $$F224$0$i$i + (local.get $$arrayidx223$i$i) + ) + ) + (block + (local.set $$163 + (i32.add + (local.get $$arrayidx223$i$i) + (i32.const 8) + ) + ) + (local.set $$164 + (i32.load + (local.get $$163) + ) + ) + (local.set $$165 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp236$i$i + (i32.gt_u + (local.get $$165) + (local.get $$164) + ) + ) + (if + (i32.eqz + (local.get $$cmp236$i$i) + ) + (block + (local.set $$$pre$phi$i48$iZ2D + (local.get $$163) + ) + (local.set $$F224$0$i$i + (local.get $$164) + ) + (br $do-once58) + ) + ) + (call $_abort) + ) + ) + ) + (i32.store + (local.get $$$pre$phi$i48$iZ2D) + (local.get $$add$ptr17$i$i) + ) + (local.set $$bk246$i$i + (i32.add + (local.get $$F224$0$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk246$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$fd247$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd247$i$i) + (local.get $$F224$0$i$i) + ) + (local.set $$bk248$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk248$i$i) + (local.get $$arrayidx223$i$i) + ) + (br $label$break$L317) + ) + ) + (local.set $$shr253$i$i + (i32.shr_u + (local.get $$qsize$0$i$i) + (i32.const 8) + ) + ) + (local.set $$cmp254$i$i + (i32.eq + (local.get $$shr253$i$i) + (i32.const 0) + ) + ) + (block $do-once60 + (if + (local.get $$cmp254$i$i) + (local.set $$I252$0$i$i + (i32.const 0) + ) + (block + (local.set $$cmp258$i$i + (i32.gt_u + (local.get $$qsize$0$i$i) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp258$i$i) + (block + (local.set $$I252$0$i$i + (i32.const 31) + ) + (br $do-once60) + ) + ) + (local.set $$sub262$i$i + (i32.add + (local.get $$shr253$i$i) + (i32.const 1048320) + ) + ) + (local.set $$shr263$i$i + (i32.shr_u + (local.get $$sub262$i$i) + (i32.const 16) + ) + ) + (local.set $$and264$i$i + (i32.and + (local.get $$shr263$i$i) + (i32.const 8) + ) + ) + (local.set $$shl265$i$i + (i32.shl + (local.get $$shr253$i$i) + (local.get $$and264$i$i) + ) + ) + (local.set $$sub266$i$i + (i32.add + (local.get $$shl265$i$i) + (i32.const 520192) + ) + ) + (local.set $$shr267$i$i + (i32.shr_u + (local.get $$sub266$i$i) + (i32.const 16) + ) + ) + (local.set $$and268$i$i + (i32.and + (local.get $$shr267$i$i) + (i32.const 4) + ) + ) + (local.set $$add269$i$i + (i32.or + (local.get $$and268$i$i) + (local.get $$and264$i$i) + ) + ) + (local.set $$shl270$i$i + (i32.shl + (local.get $$shl265$i$i) + (local.get $$and268$i$i) + ) + ) + (local.set $$sub271$i$i + (i32.add + (local.get $$shl270$i$i) + (i32.const 245760) + ) + ) + (local.set $$shr272$i$i + (i32.shr_u + (local.get $$sub271$i$i) + (i32.const 16) + ) + ) + (local.set $$and273$i$i + (i32.and + (local.get $$shr272$i$i) + (i32.const 2) + ) + ) + (local.set $$add274$i$i + (i32.or + (local.get $$add269$i$i) + (local.get $$and273$i$i) + ) + ) + (local.set $$sub275$i$i + (i32.sub + (i32.const 14) + (local.get $$add274$i$i) + ) + ) + (local.set $$shl276$i$i + (i32.shl + (local.get $$shl270$i$i) + (local.get $$and273$i$i) + ) + ) + (local.set $$shr277$i$i + (i32.shr_u + (local.get $$shl276$i$i) + (i32.const 15) + ) + ) + (local.set $$add278$i$i + (i32.add + (local.get $$sub275$i$i) + (local.get $$shr277$i$i) + ) + ) + (local.set $$shl279$i$i + (i32.shl + (local.get $$add278$i$i) + (i32.const 1) + ) + ) + (local.set $$add280$i$i + (i32.add + (local.get $$add278$i$i) + (i32.const 7) + ) + ) + (local.set $$shr281$i$i + (i32.shr_u + (local.get $$qsize$0$i$i) + (local.get $$add280$i$i) + ) + ) + (local.set $$and282$i$i + (i32.and + (local.get $$shr281$i$i) + (i32.const 1) + ) + ) + (local.set $$add283$i$i + (i32.or + (local.get $$and282$i$i) + (local.get $$shl279$i$i) + ) + ) + (local.set $$I252$0$i$i + (local.get $$add283$i$i) + ) + ) + ) + ) + (local.set $$arrayidx287$i$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$I252$0$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$index288$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 28) + ) + ) + (i32.store + (local.get $$index288$i$i) + (local.get $$I252$0$i$i) + ) + (local.set $$child289$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 16) + ) + ) + (local.set $$arrayidx290$i$i + (i32.add + (local.get $$child289$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$arrayidx290$i$i) + (i32.const 0) + ) + (i32.store + (local.get $$child289$i$i) + (i32.const 0) + ) + (local.set $$166 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$shl294$i$i + (i32.shl + (i32.const 1) + (local.get $$I252$0$i$i) + ) + ) + (local.set $$and295$i$i + (i32.and + (local.get $$166) + (local.get $$shl294$i$i) + ) + ) + (local.set $$tobool296$i$i + (i32.eq + (local.get $$and295$i$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool296$i$i) + (block + (local.set $$or300$i$i + (i32.or + (local.get $$166) + (local.get $$shl294$i$i) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$or300$i$i) + ) + (i32.store + (local.get $$arrayidx287$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$parent301$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent301$i$i) + (local.get $$arrayidx287$i$i) + ) + (local.set $$bk302$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk302$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$fd303$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd303$i$i) + (local.get $$add$ptr17$i$i) + ) + (br $label$break$L317) + ) + ) + (local.set $$167 + (i32.load + (local.get $$arrayidx287$i$i) + ) + ) + (local.set $$head3176$i$i + (i32.add + (local.get $$167) + (i32.const 4) + ) + ) + (local.set $$168 + (i32.load + (local.get $$head3176$i$i) + ) + ) + (local.set $$and3187$i$i + (i32.and + (local.get $$168) + (i32.const -8) + ) + ) + (local.set $$cmp3198$i$i + (i32.eq + (local.get $$and3187$i$i) + (local.get $$qsize$0$i$i) + ) + ) + (block $label$break$L410 + (if + (local.get $$cmp3198$i$i) + (local.set $$T$0$lcssa$i50$i + (local.get $$167) + ) + (block + (local.set $$cmp306$i$i + (i32.eq + (local.get $$I252$0$i$i) + (i32.const 31) + ) + ) + (local.set $$shr310$i$i + (i32.shr_u + (local.get $$I252$0$i$i) + (i32.const 1) + ) + ) + (local.set $$sub313$i$i + (i32.sub + (i32.const 25) + (local.get $$shr310$i$i) + ) + ) + (local.set $$cond315$i$i + (if (result i32) + (local.get $$cmp306$i$i) + (i32.const 0) + (local.get $$sub313$i$i) + ) + ) + (local.set $$shl316$i$i + (i32.shl + (local.get $$qsize$0$i$i) + (local.get $$cond315$i$i) + ) + ) + (local.set $$K305$010$i$i + (local.get $$shl316$i$i) + ) + (local.set $$T$09$i$i + (local.get $$167) + ) + (loop $while-in64 + (block $while-out63 + (local.set $$shr323$i$i + (i32.shr_u + (local.get $$K305$010$i$i) + (i32.const 31) + ) + ) + (local.set $$arrayidx325$i$i + (i32.add + (i32.add + (local.get $$T$09$i$i) + (i32.const 16) + ) + (i32.shl + (local.get $$shr323$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$169 + (i32.load + (local.get $$arrayidx325$i$i) + ) + ) + (local.set $$cmp327$i$i + (i32.eq + (local.get $$169) + (i32.const 0) + ) + ) + (if + (local.get $$cmp327$i$i) + (br $while-out63) + ) + (local.set $$shl326$i$i + (i32.shl + (local.get $$K305$010$i$i) + (i32.const 1) + ) + ) + (local.set $$head317$i$i + (i32.add + (local.get $$169) + (i32.const 4) + ) + ) + (local.set $$170 + (i32.load + (local.get $$head317$i$i) + ) + ) + (local.set $$and318$i$i + (i32.and + (local.get $$170) + (i32.const -8) + ) + ) + (local.set $$cmp319$i$i + (i32.eq + (local.get $$and318$i$i) + (local.get $$qsize$0$i$i) + ) + ) + (if + (local.get $$cmp319$i$i) + (block + (local.set $$T$0$lcssa$i50$i + (local.get $$169) + ) + (br $label$break$L410) + ) + (block + (local.set $$K305$010$i$i + (local.get $$shl326$i$i) + ) + (local.set $$T$09$i$i + (local.get $$169) + ) + ) + ) + (br $while-in64) + ) + ) + (local.set $$171 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp332$i$i + (i32.gt_u + (local.get $$171) + (local.get $$arrayidx325$i$i) + ) + ) + (if + (local.get $$cmp332$i$i) + (call $_abort) + (block + (i32.store + (local.get $$arrayidx325$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$parent337$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent337$i$i) + (local.get $$T$09$i$i) + ) + (local.set $$bk338$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk338$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$fd339$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd339$i$i) + (local.get $$add$ptr17$i$i) + ) + (br $label$break$L317) + ) + ) + ) + ) + ) + (local.set $$fd344$i$i + (i32.add + (local.get $$T$0$lcssa$i50$i) + (i32.const 8) + ) + ) + (local.set $$172 + (i32.load + (local.get $$fd344$i$i) + ) + ) + (local.set $$173 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp346$i$i + (i32.le_u + (local.get $$173) + (local.get $$T$0$lcssa$i50$i) + ) + ) + (local.set $$cmp350$i$i + (i32.le_u + (local.get $$173) + (local.get $$172) + ) + ) + (local.set $$174 + (i32.and + (local.get $$cmp350$i$i) + (local.get $$cmp346$i$i) + ) + ) + (if + (local.get $$174) + (block + (local.set $$bk357$i$i + (i32.add + (local.get $$172) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk357$i$i) + (local.get $$add$ptr17$i$i) + ) + (i32.store + (local.get $$fd344$i$i) + (local.get $$add$ptr17$i$i) + ) + (local.set $$fd359$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd359$i$i) + (local.get $$172) + ) + (local.set $$bk360$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk360$i$i) + (local.get $$T$0$lcssa$i50$i) + ) + (local.set $$parent361$i$i + (i32.add + (local.get $$add$ptr17$i$i) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent361$i$i) + (i32.const 0) + ) + (br $label$break$L317) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$add$ptr369$i$i + (i32.add + (local.get $$add$ptr4$i28$i) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr369$i$i) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$sp$0$i$i$i + (i32.const 29852) + ) + (loop $while-in66 + (block $while-out65 + (local.set $$175 + (i32.load + (local.get $$sp$0$i$i$i) + ) + ) + (local.set $$cmp$i$i$i + (i32.gt_u + (local.get $$175) + (local.get $$114) + ) + ) + (if + (i32.eqz + (local.get $$cmp$i$i$i) + ) + (block + (local.set $$size$i$i$i + (i32.add + (local.get $$sp$0$i$i$i) + (i32.const 4) + ) + ) + (local.set $$176 + (i32.load + (local.get $$size$i$i$i) + ) + ) + (local.set $$add$ptr$i$i$i + (i32.add + (local.get $$175) + (local.get $$176) + ) + ) + (local.set $$cmp2$i$i$i + (i32.gt_u + (local.get $$add$ptr$i$i$i) + (local.get $$114) + ) + ) + (if + (local.get $$cmp2$i$i$i) + (br $while-out65) + ) + ) + ) + (local.set $$next$i$i$i + (i32.add + (local.get $$sp$0$i$i$i) + (i32.const 8) + ) + ) + (local.set $$177 + (i32.load + (local.get $$next$i$i$i) + ) + ) + (local.set $$sp$0$i$i$i + (local.get $$177) + ) + (br $while-in66) + ) + ) + (local.set $$add$ptr2$i$i + (i32.add + (local.get $$add$ptr$i$i$i) + (i32.const -47) + ) + ) + (local.set $$add$ptr3$i$i + (i32.add + (local.get $$add$ptr2$i$i) + (i32.const 8) + ) + ) + (local.set $$178 + (local.get $$add$ptr3$i$i) + ) + (local.set $$and$i$i + (i32.and + (local.get $$178) + (i32.const 7) + ) + ) + (local.set $$cmp$i12$i + (i32.eq + (local.get $$and$i$i) + (i32.const 0) + ) + ) + (local.set $$sub$i$i + (i32.sub + (i32.const 0) + (local.get $$178) + ) + ) + (local.set $$and6$i13$i + (i32.and + (local.get $$sub$i$i) + (i32.const 7) + ) + ) + (local.set $$cond$i$i + (if (result i32) + (local.get $$cmp$i12$i) + (i32.const 0) + (local.get $$and6$i13$i) + ) + ) + (local.set $$add$ptr7$i$i + (i32.add + (local.get $$add$ptr2$i$i) + (local.get $$cond$i$i) + ) + ) + (local.set $$add$ptr81$i$i + (i32.add + (local.get $$114) + (i32.const 16) + ) + ) + (local.set $$cmp9$i$i + (i32.lt_u + (local.get $$add$ptr7$i$i) + (local.get $$add$ptr81$i$i) + ) + ) + (local.set $$cond13$i$i + (if (result i32) + (local.get $$cmp9$i$i) + (local.get $$114) + (local.get $$add$ptr7$i$i) + ) + ) + (local.set $$add$ptr14$i$i + (i32.add + (local.get $$cond13$i$i) + (i32.const 8) + ) + ) + (local.set $$add$ptr15$i$i + (i32.add + (local.get $$cond13$i$i) + (i32.const 24) + ) + ) + (local.set $$sub16$i$i + (i32.add + (local.get $$tsize$798$i) + (i32.const -40) + ) + ) + (local.set $$add$ptr$i3$i$i + (i32.add + (local.get $$tbase$799$i) + (i32.const 8) + ) + ) + (local.set $$179 + (local.get $$add$ptr$i3$i$i) + ) + (local.set $$and$i$i$i + (i32.and + (local.get $$179) + (i32.const 7) + ) + ) + (local.set $$cmp$i4$i$i + (i32.eq + (local.get $$and$i$i$i) + (i32.const 0) + ) + ) + (local.set $$sub$i$i$i + (i32.sub + (i32.const 0) + (local.get $$179) + ) + ) + (local.set $$and3$i$i$i + (i32.and + (local.get $$sub$i$i$i) + (i32.const 7) + ) + ) + (local.set $$cond$i$i$i + (if (result i32) + (local.get $$cmp$i4$i$i) + (i32.const 0) + (local.get $$and3$i$i$i) + ) + ) + (local.set $$add$ptr4$i$i$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$cond$i$i$i) + ) + ) + (local.set $$sub5$i$i$i + (i32.sub + (local.get $$sub16$i$i) + (local.get $$cond$i$i$i) + ) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr4$i$i$i) + ) + (i32.store + (i32.const 29416) + (local.get $$sub5$i$i$i) + ) + (local.set $$or$i$i$i + (i32.or + (local.get $$sub5$i$i$i) + (i32.const 1) + ) + ) + (local.set $$head$i$i$i + (i32.add + (local.get $$add$ptr4$i$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head$i$i$i) + (local.get $$or$i$i$i) + ) + (local.set $$add$ptr6$i$i$i + (i32.add + (local.get $$tbase$799$i) + (local.get $$sub16$i$i) + ) + ) + (local.set $$head7$i$i$i + (i32.add + (local.get $$add$ptr6$i$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head7$i$i$i) + (i32.const 40) + ) + (local.set $$180 + (i32.load + (i32.const 29892) + ) + ) + (i32.store + (i32.const 29432) + (local.get $$180) + ) + (local.set $$head$i$i + (i32.add + (local.get $$cond13$i$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head$i$i) + (i32.const 27) + ) + (i64.store align=4 + (local.get $$add$ptr14$i$i) + (i64.load align=4 + (i32.const 29852) + ) + ) + (i64.store align=4 + (i32.add + (local.get $$add$ptr14$i$i) + (i32.const 8) + ) + (i64.load align=4 + (i32.add + (i32.const 29852) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.const 29852) + (local.get $$tbase$799$i) + ) + (i32.store + (i32.const 29856) + (local.get $$tsize$798$i) + ) + (i32.store + (i32.const 29864) + (i32.const 0) + ) + (i32.store + (i32.const 29860) + (local.get $$add$ptr14$i$i) + ) + (local.set $$181 + (local.get $$add$ptr15$i$i) + ) + (loop $while-in68 + (block $while-out67 + (local.set $$add$ptr24$i$i + (i32.add + (local.get $$181) + (i32.const 4) + ) + ) + (i32.store + (local.get $$add$ptr24$i$i) + (i32.const 7) + ) + (local.set $$head26$i$i + (i32.add + (local.get $$181) + (i32.const 8) + ) + ) + (local.set $$cmp27$i$i + (i32.lt_u + (local.get $$head26$i$i) + (local.get $$add$ptr$i$i$i) + ) + ) + (if + (local.get $$cmp27$i$i) + (local.set $$181 + (local.get $$add$ptr24$i$i) + ) + (br $while-out67) + ) + (br $while-in68) + ) + ) + (local.set $$cmp28$i$i + (i32.eq + (local.get $$cond13$i$i) + (local.get $$114) + ) + ) + (if + (i32.eqz + (local.get $$cmp28$i$i) + ) + (block + (local.set $$sub$ptr$lhs$cast$i$i + (local.get $$cond13$i$i) + ) + (local.set $$sub$ptr$rhs$cast$i$i + (local.get $$114) + ) + (local.set $$sub$ptr$sub$i$i + (i32.sub + (local.get $$sub$ptr$lhs$cast$i$i) + (local.get $$sub$ptr$rhs$cast$i$i) + ) + ) + (local.set $$182 + (i32.load + (local.get $$head$i$i) + ) + ) + (local.set $$and32$i$i + (i32.and + (local.get $$182) + (i32.const -2) + ) + ) + (i32.store + (local.get $$head$i$i) + (local.get $$and32$i$i) + ) + (local.set $$or33$i$i + (i32.or + (local.get $$sub$ptr$sub$i$i) + (i32.const 1) + ) + ) + (local.set $$head34$i$i + (i32.add + (local.get $$114) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head34$i$i) + (local.get $$or33$i$i) + ) + (i32.store + (local.get $$cond13$i$i) + (local.get $$sub$ptr$sub$i$i) + ) + (local.set $$shr$i$i + (i32.shr_u + (local.get $$sub$ptr$sub$i$i) + (i32.const 3) + ) + ) + (local.set $$cmp36$i$i + (i32.lt_u + (local.get $$sub$ptr$sub$i$i) + (i32.const 256) + ) + ) + (if + (local.get $$cmp36$i$i) + (block + (local.set $$shl$i$i + (i32.shl + (local.get $$shr$i$i) + (i32.const 1) + ) + ) + (local.set $$arrayidx$i$i + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$183 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shl39$i$i + (i32.shl + (i32.const 1) + (local.get $$shr$i$i) + ) + ) + (local.set $$and40$i$i + (i32.and + (local.get $$183) + (local.get $$shl39$i$i) + ) + ) + (local.set $$tobool$i$i + (i32.eq + (local.get $$and40$i$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool$i$i) + (block + (local.set $$or44$i$i + (i32.or + (local.get $$183) + (local.get $$shl39$i$i) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or44$i$i) + ) + (local.set $$$pre$i$i + (i32.add + (local.get $$arrayidx$i$i) + (i32.const 8) + ) + ) + (local.set $$$pre$phi$i$iZ2D + (local.get $$$pre$i$i) + ) + (local.set $$F$0$i$i + (local.get $$arrayidx$i$i) + ) + ) + (block + (local.set $$184 + (i32.add + (local.get $$arrayidx$i$i) + (i32.const 8) + ) + ) + (local.set $$185 + (i32.load + (local.get $$184) + ) + ) + (local.set $$186 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp46$i$i + (i32.gt_u + (local.get $$186) + (local.get $$185) + ) + ) + (if + (local.get $$cmp46$i$i) + (call $_abort) + (block + (local.set $$$pre$phi$i$iZ2D + (local.get $$184) + ) + (local.set $$F$0$i$i + (local.get $$185) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phi$i$iZ2D) + (local.get $$114) + ) + (local.set $$bk$i$i + (i32.add + (local.get $$F$0$i$i) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk$i$i) + (local.get $$114) + ) + (local.set $$fd54$i$i + (i32.add + (local.get $$114) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd54$i$i) + (local.get $$F$0$i$i) + ) + (local.set $$bk55$i$i + (i32.add + (local.get $$114) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk55$i$i) + (local.get $$arrayidx$i$i) + ) + (br $label$break$L294) + ) + ) + (local.set $$shr58$i$i + (i32.shr_u + (local.get $$sub$ptr$sub$i$i) + (i32.const 8) + ) + ) + (local.set $$cmp59$i$i + (i32.eq + (local.get $$shr58$i$i) + (i32.const 0) + ) + ) + (if + (local.get $$cmp59$i$i) + (local.set $$I57$0$i$i + (i32.const 0) + ) + (block + (local.set $$cmp63$i$i + (i32.gt_u + (local.get $$sub$ptr$sub$i$i) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp63$i$i) + (local.set $$I57$0$i$i + (i32.const 31) + ) + (block + (local.set $$sub67$i$i + (i32.add + (local.get $$shr58$i$i) + (i32.const 1048320) + ) + ) + (local.set $$shr68$i$i + (i32.shr_u + (local.get $$sub67$i$i) + (i32.const 16) + ) + ) + (local.set $$and69$i$i + (i32.and + (local.get $$shr68$i$i) + (i32.const 8) + ) + ) + (local.set $$shl70$i$i + (i32.shl + (local.get $$shr58$i$i) + (local.get $$and69$i$i) + ) + ) + (local.set $$sub71$i$i + (i32.add + (local.get $$shl70$i$i) + (i32.const 520192) + ) + ) + (local.set $$shr72$i$i + (i32.shr_u + (local.get $$sub71$i$i) + (i32.const 16) + ) + ) + (local.set $$and73$i$i + (i32.and + (local.get $$shr72$i$i) + (i32.const 4) + ) + ) + (local.set $$add74$i$i + (i32.or + (local.get $$and73$i$i) + (local.get $$and69$i$i) + ) + ) + (local.set $$shl75$i$i + (i32.shl + (local.get $$shl70$i$i) + (local.get $$and73$i$i) + ) + ) + (local.set $$sub76$i$i + (i32.add + (local.get $$shl75$i$i) + (i32.const 245760) + ) + ) + (local.set $$shr77$i$i + (i32.shr_u + (local.get $$sub76$i$i) + (i32.const 16) + ) + ) + (local.set $$and78$i$i + (i32.and + (local.get $$shr77$i$i) + (i32.const 2) + ) + ) + (local.set $$add79$i$i + (i32.or + (local.get $$add74$i$i) + (local.get $$and78$i$i) + ) + ) + (local.set $$sub80$i$i + (i32.sub + (i32.const 14) + (local.get $$add79$i$i) + ) + ) + (local.set $$shl81$i$i + (i32.shl + (local.get $$shl75$i$i) + (local.get $$and78$i$i) + ) + ) + (local.set $$shr82$i$i + (i32.shr_u + (local.get $$shl81$i$i) + (i32.const 15) + ) + ) + (local.set $$add83$i$i + (i32.add + (local.get $$sub80$i$i) + (local.get $$shr82$i$i) + ) + ) + (local.set $$shl84$i$i + (i32.shl + (local.get $$add83$i$i) + (i32.const 1) + ) + ) + (local.set $$add85$i$i + (i32.add + (local.get $$add83$i$i) + (i32.const 7) + ) + ) + (local.set $$shr86$i$i + (i32.shr_u + (local.get $$sub$ptr$sub$i$i) + (local.get $$add85$i$i) + ) + ) + (local.set $$and87$i$i + (i32.and + (local.get $$shr86$i$i) + (i32.const 1) + ) + ) + (local.set $$add88$i$i + (i32.or + (local.get $$and87$i$i) + (local.get $$shl84$i$i) + ) + ) + (local.set $$I57$0$i$i + (local.get $$add88$i$i) + ) + ) + ) + ) + ) + (local.set $$arrayidx91$i$i + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$I57$0$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$index$i$i + (i32.add + (local.get $$114) + (i32.const 28) + ) + ) + (i32.store + (local.get $$index$i$i) + (local.get $$I57$0$i$i) + ) + (local.set $$arrayidx92$i$i + (i32.add + (local.get $$114) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx92$i$i) + (i32.const 0) + ) + (i32.store + (local.get $$add$ptr81$i$i) + (i32.const 0) + ) + (local.set $$187 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$shl95$i$i + (i32.shl + (i32.const 1) + (local.get $$I57$0$i$i) + ) + ) + (local.set $$and96$i$i + (i32.and + (local.get $$187) + (local.get $$shl95$i$i) + ) + ) + (local.set $$tobool97$i$i + (i32.eq + (local.get $$and96$i$i) + (i32.const 0) + ) + ) + (if + (local.get $$tobool97$i$i) + (block + (local.set $$or101$i$i + (i32.or + (local.get $$187) + (local.get $$shl95$i$i) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$or101$i$i) + ) + (i32.store + (local.get $$arrayidx91$i$i) + (local.get $$114) + ) + (local.set $$parent$i$i + (i32.add + (local.get $$114) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent$i$i) + (local.get $$arrayidx91$i$i) + ) + (local.set $$bk102$i$i + (i32.add + (local.get $$114) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk102$i$i) + (local.get $$114) + ) + (local.set $$fd103$i$i + (i32.add + (local.get $$114) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd103$i$i) + (local.get $$114) + ) + (br $label$break$L294) + ) + ) + (local.set $$188 + (i32.load + (local.get $$arrayidx91$i$i) + ) + ) + (local.set $$head1187$i$i + (i32.add + (local.get $$188) + (i32.const 4) + ) + ) + (local.set $$189 + (i32.load + (local.get $$head1187$i$i) + ) + ) + (local.set $$and1198$i$i + (i32.and + (local.get $$189) + (i32.const -8) + ) + ) + (local.set $$cmp1209$i$i + (i32.eq + (local.get $$and1198$i$i) + (local.get $$sub$ptr$sub$i$i) + ) + ) + (block $label$break$L451 + (if + (local.get $$cmp1209$i$i) + (local.set $$T$0$lcssa$i$i + (local.get $$188) + ) + (block + (local.set $$cmp106$i$i + (i32.eq + (local.get $$I57$0$i$i) + (i32.const 31) + ) + ) + (local.set $$shr110$i$i + (i32.shr_u + (local.get $$I57$0$i$i) + (i32.const 1) + ) + ) + (local.set $$sub113$i$i + (i32.sub + (i32.const 25) + (local.get $$shr110$i$i) + ) + ) + (local.set $$cond115$i$i + (if (result i32) + (local.get $$cmp106$i$i) + (i32.const 0) + (local.get $$sub113$i$i) + ) + ) + (local.set $$shl116$i$i + (i32.shl + (local.get $$sub$ptr$sub$i$i) + (local.get $$cond115$i$i) + ) + ) + (local.set $$K105$011$i$i + (local.get $$shl116$i$i) + ) + (local.set $$T$010$i$i + (local.get $$188) + ) + (loop $while-in71 + (block $while-out70 + (local.set $$shr124$i$i + (i32.shr_u + (local.get $$K105$011$i$i) + (i32.const 31) + ) + ) + (local.set $$arrayidx126$i$i + (i32.add + (i32.add + (local.get $$T$010$i$i) + (i32.const 16) + ) + (i32.shl + (local.get $$shr124$i$i) + (i32.const 2) + ) + ) + ) + (local.set $$190 + (i32.load + (local.get $$arrayidx126$i$i) + ) + ) + (local.set $$cmp128$i$i + (i32.eq + (local.get $$190) + (i32.const 0) + ) + ) + (if + (local.get $$cmp128$i$i) + (br $while-out70) + ) + (local.set $$shl127$i$i + (i32.shl + (local.get $$K105$011$i$i) + (i32.const 1) + ) + ) + (local.set $$head118$i$i + (i32.add + (local.get $$190) + (i32.const 4) + ) + ) + (local.set $$191 + (i32.load + (local.get $$head118$i$i) + ) + ) + (local.set $$and119$i$i + (i32.and + (local.get $$191) + (i32.const -8) + ) + ) + (local.set $$cmp120$i$i + (i32.eq + (local.get $$and119$i$i) + (local.get $$sub$ptr$sub$i$i) + ) + ) + (if + (local.get $$cmp120$i$i) + (block + (local.set $$T$0$lcssa$i$i + (local.get $$190) + ) + (br $label$break$L451) + ) + (block + (local.set $$K105$011$i$i + (local.get $$shl127$i$i) + ) + (local.set $$T$010$i$i + (local.get $$190) + ) + ) + ) + (br $while-in71) + ) + ) + (local.set $$192 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp133$i$i + (i32.gt_u + (local.get $$192) + (local.get $$arrayidx126$i$i) + ) + ) + (if + (local.get $$cmp133$i$i) + (call $_abort) + (block + (i32.store + (local.get $$arrayidx126$i$i) + (local.get $$114) + ) + (local.set $$parent138$i$i + (i32.add + (local.get $$114) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent138$i$i) + (local.get $$T$010$i$i) + ) + (local.set $$bk139$i$i + (i32.add + (local.get $$114) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk139$i$i) + (local.get $$114) + ) + (local.set $$fd140$i$i + (i32.add + (local.get $$114) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd140$i$i) + (local.get $$114) + ) + (br $label$break$L294) + ) + ) + ) + ) + ) + (local.set $$fd148$i$i + (i32.add + (local.get $$T$0$lcssa$i$i) + (i32.const 8) + ) + ) + (local.set $$193 + (i32.load + (local.get $$fd148$i$i) + ) + ) + (local.set $$194 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp150$i$i + (i32.le_u + (local.get $$194) + (local.get $$T$0$lcssa$i$i) + ) + ) + (local.set $$cmp153$i$i + (i32.le_u + (local.get $$194) + (local.get $$193) + ) + ) + (local.set $$195 + (i32.and + (local.get $$cmp153$i$i) + (local.get $$cmp150$i$i) + ) + ) + (if + (local.get $$195) + (block + (local.set $$bk158$i$i + (i32.add + (local.get $$193) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk158$i$i) + (local.get $$114) + ) + (i32.store + (local.get $$fd148$i$i) + (local.get $$114) + ) + (local.set $$fd160$i$i + (i32.add + (local.get $$114) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd160$i$i) + (local.get $$193) + ) + (local.set $$bk161$i$i + (i32.add + (local.get $$114) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk161$i$i) + (local.get $$T$0$lcssa$i$i) + ) + (local.set $$parent162$i$i + (i32.add + (local.get $$114) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent162$i$i) + (i32.const 0) + ) + (br $label$break$L294) + ) + (call $_abort) + ) + ) + ) + ) + ) + ) + (local.set $$196 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$cmp257$i + (i32.gt_u + (local.get $$196) + (local.get $$nb$0) + ) + ) + (if + (local.get $$cmp257$i) + (block + (local.set $$sub260$i + (i32.sub + (local.get $$196) + (local.get $$nb$0) + ) + ) + (i32.store + (i32.const 29416) + (local.get $$sub260$i) + ) + (local.set $$197 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$add$ptr262$i + (i32.add + (local.get $$197) + (local.get $$nb$0) + ) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr262$i) + ) + (local.set $$or264$i + (i32.or + (local.get $$sub260$i) + (i32.const 1) + ) + ) + (local.set $$head265$i + (i32.add + (local.get $$add$ptr262$i) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head265$i) + (local.get $$or264$i) + ) + (local.set $$or267$i + (i32.or + (local.get $$nb$0) + (i32.const 3) + ) + ) + (local.set $$head268$i + (i32.add + (local.get $$197) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head268$i) + (local.get $$or267$i) + ) + (local.set $$add$ptr269$i + (i32.add + (local.get $$197) + (i32.const 8) + ) + ) + (local.set $$retval$0 + (local.get $$add$ptr269$i) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + ) + ) + ) + (local.set $$call275$i + (call $___errno_location) + ) + (i32.store + (local.get $$call275$i) + (i32.const 12) + ) + (local.set $$retval$0 + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $sp) + ) + (return + (local.get $$retval$0) + ) + ) + (func $_free (; 648 ;) (param $$mem i32) + (local $$$pre i32) + (local $$$pre$phiZ2D i32) + (local $$$pre316 i32) + (local $$$pre317 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$58 i32) + (local $$59 i32) + (local $$6 i32) + (local $$60 i32) + (local $$61 i32) + (local $$62 i32) + (local $$63 i32) + (local $$64 i32) + (local $$65 i32) + (local $$66 i32) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 i32) + (local $$70 i32) + (local $$71 i32) + (local $$72 i32) + (local $$73 i32) + (local $$74 i32) + (local $$75 i32) + (local $$76 i32) + (local $$8 i32) + (local $$9 i32) + (local $$F510$0 i32) + (local $$I534$0 i32) + (local $$K583$0312 i32) + (local $$R$1 i32) + (local $$R$1$be i32) + (local $$R$1$ph i32) + (local $$R$3 i32) + (local $$R332$1 i32) + (local $$R332$1$be i32) + (local $$R332$1$ph i32) + (local $$R332$3 i32) + (local $$RP$1 i32) + (local $$RP$1$be i32) + (local $$RP$1$ph i32) + (local $$RP360$1 i32) + (local $$RP360$1$be i32) + (local $$RP360$1$ph i32) + (local $$T$0$lcssa i32) + (local $$T$0311 i32) + (local $$add$ptr i32) + (local $$add$ptr16 i32) + (local $$add$ptr217 i32) + (local $$add$ptr261 i32) + (local $$add$ptr482 i32) + (local $$add$ptr498 i32) + (local $$add$ptr6 i32) + (local $$add17 i32) + (local $$add246 i32) + (local $$add258 i32) + (local $$add267 i32) + (local $$add550 i32) + (local $$add555 i32) + (local $$add559 i32) + (local $$add561 i32) + (local $$add564 i32) + (local $$and i32) + (local $$and140 i32) + (local $$and210 i32) + (local $$and215 i32) + (local $$and232 i32) + (local $$and240 i32) + (local $$and266 i32) + (local $$and301 i32) + (local $$and410 i32) + (local $$and46 i32) + (local $$and495 i32) + (local $$and5 i32) + (local $$and512 i32) + (local $$and545 i32) + (local $$and549 i32) + (local $$and554 i32) + (local $$and563 i32) + (local $$and574 i32) + (local $$and592 i32) + (local $$and592309 i32) + (local $$and8 i32) + (local $$arrayidx i32) + (local $$arrayidx108 i32) + (local $$arrayidx113 i32) + (local $$arrayidx130 i32) + (local $$arrayidx149 i32) + (local $$arrayidx157 i32) + (local $$arrayidx157$sink i32) + (local $$arrayidx182 i32) + (local $$arrayidx188 i32) + (local $$arrayidx198 i32) + (local $$arrayidx279 i32) + (local $$arrayidx362 i32) + (local $$arrayidx374 i32) + (local $$arrayidx379 i32) + (local $$arrayidx400 i32) + (local $$arrayidx419 i32) + (local $$arrayidx427 i32) + (local $$arrayidx427$sink i32) + (local $$arrayidx454 i32) + (local $$arrayidx460 i32) + (local $$arrayidx470 i32) + (local $$arrayidx509 i32) + (local $$arrayidx567 i32) + (local $$arrayidx570 i32) + (local $$arrayidx599 i32) + (local $$arrayidx99 i32) + (local $$bk i32) + (local $$bk275 i32) + (local $$bk286 i32) + (local $$bk321 i32) + (local $$bk333 i32) + (local $$bk34 i32) + (local $$bk343 i32) + (local $$bk529 i32) + (local $$bk531 i32) + (local $$bk580 i32) + (local $$bk611 i32) + (local $$bk631 i32) + (local $$bk634 i32) + (local $$bk66 i32) + (local $$bk73 i32) + (local $$bk82 i32) + (local $$child i32) + (local $$child171 i32) + (local $$child361 i32) + (local $$child443 i32) + (local $$child569 i32) + (local $$cmp i32) + (local $$cmp$i i32) + (local $$cmp1 i32) + (local $$cmp100 i32) + (local $$cmp104 i32) + (local $$cmp109 i32) + (local $$cmp114 i32) + (local $$cmp118 i32) + (local $$cmp127 i32) + (local $$cmp13 i32) + (local $$cmp131 i32) + (local $$cmp143 i32) + (local $$cmp150 i32) + (local $$cmp162 i32) + (local $$cmp165 i32) + (local $$cmp173 i32) + (local $$cmp176 i32) + (local $$cmp18 i32) + (local $$cmp189 i32) + (local $$cmp192 i32) + (local $$cmp2 i32) + (local $$cmp211 i32) + (local $$cmp22 i32) + (local $$cmp228 i32) + (local $$cmp243 i32) + (local $$cmp249 i32) + (local $$cmp25 i32) + (local $$cmp255 i32) + (local $$cmp269 i32) + (local $$cmp280 i32) + (local $$cmp283 i32) + (local $$cmp287 i32) + (local $$cmp29 i32) + (local $$cmp296 i32) + (local $$cmp305 i32) + (local $$cmp308 i32) + (local $$cmp31 i32) + (local $$cmp312 i32) + (local $$cmp334 i32) + (local $$cmp340 i32) + (local $$cmp344 i32) + (local $$cmp348 i32) + (local $$cmp35 i32) + (local $$cmp363 i32) + (local $$cmp368 i32) + (local $$cmp375 i32) + (local $$cmp380 i32) + (local $$cmp386 i32) + (local $$cmp395 i32) + (local $$cmp401 i32) + (local $$cmp413 i32) + (local $$cmp42 i32) + (local $$cmp420 i32) + (local $$cmp432 i32) + (local $$cmp435 i32) + (local $$cmp445 i32) + (local $$cmp448 i32) + (local $$cmp461 i32) + (local $$cmp464 i32) + (local $$cmp484 i32) + (local $$cmp50 i32) + (local $$cmp502 i32) + (local $$cmp519 i32) + (local $$cmp53 i32) + (local $$cmp536 i32) + (local $$cmp540 i32) + (local $$cmp57 i32) + (local $$cmp584 i32) + (local $$cmp593 i32) + (local $$cmp593310 i32) + (local $$cmp601 i32) + (local $$cmp605 i32) + (local $$cmp621 i32) + (local $$cmp624 i32) + (local $$cmp640 i32) + (local $$cmp74 i32) + (local $$cmp80 i32) + (local $$cmp83 i32) + (local $$cmp87 i32) + (local $$cond i32) + (local $$cond292 i32) + (local $$cond293 i32) + (local $$dec i32) + (local $$fd i32) + (local $$fd273 i32) + (local $$fd311 i32) + (local $$fd322$pre$phiZ2D i32) + (local $$fd338 i32) + (local $$fd347 i32) + (local $$fd530 i32) + (local $$fd56 i32) + (local $$fd581 i32) + (local $$fd612 i32) + (local $$fd620 i32) + (local $$fd633 i32) + (local $$fd67$pre$phiZ2D i32) + (local $$fd78 i32) + (local $$fd86 i32) + (local $$head i32) + (local $$head209 i32) + (local $$head216 i32) + (local $$head231 i32) + (local $$head248 i32) + (local $$head260 i32) + (local $$head481 i32) + (local $$head497 i32) + (local $$head591 i32) + (local $$head591308 i32) + (local $$idx$neg i32) + (local $$index i32) + (local $$index399 i32) + (local $$index568 i32) + (local $$neg i32) + (local $$neg139 i32) + (local $$neg300 i32) + (local $$neg409 i32) + (local $$next4$i i32) + (local $$or i32) + (local $$or247 i32) + (local $$or259 i32) + (local $$or480 i32) + (local $$or496 i32) + (local $$or516 i32) + (local $$or578 i32) + (local $$p$1 i32) + (local $$parent i32) + (local $$parent170 i32) + (local $$parent183 i32) + (local $$parent199 i32) + (local $$parent331 i32) + (local $$parent442 i32) + (local $$parent455 i32) + (local $$parent471 i32) + (local $$parent579 i32) + (local $$parent610 i32) + (local $$parent635 i32) + (local $$psize$1 i32) + (local $$psize$2 i32) + (local $$shl i32) + (local $$shl138 i32) + (local $$shl278 i32) + (local $$shl299 i32) + (local $$shl408 i32) + (local $$shl45 i32) + (local $$shl508 i32) + (local $$shl511 i32) + (local $$shl546 i32) + (local $$shl551 i32) + (local $$shl557 i32) + (local $$shl560 i32) + (local $$shl573 i32) + (local $$shl590 i32) + (local $$shl600 i32) + (local $$shr i32) + (local $$shr268 i32) + (local $$shr501 i32) + (local $$shr535 i32) + (local $$shr544 i32) + (local $$shr548 i32) + (local $$shr553 i32) + (local $$shr558 i32) + (local $$shr562 i32) + (local $$shr586 i32) + (local $$shr597 i32) + (local $$sp$0$i i32) + (local $$sp$0$in$i i32) + (local $$sub i32) + (local $$sub547 i32) + (local $$sub552 i32) + (local $$sub556 i32) + (local $$sub589 i32) + (local $$tobool233 i32) + (local $$tobool241 i32) + (local $$tobool513 i32) + (local $$tobool575 i32) + (local $$tobool9 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$mem) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (return) + ) + (local.set $$add$ptr + (i32.add + (local.get $$mem) + (i32.const -8) + ) + ) + (local.set $$0 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp1 + (i32.lt_u + (local.get $$add$ptr) + (local.get $$0) + ) + ) + (if + (local.get $$cmp1) + (call $_abort) + ) + (local.set $$head + (i32.add + (local.get $$mem) + (i32.const -4) + ) + ) + (local.set $$1 + (i32.load + (local.get $$head) + ) + ) + (local.set $$and + (i32.and + (local.get $$1) + (i32.const 3) + ) + ) + (local.set $$cmp2 + (i32.eq + (local.get $$and) + (i32.const 1) + ) + ) + (if + (local.get $$cmp2) + (call $_abort) + ) + (local.set $$and5 + (i32.and + (local.get $$1) + (i32.const -8) + ) + ) + (local.set $$add$ptr6 + (i32.add + (local.get $$add$ptr) + (local.get $$and5) + ) + ) + (local.set $$and8 + (i32.and + (local.get $$1) + (i32.const 1) + ) + ) + (local.set $$tobool9 + (i32.eq + (local.get $$and8) + (i32.const 0) + ) + ) + (block $label$break$L10 + (if + (local.get $$tobool9) + (block + (local.set $$2 + (i32.load + (local.get $$add$ptr) + ) + ) + (local.set $$cmp13 + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (if + (local.get $$cmp13) + (return) + ) + (local.set $$idx$neg + (i32.sub + (i32.const 0) + (local.get $$2) + ) + ) + (local.set $$add$ptr16 + (i32.add + (local.get $$add$ptr) + (local.get $$idx$neg) + ) + ) + (local.set $$add17 + (i32.add + (local.get $$2) + (local.get $$and5) + ) + ) + (local.set $$cmp18 + (i32.lt_u + (local.get $$add$ptr16) + (local.get $$0) + ) + ) + (if + (local.get $$cmp18) + (call $_abort) + ) + (local.set $$3 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp22 + (i32.eq + (local.get $$3) + (local.get $$add$ptr16) + ) + ) + (if + (local.get $$cmp22) + (block + (local.set $$head209 + (i32.add + (local.get $$add$ptr6) + (i32.const 4) + ) + ) + (local.set $$27 + (i32.load + (local.get $$head209) + ) + ) + (local.set $$and210 + (i32.and + (local.get $$27) + (i32.const 3) + ) + ) + (local.set $$cmp211 + (i32.eq + (local.get $$and210) + (i32.const 3) + ) + ) + (if + (i32.eqz + (local.get $$cmp211) + ) + (block + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + ) + (local.set $$add$ptr217 + (i32.add + (local.get $$add$ptr16) + (local.get $$add17) + ) + ) + (local.set $$head216 + (i32.add + (local.get $$add$ptr16) + (i32.const 4) + ) + ) + (local.set $$or + (i32.or + (local.get $$add17) + (i32.const 1) + ) + ) + (local.set $$and215 + (i32.and + (local.get $$27) + (i32.const -2) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$add17) + ) + (i32.store + (local.get $$head209) + (local.get $$and215) + ) + (i32.store + (local.get $$head216) + (local.get $$or) + ) + (i32.store + (local.get $$add$ptr217) + (local.get $$add17) + ) + (return) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$2) + (i32.const 3) + ) + ) + (local.set $$cmp25 + (i32.lt_u + (local.get $$2) + (i32.const 256) + ) + ) + (if + (local.get $$cmp25) + (block + (local.set $$fd + (i32.add + (local.get $$add$ptr16) + (i32.const 8) + ) + ) + (local.set $$4 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$bk + (i32.add + (local.get $$add$ptr16) + (i32.const 12) + ) + ) + (local.set $$5 + (i32.load + (local.get $$bk) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr) + (i32.const 1) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl) + (i32.const 2) + ) + ) + ) + (local.set $$cmp29 + (i32.eq + (local.get $$4) + (local.get $$arrayidx) + ) + ) + (if + (i32.eqz + (local.get $$cmp29) + ) + (block + (local.set $$cmp31 + (i32.gt_u + (local.get $$0) + (local.get $$4) + ) + ) + (if + (local.get $$cmp31) + (call $_abort) + ) + (local.set $$bk34 + (i32.add + (local.get $$4) + (i32.const 12) + ) + ) + (local.set $$6 + (i32.load + (local.get $$bk34) + ) + ) + (local.set $$cmp35 + (i32.eq + (local.get $$6) + (local.get $$add$ptr16) + ) + ) + (if + (i32.eqz + (local.get $$cmp35) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp42 + (i32.eq + (local.get $$5) + (local.get $$4) + ) + ) + (if + (local.get $$cmp42) + (block + (local.set $$shl45 + (i32.shl + (i32.const 1) + (local.get $$shr) + ) + ) + (local.set $$neg + (i32.xor + (local.get $$shl45) + (i32.const -1) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and46 + (i32.and + (local.get $$7) + (local.get $$neg) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and46) + ) + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + ) + (local.set $$cmp50 + (i32.eq + (local.get $$5) + (local.get $$arrayidx) + ) + ) + (if + (local.get $$cmp50) + (block + (local.set $$$pre317 + (i32.add + (local.get $$5) + (i32.const 8) + ) + ) + (local.set $$fd67$pre$phiZ2D + (local.get $$$pre317) + ) + ) + (block + (local.set $$cmp53 + (i32.gt_u + (local.get $$0) + (local.get $$5) + ) + ) + (if + (local.get $$cmp53) + (call $_abort) + ) + (local.set $$fd56 + (i32.add + (local.get $$5) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.load + (local.get $$fd56) + ) + ) + (local.set $$cmp57 + (i32.eq + (local.get $$8) + (local.get $$add$ptr16) + ) + ) + (if + (local.get $$cmp57) + (local.set $$fd67$pre$phiZ2D + (local.get $$fd56) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk66 + (i32.add + (local.get $$4) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk66) + (local.get $$5) + ) + (i32.store + (local.get $$fd67$pre$phiZ2D) + (local.get $$4) + ) + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + ) + (local.set $$parent + (i32.add + (local.get $$add$ptr16) + (i32.const 24) + ) + ) + (local.set $$9 + (i32.load + (local.get $$parent) + ) + ) + (local.set $$bk73 + (i32.add + (local.get $$add$ptr16) + (i32.const 12) + ) + ) + (local.set $$10 + (i32.load + (local.get $$bk73) + ) + ) + (local.set $$cmp74 + (i32.eq + (local.get $$10) + (local.get $$add$ptr16) + ) + ) + (block $do-once + (if + (local.get $$cmp74) + (block + (local.set $$child + (i32.add + (local.get $$add$ptr16) + (i32.const 16) + ) + ) + (local.set $$arrayidx99 + (i32.add + (local.get $$child) + (i32.const 4) + ) + ) + (local.set $$14 + (i32.load + (local.get $$arrayidx99) + ) + ) + (local.set $$cmp100 + (i32.eq + (local.get $$14) + (i32.const 0) + ) + ) + (if + (local.get $$cmp100) + (block + (local.set $$15 + (i32.load + (local.get $$child) + ) + ) + (local.set $$cmp104 + (i32.eq + (local.get $$15) + (i32.const 0) + ) + ) + (if + (local.get $$cmp104) + (block + (local.set $$R$3 + (i32.const 0) + ) + (br $do-once) + ) + (block + (local.set $$R$1$ph + (local.get $$15) + ) + (local.set $$RP$1$ph + (local.get $$child) + ) + ) + ) + ) + (block + (local.set $$R$1$ph + (local.get $$14) + ) + (local.set $$RP$1$ph + (local.get $$arrayidx99) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$ph) + ) + (local.set $$RP$1 + (local.get $$RP$1$ph) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx108 + (i32.add + (local.get $$R$1) + (i32.const 20) + ) + ) + (local.set $$16 + (i32.load + (local.get $$arrayidx108) + ) + ) + (local.set $$cmp109 + (i32.eq + (local.get $$16) + (i32.const 0) + ) + ) + (if + (local.get $$cmp109) + (block + (local.set $$arrayidx113 + (i32.add + (local.get $$R$1) + (i32.const 16) + ) + ) + (local.set $$17 + (i32.load + (local.get $$arrayidx113) + ) + ) + (local.set $$cmp114 + (i32.eq + (local.get $$17) + (i32.const 0) + ) + ) + (if + (local.get $$cmp114) + (br $while-out) + (block + (local.set $$R$1$be + (local.get $$17) + ) + (local.set $$RP$1$be + (local.get $$arrayidx113) + ) + ) + ) + ) + (block + (local.set $$R$1$be + (local.get $$16) + ) + (local.set $$RP$1$be + (local.get $$arrayidx108) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$be) + ) + (local.set $$RP$1 + (local.get $$RP$1$be) + ) + (br $while-in) + ) + ) + (local.set $$cmp118 + (i32.gt_u + (local.get $$0) + (local.get $$RP$1) + ) + ) + (if + (local.get $$cmp118) + (call $_abort) + (block + (i32.store + (local.get $$RP$1) + (i32.const 0) + ) + (local.set $$R$3 + (local.get $$R$1) + ) + (br $do-once) + ) + ) + ) + (block + (local.set $$fd78 + (i32.add + (local.get $$add$ptr16) + (i32.const 8) + ) + ) + (local.set $$11 + (i32.load + (local.get $$fd78) + ) + ) + (local.set $$cmp80 + (i32.gt_u + (local.get $$0) + (local.get $$11) + ) + ) + (if + (local.get $$cmp80) + (call $_abort) + ) + (local.set $$bk82 + (i32.add + (local.get $$11) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$bk82) + ) + ) + (local.set $$cmp83 + (i32.eq + (local.get $$12) + (local.get $$add$ptr16) + ) + ) + (if + (i32.eqz + (local.get $$cmp83) + ) + (call $_abort) + ) + (local.set $$fd86 + (i32.add + (local.get $$10) + (i32.const 8) + ) + ) + (local.set $$13 + (i32.load + (local.get $$fd86) + ) + ) + (local.set $$cmp87 + (i32.eq + (local.get $$13) + (local.get $$add$ptr16) + ) + ) + (if + (local.get $$cmp87) + (block + (i32.store + (local.get $$bk82) + (local.get $$10) + ) + (i32.store + (local.get $$fd86) + (local.get $$11) + ) + (local.set $$R$3 + (local.get $$10) + ) + (br $do-once) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp127 + (i32.eq + (local.get $$9) + (i32.const 0) + ) + ) + (if + (local.get $$cmp127) + (block + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + ) + (block + (local.set $$index + (i32.add + (local.get $$add$ptr16) + (i32.const 28) + ) + ) + (local.set $$18 + (i32.load + (local.get $$index) + ) + ) + (local.set $$arrayidx130 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$18) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx130) + ) + ) + (local.set $$cmp131 + (i32.eq + (local.get $$19) + (local.get $$add$ptr16) + ) + ) + (block $do-once1 + (if + (local.get $$cmp131) + (block + (i32.store + (local.get $$arrayidx130) + (local.get $$R$3) + ) + (local.set $$cond292 + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cond292) + (block + (local.set $$shl138 + (i32.shl + (i32.const 1) + (local.get $$18) + ) + ) + (local.set $$neg139 + (i32.xor + (local.get $$shl138) + (i32.const -1) + ) + ) + (local.set $$20 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and140 + (i32.and + (local.get $$20) + (local.get $$neg139) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and140) + ) + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + ) + ) + (block + (local.set $$21 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp143 + (i32.gt_u + (local.get $$21) + (local.get $$9) + ) + ) + (if + (local.get $$cmp143) + (call $_abort) + (block + (local.set $$arrayidx149 + (i32.add + (local.get $$9) + (i32.const 16) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx149) + ) + ) + (local.set $$cmp150 + (i32.eq + (local.get $$22) + (local.get $$add$ptr16) + ) + ) + (local.set $$arrayidx157 + (i32.add + (local.get $$9) + (i32.const 20) + ) + ) + (local.set $$arrayidx157$sink + (if (result i32) + (local.get $$cmp150) + (local.get $$arrayidx149) + (local.get $$arrayidx157) + ) + ) + (i32.store + (local.get $$arrayidx157$sink) + (local.get $$R$3) + ) + (local.set $$cmp162 + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp162) + (block + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + (br $do-once1) + ) + ) + ) + ) + ) + ) + (local.set $$23 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp165 + (i32.gt_u + (local.get $$23) + (local.get $$R$3) + ) + ) + (if + (local.get $$cmp165) + (call $_abort) + ) + (local.set $$parent170 + (i32.add + (local.get $$R$3) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent170) + (local.get $$9) + ) + (local.set $$child171 + (i32.add + (local.get $$add$ptr16) + (i32.const 16) + ) + ) + (local.set $$24 + (i32.load + (local.get $$child171) + ) + ) + (local.set $$cmp173 + (i32.eq + (local.get $$24) + (i32.const 0) + ) + ) + (block $do-once3 + (if + (i32.eqz + (local.get $$cmp173) + ) + (block + (local.set $$cmp176 + (i32.gt_u + (local.get $$23) + (local.get $$24) + ) + ) + (if + (local.get $$cmp176) + (call $_abort) + (block + (local.set $$arrayidx182 + (i32.add + (local.get $$R$3) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx182) + (local.get $$24) + ) + (local.set $$parent183 + (i32.add + (local.get $$24) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent183) + (local.get $$R$3) + ) + (br $do-once3) + ) + ) + ) + ) + ) + (local.set $$arrayidx188 + (i32.add + (local.get $$child171) + (i32.const 4) + ) + ) + (local.set $$25 + (i32.load + (local.get $$arrayidx188) + ) + ) + (local.set $$cmp189 + (i32.eq + (local.get $$25) + (i32.const 0) + ) + ) + (if + (local.get $$cmp189) + (block + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + ) + (block + (local.set $$26 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp192 + (i32.gt_u + (local.get $$26) + (local.get $$25) + ) + ) + (if + (local.get $$cmp192) + (call $_abort) + (block + (local.set $$arrayidx198 + (i32.add + (local.get $$R$3) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx198) + (local.get $$25) + ) + (local.set $$parent199 + (i32.add + (local.get $$25) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent199) + (local.get $$R$3) + ) + (local.set $$28 + (local.get $$add$ptr16) + ) + (local.set $$p$1 + (local.get $$add$ptr16) + ) + (local.set $$psize$1 + (local.get $$add17) + ) + (br $label$break$L10) + ) + ) + ) + ) + ) + ) + ) + (block + (local.set $$28 + (local.get $$add$ptr) + ) + (local.set $$p$1 + (local.get $$add$ptr) + ) + (local.set $$psize$1 + (local.get $$and5) + ) + ) + ) + ) + (local.set $$cmp228 + (i32.lt_u + (local.get $$28) + (local.get $$add$ptr6) + ) + ) + (if + (i32.eqz + (local.get $$cmp228) + ) + (call $_abort) + ) + (local.set $$head231 + (i32.add + (local.get $$add$ptr6) + (i32.const 4) + ) + ) + (local.set $$29 + (i32.load + (local.get $$head231) + ) + ) + (local.set $$and232 + (i32.and + (local.get $$29) + (i32.const 1) + ) + ) + (local.set $$tobool233 + (i32.eq + (local.get $$and232) + (i32.const 0) + ) + ) + (if + (local.get $$tobool233) + (call $_abort) + ) + (local.set $$and240 + (i32.and + (local.get $$29) + (i32.const 2) + ) + ) + (local.set $$tobool241 + (i32.eq + (local.get $$and240) + (i32.const 0) + ) + ) + (if + (local.get $$tobool241) + (block + (local.set $$30 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$cmp243 + (i32.eq + (local.get $$30) + (local.get $$add$ptr6) + ) + ) + (if + (local.get $$cmp243) + (block + (local.set $$31 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$add246 + (i32.add + (local.get $$31) + (local.get $$psize$1) + ) + ) + (i32.store + (i32.const 29416) + (local.get $$add246) + ) + (i32.store + (i32.const 29428) + (local.get $$p$1) + ) + (local.set $$or247 + (i32.or + (local.get $$add246) + (i32.const 1) + ) + ) + (local.set $$head248 + (i32.add + (local.get $$p$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head248) + (local.get $$or247) + ) + (local.set $$32 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp249 + (i32.eq + (local.get $$p$1) + (local.get $$32) + ) + ) + (if + (i32.eqz + (local.get $$cmp249) + ) + (return) + ) + (i32.store + (i32.const 29424) + (i32.const 0) + ) + (i32.store + (i32.const 29412) + (i32.const 0) + ) + (return) + ) + ) + (local.set $$33 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp255 + (i32.eq + (local.get $$33) + (local.get $$add$ptr6) + ) + ) + (if + (local.get $$cmp255) + (block + (local.set $$34 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$add258 + (i32.add + (local.get $$34) + (local.get $$psize$1) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$add258) + ) + (i32.store + (i32.const 29424) + (local.get $$28) + ) + (local.set $$or259 + (i32.or + (local.get $$add258) + (i32.const 1) + ) + ) + (local.set $$head260 + (i32.add + (local.get $$p$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head260) + (local.get $$or259) + ) + (local.set $$add$ptr261 + (i32.add + (local.get $$28) + (local.get $$add258) + ) + ) + (i32.store + (local.get $$add$ptr261) + (local.get $$add258) + ) + (return) + ) + ) + (local.set $$and266 + (i32.and + (local.get $$29) + (i32.const -8) + ) + ) + (local.set $$add267 + (i32.add + (local.get $$and266) + (local.get $$psize$1) + ) + ) + (local.set $$shr268 + (i32.shr_u + (local.get $$29) + (i32.const 3) + ) + ) + (local.set $$cmp269 + (i32.lt_u + (local.get $$29) + (i32.const 256) + ) + ) + (block $label$break$L111 + (if + (local.get $$cmp269) + (block + (local.set $$fd273 + (i32.add + (local.get $$add$ptr6) + (i32.const 8) + ) + ) + (local.set $$35 + (i32.load + (local.get $$fd273) + ) + ) + (local.set $$bk275 + (i32.add + (local.get $$add$ptr6) + (i32.const 12) + ) + ) + (local.set $$36 + (i32.load + (local.get $$bk275) + ) + ) + (local.set $$shl278 + (i32.shl + (local.get $$shr268) + (i32.const 1) + ) + ) + (local.set $$arrayidx279 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl278) + (i32.const 2) + ) + ) + ) + (local.set $$cmp280 + (i32.eq + (local.get $$35) + (local.get $$arrayidx279) + ) + ) + (if + (i32.eqz + (local.get $$cmp280) + ) + (block + (local.set $$37 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp283 + (i32.gt_u + (local.get $$37) + (local.get $$35) + ) + ) + (if + (local.get $$cmp283) + (call $_abort) + ) + (local.set $$bk286 + (i32.add + (local.get $$35) + (i32.const 12) + ) + ) + (local.set $$38 + (i32.load + (local.get $$bk286) + ) + ) + (local.set $$cmp287 + (i32.eq + (local.get $$38) + (local.get $$add$ptr6) + ) + ) + (if + (i32.eqz + (local.get $$cmp287) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp296 + (i32.eq + (local.get $$36) + (local.get $$35) + ) + ) + (if + (local.get $$cmp296) + (block + (local.set $$shl299 + (i32.shl + (i32.const 1) + (local.get $$shr268) + ) + ) + (local.set $$neg300 + (i32.xor + (local.get $$shl299) + (i32.const -1) + ) + ) + (local.set $$39 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and301 + (i32.and + (local.get $$39) + (local.get $$neg300) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and301) + ) + (br $label$break$L111) + ) + ) + (local.set $$cmp305 + (i32.eq + (local.get $$36) + (local.get $$arrayidx279) + ) + ) + (if + (local.get $$cmp305) + (block + (local.set $$$pre316 + (i32.add + (local.get $$36) + (i32.const 8) + ) + ) + (local.set $$fd322$pre$phiZ2D + (local.get $$$pre316) + ) + ) + (block + (local.set $$40 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp308 + (i32.gt_u + (local.get $$40) + (local.get $$36) + ) + ) + (if + (local.get $$cmp308) + (call $_abort) + ) + (local.set $$fd311 + (i32.add + (local.get $$36) + (i32.const 8) + ) + ) + (local.set $$41 + (i32.load + (local.get $$fd311) + ) + ) + (local.set $$cmp312 + (i32.eq + (local.get $$41) + (local.get $$add$ptr6) + ) + ) + (if + (local.get $$cmp312) + (local.set $$fd322$pre$phiZ2D + (local.get $$fd311) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk321 + (i32.add + (local.get $$35) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk321) + (local.get $$36) + ) + (i32.store + (local.get $$fd322$pre$phiZ2D) + (local.get $$35) + ) + ) + (block + (local.set $$parent331 + (i32.add + (local.get $$add$ptr6) + (i32.const 24) + ) + ) + (local.set $$42 + (i32.load + (local.get $$parent331) + ) + ) + (local.set $$bk333 + (i32.add + (local.get $$add$ptr6) + (i32.const 12) + ) + ) + (local.set $$43 + (i32.load + (local.get $$bk333) + ) + ) + (local.set $$cmp334 + (i32.eq + (local.get $$43) + (local.get $$add$ptr6) + ) + ) + (block $do-once6 + (if + (local.get $$cmp334) + (block + (local.set $$child361 + (i32.add + (local.get $$add$ptr6) + (i32.const 16) + ) + ) + (local.set $$arrayidx362 + (i32.add + (local.get $$child361) + (i32.const 4) + ) + ) + (local.set $$48 + (i32.load + (local.get $$arrayidx362) + ) + ) + (local.set $$cmp363 + (i32.eq + (local.get $$48) + (i32.const 0) + ) + ) + (if + (local.get $$cmp363) + (block + (local.set $$49 + (i32.load + (local.get $$child361) + ) + ) + (local.set $$cmp368 + (i32.eq + (local.get $$49) + (i32.const 0) + ) + ) + (if + (local.get $$cmp368) + (block + (local.set $$R332$3 + (i32.const 0) + ) + (br $do-once6) + ) + (block + (local.set $$R332$1$ph + (local.get $$49) + ) + (local.set $$RP360$1$ph + (local.get $$child361) + ) + ) + ) + ) + (block + (local.set $$R332$1$ph + (local.get $$48) + ) + (local.set $$RP360$1$ph + (local.get $$arrayidx362) + ) + ) + ) + (local.set $$R332$1 + (local.get $$R332$1$ph) + ) + (local.set $$RP360$1 + (local.get $$RP360$1$ph) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$arrayidx374 + (i32.add + (local.get $$R332$1) + (i32.const 20) + ) + ) + (local.set $$50 + (i32.load + (local.get $$arrayidx374) + ) + ) + (local.set $$cmp375 + (i32.eq + (local.get $$50) + (i32.const 0) + ) + ) + (if + (local.get $$cmp375) + (block + (local.set $$arrayidx379 + (i32.add + (local.get $$R332$1) + (i32.const 16) + ) + ) + (local.set $$51 + (i32.load + (local.get $$arrayidx379) + ) + ) + (local.set $$cmp380 + (i32.eq + (local.get $$51) + (i32.const 0) + ) + ) + (if + (local.get $$cmp380) + (br $while-out8) + (block + (local.set $$R332$1$be + (local.get $$51) + ) + (local.set $$RP360$1$be + (local.get $$arrayidx379) + ) + ) + ) + ) + (block + (local.set $$R332$1$be + (local.get $$50) + ) + (local.set $$RP360$1$be + (local.get $$arrayidx374) + ) + ) + ) + (local.set $$R332$1 + (local.get $$R332$1$be) + ) + (local.set $$RP360$1 + (local.get $$RP360$1$be) + ) + (br $while-in9) + ) + ) + (local.set $$52 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp386 + (i32.gt_u + (local.get $$52) + (local.get $$RP360$1) + ) + ) + (if + (local.get $$cmp386) + (call $_abort) + (block + (i32.store + (local.get $$RP360$1) + (i32.const 0) + ) + (local.set $$R332$3 + (local.get $$R332$1) + ) + (br $do-once6) + ) + ) + ) + (block + (local.set $$fd338 + (i32.add + (local.get $$add$ptr6) + (i32.const 8) + ) + ) + (local.set $$44 + (i32.load + (local.get $$fd338) + ) + ) + (local.set $$45 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp340 + (i32.gt_u + (local.get $$45) + (local.get $$44) + ) + ) + (if + (local.get $$cmp340) + (call $_abort) + ) + (local.set $$bk343 + (i32.add + (local.get $$44) + (i32.const 12) + ) + ) + (local.set $$46 + (i32.load + (local.get $$bk343) + ) + ) + (local.set $$cmp344 + (i32.eq + (local.get $$46) + (local.get $$add$ptr6) + ) + ) + (if + (i32.eqz + (local.get $$cmp344) + ) + (call $_abort) + ) + (local.set $$fd347 + (i32.add + (local.get $$43) + (i32.const 8) + ) + ) + (local.set $$47 + (i32.load + (local.get $$fd347) + ) + ) + (local.set $$cmp348 + (i32.eq + (local.get $$47) + (local.get $$add$ptr6) + ) + ) + (if + (local.get $$cmp348) + (block + (i32.store + (local.get $$bk343) + (local.get $$43) + ) + (i32.store + (local.get $$fd347) + (local.get $$44) + ) + (local.set $$R332$3 + (local.get $$43) + ) + (br $do-once6) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp395 + (i32.eq + (local.get $$42) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp395) + ) + (block + (local.set $$index399 + (i32.add + (local.get $$add$ptr6) + (i32.const 28) + ) + ) + (local.set $$53 + (i32.load + (local.get $$index399) + ) + ) + (local.set $$arrayidx400 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$53) + (i32.const 2) + ) + ) + ) + (local.set $$54 + (i32.load + (local.get $$arrayidx400) + ) + ) + (local.set $$cmp401 + (i32.eq + (local.get $$54) + (local.get $$add$ptr6) + ) + ) + (block $do-once10 + (if + (local.get $$cmp401) + (block + (i32.store + (local.get $$arrayidx400) + (local.get $$R332$3) + ) + (local.set $$cond293 + (i32.eq + (local.get $$R332$3) + (i32.const 0) + ) + ) + (if + (local.get $$cond293) + (block + (local.set $$shl408 + (i32.shl + (i32.const 1) + (local.get $$53) + ) + ) + (local.set $$neg409 + (i32.xor + (local.get $$shl408) + (i32.const -1) + ) + ) + (local.set $$55 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and410 + (i32.and + (local.get $$55) + (local.get $$neg409) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and410) + ) + (br $label$break$L111) + ) + ) + ) + (block + (local.set $$56 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp413 + (i32.gt_u + (local.get $$56) + (local.get $$42) + ) + ) + (if + (local.get $$cmp413) + (call $_abort) + (block + (local.set $$arrayidx419 + (i32.add + (local.get $$42) + (i32.const 16) + ) + ) + (local.set $$57 + (i32.load + (local.get $$arrayidx419) + ) + ) + (local.set $$cmp420 + (i32.eq + (local.get $$57) + (local.get $$add$ptr6) + ) + ) + (local.set $$arrayidx427 + (i32.add + (local.get $$42) + (i32.const 20) + ) + ) + (local.set $$arrayidx427$sink + (if (result i32) + (local.get $$cmp420) + (local.get $$arrayidx419) + (local.get $$arrayidx427) + ) + ) + (i32.store + (local.get $$arrayidx427$sink) + (local.get $$R332$3) + ) + (local.set $$cmp432 + (i32.eq + (local.get $$R332$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp432) + (br $label$break$L111) + (br $do-once10) + ) + ) + ) + ) + ) + ) + (local.set $$58 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp435 + (i32.gt_u + (local.get $$58) + (local.get $$R332$3) + ) + ) + (if + (local.get $$cmp435) + (call $_abort) + ) + (local.set $$parent442 + (i32.add + (local.get $$R332$3) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent442) + (local.get $$42) + ) + (local.set $$child443 + (i32.add + (local.get $$add$ptr6) + (i32.const 16) + ) + ) + (local.set $$59 + (i32.load + (local.get $$child443) + ) + ) + (local.set $$cmp445 + (i32.eq + (local.get $$59) + (i32.const 0) + ) + ) + (block $do-once12 + (if + (i32.eqz + (local.get $$cmp445) + ) + (block + (local.set $$cmp448 + (i32.gt_u + (local.get $$58) + (local.get $$59) + ) + ) + (if + (local.get $$cmp448) + (call $_abort) + (block + (local.set $$arrayidx454 + (i32.add + (local.get $$R332$3) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx454) + (local.get $$59) + ) + (local.set $$parent455 + (i32.add + (local.get $$59) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent455) + (local.get $$R332$3) + ) + (br $do-once12) + ) + ) + ) + ) + ) + (local.set $$arrayidx460 + (i32.add + (local.get $$child443) + (i32.const 4) + ) + ) + (local.set $$60 + (i32.load + (local.get $$arrayidx460) + ) + ) + (local.set $$cmp461 + (i32.eq + (local.get $$60) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp461) + ) + (block + (local.set $$61 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp464 + (i32.gt_u + (local.get $$61) + (local.get $$60) + ) + ) + (if + (local.get $$cmp464) + (call $_abort) + (block + (local.set $$arrayidx470 + (i32.add + (local.get $$R332$3) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx470) + (local.get $$60) + ) + (local.set $$parent471 + (i32.add + (local.get $$60) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent471) + (local.get $$R332$3) + ) + (br $label$break$L111) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$or480 + (i32.or + (local.get $$add267) + (i32.const 1) + ) + ) + (local.set $$head481 + (i32.add + (local.get $$p$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head481) + (local.get $$or480) + ) + (local.set $$add$ptr482 + (i32.add + (local.get $$28) + (local.get $$add267) + ) + ) + (i32.store + (local.get $$add$ptr482) + (local.get $$add267) + ) + (local.set $$62 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp484 + (i32.eq + (local.get $$p$1) + (local.get $$62) + ) + ) + (if + (local.get $$cmp484) + (block + (i32.store + (i32.const 29412) + (local.get $$add267) + ) + (return) + ) + (local.set $$psize$2 + (local.get $$add267) + ) + ) + ) + (block + (local.set $$and495 + (i32.and + (local.get $$29) + (i32.const -2) + ) + ) + (i32.store + (local.get $$head231) + (local.get $$and495) + ) + (local.set $$or496 + (i32.or + (local.get $$psize$1) + (i32.const 1) + ) + ) + (local.set $$head497 + (i32.add + (local.get $$p$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head497) + (local.get $$or496) + ) + (local.set $$add$ptr498 + (i32.add + (local.get $$28) + (local.get $$psize$1) + ) + ) + (i32.store + (local.get $$add$ptr498) + (local.get $$psize$1) + ) + (local.set $$psize$2 + (local.get $$psize$1) + ) + ) + ) + (local.set $$shr501 + (i32.shr_u + (local.get $$psize$2) + (i32.const 3) + ) + ) + (local.set $$cmp502 + (i32.lt_u + (local.get $$psize$2) + (i32.const 256) + ) + ) + (if + (local.get $$cmp502) + (block + (local.set $$shl508 + (i32.shl + (local.get $$shr501) + (i32.const 1) + ) + ) + (local.set $$arrayidx509 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl508) + (i32.const 2) + ) + ) + ) + (local.set $$63 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shl511 + (i32.shl + (i32.const 1) + (local.get $$shr501) + ) + ) + (local.set $$and512 + (i32.and + (local.get $$63) + (local.get $$shl511) + ) + ) + (local.set $$tobool513 + (i32.eq + (local.get $$and512) + (i32.const 0) + ) + ) + (if + (local.get $$tobool513) + (block + (local.set $$or516 + (i32.or + (local.get $$63) + (local.get $$shl511) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or516) + ) + (local.set $$$pre + (i32.add + (local.get $$arrayidx509) + (i32.const 8) + ) + ) + (local.set $$$pre$phiZ2D + (local.get $$$pre) + ) + (local.set $$F510$0 + (local.get $$arrayidx509) + ) + ) + (block + (local.set $$64 + (i32.add + (local.get $$arrayidx509) + (i32.const 8) + ) + ) + (local.set $$65 + (i32.load + (local.get $$64) + ) + ) + (local.set $$66 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp519 + (i32.gt_u + (local.get $$66) + (local.get $$65) + ) + ) + (if + (local.get $$cmp519) + (call $_abort) + (block + (local.set $$$pre$phiZ2D + (local.get $$64) + ) + (local.set $$F510$0 + (local.get $$65) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phiZ2D) + (local.get $$p$1) + ) + (local.set $$bk529 + (i32.add + (local.get $$F510$0) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk529) + (local.get $$p$1) + ) + (local.set $$fd530 + (i32.add + (local.get $$p$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd530) + (local.get $$F510$0) + ) + (local.set $$bk531 + (i32.add + (local.get $$p$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk531) + (local.get $$arrayidx509) + ) + (return) + ) + ) + (local.set $$shr535 + (i32.shr_u + (local.get $$psize$2) + (i32.const 8) + ) + ) + (local.set $$cmp536 + (i32.eq + (local.get $$shr535) + (i32.const 0) + ) + ) + (if + (local.get $$cmp536) + (local.set $$I534$0 + (i32.const 0) + ) + (block + (local.set $$cmp540 + (i32.gt_u + (local.get $$psize$2) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp540) + (local.set $$I534$0 + (i32.const 31) + ) + (block + (local.set $$sub + (i32.add + (local.get $$shr535) + (i32.const 1048320) + ) + ) + (local.set $$shr544 + (i32.shr_u + (local.get $$sub) + (i32.const 16) + ) + ) + (local.set $$and545 + (i32.and + (local.get $$shr544) + (i32.const 8) + ) + ) + (local.set $$shl546 + (i32.shl + (local.get $$shr535) + (local.get $$and545) + ) + ) + (local.set $$sub547 + (i32.add + (local.get $$shl546) + (i32.const 520192) + ) + ) + (local.set $$shr548 + (i32.shr_u + (local.get $$sub547) + (i32.const 16) + ) + ) + (local.set $$and549 + (i32.and + (local.get $$shr548) + (i32.const 4) + ) + ) + (local.set $$add550 + (i32.or + (local.get $$and549) + (local.get $$and545) + ) + ) + (local.set $$shl551 + (i32.shl + (local.get $$shl546) + (local.get $$and549) + ) + ) + (local.set $$sub552 + (i32.add + (local.get $$shl551) + (i32.const 245760) + ) + ) + (local.set $$shr553 + (i32.shr_u + (local.get $$sub552) + (i32.const 16) + ) + ) + (local.set $$and554 + (i32.and + (local.get $$shr553) + (i32.const 2) + ) + ) + (local.set $$add555 + (i32.or + (local.get $$add550) + (local.get $$and554) + ) + ) + (local.set $$sub556 + (i32.sub + (i32.const 14) + (local.get $$add555) + ) + ) + (local.set $$shl557 + (i32.shl + (local.get $$shl551) + (local.get $$and554) + ) + ) + (local.set $$shr558 + (i32.shr_u + (local.get $$shl557) + (i32.const 15) + ) + ) + (local.set $$add559 + (i32.add + (local.get $$sub556) + (local.get $$shr558) + ) + ) + (local.set $$shl560 + (i32.shl + (local.get $$add559) + (i32.const 1) + ) + ) + (local.set $$add561 + (i32.add + (local.get $$add559) + (i32.const 7) + ) + ) + (local.set $$shr562 + (i32.shr_u + (local.get $$psize$2) + (local.get $$add561) + ) + ) + (local.set $$and563 + (i32.and + (local.get $$shr562) + (i32.const 1) + ) + ) + (local.set $$add564 + (i32.or + (local.get $$and563) + (local.get $$shl560) + ) + ) + (local.set $$I534$0 + (local.get $$add564) + ) + ) + ) + ) + ) + (local.set $$arrayidx567 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$I534$0) + (i32.const 2) + ) + ) + ) + (local.set $$index568 + (i32.add + (local.get $$p$1) + (i32.const 28) + ) + ) + (i32.store + (local.get $$index568) + (local.get $$I534$0) + ) + (local.set $$child569 + (i32.add + (local.get $$p$1) + (i32.const 16) + ) + ) + (local.set $$arrayidx570 + (i32.add + (local.get $$p$1) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx570) + (i32.const 0) + ) + (i32.store + (local.get $$child569) + (i32.const 0) + ) + (local.set $$67 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$shl573 + (i32.shl + (i32.const 1) + (local.get $$I534$0) + ) + ) + (local.set $$and574 + (i32.and + (local.get $$67) + (local.get $$shl573) + ) + ) + (local.set $$tobool575 + (i32.eq + (local.get $$and574) + (i32.const 0) + ) + ) + (block $label$break$L197 + (if + (local.get $$tobool575) + (block + (local.set $$or578 + (i32.or + (local.get $$67) + (local.get $$shl573) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$or578) + ) + (i32.store + (local.get $$arrayidx567) + (local.get $$p$1) + ) + (local.set $$parent579 + (i32.add + (local.get $$p$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent579) + (local.get $$arrayidx567) + ) + (local.set $$bk580 + (i32.add + (local.get $$p$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk580) + (local.get $$p$1) + ) + (local.set $$fd581 + (i32.add + (local.get $$p$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd581) + (local.get $$p$1) + ) + ) + (block + (local.set $$68 + (i32.load + (local.get $$arrayidx567) + ) + ) + (local.set $$head591308 + (i32.add + (local.get $$68) + (i32.const 4) + ) + ) + (local.set $$69 + (i32.load + (local.get $$head591308) + ) + ) + (local.set $$and592309 + (i32.and + (local.get $$69) + (i32.const -8) + ) + ) + (local.set $$cmp593310 + (i32.eq + (local.get $$and592309) + (local.get $$psize$2) + ) + ) + (block $label$break$L200 + (if + (local.get $$cmp593310) + (local.set $$T$0$lcssa + (local.get $$68) + ) + (block + (local.set $$cmp584 + (i32.eq + (local.get $$I534$0) + (i32.const 31) + ) + ) + (local.set $$shr586 + (i32.shr_u + (local.get $$I534$0) + (i32.const 1) + ) + ) + (local.set $$sub589 + (i32.sub + (i32.const 25) + (local.get $$shr586) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp584) + (i32.const 0) + (local.get $$sub589) + ) + ) + (local.set $$shl590 + (i32.shl + (local.get $$psize$2) + (local.get $$cond) + ) + ) + (local.set $$K583$0312 + (local.get $$shl590) + ) + (local.set $$T$0311 + (local.get $$68) + ) + (loop $while-in17 + (block $while-out16 + (local.set $$shr597 + (i32.shr_u + (local.get $$K583$0312) + (i32.const 31) + ) + ) + (local.set $$arrayidx599 + (i32.add + (i32.add + (local.get $$T$0311) + (i32.const 16) + ) + (i32.shl + (local.get $$shr597) + (i32.const 2) + ) + ) + ) + (local.set $$70 + (i32.load + (local.get $$arrayidx599) + ) + ) + (local.set $$cmp601 + (i32.eq + (local.get $$70) + (i32.const 0) + ) + ) + (if + (local.get $$cmp601) + (br $while-out16) + ) + (local.set $$shl600 + (i32.shl + (local.get $$K583$0312) + (i32.const 1) + ) + ) + (local.set $$head591 + (i32.add + (local.get $$70) + (i32.const 4) + ) + ) + (local.set $$71 + (i32.load + (local.get $$head591) + ) + ) + (local.set $$and592 + (i32.and + (local.get $$71) + (i32.const -8) + ) + ) + (local.set $$cmp593 + (i32.eq + (local.get $$and592) + (local.get $$psize$2) + ) + ) + (if + (local.get $$cmp593) + (block + (local.set $$T$0$lcssa + (local.get $$70) + ) + (br $label$break$L200) + ) + (block + (local.set $$K583$0312 + (local.get $$shl600) + ) + (local.set $$T$0311 + (local.get $$70) + ) + ) + ) + (br $while-in17) + ) + ) + (local.set $$72 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp605 + (i32.gt_u + (local.get $$72) + (local.get $$arrayidx599) + ) + ) + (if + (local.get $$cmp605) + (call $_abort) + (block + (i32.store + (local.get $$arrayidx599) + (local.get $$p$1) + ) + (local.set $$parent610 + (i32.add + (local.get $$p$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent610) + (local.get $$T$0311) + ) + (local.set $$bk611 + (i32.add + (local.get $$p$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk611) + (local.get $$p$1) + ) + (local.set $$fd612 + (i32.add + (local.get $$p$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd612) + (local.get $$p$1) + ) + (br $label$break$L197) + ) + ) + ) + ) + ) + (local.set $$fd620 + (i32.add + (local.get $$T$0$lcssa) + (i32.const 8) + ) + ) + (local.set $$73 + (i32.load + (local.get $$fd620) + ) + ) + (local.set $$74 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp621 + (i32.le_u + (local.get $$74) + (local.get $$T$0$lcssa) + ) + ) + (local.set $$cmp624 + (i32.le_u + (local.get $$74) + (local.get $$73) + ) + ) + (local.set $$75 + (i32.and + (local.get $$cmp624) + (local.get $$cmp621) + ) + ) + (if + (local.get $$75) + (block + (local.set $$bk631 + (i32.add + (local.get $$73) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk631) + (local.get $$p$1) + ) + (i32.store + (local.get $$fd620) + (local.get $$p$1) + ) + (local.set $$fd633 + (i32.add + (local.get $$p$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd633) + (local.get $$73) + ) + (local.set $$bk634 + (i32.add + (local.get $$p$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk634) + (local.get $$T$0$lcssa) + ) + (local.set $$parent635 + (i32.add + (local.get $$p$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent635) + (i32.const 0) + ) + (br $label$break$L197) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$76 + (i32.load + (i32.const 29436) + ) + ) + (local.set $$dec + (i32.add + (local.get $$76) + (i32.const -1) + ) + ) + (i32.store + (i32.const 29436) + (local.get $$dec) + ) + (local.set $$cmp640 + (i32.eq + (local.get $$dec) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp640) + ) + (return) + ) + (local.set $$sp$0$in$i + (i32.const 29860) + ) + (loop $while-in19 + (block $while-out18 + (local.set $$sp$0$i + (i32.load + (local.get $$sp$0$in$i) + ) + ) + (local.set $$cmp$i + (i32.eq + (local.get $$sp$0$i) + (i32.const 0) + ) + ) + (local.set $$next4$i + (i32.add + (local.get $$sp$0$i) + (i32.const 8) + ) + ) + (if + (local.get $$cmp$i) + (br $while-out18) + (local.set $$sp$0$in$i + (local.get $$next4$i) + ) + ) + (br $while-in19) + ) + ) + (i32.store + (i32.const 29436) + (i32.const -1) + ) + (return) + ) + (func $_calloc (; 649 ;) (param $$n_elements i32) (param $$elem_size i32) (result i32) + (local $$0 i32) + (local $$and6 i32) + (local $$call i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp4 i32) + (local $$cmp7 i32) + (local $$div i32) + (local $$head i32) + (local $$mul i32) + (local $$or i32) + (local $$req$0 i32) + (local $$spec$select i32) + (local $$tobool i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$n_elements) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (local.set $$req$0 + (i32.const 0) + ) + (block + (local.set $$mul + (i32.mul + (local.get $$elem_size) + (local.get $$n_elements) + ) + ) + (local.set $$or + (i32.or + (local.get $$elem_size) + (local.get $$n_elements) + ) + ) + (local.set $$tobool + (i32.gt_u + (local.get $$or) + (i32.const 65535) + ) + ) + (if + (local.get $$tobool) + (block + (local.set $$div + (i32.and + (i32.div_u + (local.get $$mul) + (local.get $$n_elements) + ) + (i32.const -1) + ) + ) + (local.set $$cmp1 + (i32.eq + (local.get $$div) + (local.get $$elem_size) + ) + ) + (local.set $$spec$select + (if (result i32) + (local.get $$cmp1) + (local.get $$mul) + (i32.const -1) + ) + ) + (local.set $$req$0 + (local.get $$spec$select) + ) + ) + (local.set $$req$0 + (local.get $$mul) + ) + ) + ) + ) + (local.set $$call + (call $_malloc + (local.get $$req$0) + ) + ) + (local.set $$cmp4 + (i32.eq + (local.get $$call) + (i32.const 0) + ) + ) + (if + (local.get $$cmp4) + (return + (local.get $$call) + ) + ) + (local.set $$head + (i32.add + (local.get $$call) + (i32.const -4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$head) + ) + ) + (local.set $$and6 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$cmp7 + (i32.eq + (local.get $$and6) + (i32.const 0) + ) + ) + (if + (local.get $$cmp7) + (return + (local.get $$call) + ) + ) + (drop + (call $_memset + (local.get $$call) + (i32.const 0) + (local.get $$req$0) + ) + ) + (return + (local.get $$call) + ) + ) + (func $_realloc (; 650 ;) (param $$oldmem i32) (param $$bytes i32) (result i32) + (local $$0 i32) + (local $$add$ptr i32) + (local $$add$ptr10 i32) + (local $$add6 i32) + (local $$and i32) + (local $$and15 i32) + (local $$and17 i32) + (local $$call i32) + (local $$call12 i32) + (local $$call3 i32) + (local $$call7 i32) + (local $$cmp i32) + (local $$cmp1 i32) + (local $$cmp13 i32) + (local $$cmp18 i32) + (local $$cmp20 i32) + (local $$cmp5 i32) + (local $$cmp8 i32) + (local $$cond i32) + (local $$cond19 i32) + (local $$cond24 i32) + (local $$head i32) + (local $$mem$1 i32) + (local $$sub i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$cmp + (i32.eq + (local.get $$oldmem) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (block + (local.set $$call + (call $_malloc + (local.get $$bytes) + ) + ) + (local.set $$mem$1 + (local.get $$call) + ) + (return + (local.get $$mem$1) + ) + ) + ) + (local.set $$cmp1 + (i32.gt_u + (local.get $$bytes) + (i32.const -65) + ) + ) + (if + (local.get $$cmp1) + (block + (local.set $$call3 + (call $___errno_location) + ) + (i32.store + (local.get $$call3) + (i32.const 12) + ) + (local.set $$mem$1 + (i32.const 0) + ) + (return + (local.get $$mem$1) + ) + ) + ) + (local.set $$cmp5 + (i32.lt_u + (local.get $$bytes) + (i32.const 11) + ) + ) + (local.set $$add6 + (i32.add + (local.get $$bytes) + (i32.const 11) + ) + ) + (local.set $$and + (i32.and + (local.get $$add6) + (i32.const -8) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp5) + (i32.const 16) + (local.get $$and) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$oldmem) + (i32.const -8) + ) + ) + (local.set $$call7 + (call $_try_realloc_chunk + (local.get $$add$ptr) + (local.get $$cond) + ) + ) + (local.set $$cmp8 + (i32.eq + (local.get $$call7) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp8) + ) + (block + (local.set $$add$ptr10 + (i32.add + (local.get $$call7) + (i32.const 8) + ) + ) + (local.set $$mem$1 + (local.get $$add$ptr10) + ) + (return + (local.get $$mem$1) + ) + ) + ) + (local.set $$call12 + (call $_malloc + (local.get $$bytes) + ) + ) + (local.set $$cmp13 + (i32.eq + (local.get $$call12) + (i32.const 0) + ) + ) + (if + (local.get $$cmp13) + (block + (local.set $$mem$1 + (i32.const 0) + ) + (return + (local.get $$mem$1) + ) + ) + ) + (local.set $$head + (i32.add + (local.get $$oldmem) + (i32.const -4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$head) + ) + ) + (local.set $$and15 + (i32.and + (local.get $$0) + (i32.const -8) + ) + ) + (local.set $$and17 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$cmp18 + (i32.eq + (local.get $$and17) + (i32.const 0) + ) + ) + (local.set $$cond19 + (if (result i32) + (local.get $$cmp18) + (i32.const 8) + (i32.const 4) + ) + ) + (local.set $$sub + (i32.sub + (local.get $$and15) + (local.get $$cond19) + ) + ) + (local.set $$cmp20 + (i32.lt_u + (local.get $$sub) + (local.get $$bytes) + ) + ) + (local.set $$cond24 + (if (result i32) + (local.get $$cmp20) + (local.get $$sub) + (local.get $$bytes) + ) + ) + (drop + (call $_memcpy + (local.get $$call12) + (local.get $$oldmem) + (local.get $$cond24) + ) + ) + (call $_free + (local.get $$oldmem) + ) + (local.set $$mem$1 + (local.get $$call12) + ) + (return + (local.get $$mem$1) + ) + ) + (func $_try_realloc_chunk (; 651 ;) (param $$p i32) (param $$nb i32) (result i32) + (local $$$pre i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$4 i32) + (local $$5 i32) + (local $$6 i32) + (local $$7 i32) + (local $$8 i32) + (local $$9 i32) + (local $$R$1 i32) + (local $$R$1$be i32) + (local $$R$1$ph i32) + (local $$R$3 i32) + (local $$RP$1 i32) + (local $$RP$1$be i32) + (local $$RP$1$ph i32) + (local $$add i32) + (local $$add$i i32) + (local $$add$ptr i32) + (local $$add$ptr17 i32) + (local $$add$ptr298 i32) + (local $$add$ptr303 i32) + (local $$add$ptr317 i32) + (local $$add$ptr41 i32) + (local $$add$ptr66 i32) + (local $$add$ptr67 i32) + (local $$add$ptr91 i32) + (local $$add105 i32) + (local $$add58 i32) + (local $$and i32) + (local $$and100 i32) + (local $$and104 i32) + (local $$and128 i32) + (local $$and19 i32) + (local $$and2 i32) + (local $$and216 i32) + (local $$and294 i32) + (local $$and305 i32) + (local $$and43 i32) + (local $$and69 i32) + (local $$and7 i32) + (local $$and80 i32) + (local $$and87 i32) + (local $$arrayidx i32) + (local $$arrayidx179 i32) + (local $$arrayidx186 i32) + (local $$arrayidx190 i32) + (local $$arrayidx206 i32) + (local $$arrayidx226 i32) + (local $$arrayidx234 i32) + (local $$arrayidx234$sink i32) + (local $$arrayidx261 i32) + (local $$arrayidx267 i32) + (local $$arrayidx278 i32) + (local $$bk i32) + (local $$bk118 i32) + (local $$bk147 i32) + (local $$bk155 i32) + (local $$bk164 i32) + (local $$child i32) + (local $$child249 i32) + (local $$cmp i32) + (local $$cmp$i i32) + (local $$cmp1$i i32) + (local $$cmp106 i32) + (local $$cmp11 i32) + (local $$cmp111 i32) + (local $$cmp114 i32) + (local $$cmp116 i32) + (local $$cmp119 i32) + (local $$cmp125 i32) + (local $$cmp13 i32) + (local $$cmp133 i32) + (local $$cmp136 i32) + (local $$cmp139 i32) + (local $$cmp15 i32) + (local $$cmp156 i32) + (local $$cmp162 i32) + (local $$cmp165 i32) + (local $$cmp168 i32) + (local $$cmp180 i32) + (local $$cmp183 i32) + (local $$cmp187 i32) + (local $$cmp191 i32) + (local $$cmp195 i32) + (local $$cmp2$i i32) + (local $$cmp203 i32) + (local $$cmp207 i32) + (local $$cmp220 i32) + (local $$cmp227 i32) + (local $$cmp239 i32) + (local $$cmp243 i32) + (local $$cmp251 i32) + (local $$cmp255 i32) + (local $$cmp268 i32) + (local $$cmp272 i32) + (local $$cmp288 i32) + (local $$cmp3 i32) + (local $$cmp34 i32) + (local $$cmp36 i32) + (local $$cmp5 i32) + (local $$cmp56 i32) + (local $$cmp59 i32) + (local $$cmp63 i32) + (local $$cond i32) + (local $$fd i32) + (local $$fd138 i32) + (local $$fd148$pre$phiZ2D i32) + (local $$fd159 i32) + (local $$fd167 i32) + (local $$head i32) + (local $$head23 i32) + (local $$head299 i32) + (local $$head310 i32) + (local $$head318 i32) + (local $$head48 i32) + (local $$head6 i32) + (local $$head74 i32) + (local $$head79 i32) + (local $$head92 i32) + (local $$index i32) + (local $$neg i32) + (local $$neg215 i32) + (local $$newp$2 i32) + (local $$or i32) + (local $$or$cond$not i32) + (local $$or$cond4 i32) + (local $$or20 i32) + (local $$or28 i32) + (local $$or295 i32) + (local $$or296 i32) + (local $$or300 i32) + (local $$or306 i32) + (local $$or307 i32) + (local $$or315 i32) + (local $$or319 i32) + (local $$or32 i32) + (local $$or44 i32) + (local $$or45 i32) + (local $$or50 i32) + (local $$or70 i32) + (local $$or71 i32) + (local $$or76 i32) + (local $$or88 i32) + (local $$or89 i32) + (local $$or93 i32) + (local $$parent i32) + (local $$parent248 i32) + (local $$parent262 i32) + (local $$parent279 i32) + (local $$shl i32) + (local $$shl$i i32) + (local $$shl127 i32) + (local $$shl214 i32) + (local $$shr i32) + (local $$storemerge i32) + (local $$storemerge3 i32) + (local $$sub i32) + (local $$sub$i i32) + (local $$sub110 i32) + (local $$sub40 i32) + (local $$sub62 i32) + (local $$tobool i32) + (local $$tobool101 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$head + (i32.add + (local.get $$p) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$head) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const -8) + ) + ) + (local.set $$add$ptr + (i32.add + (local.get $$p) + (local.get $$and) + ) + ) + (local.set $$1 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp + (i32.le_u + (local.get $$1) + (local.get $$p) + ) + ) + (local.set $$and2 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$cmp3 + (i32.ne + (local.get $$and2) + (i32.const 1) + ) + ) + (local.set $$or$cond$not + (i32.and + (local.get $$cmp3) + (local.get $$cmp) + ) + ) + (local.set $$cmp5 + (i32.gt_u + (local.get $$add$ptr) + (local.get $$p) + ) + ) + (local.set $$or$cond4 + (i32.and + (local.get $$or$cond$not) + (local.get $$cmp5) + ) + ) + (if + (i32.eqz + (local.get $$or$cond4) + ) + (call $_abort) + ) + (local.set $$head6 + (i32.add + (local.get $$add$ptr) + (i32.const 4) + ) + ) + (local.set $$2 + (i32.load + (local.get $$head6) + ) + ) + (local.set $$and7 + (i32.and + (local.get $$2) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and7) + (i32.const 0) + ) + ) + (if + (local.get $$tobool) + (call $_abort) + ) + (local.set $$cmp11 + (i32.eq + (local.get $$and2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp11) + (block + (local.set $$cmp$i + (i32.lt_u + (local.get $$nb) + (i32.const 256) + ) + ) + (if + (local.get $$cmp$i) + (block + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$add$i + (i32.add + (local.get $$nb) + (i32.const 4) + ) + ) + (local.set $$cmp1$i + (i32.lt_u + (local.get $$and) + (local.get $$add$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp1$i) + ) + (block + (local.set $$sub$i + (i32.sub + (local.get $$and) + (local.get $$nb) + ) + ) + (local.set $$3 + (i32.load + (i32.const 29884) + ) + ) + (local.set $$shl$i + (i32.shl + (local.get $$3) + (i32.const 1) + ) + ) + (local.set $$cmp2$i + (i32.gt_u + (local.get $$sub$i) + (local.get $$shl$i) + ) + ) + (if + (i32.eqz + (local.get $$cmp2$i) + ) + (block + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + ) + ) + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$cmp13 + (i32.lt_u + (local.get $$and) + (local.get $$nb) + ) + ) + (if + (i32.eqz + (local.get $$cmp13) + ) + (block + (local.set $$sub + (i32.sub + (local.get $$and) + (local.get $$nb) + ) + ) + (local.set $$cmp15 + (i32.gt_u + (local.get $$sub) + (i32.const 15) + ) + ) + (if + (i32.eqz + (local.get $$cmp15) + ) + (block + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$add$ptr17 + (i32.add + (local.get $$p) + (local.get $$nb) + ) + ) + (local.set $$and19 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or + (i32.or + (local.get $$and19) + (local.get $$nb) + ) + ) + (local.set $$or20 + (i32.or + (local.get $$or) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or20) + ) + (local.set $$head23 + (i32.add + (local.get $$add$ptr17) + (i32.const 4) + ) + ) + (local.set $$or28 + (i32.or + (local.get $$sub) + (i32.const 3) + ) + ) + (i32.store + (local.get $$head23) + (local.get $$or28) + ) + (local.set $$4 + (i32.load + (local.get $$head6) + ) + ) + (local.set $$or32 + (i32.or + (local.get $$4) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head6) + (local.get $$or32) + ) + (call $_dispose_chunk + (local.get $$add$ptr17) + (local.get $$sub) + ) + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$5 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$cmp34 + (i32.eq + (local.get $$5) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp34) + (block + (local.set $$6 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$add + (i32.add + (local.get $$6) + (local.get $$and) + ) + ) + (local.set $$cmp36 + (i32.gt_u + (local.get $$add) + (local.get $$nb) + ) + ) + (local.set $$sub40 + (i32.sub + (local.get $$add) + (local.get $$nb) + ) + ) + (local.set $$add$ptr41 + (i32.add + (local.get $$p) + (local.get $$nb) + ) + ) + (if + (i32.eqz + (local.get $$cmp36) + ) + (block + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$or50 + (i32.or + (local.get $$sub40) + (i32.const 1) + ) + ) + (local.set $$head48 + (i32.add + (local.get $$add$ptr41) + (i32.const 4) + ) + ) + (local.set $$and43 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or44 + (i32.or + (local.get $$and43) + (local.get $$nb) + ) + ) + (local.set $$or45 + (i32.or + (local.get $$or44) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or45) + ) + (i32.store + (local.get $$head48) + (local.get $$or50) + ) + (i32.store + (i32.const 29428) + (local.get $$add$ptr41) + ) + (i32.store + (i32.const 29416) + (local.get $$sub40) + ) + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp56 + (i32.eq + (local.get $$7) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp56) + (block + (local.set $$8 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$add58 + (i32.add + (local.get $$8) + (local.get $$and) + ) + ) + (local.set $$cmp59 + (i32.lt_u + (local.get $$add58) + (local.get $$nb) + ) + ) + (if + (local.get $$cmp59) + (block + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$sub62 + (i32.sub + (local.get $$add58) + (local.get $$nb) + ) + ) + (local.set $$cmp63 + (i32.gt_u + (local.get $$sub62) + (i32.const 15) + ) + ) + (if + (local.get $$cmp63) + (block + (local.set $$add$ptr66 + (i32.add + (local.get $$p) + (local.get $$nb) + ) + ) + (local.set $$add$ptr67 + (i32.add + (local.get $$p) + (local.get $$add58) + ) + ) + (local.set $$and69 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or70 + (i32.or + (local.get $$and69) + (local.get $$nb) + ) + ) + (local.set $$or71 + (i32.or + (local.get $$or70) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or71) + ) + (local.set $$head74 + (i32.add + (local.get $$add$ptr66) + (i32.const 4) + ) + ) + (local.set $$or76 + (i32.or + (local.get $$sub62) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head74) + (local.get $$or76) + ) + (i32.store + (local.get $$add$ptr67) + (local.get $$sub62) + ) + (local.set $$head79 + (i32.add + (local.get $$add$ptr67) + (i32.const 4) + ) + ) + (local.set $$9 + (i32.load + (local.get $$head79) + ) + ) + (local.set $$and80 + (i32.and + (local.get $$9) + (i32.const -2) + ) + ) + (i32.store + (local.get $$head79) + (local.get $$and80) + ) + (local.set $$storemerge + (local.get $$add$ptr66) + ) + (local.set $$storemerge3 + (local.get $$sub62) + ) + ) + (block + (local.set $$and87 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or88 + (i32.or + (local.get $$and87) + (local.get $$add58) + ) + ) + (local.set $$or89 + (i32.or + (local.get $$or88) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or89) + ) + (local.set $$add$ptr91 + (i32.add + (local.get $$p) + (local.get $$add58) + ) + ) + (local.set $$head92 + (i32.add + (local.get $$add$ptr91) + (i32.const 4) + ) + ) + (local.set $$10 + (i32.load + (local.get $$head92) + ) + ) + (local.set $$or93 + (i32.or + (local.get $$10) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head92) + (local.get $$or93) + ) + (local.set $$storemerge + (i32.const 0) + ) + (local.set $$storemerge3 + (i32.const 0) + ) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$storemerge3) + ) + (i32.store + (i32.const 29424) + (local.get $$storemerge) + ) + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$and100 + (i32.and + (local.get $$2) + (i32.const 2) + ) + ) + (local.set $$tobool101 + (i32.eq + (local.get $$and100) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$tobool101) + ) + (block + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$and104 + (i32.and + (local.get $$2) + (i32.const -8) + ) + ) + (local.set $$add105 + (i32.add + (local.get $$and104) + (local.get $$and) + ) + ) + (local.set $$cmp106 + (i32.lt_u + (local.get $$add105) + (local.get $$nb) + ) + ) + (if + (local.get $$cmp106) + (block + (local.set $$newp$2 + (i32.const 0) + ) + (return + (local.get $$newp$2) + ) + ) + ) + (local.set $$sub110 + (i32.sub + (local.get $$add105) + (local.get $$nb) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$2) + (i32.const 3) + ) + ) + (local.set $$cmp111 + (i32.lt_u + (local.get $$2) + (i32.const 256) + ) + ) + (block $label$break$L49 + (if + (local.get $$cmp111) + (block + (local.set $$fd + (i32.add + (local.get $$add$ptr) + (i32.const 8) + ) + ) + (local.set $$11 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$bk + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$bk) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr) + (i32.const 1) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl) + (i32.const 2) + ) + ) + ) + (local.set $$cmp114 + (i32.eq + (local.get $$11) + (local.get $$arrayidx) + ) + ) + (if + (i32.eqz + (local.get $$cmp114) + ) + (block + (local.set $$cmp116 + (i32.gt_u + (local.get $$1) + (local.get $$11) + ) + ) + (if + (local.get $$cmp116) + (call $_abort) + ) + (local.set $$bk118 + (i32.add + (local.get $$11) + (i32.const 12) + ) + ) + (local.set $$13 + (i32.load + (local.get $$bk118) + ) + ) + (local.set $$cmp119 + (i32.eq + (local.get $$13) + (local.get $$add$ptr) + ) + ) + (if + (i32.eqz + (local.get $$cmp119) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp125 + (i32.eq + (local.get $$12) + (local.get $$11) + ) + ) + (if + (local.get $$cmp125) + (block + (local.set $$shl127 + (i32.shl + (i32.const 1) + (local.get $$shr) + ) + ) + (local.set $$neg + (i32.xor + (local.get $$shl127) + (i32.const -1) + ) + ) + (local.set $$14 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and128 + (i32.and + (local.get $$14) + (local.get $$neg) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and128) + ) + (br $label$break$L49) + ) + ) + (local.set $$cmp133 + (i32.eq + (local.get $$12) + (local.get $$arrayidx) + ) + ) + (if + (local.get $$cmp133) + (block + (local.set $$$pre + (i32.add + (local.get $$12) + (i32.const 8) + ) + ) + (local.set $$fd148$pre$phiZ2D + (local.get $$$pre) + ) + ) + (block + (local.set $$cmp136 + (i32.gt_u + (local.get $$1) + (local.get $$12) + ) + ) + (if + (local.get $$cmp136) + (call $_abort) + ) + (local.set $$fd138 + (i32.add + (local.get $$12) + (i32.const 8) + ) + ) + (local.set $$15 + (i32.load + (local.get $$fd138) + ) + ) + (local.set $$cmp139 + (i32.eq + (local.get $$15) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp139) + (local.set $$fd148$pre$phiZ2D + (local.get $$fd138) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk147 + (i32.add + (local.get $$11) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk147) + (local.get $$12) + ) + (i32.store + (local.get $$fd148$pre$phiZ2D) + (local.get $$11) + ) + ) + (block + (local.set $$parent + (i32.add + (local.get $$add$ptr) + (i32.const 24) + ) + ) + (local.set $$16 + (i32.load + (local.get $$parent) + ) + ) + (local.set $$bk155 + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (local.set $$17 + (i32.load + (local.get $$bk155) + ) + ) + (local.set $$cmp156 + (i32.eq + (local.get $$17) + (local.get $$add$ptr) + ) + ) + (block $do-once + (if + (local.get $$cmp156) + (block + (local.set $$child + (i32.add + (local.get $$add$ptr) + (i32.const 16) + ) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$child) + (i32.const 4) + ) + ) + (local.set $$21 + (i32.load + (local.get $$arrayidx179) + ) + ) + (local.set $$cmp180 + (i32.eq + (local.get $$21) + (i32.const 0) + ) + ) + (if + (local.get $$cmp180) + (block + (local.set $$22 + (i32.load + (local.get $$child) + ) + ) + (local.set $$cmp183 + (i32.eq + (local.get $$22) + (i32.const 0) + ) + ) + (if + (local.get $$cmp183) + (block + (local.set $$R$3 + (i32.const 0) + ) + (br $do-once) + ) + (block + (local.set $$R$1$ph + (local.get $$22) + ) + (local.set $$RP$1$ph + (local.get $$child) + ) + ) + ) + ) + (block + (local.set $$R$1$ph + (local.get $$21) + ) + (local.set $$RP$1$ph + (local.get $$arrayidx179) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$ph) + ) + (local.set $$RP$1 + (local.get $$RP$1$ph) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx186 + (i32.add + (local.get $$R$1) + (i32.const 20) + ) + ) + (local.set $$23 + (i32.load + (local.get $$arrayidx186) + ) + ) + (local.set $$cmp187 + (i32.eq + (local.get $$23) + (i32.const 0) + ) + ) + (if + (local.get $$cmp187) + (block + (local.set $$arrayidx190 + (i32.add + (local.get $$R$1) + (i32.const 16) + ) + ) + (local.set $$24 + (i32.load + (local.get $$arrayidx190) + ) + ) + (local.set $$cmp191 + (i32.eq + (local.get $$24) + (i32.const 0) + ) + ) + (if + (local.get $$cmp191) + (br $while-out) + (block + (local.set $$R$1$be + (local.get $$24) + ) + (local.set $$RP$1$be + (local.get $$arrayidx190) + ) + ) + ) + ) + (block + (local.set $$R$1$be + (local.get $$23) + ) + (local.set $$RP$1$be + (local.get $$arrayidx186) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$be) + ) + (local.set $$RP$1 + (local.get $$RP$1$be) + ) + (br $while-in) + ) + ) + (local.set $$cmp195 + (i32.gt_u + (local.get $$1) + (local.get $$RP$1) + ) + ) + (if + (local.get $$cmp195) + (call $_abort) + (block + (i32.store + (local.get $$RP$1) + (i32.const 0) + ) + (local.set $$R$3 + (local.get $$R$1) + ) + (br $do-once) + ) + ) + ) + (block + (local.set $$fd159 + (i32.add + (local.get $$add$ptr) + (i32.const 8) + ) + ) + (local.set $$18 + (i32.load + (local.get $$fd159) + ) + ) + (local.set $$cmp162 + (i32.gt_u + (local.get $$1) + (local.get $$18) + ) + ) + (if + (local.get $$cmp162) + (call $_abort) + ) + (local.set $$bk164 + (i32.add + (local.get $$18) + (i32.const 12) + ) + ) + (local.set $$19 + (i32.load + (local.get $$bk164) + ) + ) + (local.set $$cmp165 + (i32.eq + (local.get $$19) + (local.get $$add$ptr) + ) + ) + (if + (i32.eqz + (local.get $$cmp165) + ) + (call $_abort) + ) + (local.set $$fd167 + (i32.add + (local.get $$17) + (i32.const 8) + ) + ) + (local.set $$20 + (i32.load + (local.get $$fd167) + ) + ) + (local.set $$cmp168 + (i32.eq + (local.get $$20) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp168) + (block + (i32.store + (local.get $$bk164) + (local.get $$17) + ) + (i32.store + (local.get $$fd167) + (local.get $$18) + ) + (local.set $$R$3 + (local.get $$17) + ) + (br $do-once) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp203 + (i32.eq + (local.get $$16) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp203) + ) + (block + (local.set $$index + (i32.add + (local.get $$add$ptr) + (i32.const 28) + ) + ) + (local.set $$25 + (i32.load + (local.get $$index) + ) + ) + (local.set $$arrayidx206 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$25) + (i32.const 2) + ) + ) + ) + (local.set $$26 + (i32.load + (local.get $$arrayidx206) + ) + ) + (local.set $$cmp207 + (i32.eq + (local.get $$26) + (local.get $$add$ptr) + ) + ) + (block $do-once1 + (if + (local.get $$cmp207) + (block + (i32.store + (local.get $$arrayidx206) + (local.get $$R$3) + ) + (local.set $$cond + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cond) + (block + (local.set $$shl214 + (i32.shl + (i32.const 1) + (local.get $$25) + ) + ) + (local.set $$neg215 + (i32.xor + (local.get $$shl214) + (i32.const -1) + ) + ) + (local.set $$27 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and216 + (i32.and + (local.get $$27) + (local.get $$neg215) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and216) + ) + (br $label$break$L49) + ) + ) + ) + (block + (local.set $$28 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp220 + (i32.gt_u + (local.get $$28) + (local.get $$16) + ) + ) + (if + (local.get $$cmp220) + (call $_abort) + (block + (local.set $$arrayidx226 + (i32.add + (local.get $$16) + (i32.const 16) + ) + ) + (local.set $$29 + (i32.load + (local.get $$arrayidx226) + ) + ) + (local.set $$cmp227 + (i32.eq + (local.get $$29) + (local.get $$add$ptr) + ) + ) + (local.set $$arrayidx234 + (i32.add + (local.get $$16) + (i32.const 20) + ) + ) + (local.set $$arrayidx234$sink + (if (result i32) + (local.get $$cmp227) + (local.get $$arrayidx226) + (local.get $$arrayidx234) + ) + ) + (i32.store + (local.get $$arrayidx234$sink) + (local.get $$R$3) + ) + (local.set $$cmp239 + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp239) + (br $label$break$L49) + (br $do-once1) + ) + ) + ) + ) + ) + ) + (local.set $$30 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp243 + (i32.gt_u + (local.get $$30) + (local.get $$R$3) + ) + ) + (if + (local.get $$cmp243) + (call $_abort) + ) + (local.set $$parent248 + (i32.add + (local.get $$R$3) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent248) + (local.get $$16) + ) + (local.set $$child249 + (i32.add + (local.get $$add$ptr) + (i32.const 16) + ) + ) + (local.set $$31 + (i32.load + (local.get $$child249) + ) + ) + (local.set $$cmp251 + (i32.eq + (local.get $$31) + (i32.const 0) + ) + ) + (block $do-once3 + (if + (i32.eqz + (local.get $$cmp251) + ) + (block + (local.set $$cmp255 + (i32.gt_u + (local.get $$30) + (local.get $$31) + ) + ) + (if + (local.get $$cmp255) + (call $_abort) + (block + (local.set $$arrayidx261 + (i32.add + (local.get $$R$3) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx261) + (local.get $$31) + ) + (local.set $$parent262 + (i32.add + (local.get $$31) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent262) + (local.get $$R$3) + ) + (br $do-once3) + ) + ) + ) + ) + ) + (local.set $$arrayidx267 + (i32.add + (local.get $$child249) + (i32.const 4) + ) + ) + (local.set $$32 + (i32.load + (local.get $$arrayidx267) + ) + ) + (local.set $$cmp268 + (i32.eq + (local.get $$32) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp268) + ) + (block + (local.set $$33 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp272 + (i32.gt_u + (local.get $$33) + (local.get $$32) + ) + ) + (if + (local.get $$cmp272) + (call $_abort) + (block + (local.set $$arrayidx278 + (i32.add + (local.get $$R$3) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx278) + (local.get $$32) + ) + (local.set $$parent279 + (i32.add + (local.get $$32) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent279) + (local.get $$R$3) + ) + (br $label$break$L49) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$cmp288 + (i32.lt_u + (local.get $$sub110) + (i32.const 16) + ) + ) + (if + (local.get $$cmp288) + (block + (local.set $$and294 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or295 + (i32.or + (local.get $$and294) + (local.get $$add105) + ) + ) + (local.set $$or296 + (i32.or + (local.get $$or295) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or296) + ) + (local.set $$add$ptr298 + (i32.add + (local.get $$p) + (local.get $$add105) + ) + ) + (local.set $$head299 + (i32.add + (local.get $$add$ptr298) + (i32.const 4) + ) + ) + (local.set $$34 + (i32.load + (local.get $$head299) + ) + ) + (local.set $$or300 + (i32.or + (local.get $$34) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head299) + (local.get $$or300) + ) + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + (block + (local.set $$add$ptr303 + (i32.add + (local.get $$p) + (local.get $$nb) + ) + ) + (local.set $$and305 + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$or306 + (i32.or + (local.get $$and305) + (local.get $$nb) + ) + ) + (local.set $$or307 + (i32.or + (local.get $$or306) + (i32.const 2) + ) + ) + (i32.store + (local.get $$head) + (local.get $$or307) + ) + (local.set $$head310 + (i32.add + (local.get $$add$ptr303) + (i32.const 4) + ) + ) + (local.set $$or315 + (i32.or + (local.get $$sub110) + (i32.const 3) + ) + ) + (i32.store + (local.get $$head310) + (local.get $$or315) + ) + (local.set $$add$ptr317 + (i32.add + (local.get $$p) + (local.get $$add105) + ) + ) + (local.set $$head318 + (i32.add + (local.get $$add$ptr317) + (i32.const 4) + ) + ) + (local.set $$35 + (i32.load + (local.get $$head318) + ) + ) + (local.set $$or319 + (i32.or + (local.get $$35) + (i32.const 1) + ) + ) + (i32.store + (local.get $$head318) + (local.get $$or319) + ) + (call $_dispose_chunk + (local.get $$add$ptr303) + (local.get $$sub110) + ) + (local.set $$newp$2 + (local.get $$p) + ) + (return + (local.get $$newp$2) + ) + ) + ) + ) + (func $_dispose_chunk (; 652 ;) (param $$p i32) (param $$psize i32) + (local $$$pre i32) + (local $$$pre$phiZ2D i32) + (local $$$pre17 i32) + (local $$$pre18 i32) + (local $$0 i32) + (local $$1 i32) + (local $$10 i32) + (local $$11 i32) + (local $$12 i32) + (local $$13 i32) + (local $$14 i32) + (local $$15 i32) + (local $$16 i32) + (local $$17 i32) + (local $$18 i32) + (local $$19 i32) + (local $$2 i32) + (local $$20 i32) + (local $$21 i32) + (local $$22 i32) + (local $$23 i32) + (local $$24 i32) + (local $$25 i32) + (local $$26 i32) + (local $$27 i32) + (local $$28 i32) + (local $$29 i32) + (local $$3 i32) + (local $$30 i32) + (local $$31 i32) + (local $$32 i32) + (local $$33 i32) + (local $$34 i32) + (local $$35 i32) + (local $$36 i32) + (local $$37 i32) + (local $$38 i32) + (local $$39 i32) + (local $$4 i32) + (local $$40 i32) + (local $$41 i32) + (local $$42 i32) + (local $$43 i32) + (local $$44 i32) + (local $$45 i32) + (local $$46 i32) + (local $$47 i32) + (local $$48 i32) + (local $$49 i32) + (local $$5 i32) + (local $$50 i32) + (local $$51 i32) + (local $$52 i32) + (local $$53 i32) + (local $$54 i32) + (local $$55 i32) + (local $$56 i32) + (local $$57 i32) + (local $$58 i32) + (local $$59 i32) + (local $$6 i32) + (local $$60 i32) + (local $$61 i32) + (local $$62 i32) + (local $$63 i32) + (local $$64 i32) + (local $$65 i32) + (local $$66 i32) + (local $$67 i32) + (local $$68 i32) + (local $$69 i32) + (local $$7 i32) + (local $$70 i32) + (local $$71 i32) + (local $$8 i32) + (local $$9 i32) + (local $$F517$0 i32) + (local $$I545$0 i32) + (local $$K597$013 i32) + (local $$R$1 i32) + (local $$R$1$be i32) + (local $$R$1$ph i32) + (local $$R$3 i32) + (local $$R328$1 i32) + (local $$R328$1$be i32) + (local $$R328$1$ph i32) + (local $$R328$3 i32) + (local $$RP$1 i32) + (local $$RP$1$be i32) + (local $$RP$1$ph i32) + (local $$RP357$1 i32) + (local $$RP357$1$be i32) + (local $$RP357$1$ph i32) + (local $$T$0$lcssa i32) + (local $$T$012 i32) + (local $$add$ptr i32) + (local $$add$ptr252 i32) + (local $$add$ptr486 i32) + (local $$add$ptr5 i32) + (local $$add$ptr504 i32) + (local $$add230 i32) + (local $$add248 i32) + (local $$add258 i32) + (local $$add561 i32) + (local $$add566 i32) + (local $$add570 i32) + (local $$add572 i32) + (local $$add575 i32) + (local $$add6 i32) + (local $$and i32) + (local $$and128 i32) + (local $$and2 i32) + (local $$and202 i32) + (local $$and207 i32) + (local $$and224 i32) + (local $$and257 i32) + (local $$and295 i32) + (local $$and32 i32) + (local $$and410 i32) + (local $$and501 i32) + (local $$and520 i32) + (local $$and556 i32) + (local $$and560 i32) + (local $$and565 i32) + (local $$and574 i32) + (local $$and587 i32) + (local $$and606 i32) + (local $$and60610 i32) + (local $$arrayidx i32) + (local $$arrayidx100 i32) + (local $$arrayidx118 i32) + (local $$arrayidx138 i32) + (local $$arrayidx146 i32) + (local $$arrayidx146$sink i32) + (local $$arrayidx173 i32) + (local $$arrayidx179 i32) + (local $$arrayidx190 i32) + (local $$arrayidx271 i32) + (local $$arrayidx359 i32) + (local $$arrayidx371 i32) + (local $$arrayidx376 i32) + (local $$arrayidx399 i32) + (local $$arrayidx420 i32) + (local $$arrayidx428 i32) + (local $$arrayidx428$sink i32) + (local $$arrayidx457 i32) + (local $$arrayidx463 i32) + (local $$arrayidx474 i32) + (local $$arrayidx516 i32) + (local $$arrayidx579 i32) + (local $$arrayidx582 i32) + (local $$arrayidx613 i32) + (local $$arrayidx86 i32) + (local $$arrayidx95 i32) + (local $$bk i32) + (local $$bk22 i32) + (local $$bk266 i32) + (local $$bk279 i32) + (local $$bk317 i32) + (local $$bk329 i32) + (local $$bk340 i32) + (local $$bk52 i32) + (local $$bk539 i32) + (local $$bk541 i32) + (local $$bk594 i32) + (local $$bk60 i32) + (local $$bk626 i32) + (local $$bk648 i32) + (local $$bk651 i32) + (local $$bk70 i32) + (local $$child i32) + (local $$child161 i32) + (local $$child358 i32) + (local $$child445 i32) + (local $$child581 i32) + (local $$cmp i32) + (local $$cmp10 i32) + (local $$cmp101 i32) + (local $$cmp106 i32) + (local $$cmp115 i32) + (local $$cmp119 i32) + (local $$cmp13 i32) + (local $$cmp132 i32) + (local $$cmp139 i32) + (local $$cmp151 i32) + (local $$cmp155 i32) + (local $$cmp163 i32) + (local $$cmp167 i32) + (local $$cmp17 i32) + (local $$cmp180 i32) + (local $$cmp184 i32) + (local $$cmp20 i32) + (local $$cmp203 i32) + (local $$cmp218 i32) + (local $$cmp227 i32) + (local $$cmp23 i32) + (local $$cmp235 i32) + (local $$cmp244 i32) + (local $$cmp260 i32) + (local $$cmp272 i32) + (local $$cmp276 i32) + (local $$cmp28 i32) + (local $$cmp280 i32) + (local $$cmp289 i32) + (local $$cmp300 i32) + (local $$cmp304 i32) + (local $$cmp308 i32) + (local $$cmp330 i32) + (local $$cmp337 i32) + (local $$cmp341 i32) + (local $$cmp345 i32) + (local $$cmp36 i32) + (local $$cmp360 i32) + (local $$cmp365 i32) + (local $$cmp372 i32) + (local $$cmp377 i32) + (local $$cmp384 i32) + (local $$cmp393 i32) + (local $$cmp40 i32) + (local $$cmp400 i32) + (local $$cmp414 i32) + (local $$cmp421 i32) + (local $$cmp433 i32) + (local $$cmp437 i32) + (local $$cmp44 i32) + (local $$cmp447 i32) + (local $$cmp451 i32) + (local $$cmp464 i32) + (local $$cmp468 i32) + (local $$cmp489 i32) + (local $$cmp508 i32) + (local $$cmp529 i32) + (local $$cmp547 i32) + (local $$cmp551 i32) + (local $$cmp598 i32) + (local $$cmp607 i32) + (local $$cmp60711 i32) + (local $$cmp61 i32) + (local $$cmp615 i32) + (local $$cmp620 i32) + (local $$cmp637 i32) + (local $$cmp641 i32) + (local $$cmp68 i32) + (local $$cmp7 i32) + (local $$cmp71 i32) + (local $$cmp75 i32) + (local $$cmp87 i32) + (local $$cmp91 i32) + (local $$cmp96 i32) + (local $$cond i32) + (local $$cond5 i32) + (local $$cond6 i32) + (local $$fd i32) + (local $$fd264 i32) + (local $$fd307 i32) + (local $$fd318$pre$phiZ2D i32) + (local $$fd334 i32) + (local $$fd344 i32) + (local $$fd43 i32) + (local $$fd53$pre$phiZ2D i32) + (local $$fd540 i32) + (local $$fd595 i32) + (local $$fd627 i32) + (local $$fd635 i32) + (local $$fd65 i32) + (local $$fd650 i32) + (local $$fd74 i32) + (local $$head i32) + (local $$head201 i32) + (local $$head208 i32) + (local $$head223 i32) + (local $$head233 i32) + (local $$head251 i32) + (local $$head485 i32) + (local $$head503 i32) + (local $$head605 i32) + (local $$head6059 i32) + (local $$idx$neg i32) + (local $$index i32) + (local $$index398 i32) + (local $$index580 i32) + (local $$neg i32) + (local $$neg127 i32) + (local $$neg293 i32) + (local $$neg408 i32) + (local $$or i32) + (local $$or232 i32) + (local $$or250 i32) + (local $$or484 i32) + (local $$or502 i32) + (local $$or525 i32) + (local $$or592 i32) + (local $$p$addr$1 i32) + (local $$parent i32) + (local $$parent160 i32) + (local $$parent174 i32) + (local $$parent191 i32) + (local $$parent327 i32) + (local $$parent444 i32) + (local $$parent458 i32) + (local $$parent475 i32) + (local $$parent593 i32) + (local $$parent625 i32) + (local $$parent652 i32) + (local $$psize$addr$1 i32) + (local $$psize$addr$2 i32) + (local $$shl i32) + (local $$shl126 i32) + (local $$shl270 i32) + (local $$shl292 i32) + (local $$shl31 i32) + (local $$shl407 i32) + (local $$shl515 i32) + (local $$shl519 i32) + (local $$shl557 i32) + (local $$shl562 i32) + (local $$shl568 i32) + (local $$shl571 i32) + (local $$shl586 i32) + (local $$shl604 i32) + (local $$shl614 i32) + (local $$shr i32) + (local $$shr259 i32) + (local $$shr507 i32) + (local $$shr546 i32) + (local $$shr555 i32) + (local $$shr559 i32) + (local $$shr564 i32) + (local $$shr569 i32) + (local $$shr573 i32) + (local $$shr600 i32) + (local $$shr611 i32) + (local $$sub i32) + (local $$sub558 i32) + (local $$sub563 i32) + (local $$sub567 i32) + (local $$sub603 i32) + (local $$tobool i32) + (local $$tobool225 i32) + (local $$tobool521 i32) + (local $$tobool588 i32) + (local $label i32) + (local $sp i32) + (local $sp_a i32) + (local.set $sp + (global.get $STACKTOP) + ) + (local.set $$add$ptr + (i32.add + (local.get $$p) + (local.get $$psize) + ) + ) + (local.set $$head + (i32.add + (local.get $$p) + (i32.const 4) + ) + ) + (local.set $$0 + (i32.load + (local.get $$head) + ) + ) + (local.set $$and + (i32.and + (local.get $$0) + (i32.const 1) + ) + ) + (local.set $$tobool + (i32.eq + (local.get $$and) + (i32.const 0) + ) + ) + (block $label$break$L1 + (if + (local.get $$tobool) + (block + (local.set $$1 + (i32.load + (local.get $$p) + ) + ) + (local.set $$and2 + (i32.and + (local.get $$0) + (i32.const 3) + ) + ) + (local.set $$cmp + (i32.eq + (local.get $$and2) + (i32.const 0) + ) + ) + (if + (local.get $$cmp) + (return) + ) + (local.set $$idx$neg + (i32.sub + (i32.const 0) + (local.get $$1) + ) + ) + (local.set $$add$ptr5 + (i32.add + (local.get $$p) + (local.get $$idx$neg) + ) + ) + (local.set $$add6 + (i32.add + (local.get $$1) + (local.get $$psize) + ) + ) + (local.set $$2 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp7 + (i32.lt_u + (local.get $$add$ptr5) + (local.get $$2) + ) + ) + (if + (local.get $$cmp7) + (call $_abort) + ) + (local.set $$3 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp10 + (i32.eq + (local.get $$3) + (local.get $$add$ptr5) + ) + ) + (if + (local.get $$cmp10) + (block + (local.set $$head201 + (i32.add + (local.get $$add$ptr) + (i32.const 4) + ) + ) + (local.set $$27 + (i32.load + (local.get $$head201) + ) + ) + (local.set $$and202 + (i32.and + (local.get $$27) + (i32.const 3) + ) + ) + (local.set $$cmp203 + (i32.eq + (local.get $$and202) + (i32.const 3) + ) + ) + (if + (i32.eqz + (local.get $$cmp203) + ) + (block + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + ) + (local.set $$head208 + (i32.add + (local.get $$add$ptr5) + (i32.const 4) + ) + ) + (local.set $$or + (i32.or + (local.get $$add6) + (i32.const 1) + ) + ) + (local.set $$and207 + (i32.and + (local.get $$27) + (i32.const -2) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$add6) + ) + (i32.store + (local.get $$head201) + (local.get $$and207) + ) + (i32.store + (local.get $$head208) + (local.get $$or) + ) + (i32.store + (local.get $$add$ptr) + (local.get $$add6) + ) + (return) + ) + ) + (local.set $$shr + (i32.shr_u + (local.get $$1) + (i32.const 3) + ) + ) + (local.set $$cmp13 + (i32.lt_u + (local.get $$1) + (i32.const 256) + ) + ) + (if + (local.get $$cmp13) + (block + (local.set $$fd + (i32.add + (local.get $$add$ptr5) + (i32.const 8) + ) + ) + (local.set $$4 + (i32.load + (local.get $$fd) + ) + ) + (local.set $$bk + (i32.add + (local.get $$add$ptr5) + (i32.const 12) + ) + ) + (local.set $$5 + (i32.load + (local.get $$bk) + ) + ) + (local.set $$shl + (i32.shl + (local.get $$shr) + (i32.const 1) + ) + ) + (local.set $$arrayidx + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl) + (i32.const 2) + ) + ) + ) + (local.set $$cmp17 + (i32.eq + (local.get $$4) + (local.get $$arrayidx) + ) + ) + (if + (i32.eqz + (local.get $$cmp17) + ) + (block + (local.set $$cmp20 + (i32.gt_u + (local.get $$2) + (local.get $$4) + ) + ) + (if + (local.get $$cmp20) + (call $_abort) + ) + (local.set $$bk22 + (i32.add + (local.get $$4) + (i32.const 12) + ) + ) + (local.set $$6 + (i32.load + (local.get $$bk22) + ) + ) + (local.set $$cmp23 + (i32.eq + (local.get $$6) + (local.get $$add$ptr5) + ) + ) + (if + (i32.eqz + (local.get $$cmp23) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp28 + (i32.eq + (local.get $$5) + (local.get $$4) + ) + ) + (if + (local.get $$cmp28) + (block + (local.set $$shl31 + (i32.shl + (i32.const 1) + (local.get $$shr) + ) + ) + (local.set $$neg + (i32.xor + (local.get $$shl31) + (i32.const -1) + ) + ) + (local.set $$7 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and32 + (i32.and + (local.get $$7) + (local.get $$neg) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and32) + ) + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + ) + (local.set $$cmp36 + (i32.eq + (local.get $$5) + (local.get $$arrayidx) + ) + ) + (if + (local.get $$cmp36) + (block + (local.set $$$pre18 + (i32.add + (local.get $$5) + (i32.const 8) + ) + ) + (local.set $$fd53$pre$phiZ2D + (local.get $$$pre18) + ) + ) + (block + (local.set $$cmp40 + (i32.gt_u + (local.get $$2) + (local.get $$5) + ) + ) + (if + (local.get $$cmp40) + (call $_abort) + ) + (local.set $$fd43 + (i32.add + (local.get $$5) + (i32.const 8) + ) + ) + (local.set $$8 + (i32.load + (local.get $$fd43) + ) + ) + (local.set $$cmp44 + (i32.eq + (local.get $$8) + (local.get $$add$ptr5) + ) + ) + (if + (local.get $$cmp44) + (local.set $$fd53$pre$phiZ2D + (local.get $$fd43) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk52 + (i32.add + (local.get $$4) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk52) + (local.get $$5) + ) + (i32.store + (local.get $$fd53$pre$phiZ2D) + (local.get $$4) + ) + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + ) + (local.set $$parent + (i32.add + (local.get $$add$ptr5) + (i32.const 24) + ) + ) + (local.set $$9 + (i32.load + (local.get $$parent) + ) + ) + (local.set $$bk60 + (i32.add + (local.get $$add$ptr5) + (i32.const 12) + ) + ) + (local.set $$10 + (i32.load + (local.get $$bk60) + ) + ) + (local.set $$cmp61 + (i32.eq + (local.get $$10) + (local.get $$add$ptr5) + ) + ) + (block $do-once + (if + (local.get $$cmp61) + (block + (local.set $$child + (i32.add + (local.get $$add$ptr5) + (i32.const 16) + ) + ) + (local.set $$arrayidx86 + (i32.add + (local.get $$child) + (i32.const 4) + ) + ) + (local.set $$14 + (i32.load + (local.get $$arrayidx86) + ) + ) + (local.set $$cmp87 + (i32.eq + (local.get $$14) + (i32.const 0) + ) + ) + (if + (local.get $$cmp87) + (block + (local.set $$15 + (i32.load + (local.get $$child) + ) + ) + (local.set $$cmp91 + (i32.eq + (local.get $$15) + (i32.const 0) + ) + ) + (if + (local.get $$cmp91) + (block + (local.set $$R$3 + (i32.const 0) + ) + (br $do-once) + ) + (block + (local.set $$R$1$ph + (local.get $$15) + ) + (local.set $$RP$1$ph + (local.get $$child) + ) + ) + ) + ) + (block + (local.set $$R$1$ph + (local.get $$14) + ) + (local.set $$RP$1$ph + (local.get $$arrayidx86) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$ph) + ) + (local.set $$RP$1 + (local.get $$RP$1$ph) + ) + (loop $while-in + (block $while-out + (local.set $$arrayidx95 + (i32.add + (local.get $$R$1) + (i32.const 20) + ) + ) + (local.set $$16 + (i32.load + (local.get $$arrayidx95) + ) + ) + (local.set $$cmp96 + (i32.eq + (local.get $$16) + (i32.const 0) + ) + ) + (if + (local.get $$cmp96) + (block + (local.set $$arrayidx100 + (i32.add + (local.get $$R$1) + (i32.const 16) + ) + ) + (local.set $$17 + (i32.load + (local.get $$arrayidx100) + ) + ) + (local.set $$cmp101 + (i32.eq + (local.get $$17) + (i32.const 0) + ) + ) + (if + (local.get $$cmp101) + (br $while-out) + (block + (local.set $$R$1$be + (local.get $$17) + ) + (local.set $$RP$1$be + (local.get $$arrayidx100) + ) + ) + ) + ) + (block + (local.set $$R$1$be + (local.get $$16) + ) + (local.set $$RP$1$be + (local.get $$arrayidx95) + ) + ) + ) + (local.set $$R$1 + (local.get $$R$1$be) + ) + (local.set $$RP$1 + (local.get $$RP$1$be) + ) + (br $while-in) + ) + ) + (local.set $$cmp106 + (i32.gt_u + (local.get $$2) + (local.get $$RP$1) + ) + ) + (if + (local.get $$cmp106) + (call $_abort) + (block + (i32.store + (local.get $$RP$1) + (i32.const 0) + ) + (local.set $$R$3 + (local.get $$R$1) + ) + (br $do-once) + ) + ) + ) + (block + (local.set $$fd65 + (i32.add + (local.get $$add$ptr5) + (i32.const 8) + ) + ) + (local.set $$11 + (i32.load + (local.get $$fd65) + ) + ) + (local.set $$cmp68 + (i32.gt_u + (local.get $$2) + (local.get $$11) + ) + ) + (if + (local.get $$cmp68) + (call $_abort) + ) + (local.set $$bk70 + (i32.add + (local.get $$11) + (i32.const 12) + ) + ) + (local.set $$12 + (i32.load + (local.get $$bk70) + ) + ) + (local.set $$cmp71 + (i32.eq + (local.get $$12) + (local.get $$add$ptr5) + ) + ) + (if + (i32.eqz + (local.get $$cmp71) + ) + (call $_abort) + ) + (local.set $$fd74 + (i32.add + (local.get $$10) + (i32.const 8) + ) + ) + (local.set $$13 + (i32.load + (local.get $$fd74) + ) + ) + (local.set $$cmp75 + (i32.eq + (local.get $$13) + (local.get $$add$ptr5) + ) + ) + (if + (local.get $$cmp75) + (block + (i32.store + (local.get $$bk70) + (local.get $$10) + ) + (i32.store + (local.get $$fd74) + (local.get $$11) + ) + (local.set $$R$3 + (local.get $$10) + ) + (br $do-once) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp115 + (i32.eq + (local.get $$9) + (i32.const 0) + ) + ) + (if + (local.get $$cmp115) + (block + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + ) + (block + (local.set $$index + (i32.add + (local.get $$add$ptr5) + (i32.const 28) + ) + ) + (local.set $$18 + (i32.load + (local.get $$index) + ) + ) + (local.set $$arrayidx118 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$18) + (i32.const 2) + ) + ) + ) + (local.set $$19 + (i32.load + (local.get $$arrayidx118) + ) + ) + (local.set $$cmp119 + (i32.eq + (local.get $$19) + (local.get $$add$ptr5) + ) + ) + (block $do-once1 + (if + (local.get $$cmp119) + (block + (i32.store + (local.get $$arrayidx118) + (local.get $$R$3) + ) + (local.set $$cond5 + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cond5) + (block + (local.set $$shl126 + (i32.shl + (i32.const 1) + (local.get $$18) + ) + ) + (local.set $$neg127 + (i32.xor + (local.get $$shl126) + (i32.const -1) + ) + ) + (local.set $$20 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and128 + (i32.and + (local.get $$20) + (local.get $$neg127) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and128) + ) + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + ) + ) + (block + (local.set $$21 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp132 + (i32.gt_u + (local.get $$21) + (local.get $$9) + ) + ) + (if + (local.get $$cmp132) + (call $_abort) + (block + (local.set $$arrayidx138 + (i32.add + (local.get $$9) + (i32.const 16) + ) + ) + (local.set $$22 + (i32.load + (local.get $$arrayidx138) + ) + ) + (local.set $$cmp139 + (i32.eq + (local.get $$22) + (local.get $$add$ptr5) + ) + ) + (local.set $$arrayidx146 + (i32.add + (local.get $$9) + (i32.const 20) + ) + ) + (local.set $$arrayidx146$sink + (if (result i32) + (local.get $$cmp139) + (local.get $$arrayidx138) + (local.get $$arrayidx146) + ) + ) + (i32.store + (local.get $$arrayidx146$sink) + (local.get $$R$3) + ) + (local.set $$cmp151 + (i32.eq + (local.get $$R$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp151) + (block + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + (br $do-once1) + ) + ) + ) + ) + ) + ) + (local.set $$23 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp155 + (i32.gt_u + (local.get $$23) + (local.get $$R$3) + ) + ) + (if + (local.get $$cmp155) + (call $_abort) + ) + (local.set $$parent160 + (i32.add + (local.get $$R$3) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent160) + (local.get $$9) + ) + (local.set $$child161 + (i32.add + (local.get $$add$ptr5) + (i32.const 16) + ) + ) + (local.set $$24 + (i32.load + (local.get $$child161) + ) + ) + (local.set $$cmp163 + (i32.eq + (local.get $$24) + (i32.const 0) + ) + ) + (block $do-once3 + (if + (i32.eqz + (local.get $$cmp163) + ) + (block + (local.set $$cmp167 + (i32.gt_u + (local.get $$23) + (local.get $$24) + ) + ) + (if + (local.get $$cmp167) + (call $_abort) + (block + (local.set $$arrayidx173 + (i32.add + (local.get $$R$3) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx173) + (local.get $$24) + ) + (local.set $$parent174 + (i32.add + (local.get $$24) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent174) + (local.get $$R$3) + ) + (br $do-once3) + ) + ) + ) + ) + ) + (local.set $$arrayidx179 + (i32.add + (local.get $$child161) + (i32.const 4) + ) + ) + (local.set $$25 + (i32.load + (local.get $$arrayidx179) + ) + ) + (local.set $$cmp180 + (i32.eq + (local.get $$25) + (i32.const 0) + ) + ) + (if + (local.get $$cmp180) + (block + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + ) + (block + (local.set $$26 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp184 + (i32.gt_u + (local.get $$26) + (local.get $$25) + ) + ) + (if + (local.get $$cmp184) + (call $_abort) + (block + (local.set $$arrayidx190 + (i32.add + (local.get $$R$3) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx190) + (local.get $$25) + ) + (local.set $$parent191 + (i32.add + (local.get $$25) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent191) + (local.get $$R$3) + ) + (local.set $$p$addr$1 + (local.get $$add$ptr5) + ) + (local.set $$psize$addr$1 + (local.get $$add6) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + ) + ) + (block + (local.set $$p$addr$1 + (local.get $$p) + ) + (local.set $$psize$addr$1 + (local.get $$psize) + ) + ) + ) + ) + (local.set $$28 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp218 + (i32.lt_u + (local.get $$add$ptr) + (local.get $$28) + ) + ) + (if + (local.get $$cmp218) + (call $_abort) + ) + (local.set $$head223 + (i32.add + (local.get $$add$ptr) + (i32.const 4) + ) + ) + (local.set $$29 + (i32.load + (local.get $$head223) + ) + ) + (local.set $$and224 + (i32.and + (local.get $$29) + (i32.const 2) + ) + ) + (local.set $$tobool225 + (i32.eq + (local.get $$and224) + (i32.const 0) + ) + ) + (if + (local.get $$tobool225) + (block + (local.set $$30 + (i32.load + (i32.const 29428) + ) + ) + (local.set $$cmp227 + (i32.eq + (local.get $$30) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp227) + (block + (local.set $$31 + (i32.load + (i32.const 29416) + ) + ) + (local.set $$add230 + (i32.add + (local.get $$31) + (local.get $$psize$addr$1) + ) + ) + (i32.store + (i32.const 29416) + (local.get $$add230) + ) + (i32.store + (i32.const 29428) + (local.get $$p$addr$1) + ) + (local.set $$or232 + (i32.or + (local.get $$add230) + (i32.const 1) + ) + ) + (local.set $$head233 + (i32.add + (local.get $$p$addr$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head233) + (local.get $$or232) + ) + (local.set $$32 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp235 + (i32.eq + (local.get $$p$addr$1) + (local.get $$32) + ) + ) + (if + (i32.eqz + (local.get $$cmp235) + ) + (return) + ) + (i32.store + (i32.const 29424) + (i32.const 0) + ) + (i32.store + (i32.const 29412) + (i32.const 0) + ) + (return) + ) + ) + (local.set $$33 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp244 + (i32.eq + (local.get $$33) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp244) + (block + (local.set $$34 + (i32.load + (i32.const 29412) + ) + ) + (local.set $$add248 + (i32.add + (local.get $$34) + (local.get $$psize$addr$1) + ) + ) + (i32.store + (i32.const 29412) + (local.get $$add248) + ) + (i32.store + (i32.const 29424) + (local.get $$p$addr$1) + ) + (local.set $$or250 + (i32.or + (local.get $$add248) + (i32.const 1) + ) + ) + (local.set $$head251 + (i32.add + (local.get $$p$addr$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head251) + (local.get $$or250) + ) + (local.set $$add$ptr252 + (i32.add + (local.get $$p$addr$1) + (local.get $$add248) + ) + ) + (i32.store + (local.get $$add$ptr252) + (local.get $$add248) + ) + (return) + ) + ) + (local.set $$and257 + (i32.and + (local.get $$29) + (i32.const -8) + ) + ) + (local.set $$add258 + (i32.add + (local.get $$and257) + (local.get $$psize$addr$1) + ) + ) + (local.set $$shr259 + (i32.shr_u + (local.get $$29) + (i32.const 3) + ) + ) + (local.set $$cmp260 + (i32.lt_u + (local.get $$29) + (i32.const 256) + ) + ) + (block $label$break$L99 + (if + (local.get $$cmp260) + (block + (local.set $$fd264 + (i32.add + (local.get $$add$ptr) + (i32.const 8) + ) + ) + (local.set $$35 + (i32.load + (local.get $$fd264) + ) + ) + (local.set $$bk266 + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (local.set $$36 + (i32.load + (local.get $$bk266) + ) + ) + (local.set $$shl270 + (i32.shl + (local.get $$shr259) + (i32.const 1) + ) + ) + (local.set $$arrayidx271 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl270) + (i32.const 2) + ) + ) + ) + (local.set $$cmp272 + (i32.eq + (local.get $$35) + (local.get $$arrayidx271) + ) + ) + (if + (i32.eqz + (local.get $$cmp272) + ) + (block + (local.set $$cmp276 + (i32.gt_u + (local.get $$28) + (local.get $$35) + ) + ) + (if + (local.get $$cmp276) + (call $_abort) + ) + (local.set $$bk279 + (i32.add + (local.get $$35) + (i32.const 12) + ) + ) + (local.set $$37 + (i32.load + (local.get $$bk279) + ) + ) + (local.set $$cmp280 + (i32.eq + (local.get $$37) + (local.get $$add$ptr) + ) + ) + (if + (i32.eqz + (local.get $$cmp280) + ) + (call $_abort) + ) + ) + ) + (local.set $$cmp289 + (i32.eq + (local.get $$36) + (local.get $$35) + ) + ) + (if + (local.get $$cmp289) + (block + (local.set $$shl292 + (i32.shl + (i32.const 1) + (local.get $$shr259) + ) + ) + (local.set $$neg293 + (i32.xor + (local.get $$shl292) + (i32.const -1) + ) + ) + (local.set $$38 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$and295 + (i32.and + (local.get $$38) + (local.get $$neg293) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$and295) + ) + (br $label$break$L99) + ) + ) + (local.set $$cmp300 + (i32.eq + (local.get $$36) + (local.get $$arrayidx271) + ) + ) + (if + (local.get $$cmp300) + (block + (local.set $$$pre17 + (i32.add + (local.get $$36) + (i32.const 8) + ) + ) + (local.set $$fd318$pre$phiZ2D + (local.get $$$pre17) + ) + ) + (block + (local.set $$cmp304 + (i32.gt_u + (local.get $$28) + (local.get $$36) + ) + ) + (if + (local.get $$cmp304) + (call $_abort) + ) + (local.set $$fd307 + (i32.add + (local.get $$36) + (i32.const 8) + ) + ) + (local.set $$39 + (i32.load + (local.get $$fd307) + ) + ) + (local.set $$cmp308 + (i32.eq + (local.get $$39) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp308) + (local.set $$fd318$pre$phiZ2D + (local.get $$fd307) + ) + (call $_abort) + ) + ) + ) + (local.set $$bk317 + (i32.add + (local.get $$35) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk317) + (local.get $$36) + ) + (i32.store + (local.get $$fd318$pre$phiZ2D) + (local.get $$35) + ) + ) + (block + (local.set $$parent327 + (i32.add + (local.get $$add$ptr) + (i32.const 24) + ) + ) + (local.set $$40 + (i32.load + (local.get $$parent327) + ) + ) + (local.set $$bk329 + (i32.add + (local.get $$add$ptr) + (i32.const 12) + ) + ) + (local.set $$41 + (i32.load + (local.get $$bk329) + ) + ) + (local.set $$cmp330 + (i32.eq + (local.get $$41) + (local.get $$add$ptr) + ) + ) + (block $do-once6 + (if + (local.get $$cmp330) + (block + (local.set $$child358 + (i32.add + (local.get $$add$ptr) + (i32.const 16) + ) + ) + (local.set $$arrayidx359 + (i32.add + (local.get $$child358) + (i32.const 4) + ) + ) + (local.set $$45 + (i32.load + (local.get $$arrayidx359) + ) + ) + (local.set $$cmp360 + (i32.eq + (local.get $$45) + (i32.const 0) + ) + ) + (if + (local.get $$cmp360) + (block + (local.set $$46 + (i32.load + (local.get $$child358) + ) + ) + (local.set $$cmp365 + (i32.eq + (local.get $$46) + (i32.const 0) + ) + ) + (if + (local.get $$cmp365) + (block + (local.set $$R328$3 + (i32.const 0) + ) + (br $do-once6) + ) + (block + (local.set $$R328$1$ph + (local.get $$46) + ) + (local.set $$RP357$1$ph + (local.get $$child358) + ) + ) + ) + ) + (block + (local.set $$R328$1$ph + (local.get $$45) + ) + (local.set $$RP357$1$ph + (local.get $$arrayidx359) + ) + ) + ) + (local.set $$R328$1 + (local.get $$R328$1$ph) + ) + (local.set $$RP357$1 + (local.get $$RP357$1$ph) + ) + (loop $while-in9 + (block $while-out8 + (local.set $$arrayidx371 + (i32.add + (local.get $$R328$1) + (i32.const 20) + ) + ) + (local.set $$47 + (i32.load + (local.get $$arrayidx371) + ) + ) + (local.set $$cmp372 + (i32.eq + (local.get $$47) + (i32.const 0) + ) + ) + (if + (local.get $$cmp372) + (block + (local.set $$arrayidx376 + (i32.add + (local.get $$R328$1) + (i32.const 16) + ) + ) + (local.set $$48 + (i32.load + (local.get $$arrayidx376) + ) + ) + (local.set $$cmp377 + (i32.eq + (local.get $$48) + (i32.const 0) + ) + ) + (if + (local.get $$cmp377) + (br $while-out8) + (block + (local.set $$R328$1$be + (local.get $$48) + ) + (local.set $$RP357$1$be + (local.get $$arrayidx376) + ) + ) + ) + ) + (block + (local.set $$R328$1$be + (local.get $$47) + ) + (local.set $$RP357$1$be + (local.get $$arrayidx371) + ) + ) + ) + (local.set $$R328$1 + (local.get $$R328$1$be) + ) + (local.set $$RP357$1 + (local.get $$RP357$1$be) + ) + (br $while-in9) + ) + ) + (local.set $$cmp384 + (i32.gt_u + (local.get $$28) + (local.get $$RP357$1) + ) + ) + (if + (local.get $$cmp384) + (call $_abort) + (block + (i32.store + (local.get $$RP357$1) + (i32.const 0) + ) + (local.set $$R328$3 + (local.get $$R328$1) + ) + (br $do-once6) + ) + ) + ) + (block + (local.set $$fd334 + (i32.add + (local.get $$add$ptr) + (i32.const 8) + ) + ) + (local.set $$42 + (i32.load + (local.get $$fd334) + ) + ) + (local.set $$cmp337 + (i32.gt_u + (local.get $$28) + (local.get $$42) + ) + ) + (if + (local.get $$cmp337) + (call $_abort) + ) + (local.set $$bk340 + (i32.add + (local.get $$42) + (i32.const 12) + ) + ) + (local.set $$43 + (i32.load + (local.get $$bk340) + ) + ) + (local.set $$cmp341 + (i32.eq + (local.get $$43) + (local.get $$add$ptr) + ) + ) + (if + (i32.eqz + (local.get $$cmp341) + ) + (call $_abort) + ) + (local.set $$fd344 + (i32.add + (local.get $$41) + (i32.const 8) + ) + ) + (local.set $$44 + (i32.load + (local.get $$fd344) + ) + ) + (local.set $$cmp345 + (i32.eq + (local.get $$44) + (local.get $$add$ptr) + ) + ) + (if + (local.get $$cmp345) + (block + (i32.store + (local.get $$bk340) + (local.get $$41) + ) + (i32.store + (local.get $$fd344) + (local.get $$42) + ) + (local.set $$R328$3 + (local.get $$41) + ) + (br $do-once6) + ) + (call $_abort) + ) + ) + ) + ) + (local.set $$cmp393 + (i32.eq + (local.get $$40) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp393) + ) + (block + (local.set $$index398 + (i32.add + (local.get $$add$ptr) + (i32.const 28) + ) + ) + (local.set $$49 + (i32.load + (local.get $$index398) + ) + ) + (local.set $$arrayidx399 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$49) + (i32.const 2) + ) + ) + ) + (local.set $$50 + (i32.load + (local.get $$arrayidx399) + ) + ) + (local.set $$cmp400 + (i32.eq + (local.get $$50) + (local.get $$add$ptr) + ) + ) + (block $do-once10 + (if + (local.get $$cmp400) + (block + (i32.store + (local.get $$arrayidx399) + (local.get $$R328$3) + ) + (local.set $$cond6 + (i32.eq + (local.get $$R328$3) + (i32.const 0) + ) + ) + (if + (local.get $$cond6) + (block + (local.set $$shl407 + (i32.shl + (i32.const 1) + (local.get $$49) + ) + ) + (local.set $$neg408 + (i32.xor + (local.get $$shl407) + (i32.const -1) + ) + ) + (local.set $$51 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$and410 + (i32.and + (local.get $$51) + (local.get $$neg408) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$and410) + ) + (br $label$break$L99) + ) + ) + ) + (block + (local.set $$52 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp414 + (i32.gt_u + (local.get $$52) + (local.get $$40) + ) + ) + (if + (local.get $$cmp414) + (call $_abort) + (block + (local.set $$arrayidx420 + (i32.add + (local.get $$40) + (i32.const 16) + ) + ) + (local.set $$53 + (i32.load + (local.get $$arrayidx420) + ) + ) + (local.set $$cmp421 + (i32.eq + (local.get $$53) + (local.get $$add$ptr) + ) + ) + (local.set $$arrayidx428 + (i32.add + (local.get $$40) + (i32.const 20) + ) + ) + (local.set $$arrayidx428$sink + (if (result i32) + (local.get $$cmp421) + (local.get $$arrayidx420) + (local.get $$arrayidx428) + ) + ) + (i32.store + (local.get $$arrayidx428$sink) + (local.get $$R328$3) + ) + (local.set $$cmp433 + (i32.eq + (local.get $$R328$3) + (i32.const 0) + ) + ) + (if + (local.get $$cmp433) + (br $label$break$L99) + (br $do-once10) + ) + ) + ) + ) + ) + ) + (local.set $$54 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp437 + (i32.gt_u + (local.get $$54) + (local.get $$R328$3) + ) + ) + (if + (local.get $$cmp437) + (call $_abort) + ) + (local.set $$parent444 + (i32.add + (local.get $$R328$3) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent444) + (local.get $$40) + ) + (local.set $$child445 + (i32.add + (local.get $$add$ptr) + (i32.const 16) + ) + ) + (local.set $$55 + (i32.load + (local.get $$child445) + ) + ) + (local.set $$cmp447 + (i32.eq + (local.get $$55) + (i32.const 0) + ) + ) + (block $do-once12 + (if + (i32.eqz + (local.get $$cmp447) + ) + (block + (local.set $$cmp451 + (i32.gt_u + (local.get $$54) + (local.get $$55) + ) + ) + (if + (local.get $$cmp451) + (call $_abort) + (block + (local.set $$arrayidx457 + (i32.add + (local.get $$R328$3) + (i32.const 16) + ) + ) + (i32.store + (local.get $$arrayidx457) + (local.get $$55) + ) + (local.set $$parent458 + (i32.add + (local.get $$55) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent458) + (local.get $$R328$3) + ) + (br $do-once12) + ) + ) + ) + ) + ) + (local.set $$arrayidx463 + (i32.add + (local.get $$child445) + (i32.const 4) + ) + ) + (local.set $$56 + (i32.load + (local.get $$arrayidx463) + ) + ) + (local.set $$cmp464 + (i32.eq + (local.get $$56) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.get $$cmp464) + ) + (block + (local.set $$57 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp468 + (i32.gt_u + (local.get $$57) + (local.get $$56) + ) + ) + (if + (local.get $$cmp468) + (call $_abort) + (block + (local.set $$arrayidx474 + (i32.add + (local.get $$R328$3) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx474) + (local.get $$56) + ) + (local.set $$parent475 + (i32.add + (local.get $$56) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent475) + (local.get $$R328$3) + ) + (br $label$break$L99) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $$or484 + (i32.or + (local.get $$add258) + (i32.const 1) + ) + ) + (local.set $$head485 + (i32.add + (local.get $$p$addr$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head485) + (local.get $$or484) + ) + (local.set $$add$ptr486 + (i32.add + (local.get $$p$addr$1) + (local.get $$add258) + ) + ) + (i32.store + (local.get $$add$ptr486) + (local.get $$add258) + ) + (local.set $$58 + (i32.load + (i32.const 29424) + ) + ) + (local.set $$cmp489 + (i32.eq + (local.get $$p$addr$1) + (local.get $$58) + ) + ) + (if + (local.get $$cmp489) + (block + (i32.store + (i32.const 29412) + (local.get $$add258) + ) + (return) + ) + (local.set $$psize$addr$2 + (local.get $$add258) + ) + ) + ) + (block + (local.set $$and501 + (i32.and + (local.get $$29) + (i32.const -2) + ) + ) + (i32.store + (local.get $$head223) + (local.get $$and501) + ) + (local.set $$or502 + (i32.or + (local.get $$psize$addr$1) + (i32.const 1) + ) + ) + (local.set $$head503 + (i32.add + (local.get $$p$addr$1) + (i32.const 4) + ) + ) + (i32.store + (local.get $$head503) + (local.get $$or502) + ) + (local.set $$add$ptr504 + (i32.add + (local.get $$p$addr$1) + (local.get $$psize$addr$1) + ) + ) + (i32.store + (local.get $$add$ptr504) + (local.get $$psize$addr$1) + ) + (local.set $$psize$addr$2 + (local.get $$psize$addr$1) + ) + ) + ) + (local.set $$shr507 + (i32.shr_u + (local.get $$psize$addr$2) + (i32.const 3) + ) + ) + (local.set $$cmp508 + (i32.lt_u + (local.get $$psize$addr$2) + (i32.const 256) + ) + ) + (if + (local.get $$cmp508) + (block + (local.set $$shl515 + (i32.shl + (local.get $$shr507) + (i32.const 1) + ) + ) + (local.set $$arrayidx516 + (i32.add + (i32.const 29444) + (i32.shl + (local.get $$shl515) + (i32.const 2) + ) + ) + ) + (local.set $$59 + (i32.load + (i32.const 29404) + ) + ) + (local.set $$shl519 + (i32.shl + (i32.const 1) + (local.get $$shr507) + ) + ) + (local.set $$and520 + (i32.and + (local.get $$59) + (local.get $$shl519) + ) + ) + (local.set $$tobool521 + (i32.eq + (local.get $$and520) + (i32.const 0) + ) + ) + (if + (local.get $$tobool521) + (block + (local.set $$or525 + (i32.or + (local.get $$59) + (local.get $$shl519) + ) + ) + (i32.store + (i32.const 29404) + (local.get $$or525) + ) + (local.set $$$pre + (i32.add + (local.get $$arrayidx516) + (i32.const 8) + ) + ) + (local.set $$$pre$phiZ2D + (local.get $$$pre) + ) + (local.set $$F517$0 + (local.get $$arrayidx516) + ) + ) + (block + (local.set $$60 + (i32.add + (local.get $$arrayidx516) + (i32.const 8) + ) + ) + (local.set $$61 + (i32.load + (local.get $$60) + ) + ) + (local.set $$62 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp529 + (i32.gt_u + (local.get $$62) + (local.get $$61) + ) + ) + (if + (local.get $$cmp529) + (call $_abort) + (block + (local.set $$$pre$phiZ2D + (local.get $$60) + ) + (local.set $$F517$0 + (local.get $$61) + ) + ) + ) + ) + ) + (i32.store + (local.get $$$pre$phiZ2D) + (local.get $$p$addr$1) + ) + (local.set $$bk539 + (i32.add + (local.get $$F517$0) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk539) + (local.get $$p$addr$1) + ) + (local.set $$fd540 + (i32.add + (local.get $$p$addr$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd540) + (local.get $$F517$0) + ) + (local.set $$bk541 + (i32.add + (local.get $$p$addr$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk541) + (local.get $$arrayidx516) + ) + (return) + ) + ) + (local.set $$shr546 + (i32.shr_u + (local.get $$psize$addr$2) + (i32.const 8) + ) + ) + (local.set $$cmp547 + (i32.eq + (local.get $$shr546) + (i32.const 0) + ) + ) + (if + (local.get $$cmp547) + (local.set $$I545$0 + (i32.const 0) + ) + (block + (local.set $$cmp551 + (i32.gt_u + (local.get $$psize$addr$2) + (i32.const 16777215) + ) + ) + (if + (local.get $$cmp551) + (local.set $$I545$0 + (i32.const 31) + ) + (block + (local.set $$sub + (i32.add + (local.get $$shr546) + (i32.const 1048320) + ) + ) + (local.set $$shr555 + (i32.shr_u + (local.get $$sub) + (i32.const 16) + ) + ) + (local.set $$and556 + (i32.and + (local.get $$shr555) + (i32.const 8) + ) + ) + (local.set $$shl557 + (i32.shl + (local.get $$shr546) + (local.get $$and556) + ) + ) + (local.set $$sub558 + (i32.add + (local.get $$shl557) + (i32.const 520192) + ) + ) + (local.set $$shr559 + (i32.shr_u + (local.get $$sub558) + (i32.const 16) + ) + ) + (local.set $$and560 + (i32.and + (local.get $$shr559) + (i32.const 4) + ) + ) + (local.set $$add561 + (i32.or + (local.get $$and560) + (local.get $$and556) + ) + ) + (local.set $$shl562 + (i32.shl + (local.get $$shl557) + (local.get $$and560) + ) + ) + (local.set $$sub563 + (i32.add + (local.get $$shl562) + (i32.const 245760) + ) + ) + (local.set $$shr564 + (i32.shr_u + (local.get $$sub563) + (i32.const 16) + ) + ) + (local.set $$and565 + (i32.and + (local.get $$shr564) + (i32.const 2) + ) + ) + (local.set $$add566 + (i32.or + (local.get $$add561) + (local.get $$and565) + ) + ) + (local.set $$sub567 + (i32.sub + (i32.const 14) + (local.get $$add566) + ) + ) + (local.set $$shl568 + (i32.shl + (local.get $$shl562) + (local.get $$and565) + ) + ) + (local.set $$shr569 + (i32.shr_u + (local.get $$shl568) + (i32.const 15) + ) + ) + (local.set $$add570 + (i32.add + (local.get $$sub567) + (local.get $$shr569) + ) + ) + (local.set $$shl571 + (i32.shl + (local.get $$add570) + (i32.const 1) + ) + ) + (local.set $$add572 + (i32.add + (local.get $$add570) + (i32.const 7) + ) + ) + (local.set $$shr573 + (i32.shr_u + (local.get $$psize$addr$2) + (local.get $$add572) + ) + ) + (local.set $$and574 + (i32.and + (local.get $$shr573) + (i32.const 1) + ) + ) + (local.set $$add575 + (i32.or + (local.get $$and574) + (local.get $$shl571) + ) + ) + (local.set $$I545$0 + (local.get $$add575) + ) + ) + ) + ) + ) + (local.set $$arrayidx579 + (i32.add + (i32.const 29708) + (i32.shl + (local.get $$I545$0) + (i32.const 2) + ) + ) + ) + (local.set $$index580 + (i32.add + (local.get $$p$addr$1) + (i32.const 28) + ) + ) + (i32.store + (local.get $$index580) + (local.get $$I545$0) + ) + (local.set $$child581 + (i32.add + (local.get $$p$addr$1) + (i32.const 16) + ) + ) + (local.set $$arrayidx582 + (i32.add + (local.get $$p$addr$1) + (i32.const 20) + ) + ) + (i32.store + (local.get $$arrayidx582) + (i32.const 0) + ) + (i32.store + (local.get $$child581) + (i32.const 0) + ) + (local.set $$63 + (i32.load + (i32.const 29408) + ) + ) + (local.set $$shl586 + (i32.shl + (i32.const 1) + (local.get $$I545$0) + ) + ) + (local.set $$and587 + (i32.and + (local.get $$63) + (local.get $$shl586) + ) + ) + (local.set $$tobool588 + (i32.eq + (local.get $$and587) + (i32.const 0) + ) + ) + (if + (local.get $$tobool588) + (block + (local.set $$or592 + (i32.or + (local.get $$63) + (local.get $$shl586) + ) + ) + (i32.store + (i32.const 29408) + (local.get $$or592) + ) + (i32.store + (local.get $$arrayidx579) + (local.get $$p$addr$1) + ) + (local.set $$parent593 + (i32.add + (local.get $$p$addr$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent593) + (local.get $$arrayidx579) + ) + (local.set $$bk594 + (i32.add + (local.get $$p$addr$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk594) + (local.get $$p$addr$1) + ) + (local.set $$fd595 + (i32.add + (local.get $$p$addr$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd595) + (local.get $$p$addr$1) + ) + (return) + ) + ) + (local.set $$64 + (i32.load + (local.get $$arrayidx579) + ) + ) + (local.set $$head6059 + (i32.add + (local.get $$64) + (i32.const 4) + ) + ) + (local.set $$65 + (i32.load + (local.get $$head6059) + ) + ) + (local.set $$and60610 + (i32.and + (local.get $$65) + (i32.const -8) + ) + ) + (local.set $$cmp60711 + (i32.eq + (local.get $$and60610) + (local.get $$psize$addr$2) + ) + ) + (block $label$break$L189 + (if + (local.get $$cmp60711) + (local.set $$T$0$lcssa + (local.get $$64) + ) + (block + (local.set $$cmp598 + (i32.eq + (local.get $$I545$0) + (i32.const 31) + ) + ) + (local.set $$shr600 + (i32.shr_u + (local.get $$I545$0) + (i32.const 1) + ) + ) + (local.set $$sub603 + (i32.sub + (i32.const 25) + (local.get $$shr600) + ) + ) + (local.set $$cond + (if (result i32) + (local.get $$cmp598) + (i32.const 0) + (local.get $$sub603) + ) + ) + (local.set $$shl604 + (i32.shl + (local.get $$psize$addr$2) + (local.get $$cond) + ) + ) + (local.set $$K597$013 + (local.get $$shl604) + ) + (local.set $$T$012 + (local.get $$64) + ) + (loop $while-in16 + (block $while-out15 + (local.set $$shr611 + (i32.shr_u + (local.get $$K597$013) + (i32.const 31) + ) + ) + (local.set $$arrayidx613 + (i32.add + (i32.add + (local.get $$T$012) + (i32.const 16) + ) + (i32.shl + (local.get $$shr611) + (i32.const 2) + ) + ) + ) + (local.set $$66 + (i32.load + (local.get $$arrayidx613) + ) + ) + (local.set $$cmp615 + (i32.eq + (local.get $$66) + (i32.const 0) + ) + ) + (if + (local.get $$cmp615) + (br $while-out15) + ) + (local.set $$shl614 + (i32.shl + (local.get $$K597$013) + (i32.const 1) + ) + ) + (local.set $$head605 + (i32.add + (local.get $$66) + (i32.const 4) + ) + ) + (local.set $$67 + (i32.load + (local.get $$head605) + ) + ) + (local.set $$and606 + (i32.and + (local.get $$67) + (i32.const -8) + ) + ) + (local.set $$cmp607 + (i32.eq + (local.get $$and606) + (local.get $$psize$addr$2) + ) + ) + (if + (local.get $$cmp607) + (block + (local.set $$T$0$lcssa + (local.get $$66) + ) + (br $label$break$L189) + ) + (block + (local.set $$K597$013 + (local.get $$shl614) + ) + (local.set $$T$012 + (local.get $$66) + ) + ) + ) + (br $while-in16) + ) + ) + (local.set $$68 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp620 + (i32.gt_u + (local.get $$68) + (local.get $$arrayidx613) + ) + ) + (if + (local.get $$cmp620) + (call $_abort) + ) + (i32.store + (local.get $$arrayidx613) + (local.get $$p$addr$1) + ) + (local.set $$parent625 + (i32.add + (local.get $$p$addr$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent625) + (local.get $$T$012) + ) + (local.set $$bk626 + (i32.add + (local.get $$p$addr$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk626) + (local.get $$p$addr$1) + ) + (local.set $$fd627 + (i32.add + (local.get $$p$addr$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd627) + (local.get $$p$addr$1) + ) + (return) + ) + ) + ) + (local.set $$fd635 + (i32.add + (local.get $$T$0$lcssa) + (i32.const 8) + ) + ) + (local.set $$69 + (i32.load + (local.get $$fd635) + ) + ) + (local.set $$70 + (i32.load + (i32.const 29420) + ) + ) + (local.set $$cmp637 + (i32.le_u + (local.get $$70) + (local.get $$T$0$lcssa) + ) + ) + (local.set $$cmp641 + (i32.le_u + (local.get $$70) + (local.get $$69) + ) + ) + (local.set $$71 + (i32.and + (local.get $$cmp641) + (local.get $$cmp637) + ) + ) + (if + (i32.eqz + (local.get $$71) + ) + (call $_abort) + ) + (local.set $$bk648 + (i32.add + (local.get $$69) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk648) + (local.get $$p$addr$1) + ) + (i32.store + (local.get $$fd635) + (local.get $$p$addr$1) + ) + (local.set $$fd650 + (i32.add + (local.get $$p$addr$1) + (i32.const 8) + ) + ) + (i32.store + (local.get $$fd650) + (local.get $$69) + ) + (local.set $$bk651 + (i32.add + (local.get $$p$addr$1) + (i32.const 12) + ) + ) + (i32.store + (local.get $$bk651) + (local.get $$T$0$lcssa) + ) + (local.set $$parent652 + (i32.add + (local.get $$p$addr$1) + (i32.const 24) + ) + ) + (i32.store + (local.get $$parent652) + (i32.const 0) + ) + (return) + ) + (func $__emscripten_dceable_type_decls (; 653 ;) + (drop + (call $_emscripten_glIsBuffer + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glIsShader + (i32.const 0) + ) + ) + (call $_emscripten_glHint + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glEnable + (i32.const 0) + ) + (call $_emscripten_glEnableVertexAttribArray + (i32.const 0) + ) + (call $_emscripten_glGenBuffers + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetFramebufferAttachmentParameteriv + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetFloatv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetShaderInfoLog + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetActiveAttrib + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetProgramInfoLog + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetShaderPrecisionFormat + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetShaderiv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetUniformiv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetIntegerv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGenFramebuffers + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glFrontFace + (i32.const 0) + ) + (call $_emscripten_glGetVertexAttribfv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetVertexAttribiv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glIsTexture + (i32.const 0) + ) + ) + (call $_emscripten_glLineWidth + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glPixelStorei + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glPolygonOffset + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glDisableVertexAttribArray + (i32.const 0) + ) + (call $_emscripten_glFinish) + (call $_emscripten_glFramebufferRenderbuffer + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGenRenderbuffers + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glIsEnabled + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glIsFramebuffer + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glIsProgram + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glGetAttribLocation + (i32.const 0) + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glIsRenderbuffer + (i32.const 0) + ) + ) + (call $_emscripten_glFramebufferTexture2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetActiveUniform + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glLinkProgram + (i32.const 0) + ) + (call $_emscripten_glReadPixels + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDrawElements + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glReleaseShaderCompiler) + (call $_emscripten_glRenderbufferStorage + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glSampleCoverage + (f64.promote_f32 + (f32.const 0) + ) + (i32.const 0) + ) + (call $_emscripten_glScissor + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetBufferParameteriv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetProgramiv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetShaderSource + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDrawArrays + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glShaderBinary + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glGetError) + ) + (call $_emscripten_glGetRenderbufferParameteriv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glShaderSource + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glStencilFuncSeparate + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetAttachedShaders + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetTexParameteriv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glStencilFunc + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glStencilMask + (i32.const 0) + ) + (call $_emscripten_glGetTexParameterfv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glGetString + (i32.const 0) + ) + ) + (drop + (call $_emscripten_glGetUniformLocation + (i32.const 0) + (i32.const 0) + ) + ) + (call $_emscripten_glFlush) + (call $_emscripten_glGenerateMipmap + (i32.const 0) + ) + (call $_emscripten_glGenTextures + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetBooleanv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDisable + (i32.const 0) + ) + (call $_emscripten_glGetUniformfv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetVertexAttribPointerv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glValidateProgram + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib1fv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform1f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glStencilOpSeparate + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexParameteri + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexSubImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform1fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexParameterf + (i32.const 0) + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniform2iv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform3fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform3i + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform4f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glVertexAttrib2f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniformMatrix2fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform4i + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib3f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniform4fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform3iv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib3fv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUseProgram + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib4f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniformMatrix3fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glStencilMaskSeparate + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexParameterfv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform1i + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glStencilOp + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glTexParameteriv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib1f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniform2fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib2fv + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform2f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniform1iv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform2i + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniform3f + (i32.const 0) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glUniform4iv + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glUniformMatrix4fv + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGenQueriesEXT + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glIsQueryEXT + (i32.const 0) + ) + ) + (call $_emscripten_glEndQueryEXT + (i32.const 0) + ) + (call $_emscripten_glBeginQueryEXT + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetQueryivEXT + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetQueryObjectivEXT + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetQueryObjecti64vEXT + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDrawArraysInstancedANGLE + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDeleteQueriesEXT + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glQueryCounterEXT + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetQueryObjectuivEXT + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGetQueryObjectui64vEXT + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDeleteVertexArraysOES + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glGenVertexArraysOES + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glIsVertexArrayOES + (i32.const 0) + ) + ) + (call $_emscripten_glDrawBuffersWEBGL + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDrawElementsInstancedANGLE + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBindVertexArrayOES + (i32.const 0) + ) + (call $_emscripten_glActiveTexture + (i32.const 0) + ) + (call $_emscripten_glVertexAttribDivisorANGLE + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glCreateShader + (i32.const 0) + ) + ) + (call $_emscripten_glDeleteFramebuffers + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDeleteProgram + (i32.const 0) + ) + (call $_emscripten_glDeleteRenderbuffers + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBindBuffer + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glCompressedTexSubImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDeleteShader + (i32.const 0) + ) + (call $_emscripten_glDeleteTextures + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glDepthFunc + (i32.const 0) + ) + (call $_emscripten_glDepthMask + (i32.const 0) + ) + (call $_emscripten_glDepthRangef + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glDetachShader + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBufferData + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBufferSubData + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glCopyTexImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glCheckFramebufferStatus + (i32.const 0) + ) + ) + (call $_emscripten_glBindFramebuffer + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBlendFunc + (i32.const 0) + (i32.const 0) + ) + (drop + (call $_emscripten_glCreateProgram) + ) + (call $_emscripten_glAttachShader + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glCopyTexSubImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glClearStencil + (i32.const 0) + ) + (call $_emscripten_glColorMask + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glCompileShader + (i32.const 0) + ) + (call $_emscripten_glBlendEquation + (i32.const 0) + ) + (call $_emscripten_glBlendEquationSeparate + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glClearColor + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glCompressedTexImage2D + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glClearDepthf + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glBlendFuncSeparate + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBindRenderbuffer + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBindAttribLocation + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBindTexture + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glBlendColor + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + (f64.promote_f32 + (f32.const 0) + ) + ) + (call $_emscripten_glClear + (i32.const 0) + ) + (call $_emscripten_glCullFace + (i32.const 0) + ) + (call $_emscripten_glDeleteBuffers + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glViewport + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttribPointer + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_emscripten_glVertexAttrib4fv + (i32.const 0) + (i32.const 0) + ) + ) + (func $_emscripten_glBlendColor$legalf32 (; 654 ;) (param $a f32) (param $b f32) (param $c f32) (param $d f32) + (call $_emscripten_glBlendColor + (f64.promote_f32 + (local.get $a) + ) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + ) + ) + (func $_emscripten_glClearColor$legalf32 (; 655 ;) (param $a f32) (param $b f32) (param $c f32) (param $d f32) + (call $_emscripten_glClearColor + (f64.promote_f32 + (local.get $a) + ) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + ) + ) + (func $_emscripten_glClearDepthf$legalf32 (; 656 ;) (param $a f32) + (call $_emscripten_glClearDepthf + (f64.promote_f32 + (local.get $a) + ) + ) + ) + (func $_emscripten_glDepthRangef$legalf32 (; 657 ;) (param $a f32) (param $b f32) + (call $_emscripten_glDepthRangef + (f64.promote_f32 + (local.get $a) + ) + (f64.promote_f32 + (local.get $b) + ) + ) + ) + (func $_emscripten_glLineWidth$legalf32 (; 658 ;) (param $a f32) + (call $_emscripten_glLineWidth + (f64.promote_f32 + (local.get $a) + ) + ) + ) + (func $_emscripten_glPolygonOffset$legalf32 (; 659 ;) (param $a f32) (param $b f32) + (call $_emscripten_glPolygonOffset + (f64.promote_f32 + (local.get $a) + ) + (f64.promote_f32 + (local.get $b) + ) + ) + ) + (func $_emscripten_glSampleCoverage$legalf32 (; 660 ;) (param $a f32) (param $b i32) + (call $_emscripten_glSampleCoverage + (f64.promote_f32 + (local.get $a) + ) + (local.get $b) + ) + ) + (func $_emscripten_glTexParameterf$legalf32 (; 661 ;) (param $a i32) (param $b i32) (param $c f32) + (call $_emscripten_glTexParameterf + (local.get $a) + (local.get $b) + (f64.promote_f32 + (local.get $c) + ) + ) + ) + (func $_emscripten_glUniform1f$legalf32 (; 662 ;) (param $a i32) (param $b f32) + (call $_emscripten_glUniform1f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + ) + ) + (func $_emscripten_glUniform2f$legalf32 (; 663 ;) (param $a i32) (param $b f32) (param $c f32) + (call $_emscripten_glUniform2f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + ) + ) + (func $_emscripten_glUniform3f$legalf32 (; 664 ;) (param $a i32) (param $b f32) (param $c f32) (param $d f32) + (call $_emscripten_glUniform3f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + ) + ) + (func $_emscripten_glUniform4f$legalf32 (; 665 ;) (param $a i32) (param $b f32) (param $c f32) (param $d f32) (param $e f32) + (call $_emscripten_glUniform4f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + (f64.promote_f32 + (local.get $e) + ) + ) + ) + (func $_emscripten_glVertexAttrib1f$legalf32 (; 666 ;) (param $a i32) (param $b f32) + (call $_emscripten_glVertexAttrib1f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + ) + ) + (func $_emscripten_glVertexAttrib2f$legalf32 (; 667 ;) (param $a i32) (param $b f32) (param $c f32) + (call $_emscripten_glVertexAttrib2f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + ) + ) + (func $_emscripten_glVertexAttrib3f$legalf32 (; 668 ;) (param $a i32) (param $b f32) (param $c f32) (param $d f32) + (call $_emscripten_glVertexAttrib3f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + ) + ) + (func $_emscripten_glVertexAttrib4f$legalf32 (; 669 ;) (param $a i32) (param $b f32) (param $c f32) (param $d f32) (param $e f32) + (call $_emscripten_glVertexAttrib4f + (local.get $a) + (f64.promote_f32 + (local.get $b) + ) + (f64.promote_f32 + (local.get $c) + ) + (f64.promote_f32 + (local.get $d) + ) + (f64.promote_f32 + (local.get $e) + ) + ) + ) + (func $_llvm_round_f32 (; 670 ;) (param $f f64) (result f64) + (return + (if (result f64) + (f64.ge + (local.get $f) + (f64.const 0) + ) + (f64.floor + (f64.add + (local.get $f) + (f64.const 0.5) + ) + ) + (f64.ceil + (f64.sub + (local.get $f) + (f64.const 0.5) + ) + ) + ) + ) + ) + (func $_memcpy (; 671 ;) (param $dest i32) (param $src i32) (param $num i32) (result i32) + (local $ret i32) + (local $aligned_dest_end i32) + (local $block_aligned_dest_end i32) + (local $dest_end i32) + (if + (i32.ge_s + (local.get $num) + (i32.const 8192) + ) + (block + (drop + (call $_emscripten_memcpy_big + (local.get $dest) + (local.get $src) + (local.get $num) + ) + ) + (return + (local.get $dest) + ) + ) + ) + (local.set $ret + (local.get $dest) + ) + (local.set $dest_end + (i32.add + (local.get $dest) + (local.get $num) + ) + ) + (if + (i32.eq + (i32.and + (local.get $dest) + (i32.const 3) + ) + (i32.and + (local.get $src) + (i32.const 3) + ) + ) + (block + (loop $while-in + (block $while-out + (if + (i32.eqz + (i32.and + (local.get $dest) + (i32.const 3) + ) + ) + (br $while-out) + ) + (block + (if + (i32.eq + (local.get $num) + (i32.const 0) + ) + (return + (local.get $ret) + ) + ) + (i32.store8 + (local.get $dest) + (i32.load8_s + (local.get $src) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (i32.const 1) + ) + ) + (local.set $src + (i32.add + (local.get $src) + (i32.const 1) + ) + ) + (local.set $num + (i32.sub + (local.get $num) + (i32.const 1) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $aligned_dest_end + (i32.and + (local.get $dest_end) + (i32.const -4) + ) + ) + (local.set $block_aligned_dest_end + (i32.sub + (local.get $aligned_dest_end) + (i32.const 64) + ) + ) + (loop $while-in1 + (block $while-out0 + (if + (i32.eqz + (i32.le_s + (local.get $dest) + (local.get $block_aligned_dest_end) + ) + ) + (br $while-out0) + ) + (block + (i32.store + (local.get $dest) + (i32.load + (local.get $src) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 4) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 4) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 8) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 12) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 12) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 16) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 20) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 20) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 24) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 28) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 28) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 32) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 32) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 36) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 36) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 40) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 40) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 44) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 44) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 48) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 48) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 52) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 52) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 56) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 56) + ) + ) + ) + (i32.store + (i32.add + (local.get $dest) + (i32.const 60) + ) + (i32.load + (i32.add + (local.get $src) + (i32.const 60) + ) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (i32.const 64) + ) + ) + (local.set $src + (i32.add + (local.get $src) + (i32.const 64) + ) + ) + ) + (br $while-in1) + ) + ) + (loop $while-in3 + (block $while-out2 + (if + (i32.eqz + (i32.lt_s + (local.get $dest) + (local.get $aligned_dest_end) + ) + ) + (br $while-out2) + ) + (block + (i32.store + (local.get $dest) + (i32.load + (local.get $src) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (i32.const 4) + ) + ) + (local.set $src + (i32.add + (local.get $src) + (i32.const 4) + ) + ) + ) + (br $while-in3) + ) + ) + ) + (block + (local.set $aligned_dest_end + (i32.sub + (local.get $dest_end) + (i32.const 4) + ) + ) + (loop $while-in5 + (block $while-out4 + (if + (i32.eqz + (i32.lt_s + (local.get $dest) + (local.get $aligned_dest_end) + ) + ) + (br $while-out4) + ) + (block + (i32.store8 + (local.get $dest) + (i32.load8_s + (local.get $src) + ) + ) + (i32.store8 + (i32.add + (local.get $dest) + (i32.const 1) + ) + (i32.load8_s + (i32.add + (local.get $src) + (i32.const 1) + ) + ) + ) + (i32.store8 + (i32.add + (local.get $dest) + (i32.const 2) + ) + (i32.load8_s + (i32.add + (local.get $src) + (i32.const 2) + ) + ) + ) + (i32.store8 + (i32.add + (local.get $dest) + (i32.const 3) + ) + (i32.load8_s + (i32.add + (local.get $src) + (i32.const 3) + ) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (i32.const 4) + ) + ) + (local.set $src + (i32.add + (local.get $src) + (i32.const 4) + ) + ) + ) + (br $while-in5) + ) + ) + ) + ) + (loop $while-in7 + (block $while-out6 + (if + (i32.eqz + (i32.lt_s + (local.get $dest) + (local.get $dest_end) + ) + ) + (br $while-out6) + ) + (block + (i32.store8 + (local.get $dest) + (i32.load8_s + (local.get $src) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (i32.const 1) + ) + ) + (local.set $src + (i32.add + (local.get $src) + (i32.const 1) + ) + ) + ) + (br $while-in7) + ) + ) + (return + (local.get $ret) + ) + ) + (func $_memmove (; 672 ;) (param $dest i32) (param $src i32) (param $num i32) (result i32) + (local $ret i32) + (if + (i32.and + (i32.lt_s + (local.get $src) + (local.get $dest) + ) + (i32.lt_s + (local.get $dest) + (i32.add + (local.get $src) + (local.get $num) + ) + ) + ) + (block + (local.set $ret + (local.get $dest) + ) + (local.set $src + (i32.add + (local.get $src) + (local.get $num) + ) + ) + (local.set $dest + (i32.add + (local.get $dest) + (local.get $num) + ) + ) + (loop $while-in + (block $while-out + (if + (i32.eqz + (i32.gt_s + (local.get $num) + (i32.const 0) + ) + ) + (br $while-out) + ) + (block + (local.set $dest + (i32.sub + (local.get $dest) + (i32.const 1) + ) + ) + (local.set $src + (i32.sub + (local.get $src) + (i32.const 1) + ) + ) + (local.set $num + (i32.sub + (local.get $num) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $dest) + (i32.load8_s + (local.get $src) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $dest + (local.get $ret) + ) + ) + (drop + (call $_memcpy + (local.get $dest) + (local.get $src) + (local.get $num) + ) + ) + ) + (return + (local.get $dest) + ) + ) + (func $_memset (; 673 ;) (param $ptr i32) (param $value i32) (param $num i32) (result i32) + (local $end i32) + (local $aligned_end i32) + (local $block_aligned_end i32) + (local $value4 i32) + (local.set $end + (i32.add + (local.get $ptr) + (local.get $num) + ) + ) + (local.set $value + (i32.and + (local.get $value) + (i32.const 255) + ) + ) + (if + (i32.ge_s + (local.get $num) + (i32.const 67) + ) + (block + (loop $while-in + (block $while-out + (if + (i32.eqz + (i32.ne + (i32.and + (local.get $ptr) + (i32.const 3) + ) + (i32.const 0) + ) + ) + (br $while-out) + ) + (block + (i32.store8 + (local.get $ptr) + (local.get $value) + ) + (local.set $ptr + (i32.add + (local.get $ptr) + (i32.const 1) + ) + ) + ) + (br $while-in) + ) + ) + (local.set $aligned_end + (i32.and + (local.get $end) + (i32.const -4) + ) + ) + (local.set $value4 + (i32.or + (i32.or + (i32.or + (local.get $value) + (i32.shl + (local.get $value) + (i32.const 8) + ) + ) + (i32.shl + (local.get $value) + (i32.const 16) + ) + ) + (i32.shl + (local.get $value) + (i32.const 24) + ) + ) + ) + (local.set $block_aligned_end + (i32.sub + (local.get $aligned_end) + (i32.const 64) + ) + ) + (loop $while-in1 + (block $while-out0 + (if + (i32.eqz + (i32.le_s + (local.get $ptr) + (local.get $block_aligned_end) + ) + ) + (br $while-out0) + ) + (block + (i32.store + (local.get $ptr) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 4) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 8) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 12) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 16) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 20) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 24) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 28) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 32) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 36) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 40) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 44) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 48) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 52) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 56) + ) + (local.get $value4) + ) + (i32.store + (i32.add + (local.get $ptr) + (i32.const 60) + ) + (local.get $value4) + ) + (local.set $ptr + (i32.add + (local.get $ptr) + (i32.const 64) + ) + ) + ) + (br $while-in1) + ) + ) + (loop $while-in3 + (block $while-out2 + (if + (i32.eqz + (i32.lt_s + (local.get $ptr) + (local.get $aligned_end) + ) + ) + (br $while-out2) + ) + (block + (i32.store + (local.get $ptr) + (local.get $value4) + ) + (local.set $ptr + (i32.add + (local.get $ptr) + (i32.const 4) + ) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (loop $while-in5 + (block $while-out4 + (if + (i32.eqz + (i32.lt_s + (local.get $ptr) + (local.get $end) + ) + ) + (br $while-out4) + ) + (block + (i32.store8 + (local.get $ptr) + (local.get $value) + ) + (local.set $ptr + (i32.add + (local.get $ptr) + (i32.const 1) + ) + ) + ) + (br $while-in5) + ) + ) + (return + (i32.sub + (local.get $end) + (local.get $num) + ) + ) + ) + (func $_sbrk (; 674 ;) (param $increment i32) (result i32) + (local $oldDynamicTop i32) + (local $oldDynamicTopOnChange i32) + (local $newDynamicTop i32) + (local $totalMemory i32) + (local.set $totalMemory + (call $_emscripten_get_heap_size) + ) + (local.set $oldDynamicTop + (i32.load + (global.get $DYNAMICTOP_PTR) + ) + ) + (local.set $newDynamicTop + (i32.add + (local.get $oldDynamicTop) + (local.get $increment) + ) + ) + (if + (i32.or + (i32.and + (i32.gt_s + (local.get $increment) + (i32.const 0) + ) + (i32.lt_s + (local.get $newDynamicTop) + (local.get $oldDynamicTop) + ) + ) + (i32.lt_s + (local.get $newDynamicTop) + (i32.const 0) + ) + ) + (block + (drop + (call $abortOnCannotGrowMemory + (local.get $newDynamicTop) + ) + ) + (call $___setErrNo + (i32.const 12) + ) + (return + (i32.const -1) + ) + ) + ) + (if + (i32.gt_s + (local.get $newDynamicTop) + (local.get $totalMemory) + ) + (if + (i32.eqz + (call $_emscripten_resize_heap + (local.get $newDynamicTop) + ) + ) + (block + (call $___setErrNo + (i32.const 12) + ) + (return + (i32.const -1) + ) + ) + ) + ) + (i32.store + (global.get $DYNAMICTOP_PTR) + (local.get $newDynamicTop) + ) + (return + (local.get $oldDynamicTop) + ) + ) + (func $dynCall_ff (; 675 ;) (param $index i32) (param $a1 f32) (result f32) + (return + (call_indirect (type $FUNCSIG$ff) + (local.get $a1) + (i32.add + (i32.and + (local.get $index) + (i32.const 7) + ) + (i32.const 0) + ) + ) + ) + ) + (func $dynCall_fff (; 676 ;) (param $index i32) (param $a1 f32) (param $a2 f32) (result f32) + (return + (call_indirect (type $FUNCSIG$fff) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 15) + ) + (i32.const 8) + ) + ) + ) + ) + (func $dynCall_i (; 677 ;) (param $index i32) (result i32) + (return + (call_indirect (type $FUNCSIG$i) + (i32.add + (i32.and + (local.get $index) + (i32.const 127) + ) + (i32.const 24) + ) + ) + ) + ) + (func $dynCall_ii (; 678 ;) (param $index i32) (param $a1 i32) (result i32) + (return + (call_indirect (type $FUNCSIG$ii) + (local.get $a1) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 152) + ) + ) + ) + ) + (func $dynCall_iidiiii (; 679 ;) (param $index i32) (param $a1 i32) (param $a2 f64) (param $a3 i32) (param $a4 i32) (param $a5 i32) (param $a6 i32) (result i32) + (return + (call_indirect (type $FUNCSIG$iidiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (local.get $a6) + (i32.add + (i32.and + (local.get $index) + (i32.const 31) + ) + (i32.const 408) + ) + ) + ) + ) + (func $dynCall_iii (; 680 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (result i32) + (return + (call_indirect (type $FUNCSIG$iii) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 127) + ) + (i32.const 440) + ) + ) + ) + ) + (func $dynCall_iiii (; 681 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) + (return + (call_indirect (type $FUNCSIG$iiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 63) + ) + (i32.const 568) + ) + ) + ) + ) + (func $dynCall_iiiii (; 682 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (result i32) + (return + (call_indirect (type $FUNCSIG$iiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (i32.add + (i32.and + (local.get $index) + (i32.const 0) + ) + (i32.const 632) + ) + ) + ) + ) + (func $dynCall_jiji (; 683 ;) (param $index i32) (param $a1 i32) (param $a2 i64) (param $a3 i32) (result i64) + (return + (call_indirect (type $FUNCSIG$jiji) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 63) + ) + (i32.const 633) + ) + ) + ) + ) + (func $dynCall_v (; 684 ;) (param $index i32) + (call_indirect (type $FUNCSIG$v) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 697) + ) + ) + ) + (func $dynCall_vf (; 685 ;) (param $index i32) (param $a1 f32) + (call_indirect (type $FUNCSIG$vf) + (local.get $a1) + (i32.add + (i32.and + (local.get $index) + (i32.const 127) + ) + (i32.const 953) + ) + ) + ) + (func $dynCall_vff (; 686 ;) (param $index i32) (param $a1 f32) (param $a2 f32) + (call_indirect (type $FUNCSIG$vff) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 127) + ) + (i32.const 1081) + ) + ) + ) + (func $dynCall_vffff (; 687 ;) (param $index i32) (param $a1 f32) (param $a2 f32) (param $a3 f32) (param $a4 f32) + (call_indirect (type $FUNCSIG$vffff) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (i32.add + (i32.and + (local.get $index) + (i32.const 63) + ) + (i32.const 1209) + ) + ) + ) + (func $dynCall_vfi (; 688 ;) (param $index i32) (param $a1 f32) (param $a2 i32) + (call_indirect (type $FUNCSIG$vfi) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 1273) + ) + ) + ) + (func $dynCall_vi (; 689 ;) (param $index i32) (param $a1 i32) + (call_indirect (type $FUNCSIG$vi) + (local.get $a1) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 1529) + ) + ) + ) + (func $dynCall_vidd (; 690 ;) (param $index i32) (param $a1 i32) (param $a2 f64) (param $a3 f64) + (call_indirect (type $FUNCSIG$vidd) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 31) + ) + (i32.const 1785) + ) + ) + ) + (func $dynCall_vif (; 691 ;) (param $index i32) (param $a1 i32) (param $a2 f32) + (call_indirect (type $FUNCSIG$vif) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 1817) + ) + ) + ) + (func $dynCall_viff (; 692 ;) (param $index i32) (param $a1 i32) (param $a2 f32) (param $a3 f32) + (call_indirect (type $FUNCSIG$viff) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 2073) + ) + ) + ) + (func $dynCall_vifff (; 693 ;) (param $index i32) (param $a1 i32) (param $a2 f32) (param $a3 f32) (param $a4 f32) + (call_indirect (type $FUNCSIG$vifff) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 2329) + ) + ) + ) + (func $dynCall_viffff (; 694 ;) (param $index i32) (param $a1 i32) (param $a2 f32) (param $a3 f32) (param $a4 f32) (param $a5 f32) + (call_indirect (type $FUNCSIG$viffff) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 2585) + ) + ) + ) + (func $dynCall_vii (; 695 ;) (param $index i32) (param $a1 i32) (param $a2 i32) + (call_indirect (type $FUNCSIG$vii) + (local.get $a1) + (local.get $a2) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 2841) + ) + ) + ) + (func $dynCall_viif (; 696 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 f32) + (call_indirect (type $FUNCSIG$viif) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 3097) + ) + ) + ) + (func $dynCall_viii (; 697 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) + (call_indirect (type $FUNCSIG$viii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 3353) + ) + ) + ) + (func $dynCall_viiii (; 698 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) + (call_indirect (type $FUNCSIG$viiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 3609) + ) + ) + ) + (func $dynCall_viiiii (; 699 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (param $a5 i32) + (call_indirect (type $FUNCSIG$viiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 3865) + ) + ) + ) + (func $dynCall_viiiiii (; 700 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (param $a5 i32) (param $a6 i32) + (call_indirect (type $FUNCSIG$viiiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (local.get $a6) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 4121) + ) + ) + ) + (func $dynCall_viiiiiii (; 701 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (param $a5 i32) (param $a6 i32) (param $a7 i32) + (call_indirect (type $FUNCSIG$viiiiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (local.get $a6) + (local.get $a7) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 4377) + ) + ) + ) + (func $dynCall_viiiiiiii (; 702 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (param $a5 i32) (param $a6 i32) (param $a7 i32) (param $a8 i32) + (call_indirect (type $FUNCSIG$viiiiiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (local.get $a6) + (local.get $a7) + (local.get $a8) + (i32.add + (i32.and + (local.get $index) + (i32.const 63) + ) + (i32.const 4633) + ) + ) + ) + (func $dynCall_viiiiiiiii (; 703 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (param $a4 i32) (param $a5 i32) (param $a6 i32) (param $a7 i32) (param $a8 i32) (param $a9 i32) + (call_indirect (type $FUNCSIG$viiiiiiiii) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (local.get $a5) + (local.get $a6) + (local.get $a7) + (local.get $a8) + (local.get $a9) + (i32.add + (i32.and + (local.get $index) + (i32.const 255) + ) + (i32.const 4697) + ) + ) + ) + (func $dynCall_viiji (; 704 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i64) (param $a4 i32) + (call_indirect (type $FUNCSIG$viiji) + (local.get $a1) + (local.get $a2) + (local.get $a3) + (local.get $a4) + (i32.add + (i32.and + (local.get $index) + (i32.const 0) + ) + (i32.const 4953) + ) + ) + ) + (func $b0 (; 705 ;) (param $p0 f32) (result f32) + (call $nullFunc_ff + (i32.const 0) + ) + (return + (f32.const 0) + ) + ) + (func $b1 (; 706 ;) (param $p0 f32) (param $p1 f32) (result f32) + (call $nullFunc_fff + (i32.const 1) + ) + (return + (f32.const 0) + ) + ) + (func $b2 (; 707 ;) (result i32) + (call $nullFunc_i + (i32.const 2) + ) + (return + (i32.const 0) + ) + ) + (func $b3 (; 708 ;) (param $p0 i32) (result i32) + (call $nullFunc_ii + (i32.const 3) + ) + (return + (i32.const 0) + ) + ) + (func $b4 (; 709 ;) (param $p0 i32) (param $p1 f64) (param $p2 i32) (param $p3 i32) (param $p4 i32) (param $p5 i32) (result i32) + (call $nullFunc_iidiiii + (i32.const 4) + ) + (return + (i32.const 0) + ) + ) + (func $b5 (; 710 ;) (param $p0 i32) (param $p1 i32) (result i32) + (call $nullFunc_iii + (i32.const 5) + ) + (return + (i32.const 0) + ) + ) + (func $b6 (; 711 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (result i32) + (call $nullFunc_iiii + (i32.const 6) + ) + (return + (i32.const 0) + ) + ) + (func $b7 (; 712 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (result i32) + (call $nullFunc_iiiii + (i32.const 7) + ) + (return + (i32.const 0) + ) + ) + (func $b8 (; 713 ;) (param $p0 i32) (param $p1 i64) (param $p2 i32) (result i64) + (call $nullFunc_jiji + (i32.const 8) + ) + (return + (i64.const 0) + ) + ) + (func $b9 (; 714 ;) + (call $nullFunc_v + (i32.const 9) + ) + ) + (func $b10 (; 715 ;) (param $p0 f32) + (call $nullFunc_vf + (i32.const 10) + ) + ) + (func $b11 (; 716 ;) (param $p0 f32) (param $p1 f32) + (call $nullFunc_vff + (i32.const 11) + ) + ) + (func $b12 (; 717 ;) (param $p0 f32) (param $p1 f32) (param $p2 f32) (param $p3 f32) + (call $nullFunc_vffff + (i32.const 12) + ) + ) + (func $b13 (; 718 ;) (param $p0 f32) (param $p1 i32) + (call $nullFunc_vfi + (i32.const 13) + ) + ) + (func $b14 (; 719 ;) (param $p0 i32) + (call $nullFunc_vi + (i32.const 14) + ) + ) + (func $b15 (; 720 ;) (param $p0 i32) (param $p1 f64) (param $p2 f64) + (call $nullFunc_vidd + (i32.const 15) + ) + ) + (func $b16 (; 721 ;) (param $p0 i32) (param $p1 f32) + (call $nullFunc_vif + (i32.const 16) + ) + ) + (func $b17 (; 722 ;) (param $p0 i32) (param $p1 f32) (param $p2 f32) + (call $nullFunc_viff + (i32.const 17) + ) + ) + (func $b18 (; 723 ;) (param $p0 i32) (param $p1 f32) (param $p2 f32) (param $p3 f32) + (call $nullFunc_vifff + (i32.const 18) + ) + ) + (func $b19 (; 724 ;) (param $p0 i32) (param $p1 f32) (param $p2 f32) (param $p3 f32) (param $p4 f32) + (call $nullFunc_viffff + (i32.const 19) + ) + ) + (func $b20 (; 725 ;) (param $p0 i32) (param $p1 i32) + (call $nullFunc_vii + (i32.const 20) + ) + ) + (func $b21 (; 726 ;) (param $p0 i32) (param $p1 i32) (param $p2 f32) + (call $nullFunc_viif + (i32.const 21) + ) + ) + (func $b22 (; 727 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) + (call $nullFunc_viii + (i32.const 22) + ) + ) + (func $b23 (; 728 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) + (call $nullFunc_viiii + (i32.const 23) + ) + ) + (func $b24 (; 729 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (param $p4 i32) + (call $nullFunc_viiiii + (i32.const 24) + ) + ) + (func $b25 (; 730 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (param $p4 i32) (param $p5 i32) + (call $nullFunc_viiiiii + (i32.const 25) + ) + ) + (func $b26 (; 731 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (param $p4 i32) (param $p5 i32) (param $p6 i32) + (call $nullFunc_viiiiiii + (i32.const 26) + ) + ) + (func $b27 (; 732 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (param $p4 i32) (param $p5 i32) (param $p6 i32) (param $p7 i32) + (call $nullFunc_viiiiiiii + (i32.const 27) + ) + ) + (func $b28 (; 733 ;) (param $p0 i32) (param $p1 i32) (param $p2 i32) (param $p3 i32) (param $p4 i32) (param $p5 i32) (param $p6 i32) (param $p7 i32) (param $p8 i32) + (call $nullFunc_viiiiiiiii + (i32.const 28) + ) + ) + (func $b29 (; 734 ;) (param $p0 i32) (param $p1 i32) (param $p2 i64) (param $p3 i32) + (call $nullFunc_viiji + (i32.const 29) + ) + ) + (func $legalstub$dynCall_jiji (; 735 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i64) + (local.set $5 + (call $dynCall_jiji + (local.get $0) + (local.get $1) + (i64.or + (i64.extend_i32_u + (local.get $2) + ) + (i64.shl + (i64.extend_i32_u + (local.get $3) + ) + (i64.const 32) + ) + ) + (local.get $4) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $5) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $5) + ) + ) + (func $legalstub$dynCall_viiji (; 736 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (call $dynCall_viiji + (local.get $0) + (local.get $1) + (local.get $2) + (i64.or + (i64.extend_i32_u + (local.get $3) + ) + (i64.shl + (i64.extend_i32_u + (local.get $4) + ) + (i64.const 32) + ) + ) + (local.get $5) + ) + ) +) diff --git a/examples/web/core/core_loading_thread.html b/examples/web/core/core_loading_thread.html index 095233e..e5cf488 100644 --- a/examples/web/core/core_loading_thread.html +++ b/examples/web/core/core_loading_thread.html @@ -1 +1,468 @@ -raylib HTML5 GAME
Downloading...
\ No newline at end of file + + + + + + + raylib HTML5 GAME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/examples/web/core/core_loading_thread.html.mem b/examples/web/core/core_loading_thread.html.mem index dd4b584..104b457 100644 Binary files a/examples/web/core/core_loading_thread.html.mem and b/examples/web/core/core_loading_thread.html.mem differ diff --git a/examples/web/core/core_loading_thread.js b/examples/web/core/core_loading_thread.js index 9b58a74..4d80541 100644 --- a/examples/web/core/core_loading_thread.js +++ b/examples/web/core/core_loading_thread.js @@ -1 +1,11713 @@ -var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(Module["ENVIRONMENT"]){throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)")}if(typeof ENVIRONMENT_IS_PTHREAD==="undefined"){ENVIRONMENT_IS_PTHREAD=false;var PthreadWorkerInit={}}var _scriptDir=typeof document!=="undefined"&&document.currentScript?document.currentScript.src:undefined;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}else{return scriptDirectory+path}}if(ENVIRONMENT_IS_NODE){scriptDirectory=__dirname+"/";var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{throw new Error("environment detection error")}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;assert(typeof Module["memoryInitializerPrefixURL"]==="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["pthreadMainPrefixURL"]==="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["cdInitializerPrefixURL"]==="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["filePackagePrefixURL"]==="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead");assert(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER,"Pthreads do not work in non-browser environments yet (need Web Workers, or an alternative to them)");stackSave=stackRestore=stackAlloc=function(){abort("cannot use the stack before compiled code is ready to run, and has provided stack access")};function dynamicAlloc(size){assert(DYNAMICTOP_PTR);assert(!ENVIRONMENT_IS_PTHREAD);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{return 0}return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var GLOBAL_BASE=1024;if(typeof WebAssembly!=="object"){abort("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.")}var wasmMemory;var wasmTable;var wasmModule;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_NORMAL=0;var ALLOC_NONE=3;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,stackAlloc,dynamicAlloc][allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i=endIdx)){var u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{if((u0&248)!=240)warnOnce("Invalid UTF-8 leading byte 0x"+u0.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!");u0=(u0&7)<<18|u1<<12|u2<<6|u8Array[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;if(u>=2097152)warnOnce("Invalid Unicode code point 0x"+u.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){assert(typeof maxBytesToWrite=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function demangle(func){warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var WASM_PAGE_SIZE=65536;var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}if(!ENVIRONMENT_IS_PTHREAD){var STACK_BASE=31216,STACK_MAX=5274096,DYNAMIC_BASE=5274096,DYNAMICTOP_PTR=31184;assert(STACK_BASE%16===0,"stack must start aligned");assert(DYNAMIC_BASE%16===0,"heap must start aligned")}var TOTAL_STACK=5242880;if(Module["TOTAL_STACK"])assert(TOTAL_STACK===Module["TOTAL_STACK"],"the stack size can no longer be determined at runtime");var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||67108864;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE}function writeStackCookie(){assert((STACK_MAX&3)==0);HEAPU32[(STACK_MAX>>2)-1]=34821223;HEAPU32[(STACK_MAX>>2)-2]=2310721022}function checkStackCookie(){if(HEAPU32[(STACK_MAX>>2)-1]!=34821223||HEAPU32[(STACK_MAX>>2)-2]!=2310721022){abort("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+HEAPU32[(STACK_MAX>>2)-2].toString(16)+" "+HEAPU32[(STACK_MAX>>2)-1].toString(16))}if(HEAP32[0]!==1668509029)throw"Runtime error: The application has corrupted its heap memory area (address zero)!"}function abortStackOverflow(allocSize){abort("Stack overflow! Attempted to allocate "+allocSize+" bytes on the stack, but stack has only "+(STACK_MAX-stackSave()+allocSize)+" bytes available!")}if(!ENVIRONMENT_IS_PTHREAD){HEAP32[0]=1668509029}else{if(HEAP32[0]!==1668509029)throw"Runtime error: The application has corrupted its heap memory area (address zero)!"}HEAP16[1]=25459;if(HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;if(ENVIRONMENT_IS_PTHREAD)runtimeInitialized=true;function preRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){checkStackCookie();if(ENVIRONMENT_IS_PTHREAD)return;if(runtimeInitialized)return;runtimeInitialized=true;__register_pthread_ptr(PThread.mainThreadBlock,!ENVIRONMENT_IS_WORKER,1);_emscripten_register_main_browser_thread_id(PThread.mainThreadBlock);if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){checkStackCookie();if(ENVIRONMENT_IS_PTHREAD)return;FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){checkStackCookie();if(ENVIRONMENT_IS_PTHREAD)return;runtimeExited=true}function postRun(){checkStackCookie();if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}assert(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");assert(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;var runDependencyTracking={};function getUniqueRunDependency(id){var orig=id;while(1){if(!runDependencyTracking[id])return id;id=orig+Math.random()}return id}function addRunDependency(id){assert(!ENVIRONMENT_IS_PTHREAD,"addRunDependency cannot be used in a pthread worker");runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;if(runDependencyWatcher===null&&typeof setInterval!=="undefined"){runDependencyWatcher=setInterval(function(){if(ABORT){clearInterval(runDependencyWatcher);runDependencyWatcher=null;return}var shown=false;for(var dep in runDependencyTracking){if(!shown){shown=true;err("still waiting on run dependencies:")}err("dependency: "+dep)}if(shown){err("(end of list)")}},1e4)}}else{err("warning: run dependency added without ID")}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id]}else{err("warning: run dependency removed without ID")}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="core_loading_thread.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmModule=module;if(!ENVIRONMENT_IS_PTHREAD)removeRunDependency("wasm-instantiate")}if(!ENVIRONMENT_IS_PTHREAD){addRunDependency("wasm-instantiate")}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}var trueModule=Module;function receiveInstantiatedSource(output){assert(Module===trueModule,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");trueModule=null;receiveInstance(output["instance"],output["module"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":607,"maximum":607,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);assert(exports,"binaryen setup failed (no wasm support?)");return exports};var ASM_CONSTS=[function(){console.error("emscripten_webgl_create_context: attributes pointer is null!")},function(){postMessage({cmd:"processQueuedMainThreadWork"})},function($0){if(!ENVIRONMENT_IS_PTHREAD){if(!PThread.pthreads[$0]||!PThread.pthreads[$0].worker){return 0}PThread.pthreads[$0].worker.postMessage({cmd:"processThreadQueue"})}else{postMessage({targetThread:$0,cmd:"processThreadQueue"})}return 1},function(){return!!Module["canvas"]},function(){Module["noExitRuntime"]=true},function(){throw"Canceled!"}];function _emscripten_asm_const_i(code){return ASM_CONSTS[code]()}function _emscripten_asm_const_ii(code,a0){return ASM_CONSTS[code](a0)}if(!ENVIRONMENT_IS_PTHREAD)__ATINIT__.push({func:function(){___emscripten_pthread_data_constructor()}});if(!ENVIRONMENT_IS_PTHREAD){memoryInitializer="core_loading_thread.html.mem"}var tempDoublePtr;if(!ENVIRONMENT_IS_PTHREAD)tempDoublePtr=31200;assert(tempDoublePtr%8==0);function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var PROCINFO={ppid:1,pid:42,sid:42,pgid:42};var PThread={MAIN_THREAD_ID:1,mainThreadInfo:{schedPolicy:0,schedPrio:0},unusedWorkerPool:[],runningWorkers:[],initMainThreadBlock:function(){if(ENVIRONMENT_IS_PTHREAD)return undefined;PThread.mainThreadBlock=30384;for(var i=0;i<244/4;++i)HEAPU32[PThread.mainThreadBlock/4+i]=0;HEAP32[PThread.mainThreadBlock+24>>2]=PThread.mainThreadBlock;var headPtr=PThread.mainThreadBlock+168;HEAP32[headPtr>>2]=headPtr;var tlsMemory=30640;for(var i=0;i<128;++i)HEAPU32[tlsMemory/4+i]=0;Atomics.store(HEAPU32,PThread.mainThreadBlock+116>>2,tlsMemory);Atomics.store(HEAPU32,PThread.mainThreadBlock+52>>2,PThread.mainThreadBlock);Atomics.store(HEAPU32,PThread.mainThreadBlock+56>>2,PROCINFO.pid)},pthreads:{},pthreadIdCounter:2,exitHandlers:null,setThreadStatus:function(){},runExitHandlers:function(){if(PThread.exitHandlers!==null){while(PThread.exitHandlers.length>0){PThread.exitHandlers.pop()()}PThread.exitHandlers=null}if(ENVIRONMENT_IS_PTHREAD&&threadInfoStruct)___pthread_tsd_run_dtors()},threadExit:function(exitCode){var tb=_pthread_self();if(tb){Atomics.store(HEAPU32,tb+4>>2,exitCode);Atomics.store(HEAPU32,tb+0>>2,1);Atomics.store(HEAPU32,tb+72>>2,1);Atomics.store(HEAPU32,tb+76>>2,0);PThread.runExitHandlers();_emscripten_futex_wake(tb+0,2147483647);__register_pthread_ptr(0,0,0);threadInfoStruct=0;if(ENVIRONMENT_IS_PTHREAD){postMessage({cmd:"exit"})}}},threadCancel:function(){PThread.runExitHandlers();Atomics.store(HEAPU32,threadInfoStruct+4>>2,-1);Atomics.store(HEAPU32,threadInfoStruct+0>>2,1);_emscripten_futex_wake(threadInfoStruct+0,2147483647);threadInfoStruct=selfThreadId=0;__register_pthread_ptr(0,0,0);postMessage({cmd:"cancelDone"})},terminateAllThreads:function(){for(var t in PThread.pthreads){var pthread=PThread.pthreads[t];if(pthread){PThread.freeThreadData(pthread);if(pthread.worker)pthread.worker.terminate()}}PThread.pthreads={};for(var t in PThread.unusedWorkerPool){var pthread=PThread.unusedWorkerPool[t];if(pthread){PThread.freeThreadData(pthread);if(pthread.worker)pthread.worker.terminate()}}PThread.unusedWorkerPool=[];for(var t in PThread.runningWorkers){var pthread=PThread.runningWorkers[t];if(pthread){PThread.freeThreadData(pthread);if(pthread.worker)pthread.worker.terminate()}}PThread.runningWorkers=[]},freeThreadData:function(pthread){if(!pthread)return;if(pthread.threadInfoStruct){var tlsMemory=HEAP32[pthread.threadInfoStruct+116>>2];HEAP32[pthread.threadInfoStruct+116>>2]=0;_free(pthread.tlsMemory);_free(pthread.threadInfoStruct)}pthread.threadInfoStruct=0;if(pthread.allocatedOwnStack&&pthread.stackBase)_free(pthread.stackBase);pthread.stackBase=0;if(pthread.worker)pthread.worker.pthread=null},receiveObjectTransfer:function(data){},allocateUnusedWorkers:function(numWorkers,onFinishedLoading){if(typeof SharedArrayBuffer==="undefined")return;var numWorkersLoaded=0;var pthreadMainJs="core_loading_thread.worker.js";pthreadMainJs=locateFile(pthreadMainJs);for(var i=0;i0)return PThread.unusedWorkerPool.pop();else return null},busySpinWait:function(msecs){var t=performance.now()+msecs;while(performance.now()>2]=value;else err("failed to set errno from JS");return value}function ___lock(){}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)},resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(1)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=function(e){done(this.error);e.preventDefault()};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var NODEFS={isWindows:false,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process["binding"]("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"]}},bufferFrom:function(arrayBuffer){return Buffer.alloc?Buffer.from(arrayBuffer):new Buffer(arrayBuffer)},mount:function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(22)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return stat.mode},realPath:function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:function(flags){flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(!flags){return newFlags}else{throw new FS.ErrnoError(22)}},node_ops:{getattr:function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},lookup:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return node},rename:function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},unlink:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},rmdir:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readdir:function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},symlink:function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readlink:function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}}},stream_ops:{open:function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},close:function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},read:function(stream,buffer,offset,length,position){if(length===0)return 0;try{return fs.readSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},write:function(stream,buffer,offset,length,position){try{return fs.writeSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(-e.errno)}}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(5)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(40)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(40)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 13}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 13}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 13}return 0},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return 13;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 17}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return 20}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 16}}else{if(FS.isDir(node.mode)){return 21}}return 0},mayOpen:function(node,flags){if(!node){return 2}if(FS.isLink(node.mode)){return 40}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 21}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(24)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(29)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){assert(FS.syncFSRequests>0);FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(16)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(16)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(20)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(22)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(22)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(1)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},getStreamFromFD:function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream},getSocketFromFD:function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket},getSocketAddress:function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall140(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(1,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();if(!(offset_high==-1&&offset_low<0)&&!(offset_high==0&&offset_low>=0)){return-ERRNO_CODES.EOVERFLOW}var offset=offset_low;FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[result>>2]=tempI64[0],HEAP32[result+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(2,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(3,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(4,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-ERRNO_CODES.EINVAL}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:{return-ERRNO_CODES.EINVAL}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(5,1,which,varargs);SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(6,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21509:case 21505:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21519:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return-ERRNO_CODES.EINVAL}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21524:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(7,1,which,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___unlock(){}function _clock(){if(_clock.start===undefined)_clock.start=Date.now();return(Date.now()-_clock.start)*(1e6/1e3)|0}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){console.error("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.");return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);checkStackCookie();if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;assert(typeof scrollX!=="undefined"&&typeof scrollY!=="undefined","Unable to retrieve scroll position, mouse positions likely broken.");if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";Module["readAsync"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(8,1,name_);return _emscripten_GetProcAddress(name_)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i>2]=eventTypeId;HEAP32[varargs+4>>2]=eventData;HEAP32[varargs+8>>2]=userData;_emscripten_async_queue_on_thread_(targetThread,637534208,eventHandlerFunc,eventData,varargs);stackRestore(stackTop)},getTargetThreadForEventCallback:function(targetThread){switch(targetThread){case 1:return 0;case 2:return PThread.currentProxiedOperationCallerThread;default:return targetThread}},getBoundingClientRectOrZeros:function(target){return target.getBoundingClientRect?target.getBoundingClientRect():{left:0,top:0}},pageScrollPos:function(){if(window.pageXOffset>0||window.pageYOffset>0){return[window.pageXOffset,window.pageYOffset]}if(typeof document.documentElement.scrollLeft!=="undefined"||typeof document.documentElement.scrollTop!=="undefined"){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}return[document.body.scrollLeft|0,document.body.scrollTop|0]},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},tick:function(){if(window["performance"]&&window["performance"]["now"])return window["performance"]["now"]();else return Date.now()},fullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}};function __requestPointerLock(target){if(target.requestPointerLock){target.requestPointerLock()}else if(target.mozRequestPointerLock){target.mozRequestPointerLock()}else if(target.webkitRequestPointerLock){target.webkitRequestPointerLock()}else if(target.msRequestPointerLock){target.msRequestPointerLock()}else{if(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock){return-3}else{return-1}}return 0}function _emscripten_exit_pointerlock(){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(9,1);JSEvents.removeDeferredCalls(__requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else if(document.msExitPointerLock){document.msExitPointerLock()}else if(document.mozExitPointerLock){document.mozExitPointerLock()}else if(document.webkitExitPointerLock){document.webkitExitPointerLock()}else{return-1}return 0}var __main_thread_futex_wait_address;if(ENVIRONMENT_IS_PTHREAD)__main_thread_futex_wait_address=PthreadWorkerInit.__main_thread_futex_wait_address;else PthreadWorkerInit.__main_thread_futex_wait_address=__main_thread_futex_wait_address=31168;function _emscripten_futex_wait(addr,val,timeout){if(addr<=0||addr>HEAP8.length||addr&3!=0)return-22;if(ENVIRONMENT_IS_WORKER){var ret=Atomics.wait(HEAP32,addr>>2,val,timeout);if(ret==="timed-out")return-110;if(ret==="not-equal")return-11;if(ret==="ok")return 0;throw"Atomics.wait returned an unexpected value "+ret}else{var loadedVal=Atomics.load(HEAP32,addr>>2);if(val!=loadedVal)return-11;var tNow=performance.now();var tEnd=tNow+timeout;Atomics.store(HEAP32,__main_thread_futex_wait_address>>2,addr);var ourWaitAddress=addr;while(addr==ourWaitAddress){tNow=performance.now();if(tNow>tEnd){return-110}_emscripten_main_thread_process_queued_calls();addr=Atomics.load(HEAP32,__main_thread_futex_wait_address>>2)}return 0}}function _emscripten_futex_wake(addr,count){if(addr<=0||addr>HEAP8.length||addr&3!=0||count<0)return-22;if(count==0)return 0;var mainThreadWaitAddress=Atomics.load(HEAP32,__main_thread_futex_wait_address>>2);var mainThreadWoken=0;if(mainThreadWaitAddress==addr){var loadedAddr=Atomics.compareExchange(HEAP32,__main_thread_futex_wait_address>>2,mainThreadWaitAddress,0);if(loadedAddr==mainThreadWaitAddress){--count;mainThreadWoken=1;if(count<=0)return 1}}var ret=Atomics.notify(HEAP32,addr>>2,count);if(ret>=0)return ret+mainThreadWoken;throw"Atomics.notify returned an unexpected value "+ret}function __fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(10,1,index,gamepadState);if(!JSEvents.lastGamepadState)throw"emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!";if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;__fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_num_gamepads(){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(11,1);if(!JSEvents.lastGamepadState)throw"emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!";return JSEvents.lastGamepadState.length}function __fillPointerlockChangeEventData(eventStruct,e){var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP32[eventStruct>>2]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement&&pointerLockElement.id?pointerLockElement.id:"";stringToUTF8(nodeName,eventStruct+4,128);stringToUTF8(id,eventStruct+132,128)}function _emscripten_get_pointerlock_status(pointerlockStatus){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(12,1,pointerlockStatus);if(pointerlockStatus)__fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);HEAP32[handle+4>>2]=_pthread_self();var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");if(instancedArraysExt){GLctx["vertexAttribDivisor"]=function(index,divisor){instancedArraysExt["vertexAttribDivisorANGLE"](index,divisor)};GLctx["drawArraysInstanced"]=function(mode,first,count,primcount){instancedArraysExt["drawArraysInstancedANGLE"](mode,first,count,primcount)};GLctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){instancedArraysExt["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension("OES_vertex_array_object");if(vaoExt){GLctx["createVertexArray"]=function(){return vaoExt["createVertexArrayOES"]()};GLctx["deleteVertexArray"]=function(vao){vaoExt["deleteVertexArrayOES"](vao)};GLctx["bindVertexArray"]=function(vao){vaoExt["bindVertexArrayOES"](vao)};GLctx["isVertexArray"]=function(vao){return vaoExt["isVertexArrayOES"](vao)}}var drawBuffersExt=GLctx.getExtension("WEBGL_draw_buffers");if(drawBuffersExt){GLctx["drawBuffers"]=function(n,bufs){drawBuffersExt["drawBuffersWEBGL"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=="Integer"&&type!=="Integer64"){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case"Float":HEAPF32[p+i*4>>2]=result[i];break;case"Boolean":HEAP8[p+i>>0]=result[i]?1:0;break;default:throw"internal glGet error, bad type: "+type}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);return}}switch(type){case"Integer64":tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[p>>2]=tempI64[0],HEAP32[p+4>>2]=tempI64[1];break;case"Integer":HEAP32[p>>2]=ret;break;case"Float":HEAPF32[p>>2]=ret;break;case"Boolean":HEAP8[p>>0]=ret?1:0;break;default:throw"internal glGet error, bad type: "+type}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,"Boolean")}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){if(GL.lastError){var error=GL.lastError;GL.lastError=0;return error}else{return GLctx.getError()}}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,"Integer")}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;if(bufSize>0&&source){var numBytesWrittenExclNull=stringToUTF8(result,source,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Float")}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Integer")}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case"Integer":HEAP32[params>>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;case"FloatToInteger":HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;case"FloatToInteger":HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"Float")}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"FloatToInteger")}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4};var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var sizePerPixel=__colorChannelsInGlTextureFormat[format]*__sizeOfGlTextureElementType[type];if(!sizePerPixel){GL.recordError(1280);return}var bytes=__computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);var end=pixels+bytes;switch(type){case 5121:return HEAPU8.subarray(pixels,end);case 5126:return HEAPF32.subarray(pixels>>2,end>>2);case 5125:case 34042:return HEAPU32.subarray(pixels>>2,end>>2);case 5123:case 33635:case 32819:case 32820:case 36193:return HEAPU16.subarray(pixels>>1,end>>1);default:GL.recordError(1280)}}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){GLctx.uniform3iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*12>>2))}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){GLctx.uniform4iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*16>>2))}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_has_threading_support(){return typeof SharedArrayBuffer!=="undefined"}function _emscripten_proxy_to_main_thread_js(index,sync){var numCallArgs=arguments.length-2;var stack=stackSave();var buffer=stackAlloc(numCallArgs*8);for(var i=0;i>3)+i]=arguments[2+i]}var ret=_emscripten_run_in_main_runtime_thread_js(index,numCallArgs,buffer,sync);stackRestore(stack);return ret}function _emscripten_receive_on_main_thread_js(index,numCallArgs,buffer){if(!_emscripten_receive_on_main_thread_js.callArgs){_emscripten_receive_on_main_thread_js.callArgs=[]}var callArgs=_emscripten_receive_on_main_thread_js.callArgs;callArgs.length=numCallArgs;for(var i=0;i>3)+i]}var func;if(index>0){func=proxiedFunctionTable[index]}else{func=ASM_CONSTS[-index-1]}assert(func.length==numCallArgs);return func.apply(null,callArgs)}var __specialEventTargets=[0,typeof document!=="undefined"?document:0,typeof window!=="undefined"?window:0];function __findEventTarget(target){warnOnce("Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.");try{if(!target)return window;if(typeof target==="number")target=__specialEventTargets[target]||UTF8ToString(target);if(target==="#window")return window;else if(target==="#document")return document;else if(target==="#screen")return screen;else if(target==="#canvas")return Module["canvas"];return typeof target==="string"?document.getElementById(target):target}catch(e){return null}}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(13,1,target,deferUntilInEventHandler);if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.mozRequestPointerLock&&!target.webkitRequestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(__requestPointerLock,2,[target]);return 1}else{return-2}}return __requestPointerLock(target)}function abortOnCannotGrowMemory(requestedSize){abort("Cannot enlarge memory arrays to size "+requestedSize+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+HEAP8.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function _emscripten_resize_heap(requestedSize){abortOnCannotGrowMemory(requestedSize)}function _emscripten_run_script(ptr){eval(UTF8ToString(ptr))}function _emscripten_sample_gamepad_data(){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(14,1);return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread,targetCanvas,width,height){var stackTop=stackSave();var varargs=stackAlloc(12);var targetCanvasPtr=0;if(targetCanvas){targetCanvasPtr=stringToNewUTF8(targetCanvas)}HEAP32[varargs>>2]=targetCanvasPtr;HEAP32[varargs+4>>2]=width;HEAP32[varargs+8>>2]=height;_emscripten_async_queue_on_thread_(targetThread,657457152,0,targetCanvasPtr,varargs);stackRestore(stackTop)}function _emscripten_set_offscreencanvas_size_on_target_thread(targetThread,targetCanvas,width,height){targetCanvas=targetCanvas?UTF8ToString(targetCanvas):"";_emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread,targetCanvas,width,height)}function __findCanvasEventTarget(target){if(typeof target==="number")target=UTF8ToString(target);if(!target||target==="#canvas"){if(typeof GL!=="undefined"&&GL.offscreenCanvases["canvas"])return GL.offscreenCanvases["canvas"];return Module["canvas"]}if(typeof GL!=="undefined"&&GL.offscreenCanvases[target])return GL.offscreenCanvases[target];return __findEventTarget(target)}function _emscripten_set_canvas_element_size_calling_thread(target,width,height){var canvas=__findCanvasEventTarget(target);if(!canvas)return-4;if(canvas.canvasSharedPtr){HEAP32[canvas.canvasSharedPtr>>2]=width;HEAP32[canvas.canvasSharedPtr+4>>2]=height}if(canvas.offscreenCanvas||!canvas.controlTransferredOffscreen){if(canvas.offscreenCanvas)canvas=canvas.offscreenCanvas;var autoResizeViewport=false;if(canvas.GLctxObject&&canvas.GLctxObject.GLctx){var prevViewport=canvas.GLctxObject.GLctx.getParameter(canvas.GLctxObject.GLctx.VIEWPORT);autoResizeViewport=prevViewport[0]===0&&prevViewport[1]===0&&prevViewport[2]===canvas.width&&prevViewport[3]===canvas.height}canvas.width=width;canvas.height=height;if(autoResizeViewport){canvas.GLctxObject.GLctx.viewport(0,0,width,height)}}else if(canvas.canvasSharedPtr){var targetThread=HEAP32[canvas.canvasSharedPtr+8>>2];_emscripten_set_offscreencanvas_size_on_target_thread(targetThread,target,width,height);return 1}else{return-4}return 0}function _emscripten_set_canvas_element_size_main_thread(target,width,height){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(15,1,target,width,height);return _emscripten_set_canvas_element_size_calling_thread(target,width,height)}function _emscripten_set_canvas_element_size(target,width,height){var canvas=__findCanvasEventTarget(target);if(canvas){return _emscripten_set_canvas_element_size_calling_thread(target,width,height)}else{return _emscripten_set_canvas_element_size_main_thread(target,width,height)}}function __fillMouseEventData(eventStruct,e,target){HEAPF64[eventStruct>>3]=JSEvents.tick();HEAP32[eventStruct+8>>2]=e.screenX;HEAP32[eventStruct+12>>2]=e.screenY;HEAP32[eventStruct+16>>2]=e.clientX;HEAP32[eventStruct+20>>2]=e.clientY;HEAP32[eventStruct+24>>2]=e.ctrlKey;HEAP32[eventStruct+28>>2]=e.shiftKey;HEAP32[eventStruct+32>>2]=e.altKey;HEAP32[eventStruct+36>>2]=e.metaKey;HEAP16[eventStruct+40>>1]=e.button;HEAP16[eventStruct+42>>1]=e.buttons;HEAP32[eventStruct+44>>2]=e["movementX"]||e["mozMovementX"]||e["webkitMovementX"]||e.screenX-JSEvents.previousScreenX;HEAP32[eventStruct+48>>2]=e["movementY"]||e["mozMovementY"]||e["webkitMovementY"]||e.screenY-JSEvents.previousScreenY;if(Module["canvas"]){var rect=Module["canvas"].getBoundingClientRect();HEAP32[eventStruct+60>>2]=e.clientX-rect.left;HEAP32[eventStruct+64>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+60>>2]=0;HEAP32[eventStruct+64>>2]=0}if(target){var rect=JSEvents.getBoundingClientRectOrZeros(target);HEAP32[eventStruct+52>>2]=e.clientX-rect.left;HEAP32[eventStruct+56>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+52>>2]=0;HEAP32[eventStruct+56>>2]=0}if(e.type!=="wheel"&&e.type!=="mousewheel"){JSEvents.previousScreenX=e.screenX;JSEvents.previousScreenY=e.screenY}}function __registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){targetThread=JSEvents.getTargetThreadForEventCallback(targetThread);if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(72);target=__findEventTarget(target);var mouseEventHandlerFunc=function(event){var e=event||window.event;__fillMouseEventData(JSEvents.mouseEvent,e,target);if(targetThread){var mouseEventData=_malloc(72);__fillMouseEventData(mouseEventData,e,target);JSEvents.queueEventHandlerOnThread_iiii(targetThread,callbackfunc,eventTypeId,mouseEventData,userData)}else if(dynCall_iiii(callbackfunc,eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};if(JSEvents.isInternetExplorer()&&eventTypeString=="mousedown")eventHandler.allowsDeferredCalls=false;JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(16,1,target,userData,useCapture,callbackfunc,targetThread);__registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread);return 0}function __fillFullscreenChangeEventData(eventStruct,e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function __registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){targetThread=JSEvents.getTargetThreadForEventCallback(targetThread);if(!JSEvents.fullscreenChangeEvent)JSEvents.fullscreenChangeEvent=_malloc(280);var fullscreenChangeEventhandlerFunc=function(event){var e=event||window.event;var fullscreenChangeEvent=targetThread?_malloc(280):JSEvents.fullscreenChangeEvent;__fillFullscreenChangeEventData(fullscreenChangeEvent,e);if(targetThread)JSEvents.queueEventHandlerOnThread_iiii(targetThread,callbackfunc,eventTypeId,fullscreenChangeEvent,userData);else if(dynCall_iiii(callbackfunc,eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:false,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(17,1,target,userData,useCapture,callbackfunc,targetThread);if(typeof JSEvents.fullscreenEnabled()==="undefined")return-1;target=target?__findEventTarget(target):__specialEventTargets[1];if(!target)return-4;__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"mozfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"msfullscreenchange",targetThread);return 0}function __registerGamepadEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){targetThread=JSEvents.getTargetThreadForEventCallback(targetThread);if(!JSEvents.gamepadEvent)JSEvents.gamepadEvent=_malloc(1432);var gamepadEventHandlerFunc=function(event){var e=event||window.event;var gamepadEvent=targetThread?_malloc(1432):JSEvents.gamepadEvent;__fillGamepadEventData(gamepadEvent,e.gamepad);if(targetThread)JSEvents.queueEventHandlerOnThread_iiii(targetThread,callbackfunc,eventTypeId,gamepadEvent,userData);else if(dynCall_iiii(callbackfunc,eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(18,1,userData,useCapture,callbackfunc,targetThread);if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread);return 0}function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(19,1,userData,useCapture,callbackfunc,targetThread);if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread);return 0}function __registerKeyEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){targetThread=JSEvents.getTargetThreadForEventCallback(targetThread);if(!JSEvents.keyEvent)JSEvents.keyEvent=_malloc(164);var keyEventHandlerFunc=function(event){var e=event||window.event;var keyEventData=targetThread?_malloc(164):JSEvents.keyEvent;stringToUTF8(e.key?e.key:"",keyEventData+0,32);stringToUTF8(e.code?e.code:"",keyEventData+32,32);HEAP32[keyEventData+64>>2]=e.location;HEAP32[keyEventData+68>>2]=e.ctrlKey;HEAP32[keyEventData+72>>2]=e.shiftKey;HEAP32[keyEventData+76>>2]=e.altKey;HEAP32[keyEventData+80>>2]=e.metaKey;HEAP32[keyEventData+84>>2]=e.repeat;stringToUTF8(e.locale?e.locale:"",keyEventData+88,32);stringToUTF8(e.char?e.char:"",keyEventData+120,32);HEAP32[keyEventData+152>>2]=e.charCode;HEAP32[keyEventData+156>>2]=e.keyCode;HEAP32[keyEventData+160>>2]=e.which;if(targetThread)JSEvents.queueEventHandlerOnThread_iiii(targetThread,callbackfunc,eventTypeId,keyEventData,userData);else if(dynCall_iiii(callbackfunc,eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:JSEvents.isInternetExplorer()?false:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(20,1,target,userData,useCapture,callbackfunc,targetThread);__registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function __registerTouchEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){targetThread=JSEvents.getTargetThreadForEventCallback(targetThread);if(!JSEvents.touchEvent)JSEvents.touchEvent=_malloc(1684);target=__findEventTarget(target);var touchEventHandlerFunc=function(event){var e=event||window.event;var touches={};for(var i=0;i>2]=e.ctrlKey;HEAP32[ptr+8>>2]=e.shiftKey;HEAP32[ptr+12>>2]=e.altKey;HEAP32[ptr+16>>2]=e.metaKey;ptr+=20;var canvasRect=Module["canvas"]?Module["canvas"].getBoundingClientRect():undefined;var targetRect=JSEvents.getBoundingClientRectOrZeros(target);var numTouches=0;for(var i in touches){var t=touches[i];HEAP32[ptr>>2]=t.identifier;HEAP32[ptr+4>>2]=t.screenX;HEAP32[ptr+8>>2]=t.screenY;HEAP32[ptr+12>>2]=t.clientX;HEAP32[ptr+16>>2]=t.clientY;HEAP32[ptr+20>>2]=t.pageX;HEAP32[ptr+24>>2]=t.pageY;HEAP32[ptr+28>>2]=t.changed;HEAP32[ptr+32>>2]=t.onTarget;if(canvasRect){HEAP32[ptr+44>>2]=t.clientX-canvasRect.left;HEAP32[ptr+48>>2]=t.clientY-canvasRect.top}else{HEAP32[ptr+44>>2]=0;HEAP32[ptr+48>>2]=0}HEAP32[ptr+36>>2]=t.clientX-targetRect.left;HEAP32[ptr+40>>2]=t.clientY-targetRect.top;ptr+=52;if(++numTouches>=32){break}}HEAP32[touchEvent>>2]=numTouches;if(targetThread)JSEvents.queueEventHandlerOnThread_iiii(targetThread,callbackfunc,eventTypeId,touchEvent,userData);else if(dynCall_iiii(callbackfunc,eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(21,1,target,userData,useCapture,callbackfunc,targetThread);__registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread);return 0}function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(22,1,target,userData,useCapture,callbackfunc,targetThread);__registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread);return 0}function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(23,1,target,userData,useCapture,callbackfunc,targetThread);__registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread);return 0}function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(24,1,target,userData,useCapture,callbackfunc,targetThread);__registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread);return 0}function _emscripten_supports_offscreencanvas(){return 0}function _emscripten_syscall(which,varargs){switch(which){case 140:return ___syscall140(which,varargs);case 145:return ___syscall145(which,varargs);case 146:return ___syscall146(which,varargs);case 221:return ___syscall221(which,varargs);case 5:return ___syscall5(which,varargs);case 54:return ___syscall54(which,varargs);case 6:return ___syscall6(which,varargs);default:throw"surprising proxied syscall: "+which}}function _emscripten_webgl_do_commit_frame(){if(!GL.currentContext||!GL.currentContext.GLctx){return-3}if(!GL.currentContext.GLctx.commit){return-1}if(!GL.currentContext.attributes.explicitSwapControl){return-3}GL.currentContext.GLctx.commit();return 0}var __emscripten_webgl_power_preferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(target,attributes){var contextAttributes={};var a=attributes>>2;contextAttributes["alpha"]=!!HEAP32[a+(0>>2)];contextAttributes["depth"]=!!HEAP32[a+(4>>2)];contextAttributes["stencil"]=!!HEAP32[a+(8>>2)];contextAttributes["antialias"]=!!HEAP32[a+(12>>2)];contextAttributes["premultipliedAlpha"]=!!HEAP32[a+(16>>2)];contextAttributes["preserveDrawingBuffer"]=!!HEAP32[a+(20>>2)];var powerPreference=HEAP32[a+(24>>2)];contextAttributes["powerPreference"]=__emscripten_webgl_power_preferences[powerPreference];contextAttributes["failIfMajorPerformanceCaveat"]=!!HEAP32[a+(28>>2)];contextAttributes.majorVersion=HEAP32[a+(32>>2)];contextAttributes.minorVersion=HEAP32[a+(36>>2)];contextAttributes.enableExtensionsByDefault=HEAP32[a+(40>>2)];contextAttributes.explicitSwapControl=HEAP32[a+(44>>2)];contextAttributes.proxyContextToMainThread=HEAP32[a+(48>>2)];contextAttributes.renderViaOffscreenBackBuffer=HEAP32[a+(52>>2)];var canvas=__findCanvasEventTarget(target);if(ENVIRONMENT_IS_PTHREAD){if(contextAttributes.proxyContextToMainThread===2||!canvas&&contextAttributes.proxyContextToMainThread===1){if(typeof OffscreenCanvas==="undefined"){HEAP32[attributes+52>>2]=1;HEAP32[attributes+20>>2]=1}return _emscripten_sync_run_in_main_thread_2(622854144,target,attributes)}}if(!canvas){return 0}if(contextAttributes.explicitSwapControl){return 0}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _exit(status){exit(status)}var GLFW={Window:function(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.framebufferSizeFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.dropFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null},WindowFromId:function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 94;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:function(win){var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:function(event){if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;dynCall_vii(GLFW.active.charFunc,GLFW.active.id,charCode)},onKeyChanged:function(keyCode,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(!GLFW.active.keyFunc)return;if(repeat)status=2;dynCall_viiiii(GLFW.active.keyFunc,GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))},onGamepadConnected:function(event){GLFW.refreshJoysticks()},onGamepadDisconnected:function(event){GLFW.refreshJoysticks()},onKeydown:function(event){GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:function(event){GLFW.onKeyChanged(event.keyCode,0)},onBlur:function(event){if(!GLFW.active)return;for(var i=0;i0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,1)},onMouseleave:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,0)},onMouseButtonChanged:function(event,status){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=0;if(event.type=="mousewheel"){sx=event.wheelDeltaX;sy=event.wheelDeltaY}else{sx=event.deltaX;sy=event.deltaY}dynCall_vidd(GLFW.active.scrollFunc,GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:function(width,height){if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.windowSizeFunc)return;dynCall_viii(GLFW.active.windowSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},onFramebufferSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.framebufferSizeFunc)return;dynCall_viii(GLFW.active.framebufferSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},requestFullscreen:function(){var RFS=Module["canvas"]["requestFullscreen"]||Module["canvas"]["mozRequestFullScreen"]||Module["canvas"]["webkitRequestFullScreen"]||function(){};RFS.apply(Module["canvas"],[])},requestFullScreen:function(){err("GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.");GLFW.requestFullScreen=function(){return GLFW.requestFullscreen()};return GLFW.requestFullscreen()},exitFullscreen:function(){Browser.exitFullscreen()},cancelFullScreen:function(){err("GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.");GLFW.cancelFullScreen=function(){return GLFW.exitFullscreen()};return GLFW.exitFullscreen()},getTime:function(){return _emscripten_get_now()/1e3},setWindowTitle:function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=UTF8ToString(title);if(GLFW.active.id==win.id){document.title=win.title}},setJoystickCallback:function(cbfun){GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks()},joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function(){if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:null;GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joy0},getCursorPos:function(winid,x,y){setValue(x,Browser.mouseX,"double");setValue(y,Browser.mouseY,"double")},getMousePos:function(winid,x,y){setValue(x,Browser.mouseX,"i32");setValue(y,Browser.mouseY,"i32")},setCursorPos:function(winid,x,y){},getWindowPos:function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}setValue(x,wx,"i32");setValue(y,wy,"i32")},setWindowPos:function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}setValue(width,ww,"i32");setValue(height,wh,"i32")},setWindowSize:function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){GLFW.requestFullscreen()}else{GLFW.exitFullscreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(!win.windowSizeFunc)return;dynCall_viii(win.windowSizeFunc,win.id,width,height)},createWindow:function(width,height,title,monitor,share){var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){GLFW.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}if(!Module.ctx)return 0;var win=new GLFW.Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc)dynCall_vi(win.windowCloseFunc,win.id);GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i>2]=0}var pthread=PThread.pthreads[threadParams.pthread_ptr]={worker:worker,stackBase:threadParams.stackBase,stackSize:threadParams.stackSize,allocatedOwnStack:threadParams.allocatedOwnStack,thread:threadParams.pthread_ptr,threadInfoStruct:threadParams.pthread_ptr};Atomics.store(HEAPU32,pthread.threadInfoStruct+0>>2,0);Atomics.store(HEAPU32,pthread.threadInfoStruct+4>>2,0);Atomics.store(HEAPU32,pthread.threadInfoStruct+20>>2,0);Atomics.store(HEAPU32,pthread.threadInfoStruct+80>>2,threadParams.detached);Atomics.store(HEAPU32,pthread.threadInfoStruct+116>>2,tlsMemory);Atomics.store(HEAPU32,pthread.threadInfoStruct+60>>2,0);Atomics.store(HEAPU32,pthread.threadInfoStruct+52>>2,pthread.threadInfoStruct);Atomics.store(HEAPU32,pthread.threadInfoStruct+56>>2,PROCINFO.pid);Atomics.store(HEAPU32,pthread.threadInfoStruct+120>>2,threadParams.stackSize);Atomics.store(HEAPU32,pthread.threadInfoStruct+96>>2,threadParams.stackSize);Atomics.store(HEAPU32,pthread.threadInfoStruct+92>>2,threadParams.stackBase);Atomics.store(HEAPU32,pthread.threadInfoStruct+120+8>>2,threadParams.stackBase);Atomics.store(HEAPU32,pthread.threadInfoStruct+120+12>>2,threadParams.detached);Atomics.store(HEAPU32,pthread.threadInfoStruct+120+20>>2,threadParams.schedPolicy);Atomics.store(HEAPU32,pthread.threadInfoStruct+120+24>>2,threadParams.schedPrio);var global_libc=_emscripten_get_global_libc();var global_locale=global_libc+40;Atomics.store(HEAPU32,pthread.threadInfoStruct+188>>2,global_locale);worker.pthread=pthread;var msg={cmd:"run",start_routine:threadParams.startRoutine,arg:threadParams.arg,threadInfoStruct:threadParams.pthread_ptr,selfThreadId:threadParams.pthread_ptr,parentThreadId:threadParams.parent_pthread_ptr,stackBase:threadParams.stackBase,stackSize:threadParams.stackSize};worker.runPthread=function(){msg.time=performance.now();worker.postMessage(msg,threadParams.transferList)};if(worker.loaded){worker.runPthread();delete worker.runPthread}}function _pthread_getschedparam(thread,policy,schedparam){if(!policy&&!schedparam)return ERRNO_CODES.EINVAL;if(!thread){err("pthread_getschedparam called with a null thread pointer!");return ERRNO_CODES.ESRCH}var self=HEAP32[thread+24>>2];if(self!=thread){err("pthread_getschedparam attempted on thread "+thread+", which does not point to a valid thread, or does not exist anymore!");return ERRNO_CODES.ESRCH}var schedPolicy=Atomics.load(HEAPU32,thread+120+20>>2);var schedPrio=Atomics.load(HEAPU32,thread+120+24>>2);if(policy)HEAP32[policy>>2]=schedPolicy;if(schedparam)HEAP32[schedparam>>2]=schedPrio;return 0}function _pthread_create(pthread_ptr,attr,start_routine,arg){if(typeof SharedArrayBuffer==="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 11}if(!pthread_ptr){err("pthread_create called with a null thread pointer!");return 22}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length==0||error)){return _emscripten_sync_run_in_main_thread_4(687865856,pthread_ptr,attr,start_routine,arg)}if(error)return error;var stackSize=0;var stackBase=0;var detached=0;var schedPolicy=0;var schedPrio=0;if(attr){stackSize=HEAP32[attr>>2];stackSize+=81920;stackBase=HEAP32[attr+8>>2];detached=HEAP32[attr+12>>2]!=0;var inheritSched=HEAP32[attr+16>>2]==0;if(inheritSched){var prevSchedPolicy=HEAP32[attr+20>>2];var prevSchedPrio=HEAP32[attr+24>>2];var parentThreadPtr=PThread.currentProxiedOperationCallerThread?PThread.currentProxiedOperationCallerThread:_pthread_self();_pthread_getschedparam(parentThreadPtr,attr+20,attr+24);schedPolicy=HEAP32[attr+20>>2];schedPrio=HEAP32[attr+24>>2];HEAP32[attr+20>>2]=prevSchedPolicy;HEAP32[attr+24>>2]=prevSchedPrio}else{schedPolicy=HEAP32[attr+20>>2];schedPrio=HEAP32[attr+24>>2]}}else{stackSize=2097152}var allocatedOwnStack=stackBase==0;if(allocatedOwnStack){stackBase=_malloc(stackSize)}else{stackBase-=stackSize;assert(stackBase>0)}var threadInfoStruct=_malloc(244);for(var i=0;i<244>>2;++i)HEAPU32[(threadInfoStruct>>2)+i]=0;HEAP32[pthread_ptr>>2]=threadInfoStruct;HEAP32[threadInfoStruct+24>>2]=threadInfoStruct;var headPtr=threadInfoStruct+168;HEAP32[headPtr>>2]=headPtr;var threadParams={stackBase:stackBase,stackSize:stackSize,allocatedOwnStack:allocatedOwnStack,schedPolicy:schedPolicy,schedPrio:schedPrio,detached:detached,startRoutine:start_routine,pthread_ptr:threadInfoStruct,parent_pthread_ptr:_pthread_self(),arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList)}else{__spawn_thread(threadParams)}return 0}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}if(!ENVIRONMENT_IS_PTHREAD)PThread.initMainThreadBlock();if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function _emscripten_get_now_actual(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(ENVIRONMENT_IS_PTHREAD){_emscripten_get_now=function(){return performance["now"]()-__performance_now_clock_drift}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}FS.staticInit();if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));var proxiedFunctionTable=[null,___syscall140,___syscall145,___syscall146,___syscall221,___syscall5,___syscall54,___syscall6,_eglGetProcAddress,_emscripten_exit_pointerlock,_emscripten_get_gamepad_status,_emscripten_get_num_gamepads,_emscripten_get_pointerlock_status,_emscripten_request_pointerlock,_emscripten_sample_gamepad_data,_emscripten_set_canvas_element_size_main_thread,_emscripten_set_click_callback_on_thread,_emscripten_set_fullscreenchange_callback_on_thread,_emscripten_set_gamepadconnected_callback_on_thread,_emscripten_set_gamepaddisconnected_callback_on_thread,_emscripten_set_keypress_callback_on_thread,_emscripten_set_touchcancel_callback_on_thread,_emscripten_set_touchend_callback_on_thread,_emscripten_set_touchmove_callback_on_thread,_emscripten_set_touchstart_callback_on_thread];function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function nullFunc_ff(x){err("Invalid function pointer called with signature 'ff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_fff(x){err("Invalid function pointer called with signature 'fff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_i(x){err("Invalid function pointer called with signature 'i'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_ii(x){err("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iidiiii(x){err("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iii(x){err("Invalid function pointer called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiii(x){err("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiii(x){err("Invalid function pointer called with signature 'iiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiiii(x){err("Invalid function pointer called with signature 'iiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiiiii(x){err("Invalid function pointer called with signature 'iiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiiiiii(x){err("Invalid function pointer called with signature 'iiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiiiiiii(x){err("Invalid function pointer called with signature 'iiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_iiiiiiiiii(x){err("Invalid function pointer called with signature 'iiiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_jiji(x){err("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_v(x){err("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vf(x){err("Invalid function pointer called with signature 'vf'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vff(x){err("Invalid function pointer called with signature 'vff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vfff(x){err("Invalid function pointer called with signature 'vfff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vffff(x){err("Invalid function pointer called with signature 'vffff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vfi(x){err("Invalid function pointer called with signature 'vfi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vi(x){err("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vidd(x){err("Invalid function pointer called with signature 'vidd'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vif(x){err("Invalid function pointer called with signature 'vif'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viff(x){err("Invalid function pointer called with signature 'viff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vifff(x){err("Invalid function pointer called with signature 'vifff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viffff(x){err("Invalid function pointer called with signature 'viffff'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_vii(x){err("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viif(x){err("Invalid function pointer called with signature 'viif'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viifi(x){err("Invalid function pointer called with signature 'viifi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viii(x){err("Invalid function pointer called with signature 'viii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiii(x){err("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiii(x){err("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiii(x){err("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiiii(x){err("Invalid function pointer called with signature 'viiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiiiii(x){err("Invalid function pointer called with signature 'viiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiiiiii(x){err("Invalid function pointer called with signature 'viiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiiiiiii(x){err("Invalid function pointer called with signature 'viiiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiiiiiiiiii(x){err("Invalid function pointer called with signature 'viiiiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}function nullFunc_viiji(x){err("Invalid function pointer called with signature 'viiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");err("Build with ASSERTIONS=2 for more info.");abort(x)}var asmGlobalArg={};var asmLibraryArg={"f":setTempRet0,"b":abortStackOverflow,"he":nullFunc_ff,"Yd":nullFunc_fff,"Zc":nullFunc_i,"Oc":nullFunc_ii,"Jc":nullFunc_iidiiii,"Gc":nullFunc_iii,"Ec":nullFunc_iiii,"Dc":nullFunc_iiiii,"Cc":nullFunc_iiiiii,"ge":nullFunc_iiiiiii,"fe":nullFunc_iiiiiiii,"ee":nullFunc_iiiiiiiii,"de":nullFunc_iiiiiiiiii,"ce":nullFunc_jiji,"be":nullFunc_v,"ae":nullFunc_vf,"$d":nullFunc_vff,"_d":nullFunc_vfff,"Zd":nullFunc_vffff,"Xd":nullFunc_vfi,"Wd":nullFunc_vi,"Vd":nullFunc_vidd,"Pd":nullFunc_vif,"Fd":nullFunc_viff,"wd":nullFunc_vifff,"md":nullFunc_viffff,"ed":nullFunc_vii,"$c":nullFunc_viif,"_c":nullFunc_viifi,"Yc":nullFunc_viii,"Xc":nullFunc_viiii,"Wc":nullFunc_viiiii,"Vc":nullFunc_viiiiii,"Uc":nullFunc_viiiiiii,"Tc":nullFunc_viiiiiiii,"Sc":nullFunc_viiiiiiiii,"Rc":nullFunc_viiiiiiiiii,"Qc":nullFunc_viiiiiiiiiii,"Pc":nullFunc_viiji,"c":___assert_fail,"o":___call_main,"Nc":___lock,"ea":___setErrNo,"Mc":___syscall140,"Lc":___syscall145,"da":___syscall146,"k":___syscall221,"Kc":___syscall5,"ca":___syscall54,"ba":___syscall6,"n":___unlock,"aa":_clock,"m":_eglGetProcAddress,"i":_emscripten_asm_const_i,"Ic":_emscripten_asm_const_ii,"$":_emscripten_exit_pointerlock,"e":_emscripten_futex_wait,"h":_emscripten_futex_wake,"Hc":_emscripten_get_gamepad_status,"j":_emscripten_get_heap_size,"d":_emscripten_get_now,"Fc":_emscripten_get_num_gamepads,"_":_emscripten_get_pointerlock_status,"Z":_emscripten_glActiveTexture,"Y":_emscripten_glAttachShader,"X":_emscripten_glBeginQueryEXT,"W":_emscripten_glBindAttribLocation,"V":_emscripten_glBindBuffer,"U":_emscripten_glBindFramebuffer,"T":_emscripten_glBindRenderbuffer,"S":_emscripten_glBindTexture,"R":_emscripten_glBindVertexArray,"Q":_emscripten_glBlendColor,"P":_emscripten_glBlendEquation,"O":_emscripten_glBlendEquationSeparate,"N":_emscripten_glBlendFunc,"M":_emscripten_glBlendFuncSeparate,"L":_emscripten_glBufferData,"K":_emscripten_glBufferSubData,"J":_emscripten_glCheckFramebufferStatus,"I":_emscripten_glClear,"H":_emscripten_glClearColor,"G":_emscripten_glClearDepthf,"F":_emscripten_glClearStencil,"E":_emscripten_glColorMask,"D":_emscripten_glCompileShader,"C":_emscripten_glCompressedTexImage2D,"B":_emscripten_glCompressedTexSubImage2D,"A":_emscripten_glCopyTexImage2D,"z":_emscripten_glCopyTexSubImage2D,"y":_emscripten_glCreateProgram,"x":_emscripten_glCreateShader,"w":_emscripten_glCullFace,"v":_emscripten_glDeleteBuffers,"u":_emscripten_glDeleteFramebuffers,"t":_emscripten_glDeleteProgram,"s":_emscripten_glDeleteQueriesEXT,"r":_emscripten_glDeleteRenderbuffers,"q":_emscripten_glDeleteShader,"Bc":_emscripten_glDeleteTextures,"Ac":_emscripten_glDeleteVertexArrays,"zc":_emscripten_glDepthFunc,"yc":_emscripten_glDepthMask,"xc":_emscripten_glDepthRangef,"wc":_emscripten_glDetachShader,"vc":_emscripten_glDisable,"uc":_emscripten_glDisableVertexAttribArray,"tc":_emscripten_glDrawArrays,"sc":_emscripten_glDrawArraysInstanced,"rc":_emscripten_glDrawBuffers,"qc":_emscripten_glDrawElements,"pc":_emscripten_glDrawElementsInstanced,"oc":_emscripten_glEnable,"nc":_emscripten_glEnableVertexAttribArray,"mc":_emscripten_glEndQueryEXT,"lc":_emscripten_glFinish,"kc":_emscripten_glFlush,"jc":_emscripten_glFramebufferRenderbuffer,"ic":_emscripten_glFramebufferTexture2D,"hc":_emscripten_glFrontFace,"gc":_emscripten_glGenBuffers,"fc":_emscripten_glGenFramebuffers,"ec":_emscripten_glGenQueriesEXT,"dc":_emscripten_glGenRenderbuffers,"cc":_emscripten_glGenTextures,"bc":_emscripten_glGenVertexArrays,"ac":_emscripten_glGenerateMipmap,"$b":_emscripten_glGetActiveAttrib,"_b":_emscripten_glGetActiveUniform,"Zb":_emscripten_glGetAttachedShaders,"Yb":_emscripten_glGetAttribLocation,"Xb":_emscripten_glGetBooleanv,"Wb":_emscripten_glGetBufferParameteriv,"Vb":_emscripten_glGetError,"Ub":_emscripten_glGetFloatv,"Tb":_emscripten_glGetFramebufferAttachmentParameteriv,"Sb":_emscripten_glGetIntegerv,"Rb":_emscripten_glGetProgramInfoLog,"Qb":_emscripten_glGetProgramiv,"Pb":_emscripten_glGetQueryObjecti64vEXT,"Ob":_emscripten_glGetQueryObjectivEXT,"Nb":_emscripten_glGetQueryObjectui64vEXT,"Mb":_emscripten_glGetQueryObjectuivEXT,"Lb":_emscripten_glGetQueryivEXT,"Kb":_emscripten_glGetRenderbufferParameteriv,"Jb":_emscripten_glGetShaderInfoLog,"Ib":_emscripten_glGetShaderPrecisionFormat,"Hb":_emscripten_glGetShaderSource,"Gb":_emscripten_glGetShaderiv,"Fb":_emscripten_glGetString,"Eb":_emscripten_glGetTexParameterfv,"Db":_emscripten_glGetTexParameteriv,"Cb":_emscripten_glGetUniformLocation,"Bb":_emscripten_glGetUniformfv,"Ab":_emscripten_glGetUniformiv,"zb":_emscripten_glGetVertexAttribPointerv,"yb":_emscripten_glGetVertexAttribfv,"xb":_emscripten_glGetVertexAttribiv,"wb":_emscripten_glHint,"vb":_emscripten_glIsBuffer,"ub":_emscripten_glIsEnabled,"tb":_emscripten_glIsFramebuffer,"sb":_emscripten_glIsProgram,"rb":_emscripten_glIsQueryEXT,"qb":_emscripten_glIsRenderbuffer,"pb":_emscripten_glIsShader,"ob":_emscripten_glIsTexture,"nb":_emscripten_glIsVertexArray,"mb":_emscripten_glLineWidth,"lb":_emscripten_glLinkProgram,"kb":_emscripten_glPixelStorei,"jb":_emscripten_glPolygonOffset,"ib":_emscripten_glQueryCounterEXT,"hb":_emscripten_glReadPixels,"gb":_emscripten_glReleaseShaderCompiler,"fb":_emscripten_glRenderbufferStorage,"eb":_emscripten_glSampleCoverage,"db":_emscripten_glScissor,"cb":_emscripten_glShaderBinary,"bb":_emscripten_glShaderSource,"ab":_emscripten_glStencilFunc,"$a":_emscripten_glStencilFuncSeparate,"_a":_emscripten_glStencilMask,"Za":_emscripten_glStencilMaskSeparate,"Ya":_emscripten_glStencilOp,"Xa":_emscripten_glStencilOpSeparate,"Wa":_emscripten_glTexImage2D,"Va":_emscripten_glTexParameterf,"Ua":_emscripten_glTexParameterfv,"Ta":_emscripten_glTexParameteri,"Sa":_emscripten_glTexParameteriv,"Ra":_emscripten_glTexSubImage2D,"Qa":_emscripten_glUniform1f,"Pa":_emscripten_glUniform1fv,"Oa":_emscripten_glUniform1i,"Na":_emscripten_glUniform1iv,"Ma":_emscripten_glUniform2f,"La":_emscripten_glUniform2fv,"Ka":_emscripten_glUniform2i,"Ja":_emscripten_glUniform2iv,"Ia":_emscripten_glUniform3f,"Ha":_emscripten_glUniform3fv,"Ga":_emscripten_glUniform3i,"Fa":_emscripten_glUniform3iv,"Ea":_emscripten_glUniform4f,"Da":_emscripten_glUniform4fv,"Ca":_emscripten_glUniform4i,"Ba":_emscripten_glUniform4iv,"Aa":_emscripten_glUniformMatrix2fv,"za":_emscripten_glUniformMatrix3fv,"ya":_emscripten_glUniformMatrix4fv,"xa":_emscripten_glUseProgram,"wa":_emscripten_glValidateProgram,"va":_emscripten_glVertexAttrib1f,"ua":_emscripten_glVertexAttrib1fv,"ta":_emscripten_glVertexAttrib2f,"sa":_emscripten_glVertexAttrib2fv,"ra":_emscripten_glVertexAttrib3f,"qa":_emscripten_glVertexAttrib3fv,"pa":_emscripten_glVertexAttrib4f,"oa":_emscripten_glVertexAttrib4fv,"na":_emscripten_glVertexAttribDivisor,"ma":_emscripten_glVertexAttribPointer,"la":_emscripten_glViewport,"Ud":_emscripten_has_threading_support,"Td":_emscripten_memcpy_big,"Sd":_emscripten_receive_on_main_thread_js,"Rd":_emscripten_request_pointerlock,"Qd":_emscripten_resize_heap,"ka":_emscripten_run_script,"Od":_emscripten_sample_gamepad_data,"Nd":_emscripten_set_canvas_element_size,"Md":_emscripten_set_click_callback_on_thread,"Ld":_emscripten_set_fullscreenchange_callback_on_thread,"Kd":_emscripten_set_gamepadconnected_callback_on_thread,"Jd":_emscripten_set_gamepaddisconnected_callback_on_thread,"Id":_emscripten_set_keypress_callback_on_thread,"Hd":_emscripten_set_main_loop,"Gd":_emscripten_set_touchcancel_callback_on_thread,"Ed":_emscripten_set_touchend_callback_on_thread,"Dd":_emscripten_set_touchmove_callback_on_thread,"Cd":_emscripten_set_touchstart_callback_on_thread,"Bd":_emscripten_supports_offscreencanvas,"Ad":_emscripten_syscall,"ja":_emscripten_webgl_do_commit_frame,"ia":_emscripten_webgl_do_create_context,"zd":_exit,"yd":_glfwCreateWindow,"xd":_glfwDefaultWindowHints,"vd":_glfwDestroyWindow,"ud":_glfwGetCursorPos,"l":_glfwGetTime,"td":_glfwInit,"sd":_glfwMakeContextCurrent,"rd":_glfwSetCharCallback,"qd":_glfwSetCursorEnterCallback,"pd":_glfwSetCursorPosCallback,"od":_glfwSetDropCallback,"nd":_glfwSetErrorCallback,"ld":_glfwSetKeyCallback,"kd":_glfwSetMouseButtonCallback,"jd":_glfwSetScrollCallback,"id":_glfwSetWindowIconifyCallback,"hd":_glfwSetWindowShouldClose,"gd":_glfwSetWindowSizeCallback,"fd":_glfwSwapBuffers,"ha":_glfwTerminate,"g":_glfwWindowHint,"ga":_llvm_stackrestore,"fa":_llvm_stacksave,"dd":_pthread_cleanup_pop,"cd":_pthread_cleanup_push,"p":_pthread_create,"bd":_time,"ad":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);var real____emscripten_pthread_data_constructor=asm["ie"];asm["ie"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real____emscripten_pthread_data_constructor.apply(null,arguments)};var real____errno_location=asm["je"];asm["je"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real____errno_location.apply(null,arguments)};var real____pthread_tsd_run_dtors=asm["ke"];asm["ke"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real____pthread_tsd_run_dtors.apply(null,arguments)};var real___emscripten_atomic_fetch_and_add_u64=asm["le"];asm["le"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___emscripten_atomic_fetch_and_add_u64.apply(null,arguments)};var real___emscripten_atomic_fetch_and_and_u64=asm["me"];asm["me"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___emscripten_atomic_fetch_and_and_u64.apply(null,arguments)};var real___emscripten_atomic_fetch_and_or_u64=asm["ne"];asm["ne"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___emscripten_atomic_fetch_and_or_u64.apply(null,arguments)};var real___emscripten_atomic_fetch_and_sub_u64=asm["oe"];asm["oe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___emscripten_atomic_fetch_and_sub_u64.apply(null,arguments)};var real___emscripten_atomic_fetch_and_xor_u64=asm["pe"];asm["pe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___emscripten_atomic_fetch_and_xor_u64.apply(null,arguments)};var real___register_pthread_ptr=asm["qe"];asm["qe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real___register_pthread_ptr.apply(null,arguments)};var real__emscripten_GetProcAddress=asm["re"];asm["re"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_GetProcAddress.apply(null,arguments)};var real__emscripten_async_queue_call_on_thread=asm["se"];asm["se"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_async_queue_call_on_thread.apply(null,arguments)};var real__emscripten_async_queue_on_thread_=asm["te"];asm["te"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_async_queue_on_thread_.apply(null,arguments)};var real__emscripten_async_run_in_main_thread=asm["ue"];asm["ue"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_async_run_in_main_thread.apply(null,arguments)};var real__emscripten_atomic_add_u64=asm["ve"];asm["ve"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_add_u64.apply(null,arguments)};var real__emscripten_atomic_and_u64=asm["we"];asm["we"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_and_u64.apply(null,arguments)};var real__emscripten_atomic_cas_u64=asm["xe"];asm["xe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_cas_u64.apply(null,arguments)};var real__emscripten_atomic_exchange_u64=asm["ye"];asm["ye"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_exchange_u64.apply(null,arguments)};var real__emscripten_atomic_load_f32=asm["ze"];asm["ze"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_load_f32.apply(null,arguments)};var real__emscripten_atomic_load_f64=asm["Ae"];asm["Ae"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_load_f64.apply(null,arguments)};var real__emscripten_atomic_load_u64=asm["Be"];asm["Be"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_load_u64.apply(null,arguments)};var real__emscripten_atomic_or_u64=asm["Ce"];asm["Ce"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_or_u64.apply(null,arguments)};var real__emscripten_atomic_store_f32=asm["De"];asm["De"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_store_f32.apply(null,arguments)};var real__emscripten_atomic_store_f64=asm["Ee"];asm["Ee"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_store_f64.apply(null,arguments)};var real__emscripten_atomic_store_u64=asm["Fe"];asm["Fe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_store_u64.apply(null,arguments)};var real__emscripten_atomic_sub_u64=asm["Ge"];asm["Ge"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_sub_u64.apply(null,arguments)};var real__emscripten_atomic_xor_u64=asm["He"];asm["He"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_atomic_xor_u64.apply(null,arguments)};var real__emscripten_conditional_set_current_thread_status=asm["Ie"];asm["Ie"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_conditional_set_current_thread_status.apply(null,arguments)};var real__emscripten_current_thread_process_queued_calls=asm["Je"];asm["Je"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_current_thread_process_queued_calls.apply(null,arguments)};var real__emscripten_get_global_libc=asm["Ke"];asm["Ke"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_get_global_libc.apply(null,arguments)};var real__emscripten_is_main_browser_thread=asm["Le"];asm["Le"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_is_main_browser_thread.apply(null,arguments)};var real__emscripten_is_main_runtime_thread=asm["Me"];asm["Me"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_is_main_runtime_thread.apply(null,arguments)};var real__emscripten_main_browser_thread_id=asm["Ne"];asm["Ne"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_main_browser_thread_id.apply(null,arguments)};var real__emscripten_main_thread_process_queued_calls=asm["Oe"];asm["Oe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_main_thread_process_queued_calls.apply(null,arguments)};var real__emscripten_register_main_browser_thread_id=asm["Pe"];asm["Pe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_register_main_browser_thread_id.apply(null,arguments)};var real__emscripten_run_in_main_runtime_thread_js=asm["Qe"];asm["Qe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_run_in_main_runtime_thread_js.apply(null,arguments)};var real__emscripten_set_current_thread_status=asm["Re"];asm["Re"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_set_current_thread_status.apply(null,arguments)};var real__emscripten_set_thread_name=asm["Se"];asm["Se"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_set_thread_name.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread=asm["Te"];asm["Te"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_0=asm["Ue"];asm["Ue"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_0.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_1=asm["Ve"];asm["Ve"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_1.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_2=asm["We"];asm["We"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_2.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_3=asm["Xe"];asm["Xe"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_3.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_4=asm["Ye"];asm["Ye"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_4.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_5=asm["Ze"];asm["Ze"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_5.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_6=asm["_e"];asm["_e"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_6.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_7=asm["$e"];asm["$e"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_7.apply(null,arguments)};var real__emscripten_sync_run_in_main_thread_xprintf_varargs=asm["af"];asm["af"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_sync_run_in_main_thread_xprintf_varargs.apply(null,arguments)};var real__emscripten_webgl_commit_frame=asm["bf"];asm["bf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__emscripten_webgl_commit_frame.apply(null,arguments)};var real__fflush=asm["cf"];asm["cf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__fflush.apply(null,arguments)};var real__free=asm["df"];asm["df"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__free.apply(null,arguments)};var real__llvm_round_f32=asm["ef"];asm["ef"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__llvm_round_f32.apply(null,arguments)};var real__ma_device_process_pcm_frames_capture__webaudio=asm["ff"];asm["ff"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__ma_device_process_pcm_frames_capture__webaudio.apply(null,arguments)};var real__ma_device_process_pcm_frames_playback__webaudio=asm["gf"];asm["gf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__ma_device_process_pcm_frames_playback__webaudio.apply(null,arguments)};var real__main=asm["hf"];asm["hf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__main.apply(null,arguments)};var real__malloc=asm["jf"];asm["jf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__malloc.apply(null,arguments)};var real__memmove=asm["kf"];asm["kf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__memmove.apply(null,arguments)};var real__proxy_main=asm["lf"];asm["lf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__proxy_main.apply(null,arguments)};var real__pthread_self=asm["mf"];asm["mf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__pthread_self.apply(null,arguments)};var real__sbrk=asm["nf"];asm["nf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__sbrk.apply(null,arguments)};var real__strstr=asm["of"];asm["of"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real__strstr.apply(null,arguments)};var real_establishStackSpace=asm["yf"];asm["yf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real_establishStackSpace.apply(null,arguments)};var real_stackAlloc=asm["zf"];asm["zf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real_stackAlloc.apply(null,arguments)};var real_stackRestore=asm["Af"];asm["Af"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real_stackRestore.apply(null,arguments)};var real_stackSave=asm["Bf"];asm["Bf"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return real_stackSave.apply(null,arguments)};Module["asm"]=asm;var ___emscripten_pthread_data_constructor=Module["___emscripten_pthread_data_constructor"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ie"].apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["je"].apply(null,arguments)};var ___pthread_tsd_run_dtors=Module["___pthread_tsd_run_dtors"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ke"].apply(null,arguments)};var __emscripten_atomic_fetch_and_add_u64=Module["__emscripten_atomic_fetch_and_add_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["le"].apply(null,arguments)};var __emscripten_atomic_fetch_and_and_u64=Module["__emscripten_atomic_fetch_and_and_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["me"].apply(null,arguments)};var __emscripten_atomic_fetch_and_or_u64=Module["__emscripten_atomic_fetch_and_or_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ne"].apply(null,arguments)};var __emscripten_atomic_fetch_and_sub_u64=Module["__emscripten_atomic_fetch_and_sub_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["oe"].apply(null,arguments)};var __emscripten_atomic_fetch_and_xor_u64=Module["__emscripten_atomic_fetch_and_xor_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["pe"].apply(null,arguments)};var __register_pthread_ptr=Module["__register_pthread_ptr"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["qe"].apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["re"].apply(null,arguments)};var _emscripten_async_queue_call_on_thread=Module["_emscripten_async_queue_call_on_thread"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["se"].apply(null,arguments)};var _emscripten_async_queue_on_thread_=Module["_emscripten_async_queue_on_thread_"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["te"].apply(null,arguments)};var _emscripten_async_run_in_main_thread=Module["_emscripten_async_run_in_main_thread"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ue"].apply(null,arguments)};var _emscripten_atomic_add_u64=Module["_emscripten_atomic_add_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ve"].apply(null,arguments)};var _emscripten_atomic_and_u64=Module["_emscripten_atomic_and_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["we"].apply(null,arguments)};var _emscripten_atomic_cas_u64=Module["_emscripten_atomic_cas_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["xe"].apply(null,arguments)};var _emscripten_atomic_exchange_u64=Module["_emscripten_atomic_exchange_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ye"].apply(null,arguments)};var _emscripten_atomic_load_f32=Module["_emscripten_atomic_load_f32"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ze"].apply(null,arguments)};var _emscripten_atomic_load_f64=Module["_emscripten_atomic_load_f64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ae"].apply(null,arguments)};var _emscripten_atomic_load_u64=Module["_emscripten_atomic_load_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Be"].apply(null,arguments)};var _emscripten_atomic_or_u64=Module["_emscripten_atomic_or_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ce"].apply(null,arguments)};var _emscripten_atomic_store_f32=Module["_emscripten_atomic_store_f32"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["De"].apply(null,arguments)};var _emscripten_atomic_store_f64=Module["_emscripten_atomic_store_f64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ee"].apply(null,arguments)};var _emscripten_atomic_store_u64=Module["_emscripten_atomic_store_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Fe"].apply(null,arguments)};var _emscripten_atomic_sub_u64=Module["_emscripten_atomic_sub_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ge"].apply(null,arguments)};var _emscripten_atomic_xor_u64=Module["_emscripten_atomic_xor_u64"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["He"].apply(null,arguments)};var _emscripten_conditional_set_current_thread_status=Module["_emscripten_conditional_set_current_thread_status"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ie"].apply(null,arguments)};var _emscripten_current_thread_process_queued_calls=Module["_emscripten_current_thread_process_queued_calls"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Je"].apply(null,arguments)};var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ke"].apply(null,arguments)};var _emscripten_is_main_browser_thread=Module["_emscripten_is_main_browser_thread"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Le"].apply(null,arguments)};var _emscripten_is_main_runtime_thread=Module["_emscripten_is_main_runtime_thread"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Me"].apply(null,arguments)};var _emscripten_main_browser_thread_id=Module["_emscripten_main_browser_thread_id"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ne"].apply(null,arguments)};var _emscripten_main_thread_process_queued_calls=Module["_emscripten_main_thread_process_queued_calls"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Oe"].apply(null,arguments)};var _emscripten_register_main_browser_thread_id=Module["_emscripten_register_main_browser_thread_id"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Pe"].apply(null,arguments)};var _emscripten_run_in_main_runtime_thread_js=Module["_emscripten_run_in_main_runtime_thread_js"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Qe"].apply(null,arguments)};var _emscripten_set_current_thread_status=Module["_emscripten_set_current_thread_status"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Re"].apply(null,arguments)};var _emscripten_set_thread_name=Module["_emscripten_set_thread_name"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Se"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread=Module["_emscripten_sync_run_in_main_thread"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Te"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_0=Module["_emscripten_sync_run_in_main_thread_0"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ue"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_1=Module["_emscripten_sync_run_in_main_thread_1"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ve"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_2=Module["_emscripten_sync_run_in_main_thread_2"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["We"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_3=Module["_emscripten_sync_run_in_main_thread_3"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Xe"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_4=Module["_emscripten_sync_run_in_main_thread_4"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ye"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_5=Module["_emscripten_sync_run_in_main_thread_5"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Ze"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_6=Module["_emscripten_sync_run_in_main_thread_6"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["_e"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_7=Module["_emscripten_sync_run_in_main_thread_7"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["$e"].apply(null,arguments)};var _emscripten_sync_run_in_main_thread_xprintf_varargs=Module["_emscripten_sync_run_in_main_thread_xprintf_varargs"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["af"].apply(null,arguments)};var _emscripten_webgl_commit_frame=Module["_emscripten_webgl_commit_frame"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["bf"].apply(null,arguments)};var _fflush=Module["_fflush"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["cf"].apply(null,arguments)};var _free=Module["_free"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["df"].apply(null,arguments)};var _llvm_round_f32=Module["_llvm_round_f32"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ef"].apply(null,arguments)};var _ma_device_process_pcm_frames_capture__webaudio=Module["_ma_device_process_pcm_frames_capture__webaudio"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["ff"].apply(null,arguments)};var _ma_device_process_pcm_frames_playback__webaudio=Module["_ma_device_process_pcm_frames_playback__webaudio"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["gf"].apply(null,arguments)};var _main=Module["_main"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["hf"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["jf"].apply(null,arguments)};var _memmove=Module["_memmove"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["kf"].apply(null,arguments)};var _proxy_main=Module["_proxy_main"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["lf"].apply(null,arguments)};var _pthread_self=Module["_pthread_self"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["mf"].apply(null,arguments)};var _sbrk=Module["_sbrk"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["nf"].apply(null,arguments)};var _strstr=Module["_strstr"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["of"].apply(null,arguments)};var establishStackSpace=Module["establishStackSpace"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["yf"].apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["zf"].apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Af"].apply(null,arguments)};var stackSave=Module["stackSave"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["Bf"].apply(null,arguments)};var dynCall_ii=Module["dynCall_ii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["pf"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["qf"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["rf"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["sf"].apply(null,arguments)};var dynCall_vidd=Module["dynCall_vidd"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["tf"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["uf"].apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["vf"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["wf"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)");assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");return Module["asm"]["xf"].apply(null,arguments)};Module["asm"]=asm;if(!Module["intArrayFromString"])Module["intArrayFromString"]=function(){abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["intArrayToString"])Module["intArrayToString"]=function(){abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["ccall"])Module["ccall"]=function(){abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["cwrap"])Module["cwrap"]=function(){abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["setValue"])Module["setValue"]=function(){abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getValue"])Module["getValue"]=function(){abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["allocate"])Module["allocate"]=function(){abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getMemory"])Module["getMemory"]=function(){abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["AsciiToString"])Module["AsciiToString"]=function(){abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stringToAscii"])Module["stringToAscii"]=function(){abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["UTF8ArrayToString"])Module["UTF8ArrayToString"]=function(){abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["UTF8ToString"])Module["UTF8ToString"]=function(){abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stringToUTF8Array"])Module["stringToUTF8Array"]=function(){abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stringToUTF8"])Module["stringToUTF8"]=function(){abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["lengthBytesUTF8"])Module["lengthBytesUTF8"]=function(){abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["UTF16ToString"])Module["UTF16ToString"]=function(){abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stringToUTF16"])Module["stringToUTF16"]=function(){abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["lengthBytesUTF16"])Module["lengthBytesUTF16"]=function(){abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["UTF32ToString"])Module["UTF32ToString"]=function(){abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stringToUTF32"])Module["stringToUTF32"]=function(){abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["lengthBytesUTF32"])Module["lengthBytesUTF32"]=function(){abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["allocateUTF8"])Module["allocateUTF8"]=function(){abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stackTrace"])Module["stackTrace"]=function(){abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addOnPreRun"])Module["addOnPreRun"]=function(){abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addOnInit"])Module["addOnInit"]=function(){abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addOnPreMain"])Module["addOnPreMain"]=function(){abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addOnExit"])Module["addOnExit"]=function(){abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addOnPostRun"])Module["addOnPostRun"]=function(){abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["writeStringToMemory"])Module["writeStringToMemory"]=function(){abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["writeArrayToMemory"])Module["writeArrayToMemory"]=function(){abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["writeAsciiToMemory"])Module["writeAsciiToMemory"]=function(){abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addRunDependency"])Module["addRunDependency"]=function(){abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["removeRunDependency"])Module["removeRunDependency"]=function(){abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["ENV"])Module["ENV"]=function(){abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["FS"])Module["FS"]=function(){abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["FS_createFolder"])Module["FS_createFolder"]=function(){abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createPath"])Module["FS_createPath"]=function(){abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createDataFile"])Module["FS_createDataFile"]=function(){abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createPreloadedFile"])Module["FS_createPreloadedFile"]=function(){abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createLazyFile"])Module["FS_createLazyFile"]=function(){abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createLink"])Module["FS_createLink"]=function(){abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_createDevice"])Module["FS_createDevice"]=function(){abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["FS_unlink"])Module["FS_unlink"]=function(){abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")};if(!Module["GL"])Module["GL"]=function(){abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["dynamicAlloc"])Module["dynamicAlloc"]=function(){abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["warnOnce"])Module["warnOnce"]=function(){abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["loadDynamicLibrary"])Module["loadDynamicLibrary"]=function(){abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["loadWebAssemblyModule"])Module["loadWebAssemblyModule"]=function(){abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getLEB"])Module["getLEB"]=function(){abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getFunctionTables"])Module["getFunctionTables"]=function(){abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["alignFunctionTables"])Module["alignFunctionTables"]=function(){abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["registerFunctions"])Module["registerFunctions"]=function(){abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["addFunction"])Module["addFunction"]=function(){abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["removeFunction"])Module["removeFunction"]=function(){abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getFuncWrapper"])Module["getFuncWrapper"]=function(){abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["prettyPrint"])Module["prettyPrint"]=function(){abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["makeBigInt"])Module["makeBigInt"]=function(){abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["dynCall"])Module["dynCall"]=function(){abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getCompilerSetting"])Module["getCompilerSetting"]=function(){abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stackSave"])Module["stackSave"]=function(){abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stackRestore"])Module["stackRestore"]=function(){abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["stackAlloc"])Module["stackAlloc"]=function(){abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};Module["establishStackSpace"]=establishStackSpace;if(!Module["print"])Module["print"]=function(){abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["printErr"])Module["printErr"]=function(){abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["getTempRet0"])Module["getTempRet0"]=function(){abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["setTempRet0"])Module["setTempRet0"]=function(){abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};if(!Module["Pointer_stringify"])Module["Pointer_stringify"]=function(){abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")};Module["dynCall_ii"]=dynCall_ii;if(!Module["ALLOC_NORMAL"])Object.defineProperty(Module,"ALLOC_NORMAL",{get:function(){abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});if(!Module["ALLOC_STACK"])Object.defineProperty(Module,"ALLOC_STACK",{get:function(){abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});if(!Module["ALLOC_DYNAMIC"])Object.defineProperty(Module,"ALLOC_DYNAMIC",{get:function(){abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});if(!Module["ALLOC_NONE"])Object.defineProperty(Module,"ALLOC_NONE",{get:function(){abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}});if(memoryInitializer&&!ENVIRONMENT_IS_PTHREAD){if(!isDataURI(memoryInitializer)){memoryInitializer=locateFile(memoryInitializer)}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=function(data){if(data.byteLength)data=new Uint8Array(data);for(var i=0;i>2]=allocateUTF8OnStack(Module["thisProgram"]);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);Module["quit"](1,e)}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}writeStackCookie();preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}checkStackCookie()}Module["run"]=run;function checkUnflushedContent(){var print=out;var printErr=err;var has=false;out=err=function(x){has=true};try{var flush=Module["_fflush"];if(flush)flush(0);["stdout","stderr"].forEach(function(name){var info=FS.analyzePath("/dev/"+name);if(!info)return;var stream=info.object;var rdev=stream.rdev;var tty=TTY.ttys[rdev];if(tty&&tty.output&&tty.output.length){has=true}})}catch(e){}out=print;err=printErr;if(has){warnOnce("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}}function exit(status,implicit){checkUnflushedContent();if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){if(!implicit){err("exit("+status+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)")}}else{PThread.terminateAllThreads();ABORT=true;EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status)}Module["quit"](status,new ExitStatus(status))}var abortDecorators=[];function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(ENVIRONMENT_IS_PTHREAD)console.error("Pthread aborting at "+(new Error).stack);if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach(function(decorator){output=decorator(output,what)})}throw output}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}if(!ENVIRONMENT_IS_PTHREAD)Module["noExitRuntime"]=true;if(!ENVIRONMENT_IS_PTHREAD)run(); +// Copyright 2010 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) +// {{PRE_JSES}} + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_HAS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// A web environment like Electron.js can have Node enabled, so we must +// distinguish between Node-enabled environments and Node environments per se. +// This will allow the former to do things like mount NODEFS. +// Extended check using process.versions fixes issue #8816. +// (Also makes redundant the original check that 'require' is a function.) +ENVIRONMENT_HAS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); +} + + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + +// ENVIRONMENT_IS_PTHREAD=true will have been preset in worker.js. Make it false in the main runtime thread. +var ENVIRONMENT_IS_PTHREAD = Module.ENVIRONMENT_IS_PTHREAD || false; +if (!ENVIRONMENT_IS_PTHREAD) { + var PthreadWorkerInit = {}; // Collects together variables that are needed at initialization time for the web workers that host pthreads. +} + + + + +// In MODULARIZE mode _scriptDir needs to be captured already at the very top of the page immediately when the page is parsed, so it is generated there +// before the page load. In non-MODULARIZE modes generate it here. +var _scriptDir = (typeof document !== 'undefined' && document.currentScript) ? document.currentScript.src : undefined; + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +if (ENVIRONMENT_IS_NODE) { + scriptDirectory = __dirname + '/'; + + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + read_ = function shell_read(filename, binary) { + var ret; + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + return binary ? ret : ret.toString(); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + process['on']('unhandledRejection', abort); + + quit_ = function(status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} else +if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function(status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = {}; + console.log = print; + console.warn = console.error = typeof printErr !== 'undefined' ? printErr : print; + } +} else +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + + read_ = function shell_read(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + setWindowTitle = function(title) { document.title = title }; +} else +{ + throw new Error('environment detection error'); +} + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { get: function() { abort('Module.arguments has been replaced with plain arguments_') } }); +if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { get: function() { abort('Module.thisProgram has been replaced with plain thisProgram') } }); +if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { get: function() { abort('Module.quit has been replaced with plain quit_') } }); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { get: function() { abort('Module.read has been replaced with plain read_') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { get: function() { abort('Module.readAsync has been replaced with plain readAsync') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { get: function() { abort('Module.readBinary has been replaced with plain readBinary') } }); +// TODO: add when SDL2 is fixed if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } }); + +assert(ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER, 'Pthreads do not work in non-browser environments yet (need Web Workers, or an alternative to them)'); + +// TODO remove when SDL2 is fixed (also see above) + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)'); +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + assert(!ENVIRONMENT_IS_PTHREAD); // this function is not thread-safe + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + if (end > _emscripten_get_heap_size()) { + abort('failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly'); + } + HEAP32[DYNAMICTOP_PTR>>2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + "debugger": function() { + debugger; + } +}; + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// Wraps a JS function as a wasm function with a given signature. +// In the future, we may get a WebAssembly.Function constructor. Until then, +// we create a wasm module that takes the JS function as an import with a given +// signature, and re-exports that as a wasm function. +function convertJsFunctionToWasm(func, sig) { + + // The module is static, with the exception of the type section, which is + // generated based on the signature passed in. + var typeSection = [ + 0x01, // id: section, + 0x00, // length: 0 (placeholder) + 0x01, // count: 1 + 0x60, // form: func + ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + 'i': 0x7f, // i32 + 'j': 0x7e, // i64 + 'f': 0x7d, // f32 + 'd': 0x7c, // f64 + }; + + // Parameters, length + signatures + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + + // Return values, length + signatures + // With no multi-return in MVP, either 0 (void) or 1 (anything else) + if (sigRet == 'v') { + typeSection.push(0x00); + } else { + typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); + } + + // Write the overall length of the type section back into the section header + // (excepting the 2 bytes for the section id and length) + typeSection[1] = typeSection.length - 2; + + // Rest of the module is static + var bytes = new Uint8Array([ + 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") + 0x01, 0x00, 0x00, 0x00, // version: 1 + ].concat(typeSection, [ + 0x02, 0x07, // import section + // (import "e" "f" (func 0 (type 0))) + 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, + 0x07, 0x05, // export section + // (export "f" (func 0 (type 0))) + 0x01, 0x01, 0x66, 0x00, 0x00, + ])); + + // We can compile this wasm module synchronously because it is very small. + // This accepts an import (at "e.f"), that it reroutes to an export (at "f") + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + e: { + f: func + } + }); + var wrappedFunc = instance.exports.f; + return wrappedFunc; +} + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + var ret = table.length; + + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!err instanceof RangeError) { + throw err; + } + throw 'Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.'; + } + + // Insert new element + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!err instanceof TypeError) { + throw err; + } + assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + return ret; +} + +function removeFunctionWasm(index) { + // TODO(sbc): Look into implementing this to allow re-using of table slots +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + assert(typeof func !== 'undefined'); + + + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; + +} + +function removeFunction(index) { + + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary') } }); +var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } }); + + +if (typeof WebAssembly !== 'object') { + abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.'); +} + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + +// Wasm globals + +var wasmMemory; + +// Potentially used for direct table calls. +var wasmTable; + +// For sending to workers. +var wasmModule; + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + + var str = ''; + while (!(idx >= endIdx)) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = u8Array[idx++]; + // If not building with TextDecoder enabled, we don't know the string length, so scan for \0 byte. + // If building with TextDecoder, we know exactly at what byte index the string ends, so checking for nulls here would be redundant. + if (!u0) return str; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + +if (!ENVIRONMENT_IS_PTHREAD) { // Pthreads have already initialized these variables in src/worker.js, where they were passed to the thread worker at startup time + +var STATIC_BASE = 1024, + STACK_BASE = 30880, + STACKTOP = STACK_BASE, + STACK_MAX = 5273760, + DYNAMIC_BASE = 5273760, + DYNAMICTOP_PTR = 30848; + +assert(STACK_BASE % 16 === 0, 'stack must start aligned'); +assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned'); + +} + + +var TOTAL_STACK = 5242880; +if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') + +var INITIAL_TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;if (!Object.getOwnPropertyDescriptor(Module, 'TOTAL_MEMORY')) Object.defineProperty(Module, 'TOTAL_MEMORY', { get: function() { abort('Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY') } }); + +assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, 'TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + + + + +if (ENVIRONMENT_IS_PTHREAD) { +} else { + + if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; + } else + { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'shared': true + }); + assert(wasmMemory.buffer instanceof SharedArrayBuffer, 'requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag'); + } + +} + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['TOTAL_MEMORY']. +INITIAL_TOTAL_MEMORY = buffer.byteLength; +assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0); +updateGlobalBufferAndViews(buffer); + +if (!ENVIRONMENT_IS_PTHREAD) { // Pthreads have already initialized these variables in src/worker.js, where they were passed to the thread worker at startup time +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; +} + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + var cookie1 = HEAPU32[(STACK_MAX >> 2)-1]; + var cookie2 = HEAPU32[(STACK_MAX >> 2)-2]; + if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); + } + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + + +if (!ENVIRONMENT_IS_PTHREAD) { + HEAP32[0] = 0x63736d65; /* 'emsc' */ +} else { + if (HEAP32[0] !== 0x63736d65) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + + + +// Endianness check (note: assumes compiler arch was little-endian) +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function abortFnPtrError(ptr, sig) { + abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); +} + + + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + +if (ENVIRONMENT_IS_PTHREAD) runtimeInitialized = true; // The runtime is hosted in the main thread, and bits shared to pthreads via SharedArrayBuffer. No need to init again in pthread. + +function preRun() { + if (ENVIRONMENT_IS_PTHREAD) return; // PThreads reuse the runtime from the main thread. + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + checkStackCookie(); + assert(!runtimeInitialized); + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); +TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + if (ENVIRONMENT_IS_PTHREAD) return; // PThreads reuse the runtime from the main thread. + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + if (ENVIRONMENT_IS_PTHREAD) return; // PThreads reuse the runtime from the main thread. + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + if (ENVIRONMENT_IS_PTHREAD) return; // PThreads reuse the runtime from the main thread. + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + // We should never get here in pthreads (could no-op this out if called in pthreads, but that might indicate a bug in caller side, + // so good to be very explicit) + assert(!ENVIRONMENT_IS_PTHREAD, "addRunDependency cannot be used in a pthread worker"); + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + +var memoryInitializer = null; + + + + + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + +var wasmBinaryFile = 'core_loading_thread.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // if we don't have the binary yet, and have the Fetch api, use that + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function(resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm(env) { + // prepare imports + var info = { + 'env': env, + 'wasi_unstable': env + , + 'global': { + 'NaN': NaN, + 'Infinity': Infinity + }, + 'global.Math': Math, + 'asm2wasm': asm2wasmImports + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + // Keep a reference to the compiled module so we can post it to the workers. + wasmModule = module; + // Instantiation is synchronous in pthreads and we assert on run dependencies. + if (!ENVIRONMENT_IS_PTHREAD) removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + if (!ENVIRONMENT_IS_PTHREAD) { addRunDependency('wasm-instantiate'); } + + + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + receiveInstance(output['instance'], output['module']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate +// the wasm module at that time, and it receives imports and provides exports and so forth, the app +// doesn't need to care that it is wasm or asm.js. + +Module['asm'] = function(global, env, providedBuffer) { + // memory was already allocated (so js could use the buffer) + env['memory'] = wasmMemory + ; + // import table + env['table'] = wasmTable = new WebAssembly.Table({ + 'initial': 347, + 'maximum': 347, + 'element': 'anyfunc' + }); + // With the wasm backend __memory_base and __table_base and only needed for + // relocatable output. + env['__memory_base'] = 1024; // tell the memory segments where to place themselves + // table starts at 0 by default (even in dynamic linking, for the main module) + env['__table_base'] = 0; + + var exports = createWasm(env); + assert(exports, 'binaryen setup failed (no wasm support?)'); + return exports; +}; + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = [function() { postMessage({cmd : 'processQueuedMainThreadWork'}) }, + function($0) { if (!ENVIRONMENT_IS_PTHREAD) { if (!PThread.pthreads[$0] || !PThread.pthreads[$0].worker) { return 0; } PThread.pthreads[$0].worker.postMessage({cmd : 'processThreadQueue'}); } else { postMessage({targetThread : $0, cmd : 'processThreadQueue'}); } return 1; }, + function() { return !!(Module['canvas']) }, + function() { noExitRuntime = true }, + function() { throw 'Canceled!' }]; + +function _emscripten_asm_const_i(code) { + return ASM_CONSTS[code](); +} + +function _emscripten_asm_const_ii(code, a0) { + return ASM_CONSTS[code](a0); +} +function _initPthreadsJS(){ PThread.initRuntime(); } + + + +// STATICTOP = STATIC_BASE + 29856; +/* global initializers */ if (!ENVIRONMENT_IS_PTHREAD) __ATINIT__.push({ func: function() { ___emscripten_pthread_data_constructor() } }); + + +if (!ENVIRONMENT_IS_PTHREAD) { +memoryInitializer = "core_loading_thread.html.mem"; +} + + + + + +/* no memory initializer */ +var tempDoublePtr; +if (!ENVIRONMENT_IS_PTHREAD) tempDoublePtr = 30864; +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; +} + +function copyTempDouble(ptr) { + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; +} + +// {{PRE_LIBRARY}} + + + function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; + } + + function demangleAll(text) { + var regex = + /\b__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); + } + + function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); + } + + function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); + } + + function ___assert_fail(condition, filename, line, func) { + abort('Assertion failed: ' + UTF8ToString(condition) + ', at: ' + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']); + } + + + + var PROCINFO={ppid:1,pid:42,sid:42,pgid:42}; + + + var __pthread_ptr=0; + + var __pthread_is_main_runtime_thread=0; + + var __pthread_is_main_browser_thread=0; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86}; + + + var __main_thread_futex_wait_address; if (ENVIRONMENT_IS_PTHREAD) __main_thread_futex_wait_address = PthreadWorkerInit.__main_thread_futex_wait_address; else PthreadWorkerInit.__main_thread_futex_wait_address = __main_thread_futex_wait_address = 30832;function _emscripten_futex_wake(addr, count) { + if (addr <= 0 || addr > HEAP8.length || addr&3 != 0 || count < 0) return -22; + if (count == 0) return 0; + // Waking (at least) INT_MAX waiters is defined to mean wake all callers. + // For Atomics.notify() API Infinity is to be passed in that case. + if (count >= 2147483647) count = Infinity; + // dump('futex_wake addr:' + addr + ' by thread: ' + _pthread_self() + (ENVIRONMENT_IS_PTHREAD?'(pthread)':'') + '\n'); + + // See if main thread is waiting on this address? If so, wake it up by resetting its wake location to zero. + // Note that this is not a fair procedure, since we always wake main thread first before any workers, so + // this scheme does not adhere to real queue-based waiting. + var mainThreadWaitAddress = Atomics.load(HEAP32, __main_thread_futex_wait_address >> 2); + var mainThreadWoken = 0; + if (mainThreadWaitAddress == addr) { + var loadedAddr = Atomics.compareExchange(HEAP32, __main_thread_futex_wait_address >> 2, mainThreadWaitAddress, 0); + if (loadedAddr == mainThreadWaitAddress) { + --count; + mainThreadWoken = 1; + if (count <= 0) return 1; + } + } + + // Wake any workers waiting on this address. + var ret = Atomics.notify(HEAP32, addr >> 2, count); + if (ret >= 0) return ret + mainThreadWoken; + throw 'Atomics.notify returned an unexpected value ' + ret; + }var PThread={MAIN_THREAD_ID:1,mainThreadInfo:{schedPolicy:0,schedPrio:0},unusedWorkers:[],runningWorkers:[],initRuntime:function() { + // Pass the thread address inside the asm.js scope to store it for fast access that avoids the need for a FFI out. + // Global constructors trying to access this value will read the wrong value, but that is UB anyway. + __register_pthread_ptr(PThread.mainThreadBlock, /*isMainBrowserThread=*/!ENVIRONMENT_IS_WORKER, /*isMainRuntimeThread=*/1); + _emscripten_register_main_browser_thread_id(PThread.mainThreadBlock); + },initMainThreadBlock:function() { + if (ENVIRONMENT_IS_PTHREAD) return undefined; + PThread.mainThreadBlock = 30048; + + for (var i = 0; i < 244/4; ++i) HEAPU32[PThread.mainThreadBlock/4+i] = 0; + + // The pthread struct has a field that points to itself - this is used as a magic ID to detect whether the pthread_t + // structure is 'alive'. + HEAP32[(((PThread.mainThreadBlock)+(24))>>2)]=PThread.mainThreadBlock; + + // pthread struct robust_list head should point to itself. + var headPtr = PThread.mainThreadBlock + 168; + HEAP32[((headPtr)>>2)]=headPtr; + + // Allocate memory for thread-local storage. + var tlsMemory = 30304; + for (var i = 0; i < 128; ++i) HEAPU32[tlsMemory/4+i] = 0; + Atomics.store(HEAPU32, (PThread.mainThreadBlock + 116 ) >> 2, tlsMemory); // Init thread-local-storage memory array. + Atomics.store(HEAPU32, (PThread.mainThreadBlock + 52 ) >> 2, PThread.mainThreadBlock); // Main thread ID. + Atomics.store(HEAPU32, (PThread.mainThreadBlock + 56 ) >> 2, PROCINFO.pid); // Process ID. + + },pthreads:{},pthreadIdCounter:2,exitHandlers:null,setThreadStatus:function() {},runExitHandlers:function() { + if (PThread.exitHandlers !== null) { + while (PThread.exitHandlers.length > 0) { + PThread.exitHandlers.pop()(); + } + PThread.exitHandlers = null; + } + + // Call into the musl function that runs destructors of all thread-specific data. + if (ENVIRONMENT_IS_PTHREAD && threadInfoStruct) ___pthread_tsd_run_dtors(); + },threadExit:function(exitCode) { + var tb = _pthread_self(); + if (tb) { // If we haven't yet exited? + Atomics.store(HEAPU32, (tb + 4 ) >> 2, exitCode); + // When we publish this, the main thread is free to deallocate the thread object and we are done. + // Therefore set threadInfoStruct = 0; above to 'release' the object in this worker thread. + Atomics.store(HEAPU32, (tb + 0 ) >> 2, 1); + + // Disable all cancellation so that executing the cleanup handlers won't trigger another JS + // canceled exception to be thrown. + Atomics.store(HEAPU32, (tb + 72 ) >> 2, 1/*PTHREAD_CANCEL_DISABLE*/); + Atomics.store(HEAPU32, (tb + 76 ) >> 2, 0/*PTHREAD_CANCEL_DEFERRED*/); + PThread.runExitHandlers(); + + _emscripten_futex_wake(tb + 0, 2147483647); + __register_pthread_ptr(0, 0, 0); // Unregister the thread block also inside the asm.js scope. + threadInfoStruct = 0; + if (ENVIRONMENT_IS_PTHREAD) { + // Note: in theory we would like to return any offscreen canvases back to the main thread, + // but if we ever fetched a rendering context for them that would not be valid, so we don't try. + postMessage({ cmd: 'exit' }); + } + } + },threadCancel:function() { + PThread.runExitHandlers(); + Atomics.store(HEAPU32, (threadInfoStruct + 4 ) >> 2, -1/*PTHREAD_CANCELED*/); + Atomics.store(HEAPU32, (threadInfoStruct + 0 ) >> 2, 1); // Mark the thread as no longer running. + _emscripten_futex_wake(threadInfoStruct + 0, 2147483647); // wake all threads + threadInfoStruct = selfThreadId = 0; // Not hosting a pthread anymore in this worker, reset the info structures to null. + __register_pthread_ptr(0, 0, 0); // Unregister the thread block also inside the asm.js scope. + postMessage({ cmd: 'cancelDone' }); + },terminateAllThreads:function() { + for (var t in PThread.pthreads) { + var pthread = PThread.pthreads[t]; + if (pthread) { + PThread.freeThreadData(pthread); + if (pthread.worker) pthread.worker.terminate(); + } + } + PThread.pthreads = {}; + + for (var i = 0; i < PThread.unusedWorkers.length; ++i) { + var worker = PThread.unusedWorkers[i]; + assert(!worker.pthread); // This Worker should not be hosting a pthread at this time. + worker.terminate(); + } + PThread.unusedWorkers = []; + + for (var i = 0; i < PThread.runningWorkers.length; ++i) { + var worker = PThread.runningWorkers[i]; + var pthread = worker.pthread; + assert(pthread); // This Worker should have a pthread it is executing + PThread.freeThreadData(pthread); + worker.terminate(); + } + PThread.runningWorkers = []; + },freeThreadData:function(pthread) { + if (!pthread) return; + if (pthread.threadInfoStruct) { + var tlsMemory = HEAP32[(((pthread.threadInfoStruct)+(116))>>2)]; + HEAP32[(((pthread.threadInfoStruct)+(116))>>2)]=0; + _free(tlsMemory); + _free(pthread.threadInfoStruct); + } + pthread.threadInfoStruct = 0; + if (pthread.allocatedOwnStack && pthread.stackBase) _free(pthread.stackBase); + pthread.stackBase = 0; + if (pthread.worker) pthread.worker.pthread = null; + },returnWorkerToPool:function(worker) { + delete PThread.pthreads[worker.pthread.thread]; + //Note: worker is intentionally not terminated so the pool can dynamically grow. + PThread.unusedWorkers.push(worker); + PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); // Not a running Worker anymore + PThread.freeThreadData(worker.pthread); + worker.pthread = undefined; // Detach the worker from the pthread object, and return it to the worker pool as an unused worker. + },receiveObjectTransfer:function(data) { + },allocateUnusedWorkers:function(numWorkers, onFinishedLoading) { + if (typeof SharedArrayBuffer === 'undefined') return; // No multithreading support, no-op. + + var numWorkersLoaded = 0; + var pthreadMainJs = "core_loading_thread.worker.js"; + // Allow HTML module to configure the location where the 'worker.js' file will be loaded from, + // via Module.locateFile() function. If not specified, then the default URL 'worker.js' relative + // to the main html file is loaded. + pthreadMainJs = locateFile(pthreadMainJs); + + for (var i = 0; i < numWorkers; ++i) { + var worker = new Worker(pthreadMainJs); + + (function(worker) { + worker.onmessage = function(e) { + var d = e.data; + // Sometimes we need to backproxy events to the calling thread (e.g. HTML5 DOM events handlers such as emscripten_set_mousemove_callback()), so keep track in a globally accessible variable about the thread that initiated the proxying. + if (worker.pthread) PThread.currentProxiedOperationCallerThread = worker.pthread.threadInfoStruct; + + // If this message is intended to a recipient that is not the main thread, forward it to the target thread. + if (d.targetThread && d.targetThread != _pthread_self()) { + var thread = PThread.pthreads[d.targetThread]; + if (thread) { + thread.worker.postMessage(e.data, d.transferList); + } else { + console.error('Internal error! Worker sent a message "' + d.cmd + '" to target pthread ' + d.targetThread + ', but that thread no longer exists!'); + } + PThread.currentProxiedOperationCallerThread = undefined; + return; + } + + if (d.cmd === 'processQueuedMainThreadWork') { + // TODO: Must post message to main Emscripten thread in PROXY_TO_WORKER mode. + _emscripten_main_thread_process_queued_calls(); + } else if (d.cmd === 'spawnThread') { + __spawn_thread(e.data); + } else if (d.cmd === 'cleanupThread') { + __cleanup_thread(d.thread); + } else if (d.cmd === 'killThread') { + __kill_thread(d.thread); + } else if (d.cmd === 'cancelThread') { + __cancel_thread(d.thread); + } else if (d.cmd === 'loaded') { + worker.loaded = true; + // If this Worker is already pending to start running a thread, launch the thread now + if (worker.runPthread) { + worker.runPthread(); + delete worker.runPthread; + } + ++numWorkersLoaded; + if (numWorkersLoaded === numWorkers && onFinishedLoading) { + onFinishedLoading(); + } + } else if (d.cmd === 'print') { + out('Thread ' + d.threadId + ': ' + d.text); + } else if (d.cmd === 'printErr') { + err('Thread ' + d.threadId + ': ' + d.text); + } else if (d.cmd === 'alert') { + alert('Thread ' + d.threadId + ': ' + d.text); + } else if (d.cmd === 'exit') { + var detached = worker.pthread && Atomics.load(HEAPU32, (worker.pthread.thread + 80) >> 2); + if (detached) { + PThread.returnWorkerToPool(worker); + } + } else if (d.cmd === 'exitProcess') { + // A pthread has requested to exit the whole application process (runtime). + noExitRuntime = false; + try { + exit(d.returnCode); + } catch (e) { + if (e instanceof ExitStatus) return; + throw e; + } + } else if (d.cmd === 'cancelDone') { + PThread.returnWorkerToPool(worker); + } else if (d.cmd === 'objectTransfer') { + PThread.receiveObjectTransfer(e.data); + } else if (e.data.target === 'setimmediate') { + worker.postMessage(e.data); // Worker wants to postMessage() to itself to implement setImmediate() emulation. + } else { + err("worker sent an unknown command " + d.cmd); + } + PThread.currentProxiedOperationCallerThread = undefined; + }; + + worker.onerror = function(e) { + err('pthread sent an error! ' + e.filename + ':' + e.lineno + ': ' + e.message); + }; + }(worker)); + + // Allocate tempDoublePtr for the worker. This is done here on the worker's behalf, since we may need to do this statically + // if the runtime has not been loaded yet, etc. - so we just use getMemory, which is main-thread only. + var tempDoublePtr = getMemory(8); // TODO: leaks. Cleanup after worker terminates. + + // Ask the new worker to load up the Emscripten-compiled page. This is a heavy operation. + worker.postMessage({ + cmd: 'load', + // If the application main .js file was loaded from a Blob, then it is not possible + // to access the URL of the current script that could be passed to a Web Worker so that + // it could load up the same file. In that case, developer must either deliver the Blob + // object in Module['mainScriptUrlOrBlob'], or a URL to it, so that pthread Workers can + // independently load up the same main application file. + urlOrBlob: Module['mainScriptUrlOrBlob'] || _scriptDir, + wasmMemory: wasmMemory, + wasmModule: wasmModule, + tempDoublePtr: tempDoublePtr, + DYNAMIC_BASE: DYNAMIC_BASE, + DYNAMICTOP_PTR: DYNAMICTOP_PTR, + PthreadWorkerInit: PthreadWorkerInit + }); + PThread.unusedWorkers.push(worker); + } + },getNewWorker:function() { + if (PThread.unusedWorkers.length == 0) PThread.allocateUnusedWorkers(1); + if (PThread.unusedWorkers.length > 0) return PThread.unusedWorkers.pop(); + else return null; + },busySpinWait:function(msecs) { + var t = performance.now() + msecs; + while(performance.now() < t) { + ; + } + }};function ___call_main(argc, argv) { + var returnCode = _main(argc, argv); + if (!noExitRuntime) postMessage({ cmd: 'exitProcess', returnCode: returnCode }); + return returnCode; + } + + + + function _emscripten_get_now() { abort() } + + function _emscripten_get_now_is_monotonic() { + // return whether emscripten_get_now is guaranteed monotonic; the Date.now + // implementation is not :( + return (0 + || ENVIRONMENT_IS_NODE + || (typeof dateNow !== 'undefined') + || (typeof performance === 'object' && performance && typeof performance['now'] === 'function') + ); + } + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else err('failed to set errno from JS'); + return value; + }function _clock_gettime(clk_id, tp) { + // int clock_gettime(clockid_t clk_id, struct timespec *tp); + var now; + if (clk_id === 0) { + now = Date.now(); + } else if (clk_id === 1 && _emscripten_get_now_is_monotonic()) { + now = _emscripten_get_now(); + } else { + ___setErrNo(22); + return -1; + } + HEAP32[((tp)>>2)]=(now/1000)|0; // seconds + HEAP32[(((tp)+(4))>>2)]=((now % 1000)*1000*1000)|0; // nanoseconds + return 0; + }function ___clock_gettime(a0,a1 + ) { + return _clock_gettime(a0,a1); + } + + function ___lock() {} + + + + var PATH={splitPath:function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + },normalize:function(path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function(path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function(path) { + return PATH.splitPath(path)[3]; + },join:function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function(l, r) { + return PATH.normalize(l + '/' + r); + }}; + + + var PATH_FS={resolve:function() { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; + + var TTY={ttys:[],init:function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + },shutdown:function() { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + },register:function(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + },stream_ops:{open:function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(19); + } + stream.tty = tty; + stream.seekable = false; + },close:function(stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + },flush:function(stream) { + stream.tty.ops.flush(stream.tty); + },read:function(stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(6); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + },write:function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(6); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset+i]); + } + } catch (e) { + throw new FS.ErrnoError(5); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }},default_tty_ops:{get_char:function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + var isPosixPlatform = (process.platform != 'win32'); // Node doesn't offer a direct check, so test by exclusion + + var fd = process.stdin.fd; + if (isPosixPlatform) { + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + } + + try { + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + } catch(e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + },put_char:function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }},default_tty1_ops:{put_char:function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }}}; + + var MEMFS={ops_table:null,mount:function(mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + },createNode:function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(1); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + },getFileDataAsRegularArray:function(node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + },getFileDataAsTypedArray:function(node) { + if (!node.contents) return new Uint8Array; + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + },expandFileStorage:function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + },resizeFileStorage:function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + },node_ops:{getattr:function(node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + },lookup:function(parent, name) { + throw FS.genericErrors[2]; + },mknod:function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + },rename:function(old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(39); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + },unlink:function(parent, name) { + delete parent.contents[name]; + },rmdir:function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(39); + } + delete parent.contents[name]; + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + },readlink:function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(22); + } + return node.link; + }},stream_ops:{read:function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + assert(size >= 0); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + },write:function(stream, buffer, offset, length, position, canOwn) { + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + assert(position === 0, 'canOwn must imply no weird position inside the file'); + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position+length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position+length); + return length; + },llseek:function(stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + },allocate:function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if ( !(flags & 2) && + (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < stream.node.usedBytes) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + // malloc() can lead to growing the heap. If targeting the heap, we need to + // re-acquire the heap buffer object in case growth had occurred. + var fromHeap = (buffer.buffer == HEAP8.buffer); + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(12); + } + (fromHeap ? HEAP8 : buffer).set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + }}}; + + var IDBFS={dbs:{},indexedDB:function() { + if (typeof indexedDB !== 'undefined') return indexedDB; + var ret = null; + if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + assert(ret, 'IDBFS used, but indexedDB not supported'); + return ret; + },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount) { + // reuse all of the core MEMFS functionality + return MEMFS.mount.apply(null, arguments); + },syncfs:function(mount, populate, callback) { + IDBFS.getLocalSet(mount, function(err, local) { + if (err) return callback(err); + + IDBFS.getRemoteSet(mount, function(err, remote) { + if (err) return callback(err); + + var src = populate ? remote : local; + var dst = populate ? local : remote; + + IDBFS.reconcile(src, dst, callback); + }); + }); + },getDB:function(name, callback) { + // check the cache first + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); + } + + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); + } + if (!req) { + return callback("Unable to connect to IndexedDB"); + } + req.onupgradeneeded = function(e) { + var db = e.target.result; + var transaction = e.target.transaction; + + var fileStore; + + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); + } + + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } + }; + req.onsuccess = function() { + db = req.result; + + // add to the cache + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },getLocalSet:function(mount, callback) { + var entries = {}; + + function isRealDir(p) { + return p !== '.' && p !== '..'; + }; + function toAbsolute(root) { + return function(p) { + return PATH.join2(root, p); + } + }; + + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + + while (check.length) { + var path = check.pop(); + var stat; + + try { + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); + } + + entries[path] = { timestamp: stat.mtime }; + } + + return callback(null, { type: 'local', entries: entries }); + },getRemoteSet:function(mount, callback) { + var entries = {}; + + IDBFS.getDB(mount.mountpoint, function(err, db) { + if (err) return callback(err); + + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index('timestamp'); + + index.openKeyCursor().onsuccess = function(event) { + var cursor = event.target.result; + + if (!cursor) { + return callback(null, { type: 'remote', db: db, entries: entries }); + } + + entries[cursor.primaryKey] = { timestamp: cursor.key }; + + cursor.continue(); + }; + } catch (e) { + return callback(e); + } + }); + },loadLocalEntry:function(path, callback) { + var stat, node; + + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode }); + } else if (FS.isFile(stat.mode)) { + // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. + // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); + } else { + return callback(new Error('node type not supported')); + } + },storeLocalEntry:function(path, entry, callback) { + try { + if (FS.isDir(entry.mode)) { + FS.mkdir(path, entry.mode); + } else if (FS.isFile(entry.mode)) { + FS.writeFile(path, entry.contents, { canOwn: true }); + } else { + return callback(new Error('node type not supported')); + } + + FS.chmod(path, entry.mode); + FS.utime(path, entry.timestamp, entry.timestamp); + } catch (e) { + return callback(e); + } + + callback(null); + },removeLocalEntry:function(path, callback) { + try { + var lookup = FS.lookupPath(path); + var stat = FS.stat(path); + + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + + callback(null); + },loadRemoteEntry:function(store, path, callback) { + var req = store.get(path); + req.onsuccess = function(event) { callback(null, event.target.result); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },storeRemoteEntry:function(store, path, entry, callback) { + var req = store.put(entry, path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },removeRemoteEntry:function(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },reconcile:function(src, dst, callback) { + var total = 0; + + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e.timestamp > e2.timestamp) { + create.push(key); + total++; + } + }); + + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + var e = dst.entries[key]; + var e2 = src.entries[key]; + if (!e2) { + remove.push(key); + total++; + } + }); + + if (!total) { + return callback(null); + } + + var errored = false; + var db = src.type === 'remote' ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + + function done(err) { + if (err && !errored) { + errored = true; + return callback(err); + } + }; + + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; + + transaction.oncomplete = function(e) { + if (!errored) { + callback(null); + } + }; + + // sort paths in ascending order so directory entries are created + // before the files inside them + create.sort().forEach(function (path) { + if (dst.type === 'local') { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + + // sort paths in descending order so files are deleted before their + // parent directories + remove.sort().reverse().forEach(function(path) { + if (dst.type === 'local') { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); + }}; + + var NODEFS={isWindows:false,staticInit:function() { + NODEFS.isWindows = !!process.platform.match(/^win/); + var flags = process["binding"]("constants"); + // Node.js 4 compatibility: it has no namespaces for constants + if (flags["fs"]) { + flags = flags["fs"]; + } + NODEFS.flagsForNodeMap = { + "1024": flags["O_APPEND"], + "64": flags["O_CREAT"], + "128": flags["O_EXCL"], + "0": flags["O_RDONLY"], + "2": flags["O_RDWR"], + "4096": flags["O_SYNC"], + "512": flags["O_TRUNC"], + "1": flags["O_WRONLY"] + }; + },bufferFrom:function (arrayBuffer) { + // Node.js < 4.5 compatibility: Buffer.from does not support ArrayBuffer + // Buffer.from before 4.5 was just a method inherited from Uint8Array + // Buffer.alloc has been added with Buffer.from together, so check it instead + return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); + },mount:function (mount) { + assert(ENVIRONMENT_HAS_NODE); + return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); + },createNode:function (parent, name, mode, dev) { + if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { + throw new FS.ErrnoError(22); + } + var node = FS.createNode(parent, name, mode); + node.node_ops = NODEFS.node_ops; + node.stream_ops = NODEFS.stream_ops; + return node; + },getMode:function (path) { + var stat; + try { + stat = fs.lstatSync(path); + if (NODEFS.isWindows) { + // Node.js on Windows never represents permission bit 'x', so + // propagate read bits to execute bits + stat.mode = stat.mode | ((stat.mode & 292) >> 2); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); // syscall errnos are negated, node's are not + } + return stat.mode; + },realPath:function (node) { + var parts = []; + while (node.parent !== node) { + parts.push(node.name); + node = node.parent; + } + parts.push(node.mount.opts.root); + parts.reverse(); + return PATH.join.apply(null, parts); + },flagsForNode:function(flags) { + flags &= ~0x200000 /*O_PATH*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x800 /*O_NONBLOCK*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x8000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x80000 /*O_CLOEXEC*/; // Some applications may pass it; it makes no sense for a single process. + var newFlags = 0; + for (var k in NODEFS.flagsForNodeMap) { + if (flags & k) { + newFlags |= NODEFS.flagsForNodeMap[k]; + flags ^= k; + } + } + + if (!flags) { + return newFlags; + } else { + throw new FS.ErrnoError(22); + } + },node_ops:{getattr:function(node) { + var path = NODEFS.realPath(node); + var stat; + try { + stat = fs.lstatSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. + // See http://support.microsoft.com/kb/140365 + if (NODEFS.isWindows && !stat.blksize) { + stat.blksize = 4096; + } + if (NODEFS.isWindows && !stat.blocks) { + stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; + } + return { + dev: stat.dev, + ino: stat.ino, + mode: stat.mode, + nlink: stat.nlink, + uid: stat.uid, + gid: stat.gid, + rdev: stat.rdev, + size: stat.size, + atime: stat.atime, + mtime: stat.mtime, + ctime: stat.ctime, + blksize: stat.blksize, + blocks: stat.blocks + }; + },setattr:function(node, attr) { + var path = NODEFS.realPath(node); + try { + if (attr.mode !== undefined) { + fs.chmodSync(path, attr.mode); + // update the common node structure mode as well + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + var date = new Date(attr.timestamp); + fs.utimesSync(path, date, date); + } + if (attr.size !== undefined) { + fs.truncateSync(path, attr.size); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },lookup:function (parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + var mode = NODEFS.getMode(path); + return NODEFS.createNode(parent, name, mode); + },mknod:function (parent, name, mode, dev) { + var node = NODEFS.createNode(parent, name, mode, dev); + // create the backing node for this in the fs root as well + var path = NODEFS.realPath(node); + try { + if (FS.isDir(node.mode)) { + fs.mkdirSync(path, node.mode); + } else { + fs.writeFileSync(path, '', { mode: node.mode }); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + return node; + },rename:function (oldNode, newDir, newName) { + var oldPath = NODEFS.realPath(oldNode); + var newPath = PATH.join2(NODEFS.realPath(newDir), newName); + try { + fs.renameSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },unlink:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.unlinkSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },rmdir:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.rmdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readdir:function(node) { + var path = NODEFS.realPath(node); + try { + return fs.readdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },symlink:function(parent, newName, oldPath) { + var newPath = PATH.join2(NODEFS.realPath(parent), newName); + try { + fs.symlinkSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readlink:function(node) { + var path = NODEFS.realPath(node); + try { + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + }},stream_ops:{open:function (stream) { + var path = NODEFS.realPath(stream.node); + try { + if (FS.isFile(stream.node.mode)) { + stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags)); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },close:function (stream) { + try { + if (FS.isFile(stream.node.mode) && stream.nfd) { + fs.closeSync(stream.nfd); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },read:function (stream, buffer, offset, length, position) { + // Node.js < 6 compatibility: node errors on 0 length reads + if (length === 0) return 0; + try { + return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },write:function (stream, buffer, offset, length, position) { + try { + return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + try { + var stat = fs.fstatSync(stream.nfd); + position += stat.size; + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + } + } + + if (position < 0) { + throw new FS.ErrnoError(22); + } + + return position; + }}}; + + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + // Issue 4254: Using curr as a node name will prevent the node + // from being found in FS.nameTable when FS.open is called on + // a path which holds a child of this node, + // given that all FS functions assume node names + // are just their corresponding parts within their given path, + // rather than incremental aggregates which include their parent's + // directories. + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; + } + return parent; + } + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; + } + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function(node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function(parent, name) { + throw new FS.ErrnoError(2); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(1); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(1); + },unlink:function(parent, name) { + throw new FS.ErrnoError(1); + },rmdir:function(parent, name) { + throw new FS.ErrnoError(1); + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newName, oldPath) { + throw new FS.ErrnoError(1); + },readlink:function(node) { + throw new FS.ErrnoError(1); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(5); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + }}}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(40); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(40); + } + } + } + } + + return { path: current_path, node: current }; + },getPath:function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + },hashName:function(parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + },hashAddNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + },hashRemoveNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + },lookupNode:function(parent, name) { + var err = FS.mayLookup(parent); + if (err) { + throw new FS.ErrnoError(err, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + },createNode:function(parent, name, mode, rdev) { + if (!FS.FSNode) { + FS.FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + + FS.FSNode.prototype = {}; + + // compatibility + var readMode = 292 | 73; + var writeMode = 146; + + // NOTE we must use Object.defineProperties instead of individual calls to + // Object.defineProperty in order to make closure compiler happy + Object.defineProperties(FS.FSNode.prototype, { + read: { + get: function() { return (this.mode & readMode) === readMode; }, + set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } + }, + write: { + get: function() { return (this.mode & writeMode) === writeMode; }, + set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } + }, + isFolder: { + get: function() { return FS.isDir(this.mode); } + }, + isDevice: { + get: function() { return FS.isChrdev(this.mode); } + } + }); + } + + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + },destroyNode:function(node) { + FS.hashRemoveNode(node); + },isRoot:function(node) { + return node === node.parent; + },isMountpoint:function(node) { + return !!node.mounted; + },isFile:function(mode) { + return (mode & 61440) === 32768; + },isDir:function(mode) { + return (mode & 61440) === 16384; + },isLink:function(mode) { + return (mode & 61440) === 40960; + },isChrdev:function(mode) { + return (mode & 61440) === 8192; + },isBlkdev:function(mode) { + return (mode & 61440) === 24576; + },isFIFO:function(mode) { + return (mode & 61440) === 4096; + },isSocket:function(mode) { + return (mode & 49152) === 49152; + },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + },flagsToPermissionString:function(flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + },nodePermissions:function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 13; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 13; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 13; + } + return 0; + },mayLookup:function(dir) { + var err = FS.nodePermissions(dir, 'x'); + if (err) return err; + if (!dir.node_ops.lookup) return 13; + return 0; + },mayCreate:function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 17; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + },mayDelete:function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var err = FS.nodePermissions(dir, 'wx'); + if (err) { + return err; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 20; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 16; + } + } else { + if (FS.isDir(node.mode)) { + return 21; + } + } + return 0; + },mayOpen:function(node, flags) { + if (!node) { + return 2; + } + if (FS.isLink(node.mode)) { + return 40; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 21; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(24); + },getStream:function(fd) { + return FS.streams[fd]; + },createStream:function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function(){}; + FS.FSStream.prototype = {}; + // compatibility + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function() { return this.node; }, + set: function(val) { this.node = val; } + }, + isRead: { + get: function() { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function() { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function() { return (this.flags & 1024); } + } + }); + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + },closeStream:function(fd) { + FS.streams[fd] = null; + },chrdev_stream_ops:{open:function(stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + },llseek:function() { + throw new FS.ErrnoError(29); + }},major:function(dev) { + return ((dev) >> 8); + },minor:function(dev) { + return ((dev) & 0xff); + },makedev:function(ma, mi) { + return ((ma) << 8 | (mi)); + },registerDevice:function(dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + },getDevice:function(dev) { + return FS.devices[dev]; + },getMounts:function(mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + },syncfs:function(populate, callback) { + if (typeof(populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(err) { + assert(FS.syncFSRequests > 0); + FS.syncFSRequests--; + return callback(err); + } + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return doCallback(err); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + },mount:function(type, opts, mountpoint) { + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(16); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + },unmount:function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(22); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + assert(idx !== -1); + node.mount.mounts.splice(idx, 1); + },lookup:function(parent, name) { + return parent.node_ops.lookup(parent, name); + },mknod:function(path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(22); + } + var err = FS.mayCreate(parent, name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.mknod(parent, name, mode, dev); + },create:function(path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + },mkdir:function(path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + },mkdirTree:function(path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch(e) { + if (e.errno != 17) throw e; + } + } + },mkdev:function(path, mode, dev) { + if (typeof(dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + },symlink:function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(2); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(2); + } + var newname = PATH.basename(newpath); + var err = FS.mayCreate(parent, newname); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.symlink(parent, newname, oldpath); + },rename:function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(16); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(2); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(18); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(22); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(39); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var err = FS.mayDelete(old_dir, old_name, isdir); + if (err) { + throw new FS.ErrnoError(err); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + err = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(16); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + err = FS.nodePermissions(old_dir, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch(e) { + console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch(e) { + console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + },rmdir:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, true); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(20); + } + return node.node_ops.readdir(node); + },unlink:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, false); + if (err) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readlink:function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(2); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(22); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + },stat:function(path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(2); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(1); + } + return node.node_ops.getattr(node); + },lstat:function(path) { + return FS.stat(path, true); + },chmod:function(path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + },lchmod:function(path, mode) { + FS.chmod(path, mode, true); + },fchmod:function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chmod(stream.node, mode); + },chown:function(path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + },lchown:function(path, uid, gid) { + FS.chown(path, uid, gid, true); + },fchown:function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chown(stream.node, uid, gid); + },truncate:function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(22); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(21); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(22); + } + var err = FS.nodePermissions(node, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + },ftruncate:function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(22); + } + FS.truncate(stream.node, len); + },utime:function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + },open:function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(2); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(17); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(2); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var err = FS.mayOpen(node, flags); + if (err) { + throw new FS.ErrnoError(err); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + console.log("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch(e) { + console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); + } + return stream; + },close:function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + },isClosed:function(stream) { + return stream.fd === null; + },llseek:function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(29); + } + if (whence != 0 /* SEEK_SET */ && whence != 1 /* SEEK_CUR */ && whence != 2 /* SEEK_END */) { + throw new FS.ErrnoError(22); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + },read:function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(22); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + },write:function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(22); + } + if (stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch(e) { + console.log("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); + } + return bytesWritten; + },allocate:function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(22); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(95); + } + stream.stream_ops.allocate(stream, offset, length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(13); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(13); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(19); + } + return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function(stream) { + return 0; + },ioctl:function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(25); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + },readFile:function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + },writeFile:function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + },cwd:function() { + return FS.currentPath; + },chdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(2); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(20); + } + var err = FS.nodePermissions(lookup.node, 'x'); + if (err) { + throw new FS.ErrnoError(err); + } + FS.currentPath = lookup.path; + },createDefaultDirectories:function() { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + },createDefaultDevices:function() { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function() { return 0; }, + write: function(stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function() { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else + {} + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function() { abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function() { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(9); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + },createStandardStreams:function() { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); + assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); + assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); + },ensureErrnoError:function() { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function(errno) { + this.errno = errno; + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } + }; + this.setErrno(errno); + this.message = ERRNO_MESSAGES[errno]; + + // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack + // now ensures it shows what we want. + if (this.stack) { + // Define the stack property for Node.js 4, which otherwise errors on the next line. + Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); + this.stack = demangleAll(this.stack); + } + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [2].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + },staticInit:function() { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; + },init:function(input, output, error) { + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + },quit:function() { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + },getMode:function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + },joinPath:function(parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + },absolutePath:function(relative, base) { + return PATH_FS.resolve(base, relative); + },standardizePath:function(path) { + return PATH.normalize(path); + },findObject:function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + },analyzePath:function(path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + },createFolder:function(parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + },createPath:function(parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + },createFile:function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + },createDevice:function(parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset+i]); + } catch (e) { + throw new FS.ErrnoError(5); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + },createLink:function(parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + },forceLoadFile:function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(5); + return success; + },createLazyFile:function(parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length-1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize)|0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024*1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum+1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: function() { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + assert(size >= 0); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function(plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + },indexedDB:function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + },DB_NAME:function() { + return 'EM_FS_' + window.location.pathname; + },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + console.log('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + },loadFilesFromDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch(e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(9); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + },doStat:function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -20; + } + throw e; + } + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); + HEAP32[(((buf)+(48))>>2)]=4096; + HEAP32[(((buf)+(52))>>2)]=stat.blocks; + HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(76))>>2)]=0; + (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); + return 0; + },doMsync:function(addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function(path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function(path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -22; + } + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function(path, buf, bufsize) { + if (bufsize <= 0) return -22; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf+len]; + stringToUTF8(ret, buf, bufsize+1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf+len] = endChar; + + return len; + },doAccess:function(path, amode) { + if (amode & ~7) { + // need a valid mode + return -22; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -2; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -13; + } + return 0; + },doDup:function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + },doWritev:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + },varargs:0,get:function(varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function() { + var ret = UTF8ToString(SYSCALLS.get()); + return ret; + },getStreamFromFD:function() { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(9); + return stream; + },get64:function() { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function() { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(1, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -75; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((result)>>2)]=tempI64[0],HEAP32[(((result)+(4))>>2)]=tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___syscall145(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(2, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // readv + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doReadv(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___syscall221(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(3, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // fcntl64 + var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get(); + switch (cmd) { + case 0: { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -22; + } + var newStream; + newStream = FS.open(stream.path, stream.flags, 0, arg); + return newStream.fd; + } + case 1: + case 2: + return 0; // FD_CLOEXEC makes no sense for a single process. + case 3: + return stream.flags; + case 4: { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0; + } + case 12: + /* case 12: Currently in musl F_GETLK64 has same value as F_GETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ { + + var arg = SYSCALLS.get(); + var offset = 0; + // We're always unlocked. + HEAP16[(((arg)+(offset))>>1)]=2; + return 0; + } + case 13: + case 14: + /* case 13: Currently in musl F_SETLK64 has same value as F_SETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + /* case 14: Currently in musl F_SETLKW64 has same value as F_SETLKW, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + + + return 0; // Pretend that the locking is successful. + case 16: + case 8: + return -22; // These are for sockets. We don't have them fully implemented yet. + case 9: + // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves. + ___setErrNo(22); + return -1; + default: { + return -22; + } + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___syscall5(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(4, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // open + var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get(); // optional TODO + var stream = FS.open(pathname, flags, mode); + return stream.fd; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___syscall54(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(5, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21509: + case 21505: { + if (!stream.tty) return -25; + return 0; + } + case 21510: + case 21511: + case 21512: + case 21506: + case 21507: + case 21508: { + if (!stream.tty) return -25; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -25; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -25; + return -22; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + case 21523: { + // TODO: in theory we should write to the winsize struct that gets + // passed in, but for now musl doesn't read anything on it + if (!stream.tty) return -25; + return 0; + } + case 21524: { + // TODO: technically, this ioctl call should change the window size. + // but, since emscripten doesn't have any concept of a terminal window + // yet, we'll just silently throw it away as we do TIOCGWINSZ + if (!stream.tty) return -25; + return 0; + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___syscall6(which, varargs) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(6, 1, which, varargs); + SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + + function ___unlock() {} + + + function _fd_write(stream, iov, iovcnt, pnum) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(7, 1, stream, iov, iovcnt, pnum); + try { + + stream = FS.getStream(stream); + if (!stream) throw new FS.ErrnoError(9); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + function ___wasi_fd_write( + ) { + return _fd_write.apply(null, arguments) + } + + function _abort() { + Module['abort'](); + } + + function _clock() { + if (_clock.start === undefined) _clock.start = Date.now(); + return ((Date.now() - _clock.start) * (1000000 / 1000))|0; + } + + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.'); + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (typeof setImmediate === 'undefined') { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = 'setimmediate'; + var Browser_setImmediate_messageHandler = function(event) { + // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, + // so check for both cases. + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + addEventListener("message", Browser_setImmediate_messageHandler, true); + setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module['setImmediates'] === undefined) Module['setImmediates'] = []; + Module['setImmediates'].push(func); + postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js + } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + setImmediate(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + noExitRuntime = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + + Browser.mainLoop.func = func; + Browser.mainLoop.arg = arg; + + var browserIterationFunc; + if (typeof arg !== 'undefined') { + browserIterationFunc = function() { + Module['dynCall_vi'](func, arg); + }; + } else { + browserIterationFunc = function() { + Module['dynCall_v'](func); + }; + } + + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + // not counted, but move the progress along a tiny bit + next = next + 0.5; // do not steal all the next one's progress + Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; + } + } + console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); + Browser.mainLoop.updateStatus(); + + // catches pause/resume main loop from blocker execution + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + setTimeout(Browser.mainLoop.runner, 0); + return; + } + + // catch pauses from non-main loop sources + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Implement very basic swap interval control + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + // Not the scheduled time to render this frame - skip. + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + + // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize + // VBO double-buffering and reduce GPU stalls. + + + + if (Browser.mainLoop.method === 'timeout' && Module.ctx) { + err('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); + Browser.mainLoop.method = ''; // just warn once per call to set main loop + } + + Browser.mainLoop.runIter(browserIterationFunc); + + checkStackCookie(); + + // catch pauses from the main loop itself + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able + // to queue the newest produced audio samples. + // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() + // do not need to be hardcoded into this function, but can be more generic. + if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); + + Browser.mainLoop.scheduler(); + } + + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + + Browser.mainLoop.scheduler(); + } + + if (simulateInfiniteLoop) { + throw 'SimulateInfiniteLoop'; + } + }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. + },resume:function() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + },updateStatus:function() { + if (Module['setStatus']) { + var message = Module['statusMessage'] || 'Please wait...'; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); + } else { + Module['setStatus'](message); + } + } else { + Module['setStatus'](''); + } + } + },runIter:function(func) { + if (ABORT) return; + if (Module['preMainLoop']) { + var preRet = Module['preMainLoop'](); + if (preRet === false) { + return; // |return false| skips a frame + } + } + try { + func(); + } catch (e) { + if (e instanceof ExitStatus) { + return; + } else { + if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); + throw e; + } + } + if (Module['postMainLoop']) Module['postMainLoop'](); + }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function() { + if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers + + if (Browser.initted) return; + Browser.initted = true; + + try { + new Blob(); + Browser.hasBlobConstructor = true; + } catch(e) { + Browser.hasBlobConstructor = false; + console.log("warning: no blob constructor, cannot create blobs with mimetypes"); + } + Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); + Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; + if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { + console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); + Module.noImageDecoding = true; + } + + // Support for plugins that can process preloaded files. You can add more of these to + // your app by creating and appending to Module.preloadPlugins. + // + // Each plugin is asked if it can handle a file based on the file's name. If it can, + // it is given the file's raw data. When it is done, it calls a callback with the file's + // (possibly modified) data. For example, a plugin might decompress a file, or it + // might create some side data structure for use later (like an Image element, etc.). + + var imagePlugin = {}; + imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = null; + if (Browser.hasBlobConstructor) { + try { + b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + if (b.size !== byteArray.length) { // Safari bug #118630 + // Safari's Blob can only take an ArrayBuffer + b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); + } + } catch(e) { + warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); + } + } + if (!b) { + var bb = new Browser.BlobBuilder(); + bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range + b = bb.getBlob(); + } + var url = Browser.URLObject.createObjectURL(b); + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var img = new Image(); + img.onload = function img_onload() { + assert(img.complete, 'Image ' + name + ' could not be decoded'); + var canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + Module["preloadedImages"][name] = canvas; + Browser.URLObject.revokeObjectURL(url); + if (onload) onload(byteArray); + }; + img.onerror = function img_onerror(event) { + console.log('Image ' + url + ' could not be decoded'); + if (onerror) onerror(); + }; + img.src = url; + }; + Module['preloadPlugins'].push(imagePlugin); + + var audioPlugin = {}; + audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; + }; + audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + Module["preloadedAudios"][name] = audio; + if (onload) onload(byteArray); + } + function fail() { + if (done) return; + done = true; + Module["preloadedAudios"][name] = new Audio(); // empty shim + if (onerror) onerror(); + } + if (Browser.hasBlobConstructor) { + try { + var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + } catch(e) { + return fail(); + } + var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var audio = new Audio(); + audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 + audio.onerror = function audio_onerror(event) { + if (done) return; + console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); + function encode64(data) { + var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var PAD = '='; + var ret = ''; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = (leftchar << 8) | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = (leftchar >> (leftbits-6)) & 0x3f; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar&3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar&0xf) << 2]; + ret += PAD; + } + return ret; + } + audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); + finish(audio); // we don't wait for confirmation this worked - but it's worth trying + }; + audio.src = url; + // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror + Browser.safeSetTimeout(function() { + finish(audio); // try to use it even though it is not necessarily ready to play + }, 10000); + } else { + return fail(); + } + }; + Module['preloadPlugins'].push(audioPlugin); + + + // Canvas event setup + + function pointerLockChange() { + Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || + document['mozPointerLockElement'] === Module['canvas'] || + document['webkitPointerLockElement'] === Module['canvas'] || + document['msPointerLockElement'] === Module['canvas']; + } + var canvas = Module['canvas']; + if (canvas) { + // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module + // Module['forcedAspectRatio'] = 4 / 3; + + canvas.requestPointerLock = canvas['requestPointerLock'] || + canvas['mozRequestPointerLock'] || + canvas['webkitRequestPointerLock'] || + canvas['msRequestPointerLock'] || + function(){}; + canvas.exitPointerLock = document['exitPointerLock'] || + document['mozExitPointerLock'] || + document['webkitExitPointerLock'] || + document['msExitPointerLock'] || + function(){}; // no-op if function does not exist + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + + document.addEventListener('pointerlockchange', pointerLockChange, false); + document.addEventListener('mozpointerlockchange', pointerLockChange, false); + document.addEventListener('webkitpointerlockchange', pointerLockChange, false); + document.addEventListener('mspointerlockchange', pointerLockChange, false); + + if (Module['elementPointerLock']) { + canvas.addEventListener("click", function(ev) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + },createContext:function(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. + + var ctx; + var contextHandle; + if (useWebGL) { + // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: 1, + }; + + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + + // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not + // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function + // Browser.createContext() should not even be emitted. + if (typeof GL !== 'undefined') { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } + } else { + ctx = canvas.getContext('2d'); + } + + if (!ctx) return null; + + if (setInModule) { + if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); + + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); + Browser.init(); + } + return ctx; + },destroyContext:function(canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer, resizeCanvas, vrDevice) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; + + var canvas = Module['canvas']; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } else { + // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } + if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); + if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); + } + + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener('fullscreenchange', fullscreenChange, false); + document.addEventListener('mozfullscreenchange', fullscreenChange, false); + document.addEventListener('webkitfullscreenchange', fullscreenChange, false); + document.addEventListener('MSFullscreenChange', fullscreenChange, false); + } + + // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) + canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || + canvasContainer['mozRequestFullScreen'] || + canvasContainer['msRequestFullscreen'] || + (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || + (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); + + if (vrDevice) { + canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullscreen(); + } + },requestFullScreen:function(lockPointer, resizeCanvas, vrDevice) { + err('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); + Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + } + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + },exitFullscreen:function() { + // This is workaround for chrome. Trying to exit from fullscreen + // not in fullscreen state will cause "TypeError: Document not active" + // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 + if (!Browser.isFullscreen) { + return false; + } + + var CFS = document['exitFullscreen'] || + document['cancelFullScreen'] || + document['mozCancelFullScreen'] || + document['msExitFullscreen'] || + document['webkitCancelFullScreen'] || + (function() {}); + CFS.apply(document, []); + return true; + },nextRAF:0,fakeRequestAnimationFrame:function(func) { + // try to keep 60fps between calls to here + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1000/60; + } else { + while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 + Browser.nextRAF += 1000/60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + },requestAnimationFrame:function(func) { + if (typeof requestAnimationFrame === 'function') { + requestAnimationFrame(func); + return; + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func); + },safeCallback:function(func) { + return function() { + if (!ABORT) return func.apply(null, arguments); + }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function() { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } + },safeRequestAnimationFrame:function(func) { + return Browser.requestAnimationFrame(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }); + },safeSetTimeout:function(func, timeout) { + noExitRuntime = true; + return setTimeout(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }, timeout); + },safeSetInterval:function(func, timeout) { + noExitRuntime = true; + return setInterval(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in + }, timeout); + },getMimetype:function(name) { + return { + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'png': 'image/png', + 'bmp': 'image/bmp', + 'ogg': 'audio/ogg', + 'wav': 'audio/wav', + 'mp3': 'audio/mpeg' + }[name.substr(name.lastIndexOf('.')+1)]; + },getUserMedia:function(func) { + if(!window.getUserMedia) { + window.getUserMedia = navigator['getUserMedia'] || + navigator['mozGetUserMedia']; + } + window.getUserMedia(func); + },getMovementX:function(event) { + return event['movementX'] || + event['mozMovementX'] || + event['webkitMovementX'] || + 0; + },getMovementY:function(event) { + return event['movementY'] || + event['mozMovementY'] || + event['webkitMovementY'] || + 0; + },getMouseWheelDelta:function(event) { + var delta = 0; + switch (event.type) { + case 'DOMMouseScroll': + // 3 lines make up a step + delta = event.detail / 3; + break; + case 'mousewheel': + // 120 units make up a step + delta = event.wheelDelta / 120; + break; + case 'wheel': + delta = event.deltaY + switch(event.deltaMode) { + case 0: + // DOM_DELTA_PIXEL: 100 pixels make up a step + delta /= 100; + break; + case 1: + // DOM_DELTA_LINE: 3 lines make up a step + delta /= 3; + break; + case 2: + // DOM_DELTA_PAGE: A page makes up 80 steps + delta *= 80; + break; + default: + throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; + } + break; + default: + throw 'unrecognized mouse wheel event: ' + event.type; + } + return delta; + },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event) { // event should be mousemove, mousedown or mouseup + if (Browser.pointerLock) { + // When the pointer is locked, calculate the coordinates + // based on the movement of the mouse. + // Workaround for Firefox bug 764498 + if (event.type != 'mousemove' && + ('mozMovementX' in event)) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + + // check if SDL is available + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + // just add the mouse delta to the current absolut mouse position + // FIXME: ideally this should be clamped against the canvas size and zero + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + // Otherwise, calculate the movement based on the changes + // in the coordinates. + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + + // Neither .scrollX or .pageXOffset are defined in a spec, but + // we prefer .scrollX because it is currently in a spec draft. + // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) + var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); + var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); + // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset + // and we have no viable fallback. + assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.'); + + if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { + var touch = event.touch; + if (touch === undefined) { + return; // the "touch" property is only defined in SDL + + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + + var coords = { x: adjustedX, y: adjustedY }; + + if (event.type === 'touchstart') { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === 'touchend' || event.type === 'touchmove') { + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + + // the canvas might be CSS-scaled compared to its backbuffer; + // SDL-using content will want mouse coordinates in terms + // of backbuffer units. + x = x * (cw / rect.width); + y = y * (ch / rect.height); + + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + } + },asyncLoad:function(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; + readAsync(url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); + },resizeListeners:[],updateResizeListeners:function() { + var canvas = Module['canvas']; + Browser.resizeListeners.forEach(function(listener) { + listener(canvas.width, canvas.height); + }); + },setCanvasSize:function(width, height, noUpdates) { + var canvas = Module['canvas']; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags | 0x00800000; // set SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },setWindowedCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },updateCanvasDimensions:function(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { + if (w/h < Module['forcedAspectRatio']) { + w = Math.round(h * Module['forcedAspectRatio']); + } else { + h = Math.round(w / Module['forcedAspectRatio']); + } + } + if (((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != 'undefined') { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != 'undefined') { + if (w != wNative || h != hNative) { + canvas.style.setProperty( "width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } + } + },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function() { + var handle = Browser.nextWgetRequestHandle; + Browser.nextWgetRequestHandle++; + return handle; + }};var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code) { + EGL.errorCode = code; + },chooseConfig:function(display, attribList, config, config_size, numConfigs) { + if (display != 62000 /* Magic ID for Emscripten 'default display' */) { + EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); + return 0; + } + + if (attribList) { + // read attribList if it is non-null + for(;;) { + var param = HEAP32[((attribList)>>2)]; + if (param == 0x3021 /*EGL_ALPHA_SIZE*/) { + var alphaSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.alpha = (alphaSize > 0); + } else if (param == 0x3025 /*EGL_DEPTH_SIZE*/) { + var depthSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.depth = (depthSize > 0); + } else if (param == 0x3026 /*EGL_STENCIL_SIZE*/) { + var stencilSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.stencil = (stencilSize > 0); + } else if (param == 0x3031 /*EGL_SAMPLES*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples > 0); + } else if (param == 0x3032 /*EGL_SAMPLE_BUFFERS*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples == 1); + } else if (param == 0x3100 /*EGL_CONTEXT_PRIORITY_LEVEL_IMG*/) { + var requestedPriority = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.lowLatency = (requestedPriority != 0x3103 /*EGL_CONTEXT_PRIORITY_LOW_IMG*/); + } else if (param == 0x3038 /*EGL_NONE*/) { + break; + } + attribList += 8; + } + } + + if ((!config || !config_size) && !numConfigs) { + EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); + return 0; + } + if (numConfigs) { + HEAP32[((numConfigs)>>2)]=1; // Total number of supported configs: 1. + } + if (config && config_size > 0) { + HEAP32[((config)>>2)]=62002; + } + + EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); + return 1; + }};function _eglGetProcAddress(name_) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(8, 1, name_); + + return _emscripten_GetProcAddress(name_); + } + + + var _emscripten_asm_const_int=true; + + + function _emscripten_conditional_set_current_thread_status_js(expectedStatus, newStatus) { + } + + + var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function() { + for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { + JSEvents._removeHandler(i); + } + JSEvents.eventHandlers = []; + JSEvents.deferredCalls = []; + },registerRemoveEventListeners:function() { + if (!JSEvents.removeEventListenersRegistered) { + __ATEXIT__.push(JSEvents.removeAllEventListeners); + JSEvents.removeEventListenersRegistered = true; + } + },deferredCalls:[],deferCall:function(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) return false; + + for(var i in arrA) { + if (arrA[i] != arrB[i]) return false; + } + return true; + } + // Test if the given call was already queued, and if so, don't add it again. + for(var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return; + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + + JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); + },removeDeferredCalls:function(targetFunction) { + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i; + } + } + },canPerformEventHandlerRequests:function() { + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; + },runDeferredCalls:function() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return; + } + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + call.targetFunction.apply(this, call.argsList); + } + },inEventHandler:0,currentEventHandler:null,eventHandlers:[],isInternetExplorer:function() { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },removeAllHandlersOnTarget:function(target, eventTypeString) { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && + (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--); + } + } + },_removeHandler:function(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1); + },registerOrRemoveHandler:function(eventHandler) { + var jsEventHandler = function jsEventHandler(event) { + // Increment nesting count for the event handler. + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + // Process any old deferred calls the user has placed. + JSEvents.runDeferredCalls(); + // Process the actual event, calls back to user C code handler. + eventHandler.handlerFunc(event); + // Process any new deferred calls that were placed right now from this event handler. + JSEvents.runDeferredCalls(); + // Out of event handler - restore nesting count. + --JSEvents.inEventHandler; + }; + + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = jsEventHandler; + eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + JSEvents.registerRemoveEventListeners(); + } else { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target + && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--); + } + } + } + },queueEventHandlerOnThread_iiii:function(targetThread, eventHandlerFunc, eventTypeId, eventData, userData) { + var stackTop = stackSave(); + var varargs = stackAlloc(12); + HEAP32[((varargs)>>2)]=eventTypeId; + HEAP32[(((varargs)+(4))>>2)]=eventData; + HEAP32[(((varargs)+(8))>>2)]=userData; + _emscripten_async_queue_on_thread_(targetThread, 637534208, eventHandlerFunc, eventData, varargs); + stackRestore(stackTop); + },getTargetThreadForEventCallback:function(targetThread) { + switch(targetThread) { + case 1: return 0; // The event callback for the current event should be called on the main browser thread. (0 == don't proxy) + case 2: return PThread.currentProxiedOperationCallerThread; // The event callback for the current event should be backproxied to the the thread that is registering the event. + default: return targetThread; // The event callback for the current event should be proxied to the given specific thread. + } + },getBoundingClientRectOrZeros:function(target) { + return target.getBoundingClientRect ? target.getBoundingClientRect() : { left: 0, top: 0 }; + },pageScrollPos:function() { + if (pageXOffset > 0 || pageYOffset > 0) { + return [pageXOffset, pageYOffset]; + } + if (typeof document.documentElement.scrollLeft !== 'undefined' || typeof document.documentElement.scrollTop !== 'undefined') { + return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; + } + return [document.body.scrollLeft|0, document.body.scrollTop|0]; + },getNodeNameForTarget:function(target) { + if (!target) return ''; + if (target == window) return '#window'; + if (target == screen) return '#screen'; + return (target && target.nodeName) ? target.nodeName : ''; + },tick:function() { + if (window['performance'] && window['performance']['now']) return window['performance']['now'](); + else return Date.now(); + },fullscreenEnabled:function() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled; + }}; + + function __requestPointerLock(target) { + if (target.requestPointerLock) { + target.requestPointerLock(); + } else if (target.mozRequestPointerLock) { + target.mozRequestPointerLock(); + } else if (target.webkitRequestPointerLock) { + target.webkitRequestPointerLock(); + } else if (target.msRequestPointerLock) { + target.msRequestPointerLock(); + } else { + // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, + // or if the whole browser just doesn't support the feature. + if (document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock || document.body.msRequestPointerLock) { + return -3; + } else { + return -1; + } + } + return 0; + }function _emscripten_exit_pointerlock() { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(9, 1); + + // Make sure no queued up calls will fire after this. + JSEvents.removeDeferredCalls(__requestPointerLock); + + if (document.exitPointerLock) { + document.exitPointerLock(); + } else if (document.msExitPointerLock) { + document.msExitPointerLock(); + } else if (document.mozExitPointerLock) { + document.mozExitPointerLock(); + } else if (document.webkitExitPointerLock) { + document.webkitExitPointerLock(); + } else { + return -1; + } + return 0; + } + + + function _emscripten_futex_wait(addr, val, timeout) { + if (addr <= 0 || addr > HEAP8.length || addr&3 != 0) return -22; + // dump('futex_wait addr:' + addr + ' by thread: ' + _pthread_self() + (ENVIRONMENT_IS_PTHREAD?'(pthread)':'') + '\n'); + if (ENVIRONMENT_IS_WORKER) { + var ret = Atomics.wait(HEAP32, addr >> 2, val, timeout); + // dump('futex_wait done by thread: ' + _pthread_self() + (ENVIRONMENT_IS_PTHREAD?'(pthread)':'') + '\n'); + if (ret === 'timed-out') return -110; + if (ret === 'not-equal') return -11; + if (ret === 'ok') return 0; + throw 'Atomics.wait returned an unexpected value ' + ret; + } else { + // Atomics.wait is not available in the main browser thread, so simulate it via busy spinning. + var loadedVal = Atomics.load(HEAP32, addr >> 2); + if (val != loadedVal) return -11; + + var tNow = performance.now(); + var tEnd = tNow + timeout; + + + // Register globally which address the main thread is simulating to be waiting on. When zero, main thread is not waiting on anything, + // and on nonzero, the contents of address pointed by __main_thread_futex_wait_address tell which address the main thread is simulating its wait on. + Atomics.store(HEAP32, __main_thread_futex_wait_address >> 2, addr); + var ourWaitAddress = addr; // We may recursively re-enter this function while processing queued calls, in which case we'll do a spurious wakeup of the older wait operation. + while (addr == ourWaitAddress) { + tNow = performance.now(); + if (tNow > tEnd) { + return -110; + } + _emscripten_main_thread_process_queued_calls(); // We are performing a blocking loop here, so must pump any pthreads if they want to perform operations that are proxied. + addr = Atomics.load(HEAP32, __main_thread_futex_wait_address >> 2); // Look for a worker thread waking us up. + } + return 0; + } + } + + + + function __fillGamepadEventData(eventStruct, e) { + HEAPF64[((eventStruct)>>3)]=e.timestamp; + for(var i = 0; i < e.axes.length; ++i) { + HEAPF64[(((eventStruct+i*8)+(16))>>3)]=e.axes[i]; + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i].value; + } else { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i]; + } + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i].pressed; + } else { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i] == 1.0; + } + } + HEAP32[(((eventStruct)+(1296))>>2)]=e.connected; + HEAP32[(((eventStruct)+(1300))>>2)]=e.index; + HEAP32[(((eventStruct)+(8))>>2)]=e.axes.length; + HEAP32[(((eventStruct)+(12))>>2)]=e.buttons.length; + stringToUTF8(e.id, eventStruct + 1304, 64); + stringToUTF8(e.mapping, eventStruct + 1368, 64); + }function _emscripten_get_gamepad_status(index, gamepadState) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(10, 1, index, gamepadState); + + if (!JSEvents.lastGamepadState) throw 'emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + + // INVALID_PARAM is returned on a Gamepad index that never was there. + if (index < 0 || index >= JSEvents.lastGamepadState.length) return -5; + + // NO_DATA is returned on a Gamepad index that was removed. + // For previously disconnected gamepads there should be an empty slot (null/undefined/false) at the index. + // This is because gamepads must keep their original position in the array. + // For example, removing the first of two gamepads produces [null/undefined/false, gamepad]. + if (!JSEvents.lastGamepadState[index]) return -7; + + __fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); + return 0; + } + + + function _emscripten_get_heap_size() { + return HEAP8.length; + } + + + function _emscripten_get_num_gamepads() { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(11, 1); + + if (!JSEvents.lastGamepadState) throw 'emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + // N.B. Do not call emscripten_get_num_gamepads() unless having first called emscripten_sample_gamepad_data(), and that has returned EMSCRIPTEN_RESULT_SUCCESS. + // Otherwise the following line will throw an exception. + return JSEvents.lastGamepadState.length; + } + + + + function __fillPointerlockChangeEventData(eventStruct, e) { + var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; + var isPointerlocked = !!pointerLockElement; + HEAP32[((eventStruct)>>2)]=isPointerlocked; + var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); + var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; + stringToUTF8(nodeName, eventStruct + 4, 128); + stringToUTF8(id, eventStruct + 132, 128); + }function _emscripten_get_pointerlock_status(pointerlockStatus) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(12, 1, pointerlockStatus); + + if (pointerlockStatus) __fillPointerlockChangeEventData(pointerlockStatus); + if (!document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { + return -1; + } + return 0; + } + + + + var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function() { + GL.miniTempBuffer = new Float32Array(GL.MINI_TEMP_BUFFER_SIZE); + for (var i = 0; i < GL.MINI_TEMP_BUFFER_SIZE; i++) { + GL.miniTempBufferViews[i] = GL.miniTempBuffer.subarray(0, i+1); + } + },recordError:function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode; + } + },getNewId:function(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null; + } + return ret; + },MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader, count, string, length) { + var source = ''; + for (var i = 0; i < count; ++i) { + var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; + source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); + } + return source; + },createContext:function(canvas, webGLContextAttributes) { + + + + + var ctx = + (canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes)); + + + if (!ctx) return 0; + + var handle = GL.registerContext(ctx, webGLContextAttributes); + + + + return handle; + },registerContext:function(ctx, webGLContextAttributes) { + var handle = _malloc(8); // Make space on the heap to store GL context attributes that need to be accessible as shared between threads. + HEAP32[(((handle)+(4))>>2)]=_pthread_self(); // the thread pointer of the thread that owns the control of the context + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + + + + // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. + if (ctx.canvas) ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { + GL.initExtensions(context); + } + + + + + return handle; + },makeContextCurrent:function(contextHandle) { + + GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. + Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. + return !(contextHandle && !GLctx); + },getContext:function(contextHandle) { + return GL.contexts[contextHandle]; + },deleteContext:function(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; + if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. + _free(GL.contexts[contextHandle]); + GL.contexts[contextHandle] = null; + },acquireInstancedArraysExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 26 and Google Chrome 30 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('ANGLE_instanced_arrays'); + if (ext) { + ctx['vertexAttribDivisor'] = function(index, divisor) { ext['vertexAttribDivisorANGLE'](index, divisor); }; + ctx['drawArraysInstanced'] = function(mode, first, count, primcount) { ext['drawArraysInstancedANGLE'](mode, first, count, primcount); }; + ctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { ext['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; + } + },acquireVertexArrayObjectExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 25 and WebKit 536.28/desktop Safari 6.0.3 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('OES_vertex_array_object'); + if (ext) { + ctx['createVertexArray'] = function() { return ext['createVertexArrayOES'](); }; + ctx['deleteVertexArray'] = function(vao) { ext['deleteVertexArrayOES'](vao); }; + ctx['bindVertexArray'] = function(vao) { ext['bindVertexArrayOES'](vao); }; + ctx['isVertexArray'] = function(vao) { return ext['isVertexArrayOES'](vao); }; + } + },acquireDrawBuffersExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 28 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('WEBGL_draw_buffers'); + if (ext) { + ctx['drawBuffers'] = function(n, bufs) { ext['drawBuffersWEBGL'](n, bufs); }; + } + },initExtensions:function(context) { + // If this function is called without a specific context object, init the extensions of the currently active context. + if (!context) context = GL.currentContext; + + if (context.initExtensionsDone) return; + context.initExtensionsDone = true; + + var GLctx = context.GLctx; + + // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. + + if (context.version < 2) { + GL.acquireInstancedArraysExtension(GLctx); + GL.acquireVertexArrayObjectExtension(GLctx); + GL.acquireDrawBuffersExtension(GLctx); + } + + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); + + // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and + // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. + // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions + // here, as long as they don't produce a performance impact for users that might not be using those extensions. + // E.g. debugging-related extensions should probably be off by default. + var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): + "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", + "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", + "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", + "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", + "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", + // Community approved WebGL extensions ordered by number: + "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", + "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", + "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", + "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2"]; + + function shouldEnableAutomatically(extension) { + var ret = false; + automaticallyEnabledExtensions.forEach(function(include) { + if (extension.indexOf(include) != -1) { + ret = true; + } + }); + return ret; + } + + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts.forEach(function(ext) { + if (automaticallyEnabledExtensions.indexOf(ext) != -1) { + GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. + } + }); + },populateUniformTable:function(program) { + var p = GL.programs[program]; + var ptable = GL.programInfos[program] = { + uniforms: {}, + maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. + maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. + maxUniformBlockNameLength: -1 // Lazily computed as well + }; + + var utable = ptable.uniforms; + // A program's uniform table maps the string name of an uniform to an integer location of that uniform. + // The global GL.uniforms map maps integer locations to WebGLUniformLocations. + var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); + for (var i = 0; i < numUniforms; ++i) { + var u = GLctx.getActiveUniform(p, i); + + var name = u.name; + ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); + + // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", + // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. + if (name.slice(-1) == ']') { + name = name.slice(0, name.lastIndexOf('[')); + } + + // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then + // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. + // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. + var loc = GLctx.getUniformLocation(p, name); + if (loc) { + var id = GL.getNewId(GL.uniforms); + utable[name] = [u.size, id]; + GL.uniforms[id] = loc; + + for (var j = 1; j < u.size; ++j) { + var n = name + '['+j+']'; + loc = GLctx.getUniformLocation(p, n); + id = GL.getNewId(GL.uniforms); + + GL.uniforms[id] = loc; + } + } + } + }};function _emscripten_glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _emscripten_glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glBeginQueryEXT(target, id) { + GLctx.disjointTimerQueryExt['beginQueryEXT'](target, GL.timerQueriesEXT[id]); + } + + function _emscripten_glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _emscripten_glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _emscripten_glBindFramebuffer(target, framebuffer) { + + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); + + } + + function _emscripten_glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _emscripten_glBindVertexArrayOES(vao) { + GLctx['bindVertexArray'](GL.vaos[vao]); + } + + function _emscripten_glBlendColor(x0, x1, x2, x3) { GLctx['blendColor'](x0, x1, x2, x3) } + + function _emscripten_glBlendEquation(x0) { GLctx['blendEquation'](x0) } + + function _emscripten_glBlendEquationSeparate(x0, x1) { GLctx['blendEquationSeparate'](x0, x1) } + + function _emscripten_glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _emscripten_glBlendFuncSeparate(x0, x1, x2, x3) { GLctx['blendFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _emscripten_glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _emscripten_glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } + + function _emscripten_glClear(x0) { GLctx['clear'](x0) } + + function _emscripten_glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _emscripten_glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _emscripten_glClearStencil(x0) { GLctx['clearStencil'](x0) } + + function _emscripten_glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha); + } + + function _emscripten_glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _emscripten_glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexSubImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _emscripten_glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _emscripten_glCullFace(x0) { GLctx['cullFace'](x0) } + + function _emscripten_glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _emscripten_glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[(((framebuffers)+(i*4))>>2)]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } + } + + function _emscripten_glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _emscripten_glDeleteQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((ids)+(i*4))>>2)]; + var query = GL.timerQueriesEXT[id]; + if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." + GLctx.disjointTimerQueryExt['deleteQueryEXT'](query); + GL.timerQueriesEXT[id] = null; + } + } + + function _emscripten_glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } + } + + function _emscripten_glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _emscripten_glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _emscripten_glDeleteVertexArraysOES(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((vaos)+(i*4))>>2)]; + GLctx['deleteVertexArray'](GL.vaos[id]); + GL.vaos[id] = null; + } + } + + function _emscripten_glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _emscripten_glDepthMask(flag) { + GLctx.depthMask(!!flag); + } + + function _emscripten_glDepthRangef(x0, x1) { GLctx['depthRange'](x0, x1) } + + function _emscripten_glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glDisable(x0) { GLctx['disable'](x0) } + + function _emscripten_glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _emscripten_glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _emscripten_glDrawArraysInstancedANGLE(mode, first, count, primcount) { + GLctx['drawArraysInstanced'](mode, first, count, primcount); + } + + + var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n, bufs) { + + var bufArray = __tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; + } + + GLctx['drawBuffers'](bufArray); + } + + function _emscripten_glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _emscripten_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount) { + GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); + } + + function _emscripten_glEnable(x0) { GLctx['enable'](x0) } + + function _emscripten_glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _emscripten_glEndQueryEXT(target) { + GLctx.disjointTimerQueryExt['endQueryEXT'](target); + } + + function _emscripten_glFinish() { GLctx['finish']() } + + function _emscripten_glFlush() { GLctx['flush']() } + + function _emscripten_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, + GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, + GL.textures[texture], level); + } + + function _emscripten_glFrontFace(x0) { GLctx['frontFace'](x0) } + + + function __glGenObject(n, buffers, createFunction, objectTable + ) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer; + } else { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + } + HEAP32[(((buffers)+(i*4))>>2)]=id; + } + }function _emscripten_glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _emscripten_glGenFramebuffers(n, ids) { + __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers + ); + } + + function _emscripten_glGenQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var query = GLctx.disjointTimerQueryExt['createQueryEXT'](); + if (!query) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + while(i < n) HEAP32[(((ids)+(i++*4))>>2)]=0; + return; + } + var id = GL.getNewId(GL.timerQueriesEXT); + query.name = id; + GL.timerQueriesEXT[id] = query; + HEAP32[(((ids)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers + ); + } + + function _emscripten_glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _emscripten_glGenVertexArraysOES(n, arrays) { + __glGenObject(n, arrays, 'createVertexArray', GL.vaos + ); + } + + function _emscripten_glGenerateMipmap(x0) { GLctx['generateMipmap'](x0) } + + function _emscripten_glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveAttrib(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size and type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetActiveUniform(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveUniform(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size, type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetAttachedShaders(program, maxCount, count, shaders) { + var result = GLctx.getAttachedShaders(GL.programs[program]); + var len = result.length; + if (len > maxCount) { + len = maxCount; + } + HEAP32[((count)>>2)]=len; + for (var i = 0; i < len; ++i) { + var id = GL.shaders.indexOf(result[i]); + HEAP32[(((shaders)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + + function emscriptenWebGLGet(name_, p, type) { + // Guard against user passing a null pointer. + // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. + // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but + // better to report an error instead of doing anything random. + if (!p) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var ret = undefined; + switch(name_) { // Handle a few trivial GLES values + case 0x8DFA: // GL_SHADER_COMPILER + ret = 1; + break; + case 0x8DF8: // GL_SHADER_BINARY_FORMATS + if (type != 0 && type != 1) { + GL.recordError(0x0500); // GL_INVALID_ENUM + } + return; // Do not write anything to the out pointer, since no binary formats are supported. + case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS + ret = 0; + break; + case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS + // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), + // so implement it ourselves to allow C++ GLES2 code get the length. + var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); + ret = formats ? formats.length : 0; + break; + } + + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (typeof(result)) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + case "object": + if (result === null) { + // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise + // can mean an invalid name_, which we need to report as an error + switch(name_) { + case 0x8894: // ARRAY_BUFFER_BINDING + case 0x8B8D: // CURRENT_PROGRAM + case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING + case 0x8CA6: // FRAMEBUFFER_BINDING + case 0x8CA7: // RENDERBUFFER_BINDING + case 0x8069: // TEXTURE_BINDING_2D + case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES + case 0x8514: { // TEXTURE_BINDING_CUBE_MAP + ret = 0; + break; + } + default: { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + } + } else if (result instanceof Float32Array || + result instanceof Uint32Array || + result instanceof Int32Array || + result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: HEAP32[(((p)+(i*4))>>2)]=result[i]; break; + case 2: HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; + case 4: HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; + } + } + return; + } else { + try { + ret = result.name | 0; + } catch(e) { + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); + return; + } + } + break; + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Native code calling glGet' + type + 'v(' + name_ + ') and it returns ' + result + ' of type ' + typeof(result) + '!'); + return; + } + } + + switch (type) { + case 1: (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((p)>>2)]=tempI64[0],HEAP32[(((p)+(4))>>2)]=tempI64[1]); break; + case 0: HEAP32[((p)>>2)]=ret; break; + case 2: HEAPF32[((p)>>2)]=ret; break; + case 4: HEAP8[((p)>>0)]=ret ? 1 : 0; break; + } + }function _emscripten_glGetBooleanv(name_, p) { + emscriptenWebGLGet(name_, p, 4); + } + + function _emscripten_glGetBufferParameteriv(target, value, data) { + if (!data) { + // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense + // if data == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((data)>>2)]=GLctx.getBufferParameter(target, value); + } + + function _emscripten_glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0/*GL_NO_ERROR*/; + return error; + } + + function _emscripten_glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _emscripten_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || + result instanceof WebGLTexture) { + result = result.name | 0; + } + HEAP32[((params)>>2)]=result; + } + + function _emscripten_glGetIntegerv(name_, p) { + emscriptenWebGLGet(name_, p, 0); + } + + function _emscripten_glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _emscripten_glGetQueryObjecti64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryObjectui64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectuivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryivEXT(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.disjointTimerQueryExt['getQueryEXT'](target, pname); + } + + function _emscripten_glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getRenderbufferParameter(target, pname); + } + + function _emscripten_glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[((range)>>2)]=result.rangeMin; + HEAP32[(((range)+(4))>>2)]=result.rangeMax; + HEAP32[((precision)>>2)]=result.precision; + } + + function _emscripten_glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) return; // If an error occurs, nothing will be written to length or source. + var numBytesWrittenExclNull = (bufSize > 0 && source) ? stringToUTF8(result, source, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + + function stringToNewUTF8(jsString) { + var length = lengthBytesUTF8(jsString)+1; + var cString = _malloc(length); + stringToUTF8(jsString, cString, length); + return cString; + }function _emscripten_glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _emscripten_glGetTexParameterfv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAPF32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetTexParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + + function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getUniform(GL.programs[program], GL.uniforms[location]); + if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetUniformfv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 2); + } + + function _emscripten_glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0); + } + + function _emscripten_glGetVertexAttribPointerv(index, pname, pointer) { + if (!pointer) { + // GLES2 specification does not specify how to behave if pointer is a null pointer. Since calling this function does not make sense + // if pointer == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((pointer)>>2)]=GLctx.getVertexAttribOffset(index, pname); + } + + + function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 0x889F/*VERTEX_ATTRIB_ARRAY_BUFFER_BINDING*/) { + HEAP32[((params)>>2)]=data["name"]; + } else if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + case 5: HEAP32[((params)>>2)]=Math.fround(data); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + case 5: HEAP32[(((params)+(i*4))>>2)]=Math.fround(data[i]); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetVertexAttribfv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 2); + } + + function _emscripten_glGetVertexAttribiv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 5); + } + + function _emscripten_glHint(x0, x1) { GLctx['hint'](x0, x1) } + + function _emscripten_glIsBuffer(buffer) { + var b = GL.buffers[buffer]; + if (!b) return 0; + return GLctx.isBuffer(b); + } + + function _emscripten_glIsEnabled(x0) { return GLctx['isEnabled'](x0) } + + function _emscripten_glIsFramebuffer(framebuffer) { + var fb = GL.framebuffers[framebuffer]; + if (!fb) return 0; + return GLctx.isFramebuffer(fb); + } + + function _emscripten_glIsProgram(program) { + program = GL.programs[program]; + if (!program) return 0; + return GLctx.isProgram(program); + } + + function _emscripten_glIsQueryEXT(id) { + var query = GL.timerQueriesEXT[id]; + if (!query) return 0; + return GLctx.disjointTimerQueryExt['isQueryEXT'](query); + } + + function _emscripten_glIsRenderbuffer(renderbuffer) { + var rb = GL.renderbuffers[renderbuffer]; + if (!rb) return 0; + return GLctx.isRenderbuffer(rb); + } + + function _emscripten_glIsShader(shader) { + var s = GL.shaders[shader]; + if (!s) return 0; + return GLctx.isShader(s); + } + + function _emscripten_glIsTexture(id) { + var texture = GL.textures[id]; + if (!texture) return 0; + return GLctx.isTexture(texture); + } + + function _emscripten_glIsVertexArrayOES(array) { + + var vao = GL.vaos[array]; + if (!vao) return 0; + return GLctx['isVertexArray'](vao); + } + + function _emscripten_glLineWidth(x0) { GLctx['lineWidth'](x0) } + + function _emscripten_glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _emscripten_glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _emscripten_glPolygonOffset(x0, x1) { GLctx['polygonOffset'](x0, x1) } + + function _emscripten_glQueryCounterEXT(id, target) { + GLctx.disjointTimerQueryExt['queryCounterEXT'](GL.timerQueriesEXT[id], target); + } + + + + function __computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return (x + y - 1) & -y; + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize; + } + + var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4}; + + var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var sizePerPixel = __colorChannelsInGlTextureFormat[format] * __sizeOfGlTextureElementType[type]; + if (!sizePerPixel) { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + var bytes = __computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + var end = pixels + bytes; + switch(type) { + case 0x1401 /* GL_UNSIGNED_BYTE */: + return HEAPU8.subarray(pixels, end); + case 0x1406 /* GL_FLOAT */: + return HEAPF32.subarray(pixels>>2, end>>2); + case 0x1405 /* GL_UNSIGNED_INT */: + case 0x84FA /* GL_UNSIGNED_INT_24_8_WEBGL/GL_UNSIGNED_INT_24_8 */: + return HEAPU32.subarray(pixels>>2, end>>2); + case 0x1403 /* GL_UNSIGNED_SHORT */: + case 0x8363 /* GL_UNSIGNED_SHORT_5_6_5 */: + case 0x8033 /* GL_UNSIGNED_SHORT_4_4_4_4 */: + case 0x8034 /* GL_UNSIGNED_SHORT_5_5_5_1 */: + case 0x8D61 /* GL_HALF_FLOAT_OES */: + return HEAPU16.subarray(pixels>>1, end>>1); + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + } + }function _emscripten_glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _emscripten_glReleaseShaderCompiler() { + // NOP (as allowed by GLES 2.0 spec) + } + + function _emscripten_glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } + + function _emscripten_glSampleCoverage(value, invert) { + GLctx.sampleCoverage(value, !!invert); + } + + function _emscripten_glScissor(x0, x1, x2, x3) { GLctx['scissor'](x0, x1, x2, x3) } + + function _emscripten_glShaderBinary() { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + + function _emscripten_glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _emscripten_glStencilFunc(x0, x1, x2) { GLctx['stencilFunc'](x0, x1, x2) } + + function _emscripten_glStencilFuncSeparate(x0, x1, x2, x3) { GLctx['stencilFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glStencilMask(x0) { GLctx['stencilMask'](x0) } + + function _emscripten_glStencilMaskSeparate(x0, x1) { GLctx['stencilMaskSeparate'](x0, x1) } + + function _emscripten_glStencilOp(x0, x1, x2) { GLctx['stencilOp'](x0, x1, x2) } + + function _emscripten_glStencilOpSeparate(x0, x1, x2, x3) { GLctx['stencilOpSeparate'](x0, x1, x2, x3) } + + function _emscripten_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _emscripten_glTexParameterf(x0, x1, x2) { GLctx['texParameterf'](x0, x1, x2) } + + function _emscripten_glTexParameterfv(target, pname, params) { + var param = HEAPF32[((params)>>2)]; + GLctx.texParameterf(target, pname, param); + } + + function _emscripten_glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _emscripten_glTexParameteriv(target, pname, params) { + var param = HEAP32[((params)>>2)]; + GLctx.texParameteri(target, pname, param); + } + + function _emscripten_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + var pixelData = null; + if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); + } + + function _emscripten_glUniform1f(location, v0) { + GLctx.uniform1f(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1fv(location, count, value) { + + + if (count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[count-1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*4)>>2); + } + GLctx.uniform1fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1iv(location, count, value) { + + + GLctx.uniform1iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*4)>>2)); + } + + function _emscripten_glUniform2f(location, v0, v1) { + GLctx.uniform2f(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2fv(location, count, value) { + + + if (2*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[2*count-1]; + for (var i = 0; i < 2*count; i += 2) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*8)>>2); + } + GLctx.uniform2fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform2i(location, v0, v1) { + GLctx.uniform2i(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2iv(location, count, value) { + + + GLctx.uniform2iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*8)>>2)); + } + + function _emscripten_glUniform3f(location, v0, v1, v2) { + GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3fv(location, count, value) { + + + if (3*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[3*count-1]; + for (var i = 0; i < 3*count; i += 3) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*12)>>2); + } + GLctx.uniform3fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform3i(location, v0, v1, v2) { + GLctx.uniform3i(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3iv(location, count, value) { + + + GLctx.uniform3iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*12)>>2)); + } + + function _emscripten_glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4fv(location, count, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniform4fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform4i(location, v0, v1, v2, v3) { + GLctx.uniform4i(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4iv(location, count, value) { + + + GLctx.uniform4iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*16)>>2)); + } + + function _emscripten_glUniformMatrix2fv(location, count, transpose, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix3fv(location, count, transpose, value) { + + + if (9*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[9*count-1]; + for (var i = 0; i < 9*count; i += 9) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*36)>>2); + } + GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _emscripten_glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]); + } + + function _emscripten_glVertexAttrib1f(x0, x1) { GLctx['vertexAttrib1f'](x0, x1) } + + function _emscripten_glVertexAttrib1fv(index, v) { + + GLctx.vertexAttrib1f(index, HEAPF32[v>>2]); + } + + function _emscripten_glVertexAttrib2f(x0, x1, x2) { GLctx['vertexAttrib2f'](x0, x1, x2) } + + function _emscripten_glVertexAttrib2fv(index, v) { + + GLctx.vertexAttrib2f(index, HEAPF32[v>>2], HEAPF32[v+4>>2]); + } + + function _emscripten_glVertexAttrib3f(x0, x1, x2, x3) { GLctx['vertexAttrib3f'](x0, x1, x2, x3) } + + function _emscripten_glVertexAttrib3fv(index, v) { + + GLctx.vertexAttrib3f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2]); + } + + function _emscripten_glVertexAttrib4f(x0, x1, x2, x3, x4) { GLctx['vertexAttrib4f'](x0, x1, x2, x3, x4) } + + function _emscripten_glVertexAttrib4fv(index, v) { + + GLctx.vertexAttrib4f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2], HEAPF32[v+12>>2]); + } + + function _emscripten_glVertexAttribDivisorANGLE(index, divisor) { + GLctx['vertexAttribDivisor'](index, divisor); + } + + function _emscripten_glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _emscripten_glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + function _emscripten_has_threading_support() { + return typeof SharedArrayBuffer !== 'undefined'; + } + + + + + function _emscripten_proxy_to_main_thread_js(index, sync) { + // Additional arguments are passed after those two, which are the actual + // function arguments. + // The serialization buffer contains the number of call params, and then + // all the args here. + // We also pass 'sync' to C separately, since C needs to look at it. + var numCallArgs = arguments.length - 2; + if (numCallArgs > 20-1) throw 'emscripten_proxy_to_main_thread_js: Too many arguments ' + numCallArgs + ' to proxied function idx=' + index + ', maximum supported is ' + (20-1) + '!'; + // Allocate a buffer, which will be copied by the C code. + var stack = stackSave(); + // First passed parameter specifies the number of arguments to the function. + var args = stackAlloc(numCallArgs * 8); + var b = args >> 3; + for (var i = 0; i < numCallArgs; i++) { + HEAPF64[b + i] = arguments[2 + i]; + } + var ret = _emscripten_run_in_main_runtime_thread_js(index, numCallArgs, args, sync); + stackRestore(stack); + return ret; + } + + var _emscripten_receive_on_main_thread_js_callArgs=[];function _emscripten_receive_on_main_thread_js(index, numCallArgs, args) { + _emscripten_receive_on_main_thread_js_callArgs.length = numCallArgs; + var b = args >> 3; + for (var i = 0; i < numCallArgs; i++) { + _emscripten_receive_on_main_thread_js_callArgs[i] = HEAPF64[b + i]; + } + // Proxied JS library funcs are encoded as positive values, and + // EM_ASMs as negative values (see include_asm_consts) + var func = index > 0 ? proxiedFunctionTable[index] : ASM_CONSTS[-index - 1]; + assert(func.length == numCallArgs); + return func.apply(null, _emscripten_receive_on_main_thread_js_callArgs); + } + + + + var __specialEventTargets=[0, typeof document !== 'undefined' ? document : 0, typeof window !== 'undefined' ? window : 0];function __findEventTarget(target) { + warnOnce('Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.'); + try { + // The sensible "default" target varies between events, but use window as the default + // since DOM events mostly can default to that. Specific callback registrations + // override their own defaults. + if (!target) return window; + if (typeof target === "number") target = __specialEventTargets[target] || UTF8ToString(target); + if (target === '#window') return window; + else if (target === '#document') return document; + else if (target === '#screen') return screen; + else if (target === '#canvas') return Module['canvas']; + return (typeof target === 'string') ? document.getElementById(target) : target; + } catch(e) { + // In Web Workers, some objects above, such as '#document' do not exist. Gracefully + // return null for them. + return null; + } + }function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(13, 1, target, deferUntilInEventHandler); + + if (!target) target = '#canvas'; + target = __findEventTarget(target); + if (!target) return -4; + if (!target.requestPointerLock && !target.mozRequestPointerLock && !target.webkitRequestPointerLock && !target.msRequestPointerLock) { + return -1; + } + + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + + // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. + if (!canPerformRequests) { + if (deferUntilInEventHandler) { + JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); + return 1; + } else { + return -2; + } + } + + return __requestPointerLock(target); + } + + + function _emscripten_run_script(ptr) { + eval(UTF8ToString(ptr)); + } + + function _emscripten_sample_gamepad_data() { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(14, 1); + + return (JSEvents.lastGamepadState = (navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null))) + ? 0 : -1; + } + + + + + + function _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height) { + var stackTop = stackSave(); + var varargs = stackAlloc(12); + var targetCanvasPtr = 0; + if (targetCanvas) { + targetCanvasPtr = stringToNewUTF8(targetCanvas); + } + HEAP32[((varargs)>>2)]=targetCanvasPtr; + HEAP32[(((varargs)+(4))>>2)]=width; + HEAP32[(((varargs)+(8))>>2)]=height; + // Note: If we are also a pthread, the call below could theoretically be done synchronously. However if the target pthread is waiting for a mutex from us, then + // these two threads will deadlock. At the moment, we'd like to consider that this kind of deadlock would be an Emscripten runtime bug, although if + // emscripten_set_canvas_element_size() was documented to require running an event in the queue of thread that owns the OffscreenCanvas, then that might be ok. + // (safer this way however) + _emscripten_async_queue_on_thread_(targetThread, 657457152, 0, targetCanvasPtr /* satellite data */, varargs); + stackRestore(stackTop); + }function _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, targetCanvas, width, height) { + targetCanvas = targetCanvas ? UTF8ToString(targetCanvas) : ''; + _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height); + } + + function __findCanvasEventTarget(target) { + if (typeof target === 'number') target = UTF8ToString(target); + if (!target || target === '#canvas') { + if (typeof GL !== 'undefined' && GL.offscreenCanvases['canvas']) return GL.offscreenCanvases['canvas']; // TODO: Remove this line, target '#canvas' should refer only to Module['canvas'], not to GL.offscreenCanvases['canvas'] - but need stricter tests to be able to remove this line. + return Module['canvas']; + } + if (typeof GL !== 'undefined' && GL.offscreenCanvases[target]) return GL.offscreenCanvases[target]; + return __findEventTarget(target); + }function _emscripten_set_canvas_element_size_calling_thread(target, width, height) { + var canvas = __findCanvasEventTarget(target); + if (!canvas) return -4; + + if (canvas.canvasSharedPtr) { + // N.B. We hold the canvasSharedPtr info structure as the authoritative source for specifying the size of a canvas + // since the actual canvas size changes are asynchronous if the canvas is owned by an OffscreenCanvas on another thread. + // Therefore when setting the size, eagerly set the size of the canvas on the calling thread here, though this thread + // might not be the one that actually ends up specifying the size, but the actual size change may be dispatched + // as an asynchronous event below. + HEAP32[((canvas.canvasSharedPtr)>>2)]=width; + HEAP32[(((canvas.canvasSharedPtr)+(4))>>2)]=height; + } + + if (canvas.offscreenCanvas || !canvas.controlTransferredOffscreen) { + if (canvas.offscreenCanvas) canvas = canvas.offscreenCanvas; + var autoResizeViewport = false; + if (canvas.GLctxObject && canvas.GLctxObject.GLctx) { + var prevViewport = canvas.GLctxObject.GLctx.getParameter(canvas.GLctxObject.GLctx.VIEWPORT); + // TODO: Perhaps autoResizeViewport should only be true if FBO 0 is currently active? + autoResizeViewport = (prevViewport[0] === 0 && prevViewport[1] === 0 && prevViewport[2] === canvas.width && prevViewport[3] === canvas.height); + } + canvas.width = width; + canvas.height = height; + if (autoResizeViewport) { + // TODO: Add -s CANVAS_RESIZE_SETS_GL_VIEWPORT=0/1 option (default=1). This is commonly done and several graphics engines depend on this, + // but this can be quite disruptive. + canvas.GLctxObject.GLctx.viewport(0, 0, width, height); + } + } else if (canvas.canvasSharedPtr) { + var targetThread = HEAP32[(((canvas.canvasSharedPtr)+(8))>>2)]; + _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, target, width, height); + return 1; // This will have to be done asynchronously + } else { + return -4; + } + return 0; + } + + function _emscripten_set_canvas_element_size_main_thread(target, width, height) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(15, 1, target, width, height); + return _emscripten_set_canvas_element_size_calling_thread(target, width, height); } + function _emscripten_set_canvas_element_size(target, width, height) { + var canvas = __findCanvasEventTarget(target); + if (canvas) { + return _emscripten_set_canvas_element_size_calling_thread(target, width, height); + } else { + return _emscripten_set_canvas_element_size_main_thread(target, width, height); + } + } + + + + function __fillMouseEventData(eventStruct, e, target) { + HEAPF64[((eventStruct)>>3)]=JSEvents.tick(); + HEAP32[(((eventStruct)+(8))>>2)]=e.screenX; + HEAP32[(((eventStruct)+(12))>>2)]=e.screenY; + HEAP32[(((eventStruct)+(16))>>2)]=e.clientX; + HEAP32[(((eventStruct)+(20))>>2)]=e.clientY; + HEAP32[(((eventStruct)+(24))>>2)]=e.ctrlKey; + HEAP32[(((eventStruct)+(28))>>2)]=e.shiftKey; + HEAP32[(((eventStruct)+(32))>>2)]=e.altKey; + HEAP32[(((eventStruct)+(36))>>2)]=e.metaKey; + HEAP16[(((eventStruct)+(40))>>1)]=e.button; + HEAP16[(((eventStruct)+(42))>>1)]=e.buttons; + HEAP32[(((eventStruct)+(44))>>2)]=e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX); + HEAP32[(((eventStruct)+(48))>>2)]=e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY); + + if (Module['canvas']) { + var rect = Module['canvas'].getBoundingClientRect(); + HEAP32[(((eventStruct)+(60))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(64))>>2)]=e.clientY - rect.top; + } else { // Canvas is not initialized, return 0. + HEAP32[(((eventStruct)+(60))>>2)]=0; + HEAP32[(((eventStruct)+(64))>>2)]=0; + } + if (target) { + var rect = JSEvents.getBoundingClientRectOrZeros(target); + HEAP32[(((eventStruct)+(52))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(56))>>2)]=e.clientY - rect.top; + } else { // No specific target passed, return 0. + HEAP32[(((eventStruct)+(52))>>2)]=0; + HEAP32[(((eventStruct)+(56))>>2)]=0; + } + // wheel and mousewheel events contain wrong screenX/screenY on chrome/opera + // https://github.com/emscripten-core/emscripten/pull/4997 + // https://bugs.chromium.org/p/chromium/issues/detail?id=699956 + if (e.type !== 'wheel' && e.type !== 'mousewheel') { + JSEvents.previousScreenX = e.screenX; + JSEvents.previousScreenY = e.screenY; + } + }function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + targetThread = JSEvents.getTargetThreadForEventCallback(targetThread); + if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 72 ); + target = __findEventTarget(target); + + var mouseEventHandlerFunc = function(ev) { + var e = ev || event; + + // TODO: Make this access thread safe, or this could update live while app is reading it. + __fillMouseEventData(JSEvents.mouseEvent, e, target); + + if (targetThread) { + var mouseEventData = _malloc( 72 ); // This allocated block is passed as satellite data to the proxied function call, so the call frees up the data block when done. + __fillMouseEventData(mouseEventData, e, target); + JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, mouseEventData, userData); + } else + if (dynCall_iiii(callbackfunc, eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: mouseEventHandlerFunc, + useCapture: useCapture + }; + // In IE, mousedown events don't either allow deferred calls to be run! + if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_click_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(16, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 4, "click", targetThread); + return 0; + } + + + + function _emscripten_set_current_thread_status_js(newStatus) { + } + + + + function __fillFullscreenChangeEventData(eventStruct, e) { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + var isFullscreen = !!fullscreenElement; + HEAP32[((eventStruct)>>2)]=isFullscreen; + HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); + // If transitioning to fullscreen, report info about the element that is now fullscreen. + // If transitioning to windowed mode, report info about the element that just was fullscreen. + var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; + var nodeName = JSEvents.getNodeNameForTarget(reportedElement); + var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; + stringToUTF8(nodeName, eventStruct + 8, 128); + stringToUTF8(id, eventStruct + 136, 128); + HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; + HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; + HEAP32[(((eventStruct)+(272))>>2)]=screen.width; + HEAP32[(((eventStruct)+(276))>>2)]=screen.height; + if (isFullscreen) { + JSEvents.previousFullscreenElement = fullscreenElement; + } + }function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + targetThread = JSEvents.getTargetThreadForEventCallback(targetThread); + if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); + + var fullscreenChangeEventhandlerFunc = function(ev) { + var e = ev || event; + + var fullscreenChangeEvent = targetThread ? _malloc( 280 ) : JSEvents.fullscreenChangeEvent; + + __fillFullscreenChangeEventData(fullscreenChangeEvent, e); + + if (targetThread) JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, fullscreenChangeEvent, userData); + else + if (dynCall_iiii(callbackfunc, eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: false, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: fullscreenChangeEventhandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(17, 1, target, userData, useCapture, callbackfunc, targetThread); + + if (!JSEvents.fullscreenEnabled()) return -1; + target = target ? __findEventTarget(target) : __specialEventTargets[1]; + if (!target) return -4; + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "msfullscreenchange", targetThread); + return 0; + } + + + + function __registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + targetThread = JSEvents.getTargetThreadForEventCallback(targetThread); + if (!JSEvents.gamepadEvent) JSEvents.gamepadEvent = _malloc( 1432 ); + + var gamepadEventHandlerFunc = function(ev) { + var e = ev || event; + + var gamepadEvent = targetThread ? _malloc( 1432 ) : JSEvents.gamepadEvent; + __fillGamepadEventData(gamepadEvent, e["gamepad"]); + + if (targetThread) JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, gamepadEvent, userData); + else + if (dynCall_iiii(callbackfunc, eventTypeId, gamepadEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: gamepadEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(18, 1, userData, useCapture, callbackfunc, targetThread); + + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread); + return 0; + } + + + function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(19, 1, userData, useCapture, callbackfunc, targetThread); + + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread); + return 0; + } + + + + function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + targetThread = JSEvents.getTargetThreadForEventCallback(targetThread); + if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); + + var keyEventHandlerFunc = function(ev) { + var e = ev || event; + + var keyEventData = targetThread ? _malloc( 164 ) : JSEvents.keyEvent; // This allocated block is passed as satellite data to the proxied function call, so the call frees up the data block when done. + stringToUTF8(e.key ? e.key : "", keyEventData + 0, 32); + stringToUTF8(e.code ? e.code : "", keyEventData + 32, 32); + HEAP32[(((keyEventData)+(64))>>2)]=e.location; + HEAP32[(((keyEventData)+(68))>>2)]=e.ctrlKey; + HEAP32[(((keyEventData)+(72))>>2)]=e.shiftKey; + HEAP32[(((keyEventData)+(76))>>2)]=e.altKey; + HEAP32[(((keyEventData)+(80))>>2)]=e.metaKey; + HEAP32[(((keyEventData)+(84))>>2)]=e.repeat; + stringToUTF8(e.locale ? e.locale : "", keyEventData + 88, 32); + stringToUTF8(e.char ? e.char : "", keyEventData + 120, 32); + HEAP32[(((keyEventData)+(152))>>2)]=e.charCode; + HEAP32[(((keyEventData)+(156))>>2)]=e.keyCode; + HEAP32[(((keyEventData)+(160))>>2)]=e.which; + + if (targetThread) JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, keyEventData, userData); + else + if (dynCall_iiii(callbackfunc, eventTypeId, keyEventData, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do. + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: keyEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(20, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); + return 0; + } + + + + + function _emscripten_set_thread_name_js(threadId, name) { + } + + + function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + targetThread = JSEvents.getTargetThreadForEventCallback(targetThread); + if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); + + target = __findEventTarget(target); + + var touchEventHandlerFunc = function(ev) { + var e = ev || event; + + var touches = {}; + for(var i = 0; i < e.touches.length; ++i) { + var touch = e.touches[i]; + touch.changed = false; + touches[touch.identifier] = touch; + } + for(var i = 0; i < e.changedTouches.length; ++i) { + var touch = e.changedTouches[i]; + touches[touch.identifier] = touch; + touch.changed = true; + } + for(var i = 0; i < e.targetTouches.length; ++i) { + var touch = e.targetTouches[i]; + touches[touch.identifier].onTarget = true; + } + + var touchEvent = targetThread ? _malloc( 1684 ) : JSEvents.touchEvent; + var ptr = touchEvent; + HEAP32[(((ptr)+(4))>>2)]=e.ctrlKey; + HEAP32[(((ptr)+(8))>>2)]=e.shiftKey; + HEAP32[(((ptr)+(12))>>2)]=e.altKey; + HEAP32[(((ptr)+(16))>>2)]=e.metaKey; + ptr += 20; // Advance to the start of the touch array. + var canvasRect = Module['canvas'] ? Module['canvas'].getBoundingClientRect() : undefined; + var targetRect = JSEvents.getBoundingClientRectOrZeros(target); + var numTouches = 0; + for(var i in touches) { + var t = touches[i]; + HEAP32[((ptr)>>2)]=t.identifier; + HEAP32[(((ptr)+(4))>>2)]=t.screenX; + HEAP32[(((ptr)+(8))>>2)]=t.screenY; + HEAP32[(((ptr)+(12))>>2)]=t.clientX; + HEAP32[(((ptr)+(16))>>2)]=t.clientY; + HEAP32[(((ptr)+(20))>>2)]=t.pageX; + HEAP32[(((ptr)+(24))>>2)]=t.pageY; + HEAP32[(((ptr)+(28))>>2)]=t.changed; + HEAP32[(((ptr)+(32))>>2)]=t.onTarget; + if (canvasRect) { + HEAP32[(((ptr)+(44))>>2)]=t.clientX - canvasRect.left; + HEAP32[(((ptr)+(48))>>2)]=t.clientY - canvasRect.top; + } else { + HEAP32[(((ptr)+(44))>>2)]=0; + HEAP32[(((ptr)+(48))>>2)]=0; + } + HEAP32[(((ptr)+(36))>>2)]=t.clientX - targetRect.left; + HEAP32[(((ptr)+(40))>>2)]=t.clientY - targetRect.top; + + ptr += 52; + + if (++numTouches >= 32) { + break; + } + } + HEAP32[((touchEvent)>>2)]=numTouches; + + if (targetThread) JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, touchEvent, userData); + else + if (dynCall_iiii(callbackfunc, eventTypeId, touchEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: touchEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(21, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); + return 0; + } + + + function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(22, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); + return 0; + } + + + function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(23, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); + return 0; + } + + + function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (ENVIRONMENT_IS_PTHREAD) return _emscripten_proxy_to_main_thread_js(24, 1, target, userData, useCapture, callbackfunc, targetThread); + + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); + return 0; + } + + + function _emscripten_syscall(which, varargs) { + switch (which) { + case 140: return ___syscall140(which, varargs); + case 145: return ___syscall145(which, varargs); + case 221: return ___syscall221(which, varargs); + case 5: return ___syscall5(which, varargs); + case 54: return ___syscall54(which, varargs); + case 6: return ___syscall6(which, varargs); + default: throw "surprising proxied syscall: " + which; + } + } + + + + var __emscripten_webgl_power_preferences=['default', 'low-power', 'high-performance'];function _emscripten_webgl_do_create_context(target, attributes) { + assert(attributes); + var contextAttributes = {}; + var a = attributes >> 2; + contextAttributes['alpha'] = !!HEAP32[a + (0>>2)]; + contextAttributes['depth'] = !!HEAP32[a + (4>>2)]; + contextAttributes['stencil'] = !!HEAP32[a + (8>>2)]; + contextAttributes['antialias'] = !!HEAP32[a + (12>>2)]; + contextAttributes['premultipliedAlpha'] = !!HEAP32[a + (16>>2)]; + contextAttributes['preserveDrawingBuffer'] = !!HEAP32[a + (20>>2)]; + var powerPreference = HEAP32[a + (24>>2)]; + contextAttributes['powerPreference'] = __emscripten_webgl_power_preferences[powerPreference]; + contextAttributes['failIfMajorPerformanceCaveat'] = !!HEAP32[a + (28>>2)]; + contextAttributes.majorVersion = HEAP32[a + (32>>2)]; + contextAttributes.minorVersion = HEAP32[a + (36>>2)]; + contextAttributes.enableExtensionsByDefault = HEAP32[a + (40>>2)]; + contextAttributes.explicitSwapControl = HEAP32[a + (44>>2)]; + contextAttributes.proxyContextToMainThread = HEAP32[a + (48>>2)]; + contextAttributes.renderViaOffscreenBackBuffer = HEAP32[a + (52>>2)]; + + var canvas = __findCanvasEventTarget(target); + + + + if (!canvas) { + return 0; + } + + if (contextAttributes.explicitSwapControl) { + return 0; + } + + + var contextHandle = GL.createContext(canvas, contextAttributes); + return contextHandle; + }function _emscripten_webgl_create_context(a0,a1 + ) { + return _emscripten_webgl_do_create_context(a0,a1); + } + + function _exit(status) { + // void _exit(int status); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html + exit(status); + } + + function _glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _glClear(x0) { GLctx['clear'](x0) } + + function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _glCullFace(x0) { GLctx['cullFace'](x0) } + + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glDisable(x0) { GLctx['disable'](x0) } + + function _glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _glEnable(x0) { GLctx['enable'](x0) } + + function _glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _glFrontFace(x0) { GLctx['frontFace'](x0) } + + function _glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + function _glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + function _glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + function _glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + var GLFW={Window:function(id, width, height, title, monitor, share) { + this.id = id; + this.x = 0; + this.y = 0; + this.fullscreen = false; // Used to determine if app in fullscreen mode + this.storedX = 0; // Used to store X before fullscreen + this.storedY = 0; // Used to store Y before fullscreen + this.width = width; + this.height = height; + this.storedWidth = width; // Used to store width before fullscreen + this.storedHeight = height; // Used to store height before fullscreen + this.title = title; + this.monitor = monitor; + this.share = share; + this.attributes = GLFW.hints; + this.inputModes = { + 0x00033001:0x00034001, // GLFW_CURSOR (GLFW_CURSOR_NORMAL) + 0x00033002:0, // GLFW_STICKY_KEYS + 0x00033003:0, // GLFW_STICKY_MOUSE_BUTTONS + }; + this.buttons = 0; + this.keys = new Array(); + this.domKeys = new Array(); + this.shouldClose = 0; + this.title = null; + this.windowPosFunc = null; // GLFWwindowposfun + this.windowSizeFunc = null; // GLFWwindowsizefun + this.windowCloseFunc = null; // GLFWwindowclosefun + this.windowRefreshFunc = null; // GLFWwindowrefreshfun + this.windowFocusFunc = null; // GLFWwindowfocusfun + this.windowIconifyFunc = null; // GLFWwindowiconifyfun + this.framebufferSizeFunc = null; // GLFWframebuffersizefun + this.mouseButtonFunc = null; // GLFWmousebuttonfun + this.cursorPosFunc = null; // GLFWcursorposfun + this.cursorEnterFunc = null; // GLFWcursorenterfun + this.scrollFunc = null; // GLFWscrollfun + this.dropFunc = null; // GLFWdropfun + this.keyFunc = null; // GLFWkeyfun + this.charFunc = null; // GLFWcharfun + this.userptr = null; + },WindowFromId:function(id) { + if (id <= 0 || !GLFW.windows) return null; + return GLFW.windows[id - 1]; + },joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode) { + switch (keycode) { + // these keycodes are only defined for GLFW3, assume they are the same for GLFW2 + case 0x20:return 32; // DOM_VK_SPACE -> GLFW_KEY_SPACE + case 0xDE:return 39; // DOM_VK_QUOTE -> GLFW_KEY_APOSTROPHE + case 0xBC:return 44; // DOM_VK_COMMA -> GLFW_KEY_COMMA + case 0xAD:return 45; // DOM_VK_HYPHEN_MINUS -> GLFW_KEY_MINUS + case 0xBD:return 45; // DOM_VK_MINUS -> GLFW_KEY_MINUS + case 0xBE:return 46; // DOM_VK_PERIOD -> GLFW_KEY_PERIOD + case 0xBF:return 47; // DOM_VK_SLASH -> GLFW_KEY_SLASH + case 0x30:return 48; // DOM_VK_0 -> GLFW_KEY_0 + case 0x31:return 49; // DOM_VK_1 -> GLFW_KEY_1 + case 0x32:return 50; // DOM_VK_2 -> GLFW_KEY_2 + case 0x33:return 51; // DOM_VK_3 -> GLFW_KEY_3 + case 0x34:return 52; // DOM_VK_4 -> GLFW_KEY_4 + case 0x35:return 53; // DOM_VK_5 -> GLFW_KEY_5 + case 0x36:return 54; // DOM_VK_6 -> GLFW_KEY_6 + case 0x37:return 55; // DOM_VK_7 -> GLFW_KEY_7 + case 0x38:return 56; // DOM_VK_8 -> GLFW_KEY_8 + case 0x39:return 57; // DOM_VK_9 -> GLFW_KEY_9 + case 0x3B:return 59; // DOM_VK_SEMICOLON -> GLFW_KEY_SEMICOLON + case 0x3D:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0xBB:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0x41:return 65; // DOM_VK_A -> GLFW_KEY_A + case 0x42:return 66; // DOM_VK_B -> GLFW_KEY_B + case 0x43:return 67; // DOM_VK_C -> GLFW_KEY_C + case 0x44:return 68; // DOM_VK_D -> GLFW_KEY_D + case 0x45:return 69; // DOM_VK_E -> GLFW_KEY_E + case 0x46:return 70; // DOM_VK_F -> GLFW_KEY_F + case 0x47:return 71; // DOM_VK_G -> GLFW_KEY_G + case 0x48:return 72; // DOM_VK_H -> GLFW_KEY_H + case 0x49:return 73; // DOM_VK_I -> GLFW_KEY_I + case 0x4A:return 74; // DOM_VK_J -> GLFW_KEY_J + case 0x4B:return 75; // DOM_VK_K -> GLFW_KEY_K + case 0x4C:return 76; // DOM_VK_L -> GLFW_KEY_L + case 0x4D:return 77; // DOM_VK_M -> GLFW_KEY_M + case 0x4E:return 78; // DOM_VK_N -> GLFW_KEY_N + case 0x4F:return 79; // DOM_VK_O -> GLFW_KEY_O + case 0x50:return 80; // DOM_VK_P -> GLFW_KEY_P + case 0x51:return 81; // DOM_VK_Q -> GLFW_KEY_Q + case 0x52:return 82; // DOM_VK_R -> GLFW_KEY_R + case 0x53:return 83; // DOM_VK_S -> GLFW_KEY_S + case 0x54:return 84; // DOM_VK_T -> GLFW_KEY_T + case 0x55:return 85; // DOM_VK_U -> GLFW_KEY_U + case 0x56:return 86; // DOM_VK_V -> GLFW_KEY_V + case 0x57:return 87; // DOM_VK_W -> GLFW_KEY_W + case 0x58:return 88; // DOM_VK_X -> GLFW_KEY_X + case 0x59:return 89; // DOM_VK_Y -> GLFW_KEY_Y + case 0x5a:return 90; // DOM_VK_Z -> GLFW_KEY_Z + case 0xDB:return 91; // DOM_VK_OPEN_BRACKET -> GLFW_KEY_LEFT_BRACKET + case 0xDC:return 92; // DOM_VK_BACKSLASH -> GLFW_KEY_BACKSLASH + case 0xDD:return 93; // DOM_VK_CLOSE_BRACKET -> GLFW_KEY_RIGHT_BRACKET + case 0xC0:return 94; // DOM_VK_BACK_QUOTE -> GLFW_KEY_GRAVE_ACCENT + + + case 0x1B:return 256; // DOM_VK_ESCAPE -> GLFW_KEY_ESCAPE + case 0x0D:return 257; // DOM_VK_RETURN -> GLFW_KEY_ENTER + case 0x09:return 258; // DOM_VK_TAB -> GLFW_KEY_TAB + case 0x08:return 259; // DOM_VK_BACK -> GLFW_KEY_BACKSPACE + case 0x2D:return 260; // DOM_VK_INSERT -> GLFW_KEY_INSERT + case 0x2E:return 261; // DOM_VK_DELETE -> GLFW_KEY_DELETE + case 0x27:return 262; // DOM_VK_RIGHT -> GLFW_KEY_RIGHT + case 0x25:return 263; // DOM_VK_LEFT -> GLFW_KEY_LEFT + case 0x28:return 264; // DOM_VK_DOWN -> GLFW_KEY_DOWN + case 0x26:return 265; // DOM_VK_UP -> GLFW_KEY_UP + case 0x21:return 266; // DOM_VK_PAGE_UP -> GLFW_KEY_PAGE_UP + case 0x22:return 267; // DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGE_DOWN + case 0x24:return 268; // DOM_VK_HOME -> GLFW_KEY_HOME + case 0x23:return 269; // DOM_VK_END -> GLFW_KEY_END + case 0x14:return 280; // DOM_VK_CAPS_LOCK -> GLFW_KEY_CAPS_LOCK + case 0x91:return 281; // DOM_VK_SCROLL_LOCK -> GLFW_KEY_SCROLL_LOCK + case 0x90:return 282; // DOM_VK_NUM_LOCK -> GLFW_KEY_NUM_LOCK + case 0x2C:return 283; // DOM_VK_SNAPSHOT -> GLFW_KEY_PRINT_SCREEN + case 0x13:return 284; // DOM_VK_PAUSE -> GLFW_KEY_PAUSE + case 0x70:return 290; // DOM_VK_F1 -> GLFW_KEY_F1 + case 0x71:return 291; // DOM_VK_F2 -> GLFW_KEY_F2 + case 0x72:return 292; // DOM_VK_F3 -> GLFW_KEY_F3 + case 0x73:return 293; // DOM_VK_F4 -> GLFW_KEY_F4 + case 0x74:return 294; // DOM_VK_F5 -> GLFW_KEY_F5 + case 0x75:return 295; // DOM_VK_F6 -> GLFW_KEY_F6 + case 0x76:return 296; // DOM_VK_F7 -> GLFW_KEY_F7 + case 0x77:return 297; // DOM_VK_F8 -> GLFW_KEY_F8 + case 0x78:return 298; // DOM_VK_F9 -> GLFW_KEY_F9 + case 0x79:return 299; // DOM_VK_F10 -> GLFW_KEY_F10 + case 0x7A:return 300; // DOM_VK_F11 -> GLFW_KEY_F11 + case 0x7B:return 301; // DOM_VK_F12 -> GLFW_KEY_F12 + case 0x7C:return 302; // DOM_VK_F13 -> GLFW_KEY_F13 + case 0x7D:return 303; // DOM_VK_F14 -> GLFW_KEY_F14 + case 0x7E:return 304; // DOM_VK_F15 -> GLFW_KEY_F15 + case 0x7F:return 305; // DOM_VK_F16 -> GLFW_KEY_F16 + case 0x80:return 306; // DOM_VK_F17 -> GLFW_KEY_F17 + case 0x81:return 307; // DOM_VK_F18 -> GLFW_KEY_F18 + case 0x82:return 308; // DOM_VK_F19 -> GLFW_KEY_F19 + case 0x83:return 309; // DOM_VK_F20 -> GLFW_KEY_F20 + case 0x84:return 310; // DOM_VK_F21 -> GLFW_KEY_F21 + case 0x85:return 311; // DOM_VK_F22 -> GLFW_KEY_F22 + case 0x86:return 312; // DOM_VK_F23 -> GLFW_KEY_F23 + case 0x87:return 313; // DOM_VK_F24 -> GLFW_KEY_F24 + case 0x88:return 314; // 0x88 (not used?) -> GLFW_KEY_F25 + case 0x60:return 320; // DOM_VK_NUMPAD0 -> GLFW_KEY_KP_0 + case 0x61:return 321; // DOM_VK_NUMPAD1 -> GLFW_KEY_KP_1 + case 0x62:return 322; // DOM_VK_NUMPAD2 -> GLFW_KEY_KP_2 + case 0x63:return 323; // DOM_VK_NUMPAD3 -> GLFW_KEY_KP_3 + case 0x64:return 324; // DOM_VK_NUMPAD4 -> GLFW_KEY_KP_4 + case 0x65:return 325; // DOM_VK_NUMPAD5 -> GLFW_KEY_KP_5 + case 0x66:return 326; // DOM_VK_NUMPAD6 -> GLFW_KEY_KP_6 + case 0x67:return 327; // DOM_VK_NUMPAD7 -> GLFW_KEY_KP_7 + case 0x68:return 328; // DOM_VK_NUMPAD8 -> GLFW_KEY_KP_8 + case 0x69:return 329; // DOM_VK_NUMPAD9 -> GLFW_KEY_KP_9 + case 0x6E:return 330; // DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL + case 0x6F:return 331; // DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE + case 0x6A:return 332; // DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY + case 0x6D:return 333; // DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT + case 0x6B:return 334; // DOM_VK_ADD -> GLFW_KEY_KP_ADD + // case 0x0D:return 335; // DOM_VK_RETURN -> GLFW_KEY_KP_ENTER (DOM_KEY_LOCATION_RIGHT) + // case 0x61:return 336; // DOM_VK_EQUALS -> GLFW_KEY_KP_EQUAL (DOM_KEY_LOCATION_RIGHT) + case 0x10:return 340; // DOM_VK_SHIFT -> GLFW_KEY_LEFT_SHIFT + case 0x11:return 341; // DOM_VK_CONTROL -> GLFW_KEY_LEFT_CONTROL + case 0x12:return 342; // DOM_VK_ALT -> GLFW_KEY_LEFT_ALT + case 0x5B:return 343; // DOM_VK_WIN -> GLFW_KEY_LEFT_SUPER + // case 0x10:return 344; // DOM_VK_SHIFT -> GLFW_KEY_RIGHT_SHIFT (DOM_KEY_LOCATION_RIGHT) + // case 0x11:return 345; // DOM_VK_CONTROL -> GLFW_KEY_RIGHT_CONTROL (DOM_KEY_LOCATION_RIGHT) + // case 0x12:return 346; // DOM_VK_ALT -> GLFW_KEY_RIGHT_ALT (DOM_KEY_LOCATION_RIGHT) + // case 0x5B:return 347; // DOM_VK_WIN -> GLFW_KEY_RIGHT_SUPER (DOM_KEY_LOCATION_RIGHT) + case 0x5D:return 348; // DOM_VK_CONTEXT_MENU -> GLFW_KEY_MENU + // XXX: GLFW_KEY_WORLD_1, GLFW_KEY_WORLD_2 what are these? + default:return -1; // GLFW_KEY_UNKNOWN + }; + },getModBits:function(win) { + var mod = 0; + if (win.keys[340]) mod |= 0x0001; // GLFW_MOD_SHIFT + if (win.keys[341]) mod |= 0x0002; // GLFW_MOD_CONTROL + if (win.keys[342]) mod |= 0x0004; // GLFW_MOD_ALT + if (win.keys[343]) mod |= 0x0008; // GLFW_MOD_SUPER + return mod; + },onKeyPress:function(event) { + if (!GLFW.active || !GLFW.active.charFunc) return; + if (event.ctrlKey || event.metaKey) return; + + // correct unicode charCode is only available with onKeyPress event + var charCode = event.charCode; + if (charCode == 0 || (charCode >= 0x00 && charCode <= 0x1F)) return; + + + dynCall_vii(GLFW.active.charFunc, GLFW.active.id, charCode); + },onKeyChanged:function(keyCode, status) { + if (!GLFW.active) return; + + var key = GLFW.DOMToGLFWKeyCode(keyCode); + if (key == -1) return; + + var repeat = status && GLFW.active.keys[key]; + GLFW.active.keys[key] = status; + GLFW.active.domKeys[keyCode] = status; + if (!GLFW.active.keyFunc) return; + + + if (repeat) status = 2; // GLFW_REPEAT + dynCall_viiiii(GLFW.active.keyFunc, GLFW.active.id, key, keyCode, status, GLFW.getModBits(GLFW.active)); + },onGamepadConnected:function(event) { + GLFW.refreshJoysticks(); + },onGamepadDisconnected:function(event) { + GLFW.refreshJoysticks(); + },onKeydown:function(event) { + GLFW.onKeyChanged(event.keyCode, 1); // GLFW_PRESS or GLFW_REPEAT + + // This logic comes directly from the sdl implementation. We cannot + // call preventDefault on all keydown events otherwise onKeyPress will + // not get called + if (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */) { + event.preventDefault(); + } + },onKeyup:function(event) { + GLFW.onKeyChanged(event.keyCode, 0); // GLFW_RELEASE + },onBlur:function(event) { + if (!GLFW.active) return; + + for (var i = 0; i < GLFW.active.domKeys.length; ++i) { + if (GLFW.active.domKeys[i]) { + GLFW.onKeyChanged(i, 0); // GLFW_RELEASE + } + } + },onMousemove:function(event) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"] || !GLFW.active.cursorPosFunc) return; + + + dynCall_vidd(GLFW.active.cursorPosFunc, GLFW.active.id, Browser.mouseX, Browser.mouseY); + },DOMToGLFWMouseButton:function(event) { + // DOM and glfw have different button codes. + // See http://www.w3schools.com/jsref/event_button.asp. + var eventButton = event['button']; + if (eventButton > 0) { + if (eventButton == 1) { + eventButton = 2; + } else { + eventButton = 1; + } + } + return eventButton; + },onMouseenter:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 1); + },onMouseleave:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 0); + },onMouseButtonChanged:function(event, status) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"]) return; + + var eventButton = GLFW.DOMToGLFWMouseButton(event); + + if (status == 1) { // GLFW_PRESS + GLFW.active.buttons |= (1 << eventButton); + try { + event.target.setCapture(); + } catch (e) {} + } else { // GLFW_RELEASE + GLFW.active.buttons &= ~(1 << eventButton); + } + + if (!GLFW.active.mouseButtonFunc) return; + + + dynCall_viiii(GLFW.active.mouseButtonFunc, GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active)); + },onMouseButtonDown:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 1); // GLFW_PRESS + },onMouseButtonUp:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 0); // GLFW_RELEASE + },onMouseWheel:function(event) { + // Note the minus sign that flips browser wheel direction (positive direction scrolls page down) to native wheel direction (positive direction is mouse wheel up) + var delta = -Browser.getMouseWheelDelta(event); + delta = (delta == 0) ? 0 : (delta > 0 ? Math.max(delta, 1) : Math.min(delta, -1)); // Quantize to integer so that minimum scroll is at least +/- 1. + GLFW.wheelPos += delta; + + if (!GLFW.active || !GLFW.active.scrollFunc || event.target != Module['canvas']) return; + + + var sx = 0; + var sy = 0; + if (event.type == 'mousewheel') { + sx = event.wheelDeltaX; + sy = event.wheelDeltaY; + } else { + sx = event.deltaX; + sy = event.deltaY; + } + + dynCall_vidd(GLFW.active.scrollFunc, GLFW.active.id, sx, sy); + + event.preventDefault(); + },onCanvasResize:function(width, height) { + if (!GLFW.active) return; + + var resizeNeeded = true; + + // If the client is requesting fullscreen mode + if (document["fullscreen"] || document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) { + GLFW.active.storedX = GLFW.active.x; + GLFW.active.storedY = GLFW.active.y; + GLFW.active.storedWidth = GLFW.active.width; + GLFW.active.storedHeight = GLFW.active.height; + GLFW.active.x = GLFW.active.y = 0; + GLFW.active.width = screen.width; + GLFW.active.height = screen.height; + GLFW.active.fullscreen = true; + + // If the client is reverting from fullscreen mode + } else if (GLFW.active.fullscreen == true) { + GLFW.active.x = GLFW.active.storedX; + GLFW.active.y = GLFW.active.storedY; + GLFW.active.width = GLFW.active.storedWidth; + GLFW.active.height = GLFW.active.storedHeight; + GLFW.active.fullscreen = false; + + // If the width/height values do not match current active window sizes + } else if (GLFW.active.width != width || GLFW.active.height != height) { + GLFW.active.width = width; + GLFW.active.height = height; + } else { + resizeNeeded = false; + } + + // If any of the above conditions were true, we need to resize the canvas + if (resizeNeeded) { + // resets the canvas size to counter the aspect preservation of Browser.updateCanvasDimensions + Browser.setCanvasSize(GLFW.active.width, GLFW.active.height, true); + // TODO: Client dimensions (clientWidth/clientHeight) vs pixel dimensions (width/height) of + // the canvas should drive window and framebuffer size respectfully. + GLFW.onWindowSizeChanged(); + GLFW.onFramebufferSizeChanged(); + } + },onWindowSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.windowSizeFunc) return; + + + dynCall_viii(GLFW.active.windowSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },onFramebufferSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.framebufferSizeFunc) return; + + dynCall_viii(GLFW.active.framebufferSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },requestFullscreen:function() { + var RFS = Module["canvas"]['requestFullscreen'] || + Module["canvas"]['mozRequestFullScreen'] || + Module["canvas"]['webkitRequestFullScreen'] || + (function() {}); + RFS.apply(Module["canvas"], []); + },requestFullScreen:function() { + err('GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.'); + GLFW.requestFullScreen = function() { + return GLFW.requestFullscreen(); + } + return GLFW.requestFullscreen(); + },exitFullscreen:function() { + Browser.exitFullscreen(); + },cancelFullScreen:function() { + err('GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.'); + GLFW.cancelFullScreen = function() { + return GLFW.exitFullscreen(); + } + return GLFW.exitFullscreen(); + },getTime:function() { + return _emscripten_get_now() / 1000; + },setWindowTitle:function(winid, title) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + win.title = UTF8ToString(title); + if (GLFW.active.id == win.id) { + document.title = win.title; + } + },setJoystickCallback:function(cbfun) { + GLFW.joystickFunc = cbfun; + GLFW.refreshJoysticks(); + },joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function() { + // Produce a new Gamepad API sample if we are ticking a new game frame, or if not using emscripten_set_main_loop() at all to drive animation. + if (Browser.mainLoop.currentFrameNumber !== GLFW.lastGamepadStateFrame || !Browser.mainLoop.currentFrameNumber) { + GLFW.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null); + GLFW.lastGamepadStateFrame = Browser.mainLoop.currentFrameNumber; + + for (var joy = 0; joy < GLFW.lastGamepadState.length; ++joy) { + var gamepad = GLFW.lastGamepadState[joy]; + + if (gamepad) { + if (!GLFW.joys[joy]) { + console.log('glfw joystick connected:',joy); + GLFW.joys[joy] = { + id: allocate(intArrayFromString(gamepad.id), 'i8', ALLOC_NORMAL), + buttonsCount: gamepad.buttons.length, + axesCount: gamepad.axes.length, + buttons: allocate(new Array(gamepad.buttons.length), 'i8', ALLOC_NORMAL), + axes: allocate(new Array(gamepad.axes.length*4), 'float', ALLOC_NORMAL) + }; + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040001); // GLFW_CONNECTED + } + } + + var data = GLFW.joys[joy]; + + for (var i = 0; i < gamepad.buttons.length; ++i) { + setValue(data.buttons + i, gamepad.buttons[i].pressed, 'i8'); + } + + for (var i = 0; i < gamepad.axes.length; ++i) { + setValue(data.axes + i*4, gamepad.axes[i], 'float'); + } + } else { + if (GLFW.joys[joy]) { + console.log('glfw joystick disconnected',joy); + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040002); // GLFW_DISCONNECTED + } + + _free(GLFW.joys[joy].id); + _free(GLFW.joys[joy].buttons); + _free(GLFW.joys[joy].axes); + + delete GLFW.joys[joy]; + } + } + } + } + },setKeyCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.keyFunc; + win.keyFunc = cbfun; + return prevcbfun; + },setCharCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.charFunc; + win.charFunc = cbfun; + return prevcbfun; + },setMouseButtonCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.mouseButtonFunc; + win.mouseButtonFunc = cbfun; + return prevcbfun; + },setCursorPosCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.cursorPosFunc; + win.cursorPosFunc = cbfun; + return prevcbfun; + },setScrollCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.scrollFunc; + win.scrollFunc = cbfun; + return prevcbfun; + },setDropCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.dropFunc; + win.dropFunc = cbfun; + return prevcbfun; + },onDrop:function(event) { + if (!GLFW.active || !GLFW.active.dropFunc) return; + if (!event.dataTransfer || !event.dataTransfer.files || event.dataTransfer.files.length == 0) return; + + event.preventDefault(); + + + return false; + },onDragover:function(event) { + if (!GLFW.active || !GLFW.active.dropFunc) return; + + event.preventDefault(); + return false; + },setWindowSizeCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.windowSizeFunc; + win.windowSizeFunc = cbfun; + + + return prevcbfun; + },setWindowCloseCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.windowCloseFunc; + win.windowCloseFunc = cbfun; + return prevcbfun; + },setWindowRefreshCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.windowRefreshFunc; + win.windowRefreshFunc = cbfun; + return prevcbfun; + },onClickRequestPointerLock:function(e) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + e.preventDefault(); + } + },setInputMode:function(winid, mode, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + switch(mode) { + case 0x00033001: { // GLFW_CURSOR + switch(value) { + case 0x00034001: { // GLFW_CURSOR_NORMAL + win.inputModes[mode] = value; + Module['canvas'].removeEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].exitPointerLock(); + break; + } + case 0x00034002: { // GLFW_CURSOR_HIDDEN + console.log("glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented."); + break; + } + case 0x00034003: { // GLFW_CURSOR_DISABLED + win.inputModes[mode] = value; + Module['canvas'].addEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].requestPointerLock(); + break; + } + default: { + console.log("glfwSetInputMode called with unknown value parameter value: " + value + "."); + break; + } + } + break; + } + case 0x00033002: { // GLFW_STICKY_KEYS + console.log("glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented."); + break; + } + case 0x00033003: { // GLFW_STICKY_MOUSE_BUTTONS + console.log("glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented."); + break; + } + default: { + console.log("glfwSetInputMode called with unknown mode parameter value: " + mode + "."); + break; + } + } + },getKey:function(winid, key) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return win.keys[key]; + },getMouseButton:function(winid, button) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return (win.buttons & (1 << button)) > 0; + },getCursorPos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'double'); + setValue(y, Browser.mouseY, 'double'); + },getMousePos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'i32'); + setValue(y, Browser.mouseY, 'i32'); + },setCursorPos:function(winid, x, y) { + },getWindowPos:function(winid, x, y) { + var wx = 0; + var wy = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + wx = win.x; + wy = win.y; + } + + setValue(x, wx, 'i32'); + setValue(y, wy, 'i32'); + },setWindowPos:function(winid, x, y) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.x = x; + win.y = y; + },getWindowSize:function(winid, width, height) { + var ww = 0; + var wh = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + ww = win.width; + wh = win.height; + } + + setValue(width, ww, 'i32'); + setValue(height, wh, 'i32'); + },setWindowSize:function(winid, width, height) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (GLFW.active.id == win.id) { + if (width == screen.width && height == screen.height) { + GLFW.requestFullscreen(); + } else { + GLFW.exitFullscreen(); + Browser.setCanvasSize(width, height); + win.width = width; + win.height = height; + } + } + + if (!win.windowSizeFunc) return; + + + dynCall_viii(win.windowSizeFunc, win.id, width, height); + },createWindow:function(width, height, title, monitor, share) { + var i, id; + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] !== null; i++); + if (i > 0) throw "glfwCreateWindow only supports one window at time currently"; + + // id for window + id = i + 1; + + // not valid + if (width <= 0 || height <= 0) return 0; + + if (monitor) { + GLFW.requestFullscreen(); + } else { + Browser.setCanvasSize(width, height); + } + + // Create context when there are no existing alive windows + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] == null; i++); + if (i == GLFW.windows.length) { + var contextAttributes = { + antialias: (GLFW.hints[0x0002100D] > 1), // GLFW_SAMPLES + depth: (GLFW.hints[0x00021005] > 0), // GLFW_DEPTH_BITS + stencil: (GLFW.hints[0x00021006] > 0), // GLFW_STENCIL_BITS + alpha: (GLFW.hints[0x00021004] > 0) // GLFW_ALPHA_BITS + } + Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes); + } + + // If context creation failed, do not return a valid window + if (!Module.ctx) return 0; + + // Get non alive id + var win = new GLFW.Window(id, width, height, title, monitor, share); + + // Set window to array + if (id - 1 == GLFW.windows.length) { + GLFW.windows.push(win); + } else { + GLFW.windows[id - 1] = win; + } + + GLFW.active = win; + return win.id; + },destroyWindow:function(winid) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (win.windowCloseFunc) + dynCall_vi(win.windowCloseFunc, win.id); + + GLFW.windows[win.id - 1] = null; + if (GLFW.active.id == win.id) + GLFW.active = null; + + // Destroy context when no alive windows + for (var i = 0; i < GLFW.windows.length; i++) + if (GLFW.windows[i] !== null) return; + + Module.ctx = Browser.destroyContext(Module['canvas'], true, true); + },swapBuffers:function(winid) { + },GLFW2ParamToGLFW3Param:function(param) { + var table = { + 0x00030001:0, // GLFW_MOUSE_CURSOR + 0x00030002:0, // GLFW_STICKY_KEYS + 0x00030003:0, // GLFW_STICKY_MOUSE_BUTTONS + 0x00030004:0, // GLFW_SYSTEM_KEYS + 0x00030005:0, // GLFW_KEY_REPEAT + 0x00030006:0, // GLFW_AUTO_POLL_EVENTS + 0x00020001:0, // GLFW_OPENED + 0x00020002:0, // GLFW_ACTIVE + 0x00020003:0, // GLFW_ICONIFIED + 0x00020004:0, // GLFW_ACCELERATED + 0x00020005:0x00021001, // GLFW_RED_BITS + 0x00020006:0x00021002, // GLFW_GREEN_BITS + 0x00020007:0x00021003, // GLFW_BLUE_BITS + 0x00020008:0x00021004, // GLFW_ALPHA_BITS + 0x00020009:0x00021005, // GLFW_DEPTH_BITS + 0x0002000A:0x00021006, // GLFW_STENCIL_BITS + 0x0002000B:0x0002100F, // GLFW_REFRESH_RATE + 0x0002000C:0x00021007, // GLFW_ACCUM_RED_BITS + 0x0002000D:0x00021008, // GLFW_ACCUM_GREEN_BITS + 0x0002000E:0x00021009, // GLFW_ACCUM_BLUE_BITS + 0x0002000F:0x0002100A, // GLFW_ACCUM_ALPHA_BITS + 0x00020010:0x0002100B, // GLFW_AUX_BUFFERS + 0x00020011:0x0002100C, // GLFW_STEREO + 0x00020012:0, // GLFW_WINDOW_NO_RESIZE + 0x00020013:0x0002100D, // GLFW_FSAA_SAMPLES + 0x00020014:0x00022002, // GLFW_OPENGL_VERSION_MAJOR + 0x00020015:0x00022003, // GLFW_OPENGL_VERSION_MINOR + 0x00020016:0x00022006, // GLFW_OPENGL_FORWARD_COMPAT + 0x00020017:0x00022007, // GLFW_OPENGL_DEBUG_CONTEXT + 0x00020018:0x00022008, // GLFW_OPENGL_PROFILE + }; + return table[param]; + }};function _glfwCreateWindow(width, height, title, monitor, share) { + return GLFW.createWindow(width, height, title, monitor, share); + } + + function _glfwDefaultWindowHints() { + GLFW.hints = GLFW.defaultHints; + } + + function _glfwDestroyWindow(winid) { + return GLFW.destroyWindow(winid); + } + + function _glfwGetCursorPos(winid, x, y) { + GLFW.getCursorPos(winid, x, y); + } + + function _glfwGetPrimaryMonitor() { + return 1; + } + + function _glfwGetTime() { + return GLFW.getTime() - GLFW.initialTime; + } + + function _glfwGetVideoModes(monitor, count) { + setValue(count, 0, 'i32'); + return 0; + } + + function _glfwInit() { + if (GLFW.windows) return 1; // GL_TRUE + + GLFW.initialTime = GLFW.getTime(); + GLFW.hints = GLFW.defaultHints; + GLFW.windows = new Array() + GLFW.active = null; + + window.addEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.addEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.addEventListener("keydown", GLFW.onKeydown, true); + window.addEventListener("keypress", GLFW.onKeyPress, true); + window.addEventListener("keyup", GLFW.onKeyup, true); + window.addEventListener("blur", GLFW.onBlur, true); + Module["canvas"].addEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].addEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].addEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].addEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].addEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].addEventListener('drop', GLFW.onDrop, true); + Module["canvas"].addEventListener('dragover', GLFW.onDragover, true); + + Browser.resizeListeners.push(function(width, height) { + GLFW.onCanvasResize(width, height); + }); + return 1; // GL_TRUE + } + + function _glfwMakeContextCurrent(winid) {} + + function _glfwSetCharCallback(winid, cbfun) { + return GLFW.setCharCallback(winid, cbfun); + } + + function _glfwSetCursorEnterCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.cursorEnterFunc; + win.cursorEnterFunc = cbfun; + return prevcbfun; + } + + function _glfwSetCursorPosCallback(winid, cbfun) { + return GLFW.setCursorPosCallback(winid, cbfun); + } + + function _glfwSetDropCallback(winid, cbfun) { + return GLFW.setDropCallback(winid, cbfun); + } + + function _glfwSetErrorCallback(cbfun) { + var prevcbfun = GLFW.errorFunc; + GLFW.errorFunc = cbfun; + return prevcbfun; + } + + function _glfwSetKeyCallback(winid, cbfun) { + return GLFW.setKeyCallback(winid, cbfun); + } + + function _glfwSetMouseButtonCallback(winid, cbfun) { + return GLFW.setMouseButtonCallback(winid, cbfun); + } + + function _glfwSetScrollCallback(winid, cbfun) { + return GLFW.setScrollCallback(winid, cbfun); + } + + function _glfwSetWindowIconifyCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return null; + var prevcbfun = win.windowIconifyFunc; + win.windowIconifyFunc = cbfun; + return prevcbfun; + } + + function _glfwSetWindowShouldClose(winid, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.shouldClose = value; + } + + function _glfwSetWindowSizeCallback(winid, cbfun) { + return GLFW.setWindowSizeCallback(winid, cbfun); + } + + function _glfwSwapBuffers(winid) { + GLFW.swapBuffers(winid); + } + + function _glfwSwapInterval(interval) { + interval = Math.abs(interval); // GLFW uses negative values to enable GLX_EXT_swap_control_tear, which we don't have, so just treat negative and positive the same. + if (interval == 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 0); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, interval); + } + + function _glfwTerminate() { + window.removeEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.removeEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.removeEventListener("keydown", GLFW.onKeydown, true); + window.removeEventListener("keypress", GLFW.onKeyPress, true); + window.removeEventListener("keyup", GLFW.onKeyup, true); + window.removeEventListener("blur", GLFW.onBlur, true); + Module["canvas"].removeEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].removeEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].removeEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].removeEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].removeEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].removeEventListener('drop', GLFW.onDrop, true); + Module["canvas"].removeEventListener('dragover', GLFW.onDragover, true); + + + Module["canvas"].width = Module["canvas"].height = 1; + GLFW.windows = null; + GLFW.active = null; + } + + function _glfwWindowHint(target, hint) { + GLFW.hints[target] = hint; + } + + + + + function _llvm_stackrestore(p) { + var self = _llvm_stacksave; + var ret = self.LLVM_SAVEDSTACKS[p]; + self.LLVM_SAVEDSTACKS.splice(p, 1); + stackRestore(ret); + } + + function _llvm_stacksave() { + var self = _llvm_stacksave; + if (!self.LLVM_SAVEDSTACKS) { + self.LLVM_SAVEDSTACKS = []; + } + self.LLVM_SAVEDSTACKS.push(stackSave()); + return self.LLVM_SAVEDSTACKS.length-1; + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + } + + + + + + + + + function __spawn_thread(threadParams) { + if (ENVIRONMENT_IS_PTHREAD) throw 'Internal Error! _spawn_thread() can only ever be called from main application thread!'; + + var worker = PThread.getNewWorker(); + if (worker.pthread !== undefined) throw 'Internal error!'; + if (!threadParams.pthread_ptr) throw 'Internal error, no pthread ptr!'; + PThread.runningWorkers.push(worker); + + // Allocate memory for thread-local storage and initialize it to zero. + var tlsMemory = _malloc(128 * 4); + for (var i = 0; i < 128; ++i) { + HEAP32[(((tlsMemory)+(i*4))>>2)]=0; + } + + var stackHigh = threadParams.stackBase + threadParams.stackSize; + + var pthread = PThread.pthreads[threadParams.pthread_ptr] = { // Create a pthread info object to represent this thread. + worker: worker, + stackBase: threadParams.stackBase, + stackSize: threadParams.stackSize, + allocatedOwnStack: threadParams.allocatedOwnStack, + thread: threadParams.pthread_ptr, + threadInfoStruct: threadParams.pthread_ptr // Info area for this thread in Emscripten HEAP (shared) + }; + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 0 ) >> 2, 0); // threadStatus <- 0, meaning not yet exited. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 4 ) >> 2, 0); // threadExitCode <- 0. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 20 ) >> 2, 0); // profilerBlock <- 0. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 80 ) >> 2, threadParams.detached); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 116 ) >> 2, tlsMemory); // Init thread-local-storage memory array. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 60 ) >> 2, 0); // Mark initial status to unused. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 52 ) >> 2, pthread.threadInfoStruct); // Main thread ID. + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 56 ) >> 2, PROCINFO.pid); // Process ID. + + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 120) >> 2, threadParams.stackSize); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 96) >> 2, threadParams.stackSize); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 92) >> 2, stackHigh); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 120 + 8) >> 2, stackHigh); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 120 + 12) >> 2, threadParams.detached); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 120 + 20) >> 2, threadParams.schedPolicy); + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 120 + 24) >> 2, threadParams.schedPrio); + + var global_libc = _emscripten_get_global_libc(); + var global_locale = global_libc + 40; + Atomics.store(HEAPU32, (pthread.threadInfoStruct + 188) >> 2, global_locale); + + + worker.pthread = pthread; + var msg = { + cmd: 'run', + start_routine: threadParams.startRoutine, + arg: threadParams.arg, + threadInfoStruct: threadParams.pthread_ptr, + selfThreadId: threadParams.pthread_ptr, // TODO: Remove this since thread ID is now the same as the thread address. + parentThreadId: threadParams.parent_pthread_ptr, + stackBase: threadParams.stackBase, + stackSize: threadParams.stackSize, + }; + worker.runPthread = function() { + // Ask the worker to start executing its pthread entry point function. + msg.time = performance.now(); + worker.postMessage(msg, threadParams.transferList); + }; + if (worker.loaded) { + worker.runPthread(); + delete worker.runPthread; + } + } + + function _pthread_getschedparam(thread, policy, schedparam) { + if (!policy && !schedparam) return ERRNO_CODES.EINVAL; + + if (!thread) { + err('pthread_getschedparam called with a null thread pointer!'); + return ERRNO_CODES.ESRCH; + } + var self = HEAP32[(((thread)+(24))>>2)]; + if (self !== thread) { + err('pthread_getschedparam attempted on thread ' + thread + ', which does not point to a valid thread, or does not exist anymore!'); + return ERRNO_CODES.ESRCH; + } + + var schedPolicy = Atomics.load(HEAPU32, (thread + 120 + 20 ) >> 2); + var schedPrio = Atomics.load(HEAPU32, (thread + 120 + 24 ) >> 2); + + if (policy) HEAP32[((policy)>>2)]=schedPolicy; + if (schedparam) HEAP32[((schedparam)>>2)]=schedPrio; + return 0; + } + + function _pthread_create(pthread_ptr, attr, start_routine, arg) { + if (typeof SharedArrayBuffer === 'undefined') { + err('Current environment does not support SharedArrayBuffer, pthreads are not available!'); + return 11; + } + if (!pthread_ptr) { + err('pthread_create called with a null thread pointer!'); + return 22; + } + + var transferList = []; // List of JS objects that will transfer ownership to the Worker hosting the thread + var error = 0; + + + // Synchronously proxy the thread creation to main thread if possible. If we need to transfer ownership of objects, then + // proxy asynchronously via postMessage. + if (ENVIRONMENT_IS_PTHREAD && (transferList.length === 0 || error)) { + return _emscripten_sync_run_in_main_thread_4(687865856, pthread_ptr, attr, start_routine, arg); + } + + // If on the main thread, and accessing Canvas/OffscreenCanvas failed, abort with the detected error. + if (error) return error; + + var stackSize = 0; + var stackBase = 0; + var detached = 0; // Default thread attr is PTHREAD_CREATE_JOINABLE, i.e. start as not detached. + var schedPolicy = 0; /*SCHED_OTHER*/ + var schedPrio = 0; + if (attr) { + stackSize = HEAP32[((attr)>>2)]; + // Musl has a convention that the stack size that is stored to the pthread attribute structure is always musl's #define DEFAULT_STACK_SIZE + // smaller than the actual created stack size. That is, stored stack size of 0 would mean a stack of DEFAULT_STACK_SIZE in size. All musl + // functions hide this impl detail, and offset the size transparently, so pthread_*() API user does not see this offset when operating with + // the pthread API. When reading the structure directly on JS side however, we need to offset the size manually here. + stackSize += 81920 /*DEFAULT_STACK_SIZE*/; + stackBase = HEAP32[(((attr)+(8))>>2)]; + detached = HEAP32[(((attr)+(12))>>2)] !== 0/*PTHREAD_CREATE_JOINABLE*/; + var inheritSched = HEAP32[(((attr)+(16))>>2)] === 0/*PTHREAD_INHERIT_SCHED*/; + if (inheritSched) { + var prevSchedPolicy = HEAP32[(((attr)+(20))>>2)]; + var prevSchedPrio = HEAP32[(((attr)+(24))>>2)]; + // If we are inheriting the scheduling properties from the parent thread, we need to identify the parent thread properly - this function call may + // be getting proxied, in which case _pthread_self() will point to the thread performing the proxying, not the thread that initiated the call. + var parentThreadPtr = PThread.currentProxiedOperationCallerThread ? PThread.currentProxiedOperationCallerThread : _pthread_self(); + _pthread_getschedparam(parentThreadPtr, attr + 20, attr + 24); + schedPolicy = HEAP32[(((attr)+(20))>>2)]; + schedPrio = HEAP32[(((attr)+(24))>>2)]; + HEAP32[(((attr)+(20))>>2)]=prevSchedPolicy; + HEAP32[(((attr)+(24))>>2)]=prevSchedPrio; + } else { + schedPolicy = HEAP32[(((attr)+(20))>>2)]; + schedPrio = HEAP32[(((attr)+(24))>>2)]; + } + } else { + // According to http://man7.org/linux/man-pages/man3/pthread_create.3.html, default stack size if not specified is 2 MB, so follow that convention. + stackSize = 2097152; + } + var allocatedOwnStack = stackBase == 0; // If allocatedOwnStack == true, then the pthread impl maintains the stack allocation. + if (allocatedOwnStack) { + stackBase = _memalign(16, stackSize); // Allocate a stack if the user doesn't want to place the stack in a custom memory area. + } else { + // Musl stores the stack base address assuming stack grows downwards, so adjust it to Emscripten convention that the + // stack grows upwards instead. + stackBase -= stackSize; + assert(stackBase > 0); + } + + // Allocate thread block (pthread_t structure). + var threadInfoStruct = _malloc(244); + for (var i = 0; i < 244 >> 2; ++i) HEAPU32[(threadInfoStruct>>2) + i] = 0; // zero-initialize thread structure. + HEAP32[((pthread_ptr)>>2)]=threadInfoStruct; + + // The pthread struct has a field that points to itself - this is used as a magic ID to detect whether the pthread_t + // structure is 'alive'. + HEAP32[(((threadInfoStruct)+(24))>>2)]=threadInfoStruct; + + // pthread struct robust_list head should point to itself. + var headPtr = threadInfoStruct + 168; + HEAP32[((headPtr)>>2)]=headPtr; + + + var threadParams = { + stackBase: stackBase, + stackSize: stackSize, + allocatedOwnStack: allocatedOwnStack, + schedPolicy: schedPolicy, + schedPrio: schedPrio, + detached: detached, + startRoutine: start_routine, + pthread_ptr: threadInfoStruct, + parent_pthread_ptr: _pthread_self(), + arg: arg, + transferList: transferList + }; + + if (ENVIRONMENT_IS_PTHREAD) { + // The prepopulated pool of web workers that can host pthreads is stored in the main JS thread. Therefore if a + // pthread is attempting to spawn a new thread, the thread creation must be deferred to the main JS thread. + threadParams.cmd = 'spawnThread'; + postMessage(threadParams, transferList); + } else { + // We are the main thread, so we have the pthread warmup pool in this thread and can fire off JS thread creation + // directly ourselves. + __spawn_thread(threadParams); + } + + return 0; + } + + + + + function abortOnCannotGrowMemory(requestedSize) { + abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); + }function _emscripten_resize_heap(requestedSize) { + abortOnCannotGrowMemory(requestedSize); + } + + function _time(ptr) { + var ret = (Date.now()/1000)|0; + if (ptr) { + HEAP32[((ptr)>>2)]=ret; + } + return ret; + } +if (!ENVIRONMENT_IS_PTHREAD) PThread.initMainThreadBlock();; +if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = function _emscripten_get_now_actual() { + var t = process['hrtime'](); + return t[0] * 1e3 + t[1] / 1e6; + }; + } else if (ENVIRONMENT_IS_PTHREAD) { + _emscripten_get_now = function() { return performance['now']() - __performance_now_clock_drift; }; + } else if (typeof dateNow !== 'undefined') { + _emscripten_get_now = dateNow; + } else if (typeof performance === 'object' && performance && typeof performance['now'] === 'function') { + _emscripten_get_now = function() { return performance['now'](); }; + } else { + _emscripten_get_now = Date.now; + }; +FS.staticInit();; +if (ENVIRONMENT_HAS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); }; +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."); Module["requestFullScreen"] = Module["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; + Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; +var GLctx; GL.init(); +for (var i = 0; i < 32; i++) __tempFixedLengthArray.push(new Array(i));; + + // proxiedFunctionTable specifies the list of functions that can be called either synchronously or asynchronously from other threads in postMessage()d or internally queued events. This way a pthread in a Worker can synchronously access e.g. the DOM on the main thread. + +var proxiedFunctionTable = [null,___syscall140,___syscall145,___syscall221,___syscall5,___syscall54,___syscall6,_fd_write,_eglGetProcAddress,_emscripten_exit_pointerlock,_emscripten_get_gamepad_status,_emscripten_get_num_gamepads,_emscripten_get_pointerlock_status,_emscripten_request_pointerlock,_emscripten_sample_gamepad_data,_emscripten_set_canvas_element_size_main_thread,_emscripten_set_click_callback_on_thread,_emscripten_set_fullscreenchange_callback_on_thread,_emscripten_set_gamepadconnected_callback_on_thread,_emscripten_set_gamepaddisconnected_callback_on_thread,_emscripten_set_keypress_callback_on_thread,_emscripten_set_touchcancel_callback_on_thread,_emscripten_set_touchend_callback_on_thread,_emscripten_set_touchmove_callback_on_thread,_emscripten_set_touchstart_callback_on_thread]; + +var ASSERTIONS = true; + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil,Int8Array,Int32Array + +function nullFunc_ff(x) { abortFnPtrError(x, 'ff'); } +function nullFunc_fff(x) { abortFnPtrError(x, 'fff'); } +function nullFunc_i(x) { abortFnPtrError(x, 'i'); } +function nullFunc_ii(x) { abortFnPtrError(x, 'ii'); } +function nullFunc_iidiiii(x) { abortFnPtrError(x, 'iidiiii'); } +function nullFunc_iii(x) { abortFnPtrError(x, 'iii'); } +function nullFunc_iiii(x) { abortFnPtrError(x, 'iiii'); } +function nullFunc_iiiii(x) { abortFnPtrError(x, 'iiiii'); } +function nullFunc_iiiiii(x) { abortFnPtrError(x, 'iiiiii'); } +function nullFunc_iiiiiii(x) { abortFnPtrError(x, 'iiiiiii'); } +function nullFunc_iiiiiiii(x) { abortFnPtrError(x, 'iiiiiiii'); } +function nullFunc_iiiiiiiii(x) { abortFnPtrError(x, 'iiiiiiiii'); } +function nullFunc_iiiiiiiiii(x) { abortFnPtrError(x, 'iiiiiiiiii'); } +function nullFunc_jiji(x) { abortFnPtrError(x, 'jiji'); } +function nullFunc_v(x) { abortFnPtrError(x, 'v'); } +function nullFunc_vf(x) { abortFnPtrError(x, 'vf'); } +function nullFunc_vff(x) { abortFnPtrError(x, 'vff'); } +function nullFunc_vfff(x) { abortFnPtrError(x, 'vfff'); } +function nullFunc_vffff(x) { abortFnPtrError(x, 'vffff'); } +function nullFunc_vfi(x) { abortFnPtrError(x, 'vfi'); } +function nullFunc_vi(x) { abortFnPtrError(x, 'vi'); } +function nullFunc_vidd(x) { abortFnPtrError(x, 'vidd'); } +function nullFunc_vif(x) { abortFnPtrError(x, 'vif'); } +function nullFunc_viff(x) { abortFnPtrError(x, 'viff'); } +function nullFunc_vifff(x) { abortFnPtrError(x, 'vifff'); } +function nullFunc_viffff(x) { abortFnPtrError(x, 'viffff'); } +function nullFunc_vii(x) { abortFnPtrError(x, 'vii'); } +function nullFunc_viif(x) { abortFnPtrError(x, 'viif'); } +function nullFunc_viifi(x) { abortFnPtrError(x, 'viifi'); } +function nullFunc_viii(x) { abortFnPtrError(x, 'viii'); } +function nullFunc_viiii(x) { abortFnPtrError(x, 'viiii'); } +function nullFunc_viiiii(x) { abortFnPtrError(x, 'viiiii'); } +function nullFunc_viiiiii(x) { abortFnPtrError(x, 'viiiiii'); } +function nullFunc_viiiiiii(x) { abortFnPtrError(x, 'viiiiiii'); } +function nullFunc_viiiiiiii(x) { abortFnPtrError(x, 'viiiiiiii'); } +function nullFunc_viiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiii'); } +function nullFunc_viiiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiiii'); } +function nullFunc_viiiiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiiiii'); } +function nullFunc_viiji(x) { abortFnPtrError(x, 'viiji'); } + +var asmGlobalArg = {}; + +var asmLibraryArg = { + "abort": abort, + "setTempRet0": setTempRet0, + "getTempRet0": getTempRet0, + "abortStackOverflow": abortStackOverflow, + "nullFunc_ff": nullFunc_ff, + "nullFunc_fff": nullFunc_fff, + "nullFunc_i": nullFunc_i, + "nullFunc_ii": nullFunc_ii, + "nullFunc_iidiiii": nullFunc_iidiiii, + "nullFunc_iii": nullFunc_iii, + "nullFunc_iiii": nullFunc_iiii, + "nullFunc_iiiii": nullFunc_iiiii, + "nullFunc_iiiiii": nullFunc_iiiiii, + "nullFunc_iiiiiii": nullFunc_iiiiiii, + "nullFunc_iiiiiiii": nullFunc_iiiiiiii, + "nullFunc_iiiiiiiii": nullFunc_iiiiiiiii, + "nullFunc_iiiiiiiiii": nullFunc_iiiiiiiiii, + "nullFunc_jiji": nullFunc_jiji, + "nullFunc_v": nullFunc_v, + "nullFunc_vf": nullFunc_vf, + "nullFunc_vff": nullFunc_vff, + "nullFunc_vfff": nullFunc_vfff, + "nullFunc_vffff": nullFunc_vffff, + "nullFunc_vfi": nullFunc_vfi, + "nullFunc_vi": nullFunc_vi, + "nullFunc_vidd": nullFunc_vidd, + "nullFunc_vif": nullFunc_vif, + "nullFunc_viff": nullFunc_viff, + "nullFunc_vifff": nullFunc_vifff, + "nullFunc_viffff": nullFunc_viffff, + "nullFunc_vii": nullFunc_vii, + "nullFunc_viif": nullFunc_viif, + "nullFunc_viifi": nullFunc_viifi, + "nullFunc_viii": nullFunc_viii, + "nullFunc_viiii": nullFunc_viiii, + "nullFunc_viiiii": nullFunc_viiiii, + "nullFunc_viiiiii": nullFunc_viiiiii, + "nullFunc_viiiiiii": nullFunc_viiiiiii, + "nullFunc_viiiiiiii": nullFunc_viiiiiiii, + "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, + "nullFunc_viiiiiiiiii": nullFunc_viiiiiiiiii, + "nullFunc_viiiiiiiiiii": nullFunc_viiiiiiiiiii, + "nullFunc_viiji": nullFunc_viiji, + "___assert_fail": ___assert_fail, + "___call_main": ___call_main, + "___clock_gettime": ___clock_gettime, + "___lock": ___lock, + "___setErrNo": ___setErrNo, + "___syscall140": ___syscall140, + "___syscall145": ___syscall145, + "___syscall221": ___syscall221, + "___syscall5": ___syscall5, + "___syscall54": ___syscall54, + "___syscall6": ___syscall6, + "___unlock": ___unlock, + "___wasi_fd_write": ___wasi_fd_write, + "__computeUnpackAlignedImageSize": __computeUnpackAlignedImageSize, + "__fillFullscreenChangeEventData": __fillFullscreenChangeEventData, + "__fillGamepadEventData": __fillGamepadEventData, + "__fillMouseEventData": __fillMouseEventData, + "__fillPointerlockChangeEventData": __fillPointerlockChangeEventData, + "__findCanvasEventTarget": __findCanvasEventTarget, + "__findEventTarget": __findEventTarget, + "__glGenObject": __glGenObject, + "__registerFullscreenChangeEventCallback": __registerFullscreenChangeEventCallback, + "__registerGamepadEventCallback": __registerGamepadEventCallback, + "__registerKeyEventCallback": __registerKeyEventCallback, + "__registerMouseEventCallback": __registerMouseEventCallback, + "__registerTouchEventCallback": __registerTouchEventCallback, + "__requestPointerLock": __requestPointerLock, + "__spawn_thread": __spawn_thread, + "_abort": _abort, + "_clock": _clock, + "_clock_gettime": _clock_gettime, + "_eglGetProcAddress": _eglGetProcAddress, + "_emscripten_asm_const_i": _emscripten_asm_const_i, + "_emscripten_asm_const_ii": _emscripten_asm_const_ii, + "_emscripten_conditional_set_current_thread_status_js": _emscripten_conditional_set_current_thread_status_js, + "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, + "_emscripten_futex_wait": _emscripten_futex_wait, + "_emscripten_futex_wake": _emscripten_futex_wake, + "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, + "_emscripten_get_heap_size": _emscripten_get_heap_size, + "_emscripten_get_now": _emscripten_get_now, + "_emscripten_get_now_is_monotonic": _emscripten_get_now_is_monotonic, + "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, + "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, + "_emscripten_glActiveTexture": _emscripten_glActiveTexture, + "_emscripten_glAttachShader": _emscripten_glAttachShader, + "_emscripten_glBeginQueryEXT": _emscripten_glBeginQueryEXT, + "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, + "_emscripten_glBindBuffer": _emscripten_glBindBuffer, + "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, + "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, + "_emscripten_glBindTexture": _emscripten_glBindTexture, + "_emscripten_glBindVertexArrayOES": _emscripten_glBindVertexArrayOES, + "_emscripten_glBlendColor": _emscripten_glBlendColor, + "_emscripten_glBlendEquation": _emscripten_glBlendEquation, + "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, + "_emscripten_glBlendFunc": _emscripten_glBlendFunc, + "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, + "_emscripten_glBufferData": _emscripten_glBufferData, + "_emscripten_glBufferSubData": _emscripten_glBufferSubData, + "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, + "_emscripten_glClear": _emscripten_glClear, + "_emscripten_glClearColor": _emscripten_glClearColor, + "_emscripten_glClearDepthf": _emscripten_glClearDepthf, + "_emscripten_glClearStencil": _emscripten_glClearStencil, + "_emscripten_glColorMask": _emscripten_glColorMask, + "_emscripten_glCompileShader": _emscripten_glCompileShader, + "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, + "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, + "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, + "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, + "_emscripten_glCreateProgram": _emscripten_glCreateProgram, + "_emscripten_glCreateShader": _emscripten_glCreateShader, + "_emscripten_glCullFace": _emscripten_glCullFace, + "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, + "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, + "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, + "_emscripten_glDeleteQueriesEXT": _emscripten_glDeleteQueriesEXT, + "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, + "_emscripten_glDeleteShader": _emscripten_glDeleteShader, + "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, + "_emscripten_glDeleteVertexArraysOES": _emscripten_glDeleteVertexArraysOES, + "_emscripten_glDepthFunc": _emscripten_glDepthFunc, + "_emscripten_glDepthMask": _emscripten_glDepthMask, + "_emscripten_glDepthRangef": _emscripten_glDepthRangef, + "_emscripten_glDetachShader": _emscripten_glDetachShader, + "_emscripten_glDisable": _emscripten_glDisable, + "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, + "_emscripten_glDrawArrays": _emscripten_glDrawArrays, + "_emscripten_glDrawArraysInstancedANGLE": _emscripten_glDrawArraysInstancedANGLE, + "_emscripten_glDrawBuffersWEBGL": _emscripten_glDrawBuffersWEBGL, + "_emscripten_glDrawElements": _emscripten_glDrawElements, + "_emscripten_glDrawElementsInstancedANGLE": _emscripten_glDrawElementsInstancedANGLE, + "_emscripten_glEnable": _emscripten_glEnable, + "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, + "_emscripten_glEndQueryEXT": _emscripten_glEndQueryEXT, + "_emscripten_glFinish": _emscripten_glFinish, + "_emscripten_glFlush": _emscripten_glFlush, + "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, + "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, + "_emscripten_glFrontFace": _emscripten_glFrontFace, + "_emscripten_glGenBuffers": _emscripten_glGenBuffers, + "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, + "_emscripten_glGenQueriesEXT": _emscripten_glGenQueriesEXT, + "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, + "_emscripten_glGenTextures": _emscripten_glGenTextures, + "_emscripten_glGenVertexArraysOES": _emscripten_glGenVertexArraysOES, + "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, + "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, + "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, + "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, + "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, + "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, + "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, + "_emscripten_glGetError": _emscripten_glGetError, + "_emscripten_glGetFloatv": _emscripten_glGetFloatv, + "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, + "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, + "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, + "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, + "_emscripten_glGetQueryObjecti64vEXT": _emscripten_glGetQueryObjecti64vEXT, + "_emscripten_glGetQueryObjectivEXT": _emscripten_glGetQueryObjectivEXT, + "_emscripten_glGetQueryObjectui64vEXT": _emscripten_glGetQueryObjectui64vEXT, + "_emscripten_glGetQueryObjectuivEXT": _emscripten_glGetQueryObjectuivEXT, + "_emscripten_glGetQueryivEXT": _emscripten_glGetQueryivEXT, + "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, + "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, + "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, + "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, + "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, + "_emscripten_glGetString": _emscripten_glGetString, + "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, + "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, + "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, + "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, + "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, + "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, + "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, + "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, + "_emscripten_glHint": _emscripten_glHint, + "_emscripten_glIsBuffer": _emscripten_glIsBuffer, + "_emscripten_glIsEnabled": _emscripten_glIsEnabled, + "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, + "_emscripten_glIsProgram": _emscripten_glIsProgram, + "_emscripten_glIsQueryEXT": _emscripten_glIsQueryEXT, + "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, + "_emscripten_glIsShader": _emscripten_glIsShader, + "_emscripten_glIsTexture": _emscripten_glIsTexture, + "_emscripten_glIsVertexArrayOES": _emscripten_glIsVertexArrayOES, + "_emscripten_glLineWidth": _emscripten_glLineWidth, + "_emscripten_glLinkProgram": _emscripten_glLinkProgram, + "_emscripten_glPixelStorei": _emscripten_glPixelStorei, + "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, + "_emscripten_glQueryCounterEXT": _emscripten_glQueryCounterEXT, + "_emscripten_glReadPixels": _emscripten_glReadPixels, + "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, + "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, + "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, + "_emscripten_glScissor": _emscripten_glScissor, + "_emscripten_glShaderBinary": _emscripten_glShaderBinary, + "_emscripten_glShaderSource": _emscripten_glShaderSource, + "_emscripten_glStencilFunc": _emscripten_glStencilFunc, + "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, + "_emscripten_glStencilMask": _emscripten_glStencilMask, + "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, + "_emscripten_glStencilOp": _emscripten_glStencilOp, + "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, + "_emscripten_glTexImage2D": _emscripten_glTexImage2D, + "_emscripten_glTexParameterf": _emscripten_glTexParameterf, + "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, + "_emscripten_glTexParameteri": _emscripten_glTexParameteri, + "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, + "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, + "_emscripten_glUniform1f": _emscripten_glUniform1f, + "_emscripten_glUniform1fv": _emscripten_glUniform1fv, + "_emscripten_glUniform1i": _emscripten_glUniform1i, + "_emscripten_glUniform1iv": _emscripten_glUniform1iv, + "_emscripten_glUniform2f": _emscripten_glUniform2f, + "_emscripten_glUniform2fv": _emscripten_glUniform2fv, + "_emscripten_glUniform2i": _emscripten_glUniform2i, + "_emscripten_glUniform2iv": _emscripten_glUniform2iv, + "_emscripten_glUniform3f": _emscripten_glUniform3f, + "_emscripten_glUniform3fv": _emscripten_glUniform3fv, + "_emscripten_glUniform3i": _emscripten_glUniform3i, + "_emscripten_glUniform3iv": _emscripten_glUniform3iv, + "_emscripten_glUniform4f": _emscripten_glUniform4f, + "_emscripten_glUniform4fv": _emscripten_glUniform4fv, + "_emscripten_glUniform4i": _emscripten_glUniform4i, + "_emscripten_glUniform4iv": _emscripten_glUniform4iv, + "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, + "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, + "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, + "_emscripten_glUseProgram": _emscripten_glUseProgram, + "_emscripten_glValidateProgram": _emscripten_glValidateProgram, + "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, + "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, + "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, + "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, + "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, + "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, + "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, + "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, + "_emscripten_glVertexAttribDivisorANGLE": _emscripten_glVertexAttribDivisorANGLE, + "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, + "_emscripten_glViewport": _emscripten_glViewport, + "_emscripten_has_threading_support": _emscripten_has_threading_support, + "_emscripten_memcpy_big": _emscripten_memcpy_big, + "_emscripten_proxy_to_main_thread_js": _emscripten_proxy_to_main_thread_js, + "_emscripten_receive_on_main_thread_js": _emscripten_receive_on_main_thread_js, + "_emscripten_request_pointerlock": _emscripten_request_pointerlock, + "_emscripten_resize_heap": _emscripten_resize_heap, + "_emscripten_run_script": _emscripten_run_script, + "_emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, + "_emscripten_set_canvas_element_size": _emscripten_set_canvas_element_size, + "_emscripten_set_canvas_element_size_calling_thread": _emscripten_set_canvas_element_size_calling_thread, + "_emscripten_set_canvas_element_size_main_thread": _emscripten_set_canvas_element_size_main_thread, + "_emscripten_set_click_callback_on_thread": _emscripten_set_click_callback_on_thread, + "_emscripten_set_current_thread_status_js": _emscripten_set_current_thread_status_js, + "_emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, + "_emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, + "_emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, + "_emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, + "_emscripten_set_main_loop": _emscripten_set_main_loop, + "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, + "_emscripten_set_offscreencanvas_size_on_target_thread": _emscripten_set_offscreencanvas_size_on_target_thread, + "_emscripten_set_offscreencanvas_size_on_target_thread_js": _emscripten_set_offscreencanvas_size_on_target_thread_js, + "_emscripten_set_thread_name_js": _emscripten_set_thread_name_js, + "_emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, + "_emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, + "_emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, + "_emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, + "_emscripten_syscall": _emscripten_syscall, + "_emscripten_webgl_create_context": _emscripten_webgl_create_context, + "_emscripten_webgl_do_create_context": _emscripten_webgl_do_create_context, + "_exit": _exit, + "_fd_write": _fd_write, + "_glActiveTexture": _glActiveTexture, + "_glAttachShader": _glAttachShader, + "_glBindAttribLocation": _glBindAttribLocation, + "_glBindBuffer": _glBindBuffer, + "_glBindTexture": _glBindTexture, + "_glBlendFunc": _glBlendFunc, + "_glBufferData": _glBufferData, + "_glBufferSubData": _glBufferSubData, + "_glClear": _glClear, + "_glClearColor": _glClearColor, + "_glClearDepthf": _glClearDepthf, + "_glCompileShader": _glCompileShader, + "_glCompressedTexImage2D": _glCompressedTexImage2D, + "_glCreateProgram": _glCreateProgram, + "_glCreateShader": _glCreateShader, + "_glCullFace": _glCullFace, + "_glDeleteBuffers": _glDeleteBuffers, + "_glDeleteProgram": _glDeleteProgram, + "_glDeleteShader": _glDeleteShader, + "_glDeleteTextures": _glDeleteTextures, + "_glDepthFunc": _glDepthFunc, + "_glDetachShader": _glDetachShader, + "_glDisable": _glDisable, + "_glDisableVertexAttribArray": _glDisableVertexAttribArray, + "_glDrawArrays": _glDrawArrays, + "_glDrawElements": _glDrawElements, + "_glEnable": _glEnable, + "_glEnableVertexAttribArray": _glEnableVertexAttribArray, + "_glFrontFace": _glFrontFace, + "_glGenBuffers": _glGenBuffers, + "_glGenTextures": _glGenTextures, + "_glGetAttribLocation": _glGetAttribLocation, + "_glGetFloatv": _glGetFloatv, + "_glGetProgramInfoLog": _glGetProgramInfoLog, + "_glGetProgramiv": _glGetProgramiv, + "_glGetShaderInfoLog": _glGetShaderInfoLog, + "_glGetShaderiv": _glGetShaderiv, + "_glGetString": _glGetString, + "_glGetUniformLocation": _glGetUniformLocation, + "_glLinkProgram": _glLinkProgram, + "_glPixelStorei": _glPixelStorei, + "_glReadPixels": _glReadPixels, + "_glShaderSource": _glShaderSource, + "_glTexImage2D": _glTexImage2D, + "_glTexParameteri": _glTexParameteri, + "_glUniform1i": _glUniform1i, + "_glUniform4f": _glUniform4f, + "_glUniformMatrix4fv": _glUniformMatrix4fv, + "_glUseProgram": _glUseProgram, + "_glVertexAttribPointer": _glVertexAttribPointer, + "_glViewport": _glViewport, + "_glfwCreateWindow": _glfwCreateWindow, + "_glfwDefaultWindowHints": _glfwDefaultWindowHints, + "_glfwDestroyWindow": _glfwDestroyWindow, + "_glfwGetCursorPos": _glfwGetCursorPos, + "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, + "_glfwGetTime": _glfwGetTime, + "_glfwGetVideoModes": _glfwGetVideoModes, + "_glfwInit": _glfwInit, + "_glfwMakeContextCurrent": _glfwMakeContextCurrent, + "_glfwSetCharCallback": _glfwSetCharCallback, + "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, + "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, + "_glfwSetDropCallback": _glfwSetDropCallback, + "_glfwSetErrorCallback": _glfwSetErrorCallback, + "_glfwSetKeyCallback": _glfwSetKeyCallback, + "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, + "_glfwSetScrollCallback": _glfwSetScrollCallback, + "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, + "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, + "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, + "_glfwSwapBuffers": _glfwSwapBuffers, + "_glfwSwapInterval": _glfwSwapInterval, + "_glfwTerminate": _glfwTerminate, + "_glfwWindowHint": _glfwWindowHint, + "_initPthreadsJS": _initPthreadsJS, + "_llvm_stackrestore": _llvm_stackrestore, + "_llvm_stacksave": _llvm_stacksave, + "_pthread_create": _pthread_create, + "_pthread_getschedparam": _pthread_getschedparam, + "_time": _time, + "abortOnCannotGrowMemory": abortOnCannotGrowMemory, + "demangle": demangle, + "demangleAll": demangleAll, + "emscriptenWebGLGet": emscriptenWebGLGet, + "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, + "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, + "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, + "jsStackTrace": jsStackTrace, + "stackTrace": stackTrace, + "stringToNewUTF8": stringToNewUTF8, + "tempDoublePtr": tempDoublePtr, + "DYNAMICTOP_PTR": DYNAMICTOP_PTR +}; +// EMSCRIPTEN_START_ASM +var asm =Module["asm"]// EMSCRIPTEN_END_ASM +(asmGlobalArg, asmLibraryArg, buffer); + +Module["asm"] = asm; +var ___em_js__initPthreadsJS = Module["___em_js__initPthreadsJS"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___em_js__initPthreadsJS"].apply(null, arguments) +}; + +var ___emscripten_pthread_data_constructor = Module["___emscripten_pthread_data_constructor"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___emscripten_pthread_data_constructor"].apply(null, arguments) +}; + +var ___errno_location = Module["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___errno_location"].apply(null, arguments) +}; + +var ___pthread_tsd_run_dtors = Module["___pthread_tsd_run_dtors"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___pthread_tsd_run_dtors"].apply(null, arguments) +}; + +var __emscripten_atomic_fetch_and_add_u64 = Module["__emscripten_atomic_fetch_and_add_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__emscripten_atomic_fetch_and_add_u64"].apply(null, arguments) +}; + +var __emscripten_atomic_fetch_and_and_u64 = Module["__emscripten_atomic_fetch_and_and_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__emscripten_atomic_fetch_and_and_u64"].apply(null, arguments) +}; + +var __emscripten_atomic_fetch_and_or_u64 = Module["__emscripten_atomic_fetch_and_or_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__emscripten_atomic_fetch_and_or_u64"].apply(null, arguments) +}; + +var __emscripten_atomic_fetch_and_sub_u64 = Module["__emscripten_atomic_fetch_and_sub_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__emscripten_atomic_fetch_and_sub_u64"].apply(null, arguments) +}; + +var __emscripten_atomic_fetch_and_xor_u64 = Module["__emscripten_atomic_fetch_and_xor_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__emscripten_atomic_fetch_and_xor_u64"].apply(null, arguments) +}; + +var __register_pthread_ptr = Module["__register_pthread_ptr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["__register_pthread_ptr"].apply(null, arguments) +}; + +var _emscripten_GetProcAddress = Module["_emscripten_GetProcAddress"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_GetProcAddress"].apply(null, arguments) +}; + +var _emscripten_async_queue_call_on_thread = Module["_emscripten_async_queue_call_on_thread"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_async_queue_call_on_thread"].apply(null, arguments) +}; + +var _emscripten_async_queue_on_thread_ = Module["_emscripten_async_queue_on_thread_"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_async_queue_on_thread_"].apply(null, arguments) +}; + +var _emscripten_async_run_in_main_thread = Module["_emscripten_async_run_in_main_thread"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_async_run_in_main_thread"].apply(null, arguments) +}; + +var _emscripten_atomic_add_u64 = Module["_emscripten_atomic_add_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_add_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_and_u64 = Module["_emscripten_atomic_and_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_and_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_cas_u64 = Module["_emscripten_atomic_cas_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_cas_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_exchange_u64 = Module["_emscripten_atomic_exchange_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_exchange_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_load_f32 = Module["_emscripten_atomic_load_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_load_f32"].apply(null, arguments) +}; + +var _emscripten_atomic_load_f64 = Module["_emscripten_atomic_load_f64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_load_f64"].apply(null, arguments) +}; + +var _emscripten_atomic_load_u64 = Module["_emscripten_atomic_load_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_load_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_or_u64 = Module["_emscripten_atomic_or_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_or_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_store_f32 = Module["_emscripten_atomic_store_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_store_f32"].apply(null, arguments) +}; + +var _emscripten_atomic_store_f64 = Module["_emscripten_atomic_store_f64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_store_f64"].apply(null, arguments) +}; + +var _emscripten_atomic_store_u64 = Module["_emscripten_atomic_store_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_store_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_sub_u64 = Module["_emscripten_atomic_sub_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_sub_u64"].apply(null, arguments) +}; + +var _emscripten_atomic_xor_u64 = Module["_emscripten_atomic_xor_u64"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_atomic_xor_u64"].apply(null, arguments) +}; + +var _emscripten_conditional_set_current_thread_status = Module["_emscripten_conditional_set_current_thread_status"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_conditional_set_current_thread_status"].apply(null, arguments) +}; + +var _emscripten_current_thread_process_queued_calls = Module["_emscripten_current_thread_process_queued_calls"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_current_thread_process_queued_calls"].apply(null, arguments) +}; + +var _emscripten_get_global_libc = Module["_emscripten_get_global_libc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_get_global_libc"].apply(null, arguments) +}; + +var _emscripten_is_main_browser_thread = Module["_emscripten_is_main_browser_thread"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_is_main_browser_thread"].apply(null, arguments) +}; + +var _emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_main_browser_thread_id"].apply(null, arguments) +}; + +var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_main_thread_process_queued_calls"].apply(null, arguments) +}; + +var _emscripten_register_main_browser_thread_id = Module["_emscripten_register_main_browser_thread_id"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_register_main_browser_thread_id"].apply(null, arguments) +}; + +var _emscripten_run_in_main_runtime_thread_js = Module["_emscripten_run_in_main_runtime_thread_js"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_run_in_main_runtime_thread_js"].apply(null, arguments) +}; + +var _emscripten_set_current_thread_status = Module["_emscripten_set_current_thread_status"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_set_current_thread_status"].apply(null, arguments) +}; + +var _emscripten_set_thread_name = Module["_emscripten_set_thread_name"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_set_thread_name"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread = Module["_emscripten_sync_run_in_main_thread"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_0 = Module["_emscripten_sync_run_in_main_thread_0"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_0"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_1 = Module["_emscripten_sync_run_in_main_thread_1"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_1"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_2 = Module["_emscripten_sync_run_in_main_thread_2"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_2"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_3 = Module["_emscripten_sync_run_in_main_thread_3"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_3"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_4 = Module["_emscripten_sync_run_in_main_thread_4"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_4"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_5 = Module["_emscripten_sync_run_in_main_thread_5"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_5"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_6 = Module["_emscripten_sync_run_in_main_thread_6"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_6"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_7 = Module["_emscripten_sync_run_in_main_thread_7"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_7"].apply(null, arguments) +}; + +var _emscripten_sync_run_in_main_thread_xprintf_varargs = Module["_emscripten_sync_run_in_main_thread_xprintf_varargs"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_sync_run_in_main_thread_xprintf_varargs"].apply(null, arguments) +}; + +var _fflush = Module["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_fflush"].apply(null, arguments) +}; + +var _free = Module["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_free"].apply(null, arguments) +}; + +var _llvm_round_f32 = Module["_llvm_round_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_llvm_round_f32"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_capture__webaudio = Module["_ma_device_process_pcm_frames_capture__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_capture__webaudio"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_playback__webaudio = Module["_ma_device_process_pcm_frames_playback__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_playback__webaudio"].apply(null, arguments) +}; + +var _main = Module["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_main"].apply(null, arguments) +}; + +var _malloc = Module["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_malloc"].apply(null, arguments) +}; + +var _memalign = Module["_memalign"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memalign"].apply(null, arguments) +}; + +var _memcpy = Module["_memcpy"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memcpy"].apply(null, arguments) +}; + +var _memmove = Module["_memmove"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memmove"].apply(null, arguments) +}; + +var _memset = Module["_memset"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memset"].apply(null, arguments) +}; + +var _proxy_main = Module["_proxy_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_proxy_main"].apply(null, arguments) +}; + +var _pthread_self = Module["_pthread_self"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_pthread_self"].apply(null, arguments) +}; + +var _sbrk = Module["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_sbrk"].apply(null, arguments) +}; + +var _strstr = Module["_strstr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_strstr"].apply(null, arguments) +}; + +var establishStackSpace = Module["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["establishStackSpace"].apply(null, arguments) +}; + +var stackAlloc = Module["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackAlloc"].apply(null, arguments) +}; + +var stackRestore = Module["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackRestore"].apply(null, arguments) +}; + +var stackSave = Module["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackSave"].apply(null, arguments) +}; + +var dynCall_ff = Module["dynCall_ff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ff"].apply(null, arguments) +}; + +var dynCall_fff = Module["dynCall_fff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_fff"].apply(null, arguments) +}; + +var dynCall_i = Module["dynCall_i"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_i"].apply(null, arguments) +}; + +var dynCall_ii = Module["dynCall_ii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ii"].apply(null, arguments) +}; + +var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iidiiii"].apply(null, arguments) +}; + +var dynCall_iii = Module["dynCall_iii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iii"].apply(null, arguments) +}; + +var dynCall_iiii = Module["dynCall_iiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiii"].apply(null, arguments) +}; + +var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiii"].apply(null, arguments) +}; + +var dynCall_iiiiii = Module["dynCall_iiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiiiii = Module["dynCall_iiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiiiii"].apply(null, arguments) +}; + +var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiiiiiiii"].apply(null, arguments) +}; + +var dynCall_jiji = Module["dynCall_jiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_jiji"].apply(null, arguments) +}; + +var dynCall_v = Module["dynCall_v"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_v"].apply(null, arguments) +}; + +var dynCall_vf = Module["dynCall_vf"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vf"].apply(null, arguments) +}; + +var dynCall_vff = Module["dynCall_vff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vff"].apply(null, arguments) +}; + +var dynCall_vfff = Module["dynCall_vfff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vfff"].apply(null, arguments) +}; + +var dynCall_vffff = Module["dynCall_vffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vffff"].apply(null, arguments) +}; + +var dynCall_vfi = Module["dynCall_vfi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vfi"].apply(null, arguments) +}; + +var dynCall_vi = Module["dynCall_vi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vi"].apply(null, arguments) +}; + +var dynCall_vidd = Module["dynCall_vidd"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vidd"].apply(null, arguments) +}; + +var dynCall_vif = Module["dynCall_vif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vif"].apply(null, arguments) +}; + +var dynCall_viff = Module["dynCall_viff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viff"].apply(null, arguments) +}; + +var dynCall_vifff = Module["dynCall_vifff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vifff"].apply(null, arguments) +}; + +var dynCall_viffff = Module["dynCall_viffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viffff"].apply(null, arguments) +}; + +var dynCall_vii = Module["dynCall_vii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vii"].apply(null, arguments) +}; + +var dynCall_viif = Module["dynCall_viif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viif"].apply(null, arguments) +}; + +var dynCall_viifi = Module["dynCall_viifi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viifi"].apply(null, arguments) +}; + +var dynCall_viii = Module["dynCall_viii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viii"].apply(null, arguments) +}; + +var dynCall_viiii = Module["dynCall_viiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiii"].apply(null, arguments) +}; + +var dynCall_viiiii = Module["dynCall_viiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiii"].apply(null, arguments) +}; + +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiiii = Module["dynCall_viiiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiiiii = Module["dynCall_viiiiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiji = Module["dynCall_viiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiji"].apply(null, arguments) +}; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getMemory")) Module["getMemory"] = function() { abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addRunDependency")) Module["addRunDependency"] = function() { abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeRunDependency")) Module["removeRunDependency"] = function() { abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createFolder")) Module["FS_createFolder"] = function() { abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createPath")) Module["FS_createPath"] = function() { abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createDataFile")) Module["FS_createDataFile"] = function() { abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createPreloadedFile")) Module["FS_createPreloadedFile"] = function() { abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createLazyFile")) Module["FS_createLazyFile"] = function() { abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createLink")) Module["FS_createLink"] = function() { abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_createDevice")) Module["FS_createDevice"] = function() { abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS_unlink")) Module["FS_unlink"] = function() { abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") }; +if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["establishStackSpace"] = establishStackSpace; +if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["dynCall_ii"] = dynCall_ii;if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "calledRun")) Object.defineProperty(Module, "calledRun", { get: function() { abort("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you") } }); + +if (memoryInitializer && !ENVIRONMENT_IS_PTHREAD) { + if (!isDataURI(memoryInitializer)) { + memoryInitializer = locateFile(memoryInitializer); + } + if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { + var data = readBinary(memoryInitializer); + HEAPU8.set(data, GLOBAL_BASE); + } else { + addRunDependency('memory initializer'); + var applyMemoryInitializer = function(data) { + if (data.byteLength) data = new Uint8Array(data); + for (var i = 0; i < data.length; i++) { + assert(HEAPU8[GLOBAL_BASE + i] === 0, "area for memory initializer should not have been touched before it's loaded"); + } + HEAPU8.set(data, GLOBAL_BASE); + // Delete the typed array that contains the large blob of the memory initializer request response so that + // we won't keep unnecessary memory lying around. However, keep the XHR object itself alive so that e.g. + // its .status field can still be accessed later. + if (Module['memoryInitializerRequest']) delete Module['memoryInitializerRequest'].response; + removeRunDependency('memory initializer'); + }; + var doBrowserLoad = function() { + readAsync(memoryInitializer, applyMemoryInitializer, function() { + throw 'could not load memory initializer ' + memoryInitializer; + }); + }; + if (Module['memoryInitializerRequest']) { + // a network request has already been created, just use that + var useRequest = function() { + var request = Module['memoryInitializerRequest']; + var response = request.response; + if (request.status !== 200 && request.status !== 0) { + // If you see this warning, the issue may be that you are using locateFile and defining it in JS. That + // means that the HTML file doesn't know about it, and when it tries to create the mem init request early, does it to the wrong place. + // Look in your browser's devtools network console to see what's going on. + console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer); + doBrowserLoad(); + return; + } + applyMemoryInitializer(response); + }; + if (Module['memoryInitializerRequest'].response) { + setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously + } else { + Module['memoryInitializerRequest'].addEventListener('load', useRequest); // wait for it + } + } else { + // fetch it from the network ourselves + doBrowserLoad(); + } + } +} + + +var calledRun; + + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + + args = args || []; + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + + var ret = Module['_main'](argc, argv); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + noExitRuntime = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exception thrown: ' + toLog); + quit_(1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = out; + var printErr = err; + var has = false; + out = err = function(x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = Module['_fflush']; + if (flush) flush(0); + // also flush in the JS FS layer + ['stdout', 'stderr'].forEach(function(name) { + var info = FS.analyzePath('/dev/' + name); + if (!info) return; + var stream = info.object; + var rdev = stream.rdev; + var tty = TTY.ttys[rdev]; + if (tty && tty.output && tty.output.length) { + has = true; + } + }); + } catch(e) {} + out = print; + err = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + err('exit(' + status + ') called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'); + } + } else { + PThread.terminateAllThreads(); + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + if (ENVIRONMENT_IS_PTHREAD) console.error('Pthread aborting at ' + new Error().stack); + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + + +if (!ENVIRONMENT_IS_PTHREAD) // EXIT_RUNTIME=0 only applies to default behavior of the main browser thread + noExitRuntime = true; + +if (!ENVIRONMENT_IS_PTHREAD) run(); + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/examples/web/core/core_loading_thread.wasm b/examples/web/core/core_loading_thread.wasm index be6e9eb..89cc4a2 100644 Binary files a/examples/web/core/core_loading_thread.wasm and b/examples/web/core/core_loading_thread.wasm differ diff --git a/examples/web/core/core_loading_thread.wasm.map b/examples/web/core/core_loading_thread.wasm.map new file mode 100644 index 0000000..215004c --- /dev/null +++ b/examples/web/core/core_loading_thread.wasm.map @@ -0,0 +1 @@ +{"version":3,"sources":["core/core_loading_thread.c"],"names":[],"mappings":"2qcAyDA,GAGA,SAcA,GAGA,yDAUA,cAIA,KAEA,eACA,gBACA,YAEA,aAKA,yBACA,aAEA,SACA,UAHA,GAQA,KAGA,SACA,SACA,WASA,GAEA,mDAEA,cAEA,6DAGA,gEACA,wFAKA,uDACA,wDAMA,8CAEA,YAQA,IAIA,mBAEA,WACA,iBAIA,kBAPA,YAWA,SAEA"} \ No newline at end of file diff --git a/examples/web/core/core_loading_thread.wast b/examples/web/core/core_loading_thread.wast new file mode 100644 index 0000000..e452abf --- /dev/null +++ b/examples/web/core/core_loading_thread.wast @@ -0,0 +1,79336 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iidiiii (func (param i32 f64 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$jiji (func (param i32 i64 i32) (result i64))) + (type $FUNCSIG$vf (func (param f32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vif (func (param i32 f32))) + (type $FUNCSIG$vff (func (param f32 f32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viif (func (param i32 i32 f32))) + (type $FUNCSIG$viff (func (param i32 f32 f32))) + (type $FUNCSIG$vfff (func (param f32 f32 f32))) + (type $FUNCSIG$viifi (func (param i32 i32 f32 i32))) + (type $FUNCSIG$vifff (func (param i32 f32 f32 f32))) + (type $FUNCSIG$vffff (func (param f32 f32 f32 f32))) + (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) + (type $FUNCSIG$viffff (func (param i32 f32 f32 f32 f32))) + (type $FUNCSIG$viiiiii (func (param i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiii (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$viiiiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiiiii (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vfi (func (param f32 i32))) + (type $FUNCSIG$vidd (func (param i32 f64 f64))) + (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) + (type $FUNCSIG$d (func (result f64))) + (type $FUNCSIG$vdddd (func (param f64 f64 f64 f64))) + (type $FUNCSIG$vd (func (param f64))) + (type $FUNCSIG$vdd (func (param f64 f64))) + (type $FUNCSIG$vdi (func (param f64 i32))) + (type $FUNCSIG$viid (func (param i32 i32 f64))) + (type $FUNCSIG$vid (func (param i32 f64))) + (type $FUNCSIG$viddd (func (param i32 f64 f64 f64))) + (type $FUNCSIG$vidddd (func (param i32 f64 f64 f64 f64))) + (type $FUNCSIG$diii (func (param i32 i32 i32) (result f64))) + (import "env" "memory" (memory $memory (shared 256 256))) + (import "env" "table" (table $table 347 347 funcref)) + (elem (global.get $__table_base) $b0 $_stbir__support_zero $_stbir__support_trapezoid $_stbir__support_one $_stbir__support_two $b0 $b0 $b0 $b1 $_stbir__filter_trapezoid $_stbir__filter_triangle $_stbir__filter_cubic $_stbir__filter_catmullrom $_stbir__filter_mitchell $b1 $b1 $b2 $_emscripten_glCreateProgram $_emscripten_glGetError $b2 $b3 $___emscripten_stdout_close $_LoadDataThread $___stdio_close $_emscripten_glCheckFramebufferStatus $_emscripten_glCreateShader $_emscripten_glGetString $_emscripten_glIsBuffer $_emscripten_glIsEnabled $_emscripten_glIsFramebuffer $_emscripten_glIsProgram $_emscripten_glIsRenderbuffer $_emscripten_glIsShader $_emscripten_glIsTexture $_emscripten_glIsQueryEXT $_emscripten_glIsVertexArrayOES $___emscripten_thread_main $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b3 $b4 $_fmt_fp $b5 $_emscripten_glGetAttribLocation $_emscripten_glGetUniformLocation $b5 $b6 $___stdio_write $_sn_write $_EmscriptenFullscreenChangeCallback $_EmscriptenKeyboardCallback $_EmscriptenMouseCallback $_EmscriptenTouchCallback $_EmscriptenGamepadCallback $___stdio_read $b6 $b6 $b6 $b6 $b6 $b6 $b6 $b7 $b8 $b9 $b10 $b11 $b12 $b13 $___emscripten_stdout_seek $___stdio_seek $b13 $b14 $_UpdateDrawFrame $_emscripten_glFinish $_emscripten_glFlush $_emscripten_glReleaseShaderCompiler $b14 $b14 $b14 $b15 $_emscripten_glClearDepthf$legalf32 $_emscripten_glLineWidth$legalf32 $b15 $b16 $_emscripten_glDepthRangef$legalf32 $_emscripten_glPolygonOffset$legalf32 $b16 $b17 $b18 $_emscripten_glBlendColor$legalf32 $_emscripten_glClearColor$legalf32 $b18 $b19 $_emscripten_glSampleCoverage$legalf32 $b20 $_emscripten_glActiveTexture $_emscripten_glBlendEquation $_emscripten_glClear $_emscripten_glClearStencil $_emscripten_glCompileShader $_emscripten_glCullFace $_emscripten_glDeleteProgram $_emscripten_glDeleteShader $_emscripten_glDepthFunc $_emscripten_glDepthMask $_emscripten_glDisable $_emscripten_glDisableVertexAttribArray $_emscripten_glEnable $_emscripten_glEnableVertexAttribArray $_emscripten_glFrontFace $_emscripten_glGenerateMipmap $_emscripten_glLinkProgram $_emscripten_glStencilMask $_emscripten_glUseProgram $_emscripten_glValidateProgram $_emscripten_glEndQueryEXT $_emscripten_glBindVertexArrayOES $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b20 $b21 $_MouseCursorPosCallback $_ScrollCallback $b21 $b22 $_emscripten_glUniform1f$legalf32 $_emscripten_glVertexAttrib1f$legalf32 $b22 $b23 $_emscripten_glUniform2f$legalf32 $_emscripten_glVertexAttrib2f$legalf32 $b23 $b24 $_emscripten_glUniform3f$legalf32 $_emscripten_glVertexAttrib3f$legalf32 $b24 $b25 $_emscripten_glUniform4f$legalf32 $_emscripten_glVertexAttrib4f$legalf32 $b25 $b26 $_ErrorCallback $_CursorEnterCallback $_CursorEnterCallback $_WindowIconifyCallback $_pop_arg_long_double $_emscripten_glVertexAttribDivisorANGLE $_emscripten_glAttachShader $_emscripten_glBindBuffer $_emscripten_glBindFramebuffer $_emscripten_glBindRenderbuffer $_emscripten_glBindTexture $_emscripten_glBlendEquationSeparate $_emscripten_glBlendFunc $_emscripten_glDeleteBuffers $_emscripten_glDeleteFramebuffers $_emscripten_glDeleteRenderbuffers $_emscripten_glDeleteTextures $_emscripten_glDetachShader $_emscripten_glGenBuffers $_emscripten_glGenFramebuffers $_emscripten_glGenRenderbuffers $_emscripten_glGenTextures $_emscripten_glGetBooleanv $_emscripten_glGetFloatv $_emscripten_glGetIntegerv $_emscripten_glHint $_emscripten_glPixelStorei $_emscripten_glStencilMaskSeparate $_emscripten_glUniform1i $_emscripten_glVertexAttrib1fv $_emscripten_glVertexAttrib2fv $_emscripten_glVertexAttrib3fv $_emscripten_glVertexAttrib4fv $_emscripten_glGenQueriesEXT $_emscripten_glDeleteQueriesEXT $_emscripten_glBeginQueryEXT $_emscripten_glQueryCounterEXT $_emscripten_glDeleteVertexArraysOES $_emscripten_glGenVertexArraysOES $_emscripten_glDrawBuffersWEBGL $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b26 $b27 $_emscripten_glTexParameterf$legalf32 $b28 $b29 $_WindowSizeCallback $_WindowDropCallback $_emscripten_glBindAttribLocation $_emscripten_glDrawArrays $_emscripten_glGetBufferParameteriv $_emscripten_glGetProgramiv $_emscripten_glGetRenderbufferParameteriv $_emscripten_glGetShaderiv $_emscripten_glGetTexParameterfv $_emscripten_glGetTexParameteriv $_emscripten_glGetUniformfv $_emscripten_glGetUniformiv $_emscripten_glGetVertexAttribfv $_emscripten_glGetVertexAttribiv $_emscripten_glGetVertexAttribPointerv $_emscripten_glStencilFunc $_emscripten_glStencilOp $_emscripten_glTexParameterfv $_emscripten_glTexParameteri $_emscripten_glTexParameteriv $_emscripten_glUniform1fv $_emscripten_glUniform1iv $_emscripten_glUniform2fv $_emscripten_glUniform2i $_emscripten_glUniform2iv $_emscripten_glUniform3fv $_emscripten_glUniform3iv $_emscripten_glUniform4fv $_emscripten_glUniform4iv $_emscripten_glGetQueryivEXT $_emscripten_glGetQueryObjectivEXT $_emscripten_glGetQueryObjectuivEXT $_emscripten_glGetQueryObjecti64vEXT $_emscripten_glGetQueryObjectui64vEXT $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b29 $b30 $_MouseButtonCallback $_emscripten_glBlendFuncSeparate $_emscripten_glBufferData $_emscripten_glBufferSubData $_emscripten_glColorMask $_emscripten_glDrawElements $_emscripten_glFramebufferRenderbuffer $_emscripten_glGetAttachedShaders $_emscripten_glGetFramebufferAttachmentParameteriv $_emscripten_glGetProgramInfoLog $_emscripten_glGetShaderInfoLog $_emscripten_glGetShaderPrecisionFormat $_emscripten_glGetShaderSource $_emscripten_glRenderbufferStorage $_emscripten_glScissor $_emscripten_glShaderSource $_emscripten_glStencilFuncSeparate $_emscripten_glStencilOpSeparate $_emscripten_glUniform3i $_emscripten_glUniformMatrix2fv $_emscripten_glUniformMatrix3fv $_emscripten_glUniformMatrix4fv $_emscripten_glViewport $_emscripten_glDrawArraysInstancedANGLE $b30 $b30 $b30 $b30 $b30 $b30 $b30 $b31 $_KeyCallback $_emscripten_glFramebufferTexture2D $_emscripten_glShaderBinary $_emscripten_glUniform4i $_emscripten_glDrawElementsInstancedANGLE $b31 $b31 $b32 $_emscripten_glVertexAttribPointer $b33 $_emscripten_glGetActiveAttrib $_emscripten_glGetActiveUniform $_emscripten_glReadPixels $b34 $_emscripten_glCompressedTexImage2D $_emscripten_glCopyTexImage2D $_emscripten_glCopyTexSubImage2D $b35 $_emscripten_glCompressedTexSubImage2D $_emscripten_glTexImage2D $_emscripten_glTexSubImage2D $b36 $b37 $b38) + (import "env" "__table_base" (global $__table_base i32)) + (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32)) + (import "global" "Infinity" (global $inf$asm2wasm$import f64)) + (import "env" "abortStackOverflow" (func $abortStackOverflow (param i32))) + (import "env" "nullFunc_ff" (func $nullFunc_ff (param i32))) + (import "env" "nullFunc_fff" (func $nullFunc_fff (param i32))) + (import "env" "nullFunc_i" (func $nullFunc_i (param i32))) + (import "env" "nullFunc_ii" (func $nullFunc_ii (param i32))) + (import "env" "nullFunc_iidiiii" (func $nullFunc_iidiiii (param i32))) + (import "env" "nullFunc_iii" (func $nullFunc_iii (param i32))) + (import "env" "nullFunc_iiii" (func $nullFunc_iiii (param i32))) + (import "env" "nullFunc_iiiii" (func $nullFunc_iiiii (param i32))) + (import "env" "nullFunc_iiiiii" (func $nullFunc_iiiiii (param i32))) + (import "env" "nullFunc_iiiiiii" (func $nullFunc_iiiiiii (param i32))) + (import "env" "nullFunc_iiiiiiii" (func $nullFunc_iiiiiiii (param i32))) + (import "env" "nullFunc_iiiiiiiii" (func $nullFunc_iiiiiiiii (param i32))) + (import "env" "nullFunc_iiiiiiiiii" (func $nullFunc_iiiiiiiiii (param i32))) + (import "env" "nullFunc_jiji" (func $nullFunc_jiji (param i32))) + (import "env" "nullFunc_v" (func $nullFunc_v (param i32))) + (import "env" "nullFunc_vf" (func $nullFunc_vf (param i32))) + (import "env" "nullFunc_vff" (func $nullFunc_vff (param i32))) + (import "env" "nullFunc_vfff" (func $nullFunc_vfff (param i32))) + (import "env" "nullFunc_vffff" (func $nullFunc_vffff (param i32))) + (import "env" "nullFunc_vfi" (func $nullFunc_vfi (param i32))) + (import "env" "nullFunc_vi" (func $nullFunc_vi (param i32))) + (import "env" "nullFunc_vidd" (func $nullFunc_vidd (param i32))) + (import "env" "nullFunc_vif" (func $nullFunc_vif (param i32))) + (import "env" "nullFunc_viff" (func $nullFunc_viff (param i32))) + (import "env" "nullFunc_vifff" (func $nullFunc_vifff (param i32))) + (import "env" "nullFunc_viffff" (func $nullFunc_viffff (param i32))) + (import "env" "nullFunc_vii" (func $nullFunc_vii (param i32))) + (import "env" "nullFunc_viif" (func $nullFunc_viif (param i32))) + (import "env" "nullFunc_viifi" (func $nullFunc_viifi (param i32))) + (import "env" "nullFunc_viii" (func $nullFunc_viii (param i32))) + (import "env" "nullFunc_viiii" (func $nullFunc_viiii (param i32))) + (import "env" "nullFunc_viiiii" (func $nullFunc_viiiii (param i32))) + (import "env" "nullFunc_viiiiii" (func $nullFunc_viiiiii (param i32))) + (import "env" "nullFunc_viiiiiii" (func $nullFunc_viiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiii" (func $nullFunc_viiiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiiii" (func $nullFunc_viiiiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiiiii" (func $nullFunc_viiiiiiiiii (param i32))) + (import "env" "nullFunc_viiiiiiiiiii" (func $nullFunc_viiiiiiiiiii (param i32))) + (import "env" "nullFunc_viiji" (func $nullFunc_viiji (param i32))) + (import "env" "___assert_fail" (func $___assert_fail (param i32 i32 i32 i32))) + (import "env" "___call_main" (func $___call_main (param i32 i32) (result i32))) + (import "env" "___lock" (func $___lock (param i32))) + (import "env" "___setErrNo" (func $___setErrNo (param i32))) + (import "env" "___syscall140" (func $___syscall140 (param i32 i32) (result i32))) + (import "env" "___syscall145" (func $___syscall145 (param i32 i32) (result i32))) + (import "env" "___syscall221" (func $___syscall221 (param i32 i32) (result i32))) + (import "env" "___syscall5" (func $___syscall5 (param i32 i32) (result i32))) + (import "env" "___syscall54" (func $___syscall54 (param i32 i32) (result i32))) + (import "env" "___syscall6" (func $___syscall6 (param i32 i32) (result i32))) + (import "env" "___unlock" (func $___unlock (param i32))) + (import "env" "___wasi_fd_write" (func $___wasi_fd_write (param i32 i32 i32 i32) (result i32))) + (import "env" "_abort" (func $_abort)) + (import "env" "_clock" (func $_clock (result i32))) + (import "env" "_eglGetProcAddress" (func $_eglGetProcAddress (param i32) (result i32))) + (import "env" "_emscripten_asm_const_i" (func $_emscripten_asm_const_i (param i32) (result i32))) + (import "env" "_emscripten_asm_const_ii" (func $_emscripten_asm_const_ii (param i32 i32) (result i32))) + (import "env" "_emscripten_exit_pointerlock" (func $_emscripten_exit_pointerlock (result i32))) + (import "env" "_emscripten_futex_wait" (func $_emscripten_futex_wait (param i32 i32 f64) (result i32))) + (import "env" "_emscripten_futex_wake" (func $_emscripten_futex_wake (param i32 i32) (result i32))) + (import "env" "_emscripten_get_gamepad_status" (func $_emscripten_get_gamepad_status (param i32 i32) (result i32))) + (import "env" "_emscripten_get_heap_size" (func $_emscripten_get_heap_size (result i32))) + (import "env" "_emscripten_get_now" (func $_emscripten_get_now (result f64))) + (import "env" "_emscripten_get_num_gamepads" (func $_emscripten_get_num_gamepads (result i32))) + (import "env" "_emscripten_get_pointerlock_status" (func $_emscripten_get_pointerlock_status (param i32) (result i32))) + (import "env" "_emscripten_glActiveTexture" (func $_emscripten_glActiveTexture (param i32))) + (import "env" "_emscripten_glAttachShader" (func $_emscripten_glAttachShader (param i32 i32))) + (import "env" "_emscripten_glBeginQueryEXT" (func $_emscripten_glBeginQueryEXT (param i32 i32))) + (import "env" "_emscripten_glBindAttribLocation" (func $_emscripten_glBindAttribLocation (param i32 i32 i32))) + (import "env" "_emscripten_glBindBuffer" (func $_emscripten_glBindBuffer (param i32 i32))) + (import "env" "_emscripten_glBindFramebuffer" (func $_emscripten_glBindFramebuffer (param i32 i32))) + (import "env" "_emscripten_glBindRenderbuffer" (func $_emscripten_glBindRenderbuffer (param i32 i32))) + (import "env" "_emscripten_glBindTexture" (func $_emscripten_glBindTexture (param i32 i32))) + (import "env" "_emscripten_glBindVertexArrayOES" (func $_emscripten_glBindVertexArrayOES (param i32))) + (import "env" "_emscripten_glBlendColor" (func $_emscripten_glBlendColor (param f64 f64 f64 f64))) + (import "env" "_emscripten_glBlendEquation" (func $_emscripten_glBlendEquation (param i32))) + (import "env" "_emscripten_glBlendEquationSeparate" (func $_emscripten_glBlendEquationSeparate (param i32 i32))) + (import "env" "_emscripten_glBlendFunc" (func $_emscripten_glBlendFunc (param i32 i32))) + (import "env" "_emscripten_glBlendFuncSeparate" (func $_emscripten_glBlendFuncSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glBufferData" (func $_emscripten_glBufferData (param i32 i32 i32 i32))) + (import "env" "_emscripten_glBufferSubData" (func $_emscripten_glBufferSubData (param i32 i32 i32 i32))) + (import "env" "_emscripten_glCheckFramebufferStatus" (func $_emscripten_glCheckFramebufferStatus (param i32) (result i32))) + (import "env" "_emscripten_glClear" (func $_emscripten_glClear (param i32))) + (import "env" "_emscripten_glClearColor" (func $_emscripten_glClearColor (param f64 f64 f64 f64))) + (import "env" "_emscripten_glClearDepthf" (func $_emscripten_glClearDepthf (param f64))) + (import "env" "_emscripten_glClearStencil" (func $_emscripten_glClearStencil (param i32))) + (import "env" "_emscripten_glColorMask" (func $_emscripten_glColorMask (param i32 i32 i32 i32))) + (import "env" "_emscripten_glCompileShader" (func $_emscripten_glCompileShader (param i32))) + (import "env" "_emscripten_glCompressedTexImage2D" (func $_emscripten_glCompressedTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCompressedTexSubImage2D" (func $_emscripten_glCompressedTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCopyTexImage2D" (func $_emscripten_glCopyTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCopyTexSubImage2D" (func $_emscripten_glCopyTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glCreateProgram" (func $_emscripten_glCreateProgram (result i32))) + (import "env" "_emscripten_glCreateShader" (func $_emscripten_glCreateShader (param i32) (result i32))) + (import "env" "_emscripten_glCullFace" (func $_emscripten_glCullFace (param i32))) + (import "env" "_emscripten_glDeleteBuffers" (func $_emscripten_glDeleteBuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteFramebuffers" (func $_emscripten_glDeleteFramebuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteProgram" (func $_emscripten_glDeleteProgram (param i32))) + (import "env" "_emscripten_glDeleteQueriesEXT" (func $_emscripten_glDeleteQueriesEXT (param i32 i32))) + (import "env" "_emscripten_glDeleteRenderbuffers" (func $_emscripten_glDeleteRenderbuffers (param i32 i32))) + (import "env" "_emscripten_glDeleteShader" (func $_emscripten_glDeleteShader (param i32))) + (import "env" "_emscripten_glDeleteTextures" (func $_emscripten_glDeleteTextures (param i32 i32))) + (import "env" "_emscripten_glDeleteVertexArraysOES" (func $_emscripten_glDeleteVertexArraysOES (param i32 i32))) + (import "env" "_emscripten_glDepthFunc" (func $_emscripten_glDepthFunc (param i32))) + (import "env" "_emscripten_glDepthMask" (func $_emscripten_glDepthMask (param i32))) + (import "env" "_emscripten_glDepthRangef" (func $_emscripten_glDepthRangef (param f64 f64))) + (import "env" "_emscripten_glDetachShader" (func $_emscripten_glDetachShader (param i32 i32))) + (import "env" "_emscripten_glDisable" (func $_emscripten_glDisable (param i32))) + (import "env" "_emscripten_glDisableVertexAttribArray" (func $_emscripten_glDisableVertexAttribArray (param i32))) + (import "env" "_emscripten_glDrawArrays" (func $_emscripten_glDrawArrays (param i32 i32 i32))) + (import "env" "_emscripten_glDrawArraysInstancedANGLE" (func $_emscripten_glDrawArraysInstancedANGLE (param i32 i32 i32 i32))) + (import "env" "_emscripten_glDrawBuffersWEBGL" (func $_emscripten_glDrawBuffersWEBGL (param i32 i32))) + (import "env" "_emscripten_glDrawElements" (func $_emscripten_glDrawElements (param i32 i32 i32 i32))) + (import "env" "_emscripten_glDrawElementsInstancedANGLE" (func $_emscripten_glDrawElementsInstancedANGLE (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glEnable" (func $_emscripten_glEnable (param i32))) + (import "env" "_emscripten_glEnableVertexAttribArray" (func $_emscripten_glEnableVertexAttribArray (param i32))) + (import "env" "_emscripten_glEndQueryEXT" (func $_emscripten_glEndQueryEXT (param i32))) + (import "env" "_emscripten_glFinish" (func $_emscripten_glFinish)) + (import "env" "_emscripten_glFlush" (func $_emscripten_glFlush)) + (import "env" "_emscripten_glFramebufferRenderbuffer" (func $_emscripten_glFramebufferRenderbuffer (param i32 i32 i32 i32))) + (import "env" "_emscripten_glFramebufferTexture2D" (func $_emscripten_glFramebufferTexture2D (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glFrontFace" (func $_emscripten_glFrontFace (param i32))) + (import "env" "_emscripten_glGenBuffers" (func $_emscripten_glGenBuffers (param i32 i32))) + (import "env" "_emscripten_glGenFramebuffers" (func $_emscripten_glGenFramebuffers (param i32 i32))) + (import "env" "_emscripten_glGenQueriesEXT" (func $_emscripten_glGenQueriesEXT (param i32 i32))) + (import "env" "_emscripten_glGenRenderbuffers" (func $_emscripten_glGenRenderbuffers (param i32 i32))) + (import "env" "_emscripten_glGenTextures" (func $_emscripten_glGenTextures (param i32 i32))) + (import "env" "_emscripten_glGenVertexArraysOES" (func $_emscripten_glGenVertexArraysOES (param i32 i32))) + (import "env" "_emscripten_glGenerateMipmap" (func $_emscripten_glGenerateMipmap (param i32))) + (import "env" "_emscripten_glGetActiveAttrib" (func $_emscripten_glGetActiveAttrib (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glGetActiveUniform" (func $_emscripten_glGetActiveUniform (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glGetAttachedShaders" (func $_emscripten_glGetAttachedShaders (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetAttribLocation" (func $_emscripten_glGetAttribLocation (param i32 i32) (result i32))) + (import "env" "_emscripten_glGetBooleanv" (func $_emscripten_glGetBooleanv (param i32 i32))) + (import "env" "_emscripten_glGetBufferParameteriv" (func $_emscripten_glGetBufferParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetError" (func $_emscripten_glGetError (result i32))) + (import "env" "_emscripten_glGetFloatv" (func $_emscripten_glGetFloatv (param i32 i32))) + (import "env" "_emscripten_glGetFramebufferAttachmentParameteriv" (func $_emscripten_glGetFramebufferAttachmentParameteriv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetIntegerv" (func $_emscripten_glGetIntegerv (param i32 i32))) + (import "env" "_emscripten_glGetProgramInfoLog" (func $_emscripten_glGetProgramInfoLog (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetProgramiv" (func $_emscripten_glGetProgramiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjecti64vEXT" (func $_emscripten_glGetQueryObjecti64vEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectivEXT" (func $_emscripten_glGetQueryObjectivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectui64vEXT" (func $_emscripten_glGetQueryObjectui64vEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryObjectuivEXT" (func $_emscripten_glGetQueryObjectuivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetQueryivEXT" (func $_emscripten_glGetQueryivEXT (param i32 i32 i32))) + (import "env" "_emscripten_glGetRenderbufferParameteriv" (func $_emscripten_glGetRenderbufferParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetShaderInfoLog" (func $_emscripten_glGetShaderInfoLog (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderPrecisionFormat" (func $_emscripten_glGetShaderPrecisionFormat (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderSource" (func $_emscripten_glGetShaderSource (param i32 i32 i32 i32))) + (import "env" "_emscripten_glGetShaderiv" (func $_emscripten_glGetShaderiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetString" (func $_emscripten_glGetString (param i32) (result i32))) + (import "env" "_emscripten_glGetTexParameterfv" (func $_emscripten_glGetTexParameterfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetTexParameteriv" (func $_emscripten_glGetTexParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glGetUniformLocation" (func $_emscripten_glGetUniformLocation (param i32 i32) (result i32))) + (import "env" "_emscripten_glGetUniformfv" (func $_emscripten_glGetUniformfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetUniformiv" (func $_emscripten_glGetUniformiv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribPointerv" (func $_emscripten_glGetVertexAttribPointerv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribfv" (func $_emscripten_glGetVertexAttribfv (param i32 i32 i32))) + (import "env" "_emscripten_glGetVertexAttribiv" (func $_emscripten_glGetVertexAttribiv (param i32 i32 i32))) + (import "env" "_emscripten_glHint" (func $_emscripten_glHint (param i32 i32))) + (import "env" "_emscripten_glIsBuffer" (func $_emscripten_glIsBuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsEnabled" (func $_emscripten_glIsEnabled (param i32) (result i32))) + (import "env" "_emscripten_glIsFramebuffer" (func $_emscripten_glIsFramebuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsProgram" (func $_emscripten_glIsProgram (param i32) (result i32))) + (import "env" "_emscripten_glIsQueryEXT" (func $_emscripten_glIsQueryEXT (param i32) (result i32))) + (import "env" "_emscripten_glIsRenderbuffer" (func $_emscripten_glIsRenderbuffer (param i32) (result i32))) + (import "env" "_emscripten_glIsShader" (func $_emscripten_glIsShader (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $_emscripten_glIsTexture (param i32) (result i32))) + (import "env" "_emscripten_glIsVertexArrayOES" (func $_emscripten_glIsVertexArrayOES (param i32) (result i32))) + (import "env" "_emscripten_glLineWidth" (func $_emscripten_glLineWidth (param f64))) + (import "env" "_emscripten_glLinkProgram" (func $_emscripten_glLinkProgram (param i32))) + (import "env" "_emscripten_glPixelStorei" (func $_emscripten_glPixelStorei (param i32 i32))) + (import "env" "_emscripten_glPolygonOffset" (func $_emscripten_glPolygonOffset (param f64 f64))) + (import "env" "_emscripten_glQueryCounterEXT" (func $_emscripten_glQueryCounterEXT (param i32 i32))) + (import "env" "_emscripten_glReadPixels" (func $_emscripten_glReadPixels (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glReleaseShaderCompiler" (func $_emscripten_glReleaseShaderCompiler)) + (import "env" "_emscripten_glRenderbufferStorage" (func $_emscripten_glRenderbufferStorage (param i32 i32 i32 i32))) + (import "env" "_emscripten_glSampleCoverage" (func $_emscripten_glSampleCoverage (param f64 i32))) + (import "env" "_emscripten_glScissor" (func $_emscripten_glScissor (param i32 i32 i32 i32))) + (import "env" "_emscripten_glShaderBinary" (func $_emscripten_glShaderBinary (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glShaderSource" (func $_emscripten_glShaderSource (param i32 i32 i32 i32))) + (import "env" "_emscripten_glStencilFunc" (func $_emscripten_glStencilFunc (param i32 i32 i32))) + (import "env" "_emscripten_glStencilFuncSeparate" (func $_emscripten_glStencilFuncSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glStencilMask" (func $_emscripten_glStencilMask (param i32))) + (import "env" "_emscripten_glStencilMaskSeparate" (func $_emscripten_glStencilMaskSeparate (param i32 i32))) + (import "env" "_emscripten_glStencilOp" (func $_emscripten_glStencilOp (param i32 i32 i32))) + (import "env" "_emscripten_glStencilOpSeparate" (func $_emscripten_glStencilOpSeparate (param i32 i32 i32 i32))) + (import "env" "_emscripten_glTexImage2D" (func $_emscripten_glTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glTexParameterf" (func $_emscripten_glTexParameterf (param i32 i32 f64))) + (import "env" "_emscripten_glTexParameterfv" (func $_emscripten_glTexParameterfv (param i32 i32 i32))) + (import "env" "_emscripten_glTexParameteri" (func $_emscripten_glTexParameteri (param i32 i32 i32))) + (import "env" "_emscripten_glTexParameteriv" (func $_emscripten_glTexParameteriv (param i32 i32 i32))) + (import "env" "_emscripten_glTexSubImage2D" (func $_emscripten_glTexSubImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform1f" (func $_emscripten_glUniform1f (param i32 f64))) + (import "env" "_emscripten_glUniform1fv" (func $_emscripten_glUniform1fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform1i" (func $_emscripten_glUniform1i (param i32 i32))) + (import "env" "_emscripten_glUniform1iv" (func $_emscripten_glUniform1iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2f" (func $_emscripten_glUniform2f (param i32 f64 f64))) + (import "env" "_emscripten_glUniform2fv" (func $_emscripten_glUniform2fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2i" (func $_emscripten_glUniform2i (param i32 i32 i32))) + (import "env" "_emscripten_glUniform2iv" (func $_emscripten_glUniform2iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform3f" (func $_emscripten_glUniform3f (param i32 f64 f64 f64))) + (import "env" "_emscripten_glUniform3fv" (func $_emscripten_glUniform3fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform3i" (func $_emscripten_glUniform3i (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform3iv" (func $_emscripten_glUniform3iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform4f" (func $_emscripten_glUniform4f (param i32 f64 f64 f64 f64))) + (import "env" "_emscripten_glUniform4fv" (func $_emscripten_glUniform4fv (param i32 i32 i32))) + (import "env" "_emscripten_glUniform4i" (func $_emscripten_glUniform4i (param i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glUniform4iv" (func $_emscripten_glUniform4iv (param i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix2fv" (func $_emscripten_glUniformMatrix2fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix3fv" (func $_emscripten_glUniformMatrix3fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUniformMatrix4fv" (func $_emscripten_glUniformMatrix4fv (param i32 i32 i32 i32))) + (import "env" "_emscripten_glUseProgram" (func $_emscripten_glUseProgram (param i32))) + (import "env" "_emscripten_glValidateProgram" (func $_emscripten_glValidateProgram (param i32))) + (import "env" "_emscripten_glVertexAttrib1f" (func $_emscripten_glVertexAttrib1f (param i32 f64))) + (import "env" "_emscripten_glVertexAttrib1fv" (func $_emscripten_glVertexAttrib1fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib2f" (func $_emscripten_glVertexAttrib2f (param i32 f64 f64))) + (import "env" "_emscripten_glVertexAttrib2fv" (func $_emscripten_glVertexAttrib2fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib3f" (func $_emscripten_glVertexAttrib3f (param i32 f64 f64 f64))) + (import "env" "_emscripten_glVertexAttrib3fv" (func $_emscripten_glVertexAttrib3fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttrib4f" (func $_emscripten_glVertexAttrib4f (param i32 f64 f64 f64 f64))) + (import "env" "_emscripten_glVertexAttrib4fv" (func $_emscripten_glVertexAttrib4fv (param i32 i32))) + (import "env" "_emscripten_glVertexAttribDivisorANGLE" (func $_emscripten_glVertexAttribDivisorANGLE (param i32 i32))) + (import "env" "_emscripten_glVertexAttribPointer" (func $_emscripten_glVertexAttribPointer (param i32 i32 i32 i32 i32 i32))) + (import "env" "_emscripten_glViewport" (func $_emscripten_glViewport (param i32 i32 i32 i32))) + (import "env" "_emscripten_has_threading_support" (func $_emscripten_has_threading_support (result i32))) + (import "env" "_emscripten_memcpy_big" (func $_emscripten_memcpy_big (param i32 i32 i32) (result i32))) + (import "env" "_emscripten_receive_on_main_thread_js" (func $_emscripten_receive_on_main_thread_js (param i32 i32 i32) (result f64))) + (import "env" "_emscripten_request_pointerlock" (func $_emscripten_request_pointerlock (param i32 i32) (result i32))) + (import "env" "_emscripten_resize_heap" (func $_emscripten_resize_heap (param i32) (result i32))) + (import "env" "_emscripten_run_script" (func $_emscripten_run_script (param i32))) + (import "env" "_emscripten_sample_gamepad_data" (func $_emscripten_sample_gamepad_data (result i32))) + (import "env" "_emscripten_set_canvas_element_size" (func $_emscripten_set_canvas_element_size (param i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_click_callback_on_thread" (func $_emscripten_set_click_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_fullscreenchange_callback_on_thread" (func $_emscripten_set_fullscreenchange_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_gamepadconnected_callback_on_thread" (func $_emscripten_set_gamepadconnected_callback_on_thread (param i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_gamepaddisconnected_callback_on_thread" (func $_emscripten_set_gamepaddisconnected_callback_on_thread (param i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_keypress_callback_on_thread" (func $_emscripten_set_keypress_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_main_loop" (func $_emscripten_set_main_loop (param i32 i32 i32))) + (import "env" "_emscripten_set_touchcancel_callback_on_thread" (func $_emscripten_set_touchcancel_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchend_callback_on_thread" (func $_emscripten_set_touchend_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchmove_callback_on_thread" (func $_emscripten_set_touchmove_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_set_touchstart_callback_on_thread" (func $_emscripten_set_touchstart_callback_on_thread (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_emscripten_syscall" (func $_emscripten_syscall (param i32 i32) (result i32))) + (import "env" "_emscripten_webgl_create_context" (func $_emscripten_webgl_create_context (param i32 i32) (result i32))) + (import "env" "_exit" (func $_exit (param i32))) + (import "env" "_glActiveTexture" (func $_glActiveTexture (param i32))) + (import "env" "_glAttachShader" (func $_glAttachShader (param i32 i32))) + (import "env" "_glBindAttribLocation" (func $_glBindAttribLocation (param i32 i32 i32))) + (import "env" "_glBindBuffer" (func $_glBindBuffer (param i32 i32))) + (import "env" "_glBindTexture" (func $_glBindTexture (param i32 i32))) + (import "env" "_glBlendFunc" (func $_glBlendFunc (param i32 i32))) + (import "env" "_glBufferData" (func $_glBufferData (param i32 i32 i32 i32))) + (import "env" "_glBufferSubData" (func $_glBufferSubData (param i32 i32 i32 i32))) + (import "env" "_glClear" (func $_glClear (param i32))) + (import "env" "_glClearColor" (func $_glClearColor (param f64 f64 f64 f64))) + (import "env" "_glClearDepthf" (func $_glClearDepthf (param f64))) + (import "env" "_glCompileShader" (func $_glCompileShader (param i32))) + (import "env" "_glCompressedTexImage2D" (func $_glCompressedTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glCreateProgram" (func $_glCreateProgram (result i32))) + (import "env" "_glCreateShader" (func $_glCreateShader (param i32) (result i32))) + (import "env" "_glCullFace" (func $_glCullFace (param i32))) + (import "env" "_glDeleteBuffers" (func $_glDeleteBuffers (param i32 i32))) + (import "env" "_glDeleteProgram" (func $_glDeleteProgram (param i32))) + (import "env" "_glDeleteShader" (func $_glDeleteShader (param i32))) + (import "env" "_glDeleteTextures" (func $_glDeleteTextures (param i32 i32))) + (import "env" "_glDepthFunc" (func $_glDepthFunc (param i32))) + (import "env" "_glDetachShader" (func $_glDetachShader (param i32 i32))) + (import "env" "_glDisable" (func $_glDisable (param i32))) + (import "env" "_glDisableVertexAttribArray" (func $_glDisableVertexAttribArray (param i32))) + (import "env" "_glDrawArrays" (func $_glDrawArrays (param i32 i32 i32))) + (import "env" "_glDrawElements" (func $_glDrawElements (param i32 i32 i32 i32))) + (import "env" "_glEnable" (func $_glEnable (param i32))) + (import "env" "_glEnableVertexAttribArray" (func $_glEnableVertexAttribArray (param i32))) + (import "env" "_glFrontFace" (func $_glFrontFace (param i32))) + (import "env" "_glGenBuffers" (func $_glGenBuffers (param i32 i32))) + (import "env" "_glGenTextures" (func $_glGenTextures (param i32 i32))) + (import "env" "_glGetAttribLocation" (func $_glGetAttribLocation (param i32 i32) (result i32))) + (import "env" "_glGetFloatv" (func $_glGetFloatv (param i32 i32))) + (import "env" "_glGetProgramInfoLog" (func $_glGetProgramInfoLog (param i32 i32 i32 i32))) + (import "env" "_glGetProgramiv" (func $_glGetProgramiv (param i32 i32 i32))) + (import "env" "_glGetShaderInfoLog" (func $_glGetShaderInfoLog (param i32 i32 i32 i32))) + (import "env" "_glGetShaderiv" (func $_glGetShaderiv (param i32 i32 i32))) + (import "env" "_glGetString" (func $_glGetString (param i32) (result i32))) + (import "env" "_glGetUniformLocation" (func $_glGetUniformLocation (param i32 i32) (result i32))) + (import "env" "_glLinkProgram" (func $_glLinkProgram (param i32))) + (import "env" "_glPixelStorei" (func $_glPixelStorei (param i32 i32))) + (import "env" "_glReadPixels" (func $_glReadPixels (param i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glShaderSource" (func $_glShaderSource (param i32 i32 i32 i32))) + (import "env" "_glTexImage2D" (func $_glTexImage2D (param i32 i32 i32 i32 i32 i32 i32 i32 i32))) + (import "env" "_glTexParameteri" (func $_glTexParameteri (param i32 i32 i32))) + (import "env" "_glUniform1i" (func $_glUniform1i (param i32 i32))) + (import "env" "_glUniform4f" (func $_glUniform4f (param i32 f64 f64 f64 f64))) + (import "env" "_glUniformMatrix4fv" (func $_glUniformMatrix4fv (param i32 i32 i32 i32))) + (import "env" "_glUseProgram" (func $_glUseProgram (param i32))) + (import "env" "_glVertexAttribPointer" (func $_glVertexAttribPointer (param i32 i32 i32 i32 i32 i32))) + (import "env" "_glViewport" (func $_glViewport (param i32 i32 i32 i32))) + (import "env" "_glfwCreateWindow" (func $_glfwCreateWindow (param i32 i32 i32 i32 i32) (result i32))) + (import "env" "_glfwDefaultWindowHints" (func $_glfwDefaultWindowHints)) + (import "env" "_glfwDestroyWindow" (func $_glfwDestroyWindow (param i32))) + (import "env" "_glfwGetCursorPos" (func $_glfwGetCursorPos (param i32 i32 i32))) + (import "env" "_glfwGetTime" (func $_glfwGetTime (result f64))) + (import "env" "_glfwInit" (func $_glfwInit (result i32))) + (import "env" "_glfwMakeContextCurrent" (func $_glfwMakeContextCurrent (param i32))) + (import "env" "_glfwSetCharCallback" (func $_glfwSetCharCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetCursorEnterCallback" (func $_glfwSetCursorEnterCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetCursorPosCallback" (func $_glfwSetCursorPosCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetDropCallback" (func $_glfwSetDropCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetErrorCallback" (func $_glfwSetErrorCallback (param i32) (result i32))) + (import "env" "_glfwSetKeyCallback" (func $_glfwSetKeyCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetMouseButtonCallback" (func $_glfwSetMouseButtonCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetScrollCallback" (func $_glfwSetScrollCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetWindowIconifyCallback" (func $_glfwSetWindowIconifyCallback (param i32 i32) (result i32))) + (import "env" "_glfwSetWindowShouldClose" (func $_glfwSetWindowShouldClose (param i32 i32))) + (import "env" "_glfwSetWindowSizeCallback" (func $_glfwSetWindowSizeCallback (param i32 i32) (result i32))) + (import "env" "_glfwSwapBuffers" (func $_glfwSwapBuffers (param i32))) + (import "env" "_glfwTerminate" (func $_glfwTerminate)) + (import "env" "_glfwWindowHint" (func $_glfwWindowHint (param i32 i32))) + (import "env" "_initPthreadsJS" (func $_initPthreadsJS)) + (import "env" "_llvm_stackrestore" (func $_llvm_stackrestore (param i32))) + (import "env" "_llvm_stacksave" (func $_llvm_stacksave (result i32))) + (import "env" "_pthread_create" (func $_pthread_create (param i32 i32 i32 i32) (result i32))) + (import "env" "_time" (func $_time (param i32) (result i32))) + (import "env" "abortOnCannotGrowMemory" (func $abortOnCannotGrowMemory (param i32) (result i32))) + (import "env" "setTempRet0" (func $setTempRet0 (param i32))) + (global $__pthread_ptr (mut i32) (i32.const 0)) + (global $__pthread_is_main_runtime_thread (mut i32) (i32.const 0)) + (global $__pthread_is_main_browser_thread (mut i32) (i32.const 0)) + (global $STACKTOP (mut i32) (i32.const 30880)) + (global $STACK_MAX (mut i32) (i32.const 5273760)) + (export "___em_js__initPthreadsJS" (func $___em_js__initPthreadsJS)) + (export "___emscripten_pthread_data_constructor" (func $___emscripten_pthread_data_constructor)) + (export "___errno_location" (func $___errno_location)) + (export "___pthread_tsd_run_dtors" (func $___pthread_tsd_run_dtors)) + (export "__emscripten_atomic_fetch_and_add_u64" (func $legalstub$__emscripten_atomic_fetch_and_add_u64)) + (export "__emscripten_atomic_fetch_and_and_u64" (func $legalstub$__emscripten_atomic_fetch_and_and_u64)) + (export "__emscripten_atomic_fetch_and_or_u64" (func $legalstub$__emscripten_atomic_fetch_and_or_u64)) + (export "__emscripten_atomic_fetch_and_sub_u64" (func $legalstub$__emscripten_atomic_fetch_and_sub_u64)) + (export "__emscripten_atomic_fetch_and_xor_u64" (func $legalstub$__emscripten_atomic_fetch_and_xor_u64)) + (export "__register_pthread_ptr" (func $__register_pthread_ptr)) + (export "_emscripten_GetProcAddress" (func $_emscripten_GetProcAddress)) + (export "_emscripten_async_queue_call_on_thread" (func $_emscripten_async_queue_call_on_thread)) + (export "_emscripten_async_queue_on_thread_" (func $_emscripten_async_queue_on_thread_)) + (export "_emscripten_async_run_in_main_thread" (func $_emscripten_async_run_in_main_thread)) + (export "_emscripten_atomic_add_u64" (func $legalstub$__emscripten_atomic_fetch_and_add_u64)) + (export "_emscripten_atomic_and_u64" (func $legalstub$__emscripten_atomic_fetch_and_and_u64)) + (export "_emscripten_atomic_cas_u64" (func $legalstub$_emscripten_atomic_cas_u64)) + (export "_emscripten_atomic_exchange_u64" (func $legalstub$_emscripten_atomic_exchange_u64)) + (export "_emscripten_atomic_load_f32" (func $_emscripten_atomic_load_f32)) + (export "_emscripten_atomic_load_f64" (func $_emscripten_atomic_load_f64)) + (export "_emscripten_atomic_load_u64" (func $legalstub$_emscripten_atomic_load_u64)) + (export "_emscripten_atomic_or_u64" (func $legalstub$__emscripten_atomic_fetch_and_or_u64)) + (export "_emscripten_atomic_store_f32" (func $_emscripten_atomic_store_f32)) + (export "_emscripten_atomic_store_f64" (func $_emscripten_atomic_store_f64)) + (export "_emscripten_atomic_store_u64" (func $legalstub$_emscripten_atomic_store_u64)) + (export "_emscripten_atomic_sub_u64" (func $legalstub$__emscripten_atomic_fetch_and_sub_u64)) + (export "_emscripten_atomic_xor_u64" (func $legalstub$__emscripten_atomic_fetch_and_xor_u64)) + (export "_emscripten_conditional_set_current_thread_status" (func $_CursorEnterCallback)) + (export "_emscripten_current_thread_process_queued_calls" (func $_emscripten_current_thread_process_queued_calls)) + (export "_emscripten_get_global_libc" (func $_emscripten_get_global_libc)) + (export "_emscripten_is_main_browser_thread" (func $_emscripten_is_main_browser_thread)) + (export "_emscripten_main_browser_thread_id" (func $_emscripten_main_browser_thread_id)) + (export "_emscripten_main_thread_process_queued_calls" (func $_emscripten_main_thread_process_queued_calls)) + (export "_emscripten_register_main_browser_thread_id" (func $_emscripten_register_main_browser_thread_id)) + (export "_emscripten_run_in_main_runtime_thread_js" (func $_emscripten_run_in_main_runtime_thread_js)) + (export "_emscripten_set_current_thread_status" (func $_emscripten_set_current_thread_status)) + (export "_emscripten_set_thread_name" (func $_CursorEnterCallback)) + (export "_emscripten_sync_run_in_main_thread" (func $_emscripten_sync_run_in_main_thread)) + (export "_emscripten_sync_run_in_main_thread_0" (func $_emscripten_sync_run_in_main_thread_0)) + (export "_emscripten_sync_run_in_main_thread_1" (func $_emscripten_sync_run_in_main_thread_1)) + (export "_emscripten_sync_run_in_main_thread_2" (func $_emscripten_sync_run_in_main_thread_2)) + (export "_emscripten_sync_run_in_main_thread_3" (func $_emscripten_sync_run_in_main_thread_3)) + (export "_emscripten_sync_run_in_main_thread_4" (func $_emscripten_sync_run_in_main_thread_4)) + (export "_emscripten_sync_run_in_main_thread_5" (func $_emscripten_sync_run_in_main_thread_5)) + (export "_emscripten_sync_run_in_main_thread_6" (func $_emscripten_sync_run_in_main_thread_6)) + (export "_emscripten_sync_run_in_main_thread_7" (func $_emscripten_sync_run_in_main_thread_7)) + (export "_emscripten_sync_run_in_main_thread_xprintf_varargs" (func $_emscripten_sync_run_in_main_thread_xprintf_varargs)) + (export "_fflush" (func $_fflush)) + (export "_free" (func $_free)) + (export "_llvm_round_f32" (func $_llvm_round_f32)) + (export "_ma_device_process_pcm_frames_capture__webaudio" (func $_ma_device_process_pcm_frames_capture__webaudio)) + (export "_ma_device_process_pcm_frames_playback__webaudio" (func $_ma_device_process_pcm_frames_playback__webaudio)) + (export "_main" (func $_main)) + (export "_malloc" (func $_malloc)) + (export "_memalign" (func $_memalign)) + (export "_memcpy" (func $_memcpy)) + (export "_memmove" (func $_memmove)) + (export "_memset" (func $_memset)) + (export "_proxy_main" (func $_proxy_main)) + (export "_pthread_self" (func $_pthread_self)) + (export "_sbrk" (func $_sbrk)) + (export "_strstr" (func $_strstr)) + (export "dynCall_ff" (func $dynCall_ff)) + (export "dynCall_fff" (func $dynCall_fff)) + (export "dynCall_i" (func $dynCall_i)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iidiiii" (func $dynCall_iidiiii)) + (export "dynCall_iii" (func $dynCall_iii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_iiiii" (func $dynCall_iiiii)) + (export "dynCall_iiiiii" (func $dynCall_iiiiii)) + (export "dynCall_iiiiiii" (func $dynCall_iiiiiii)) + (export "dynCall_iiiiiiii" (func $dynCall_iiiiiiii)) + (export "dynCall_iiiiiiiii" (func $dynCall_iiiiiiiii)) + (export "dynCall_iiiiiiiiii" (func $dynCall_iiiiiiiiii)) + (export "dynCall_jiji" (func $legalstub$dynCall_jiji)) + (export "dynCall_v" (func $dynCall_v)) + (export "dynCall_vf" (func $dynCall_vf)) + (export "dynCall_vff" (func $dynCall_vff)) + (export "dynCall_vfff" (func $dynCall_vfff)) + (export "dynCall_vffff" (func $dynCall_vffff)) + (export "dynCall_vfi" (func $dynCall_vfi)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "dynCall_vidd" (func $dynCall_vidd)) + (export "dynCall_vif" (func $dynCall_vif)) + (export "dynCall_viff" (func $dynCall_viff)) + (export "dynCall_vifff" (func $dynCall_vifff)) + (export "dynCall_viffff" (func $dynCall_viffff)) + (export "dynCall_vii" (func $dynCall_vii)) + (export "dynCall_viif" (func $dynCall_viif)) + (export "dynCall_viifi" (func $dynCall_viifi)) + (export "dynCall_viii" (func $dynCall_viii)) + (export "dynCall_viiii" (func $dynCall_viiii)) + (export "dynCall_viiiii" (func $dynCall_viiiii)) + (export "dynCall_viiiiii" (func $dynCall_viiiiii)) + (export "dynCall_viiiiiii" (func $dynCall_viiiiiii)) + (export "dynCall_viiiiiiii" (func $dynCall_viiiiiiii)) + (export "dynCall_viiiiiiiii" (func $dynCall_viiiiiiiii)) + (export "dynCall_viiiiiiiiii" (func $dynCall_viiiiiiiiii)) + (export "dynCall_viiiiiiiiiii" (func $dynCall_viiiiiiiiiii)) + (export "dynCall_viiji" (func $legalstub$dynCall_viiji)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackRestore" (func $stackRestore)) + (export "stackSave" (func $stackSave)) + (func $stackAlloc (; 326 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (local.get $0) + (global.get $STACKTOP) + ) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 15) + ) + (i32.const -16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (local.get $0) + ) + ) + (local.get $1) + ) + (func $stackSave (; 327 ;) (; has Stack IR ;) (result i32) + (global.get $STACKTOP) + ) + (func $stackRestore (; 328 ;) (; has Stack IR ;) (param $0 i32) + (global.set $STACKTOP + (local.get $0) + ) + ) + (func $establishStackSpace (; 329 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (global.set $STACKTOP + (local.get $0) + ) + (global.set $STACK_MAX + (local.get $1) + ) + ) + (func $_main (; 330 ;) (; has Stack IR ;) (result i32) + ;;@ core/core_loading_thread.c:58:0 + (call $_InitWindow) + ;;@ core/core_loading_thread.c:61:0 + (call $_emscripten_set_main_loop + (i32.const 1) + (i32.const 0) + (i32.const 1) + ) + ;;@ core/core_loading_thread.c:75:0 + (call $_CloseWindow) + ;;@ core/core_loading_thread.c:78:0 + (i32.const 0) + ) + (func $_UpdateDrawFrame (; 331 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 40) + ) + ) + (local.set $3 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $1 + (local.get $0) + ) + (block $switch + (block $switch-case1 + (block $switch-case0 + (block $switch-case + ;;@ core/core_loading_thread.c:88:0 + (br_table $switch-case $switch-case0 $switch-case1 $switch + (i32.load + (i32.const 27648) + ) + ) + ) + (if + ;;@ core/core_loading_thread.c:92:0 + (call $_IsKeyPressed) + (block + ;;@ core/core_loading_thread.c:94:0 + (local.set $4 + (call $_pthread_create + (i32.const 27656) + (i32.const 0) + (i32.const 2) + (i32.const 0) + ) + ) + (if + ;;@ core/core_loading_thread.c:95:0 + (local.get $4) + (call $_TraceLog + (i32.const 5) + (i32.const 9003) + (local.get $1) + ) + ;;@ core/core_loading_thread.c:96:0 + (call $_TraceLog + (i32.const 3) + (i32.const 9033) + (local.get $3) + ) + ) + ;;@ core/core_loading_thread.c:98:0 + (i32.store + (i32.const 27648) + (i32.const 1) + ) + ) + ) + (br $switch) + ) + ;;@ core/core_loading_thread.c:103:0 + (local.set $1 + (i32.load + (i32.const 27652) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.store + (i32.const 27652) + (local.get $1) + ) + ;;@ core/core_loading_thread.c:104:0 + (local.set $1 + (i32.load8_s + (i32.const 28824) + ) + ) + (if + (local.get $1) + (block + ;;@ core/core_loading_thread.c:106:0 + (i32.store + (i32.const 27652) + (i32.const 0) + ) + ;;@ core/core_loading_thread.c:107:0 + (i32.store + (i32.const 27648) + (i32.const 2) + ) + ) + ) + (br $switch) + ) + (if + ;;@ core/core_loading_thread.c:112:0 + (call $_IsKeyPressed) + (block + ;;@ core/core_loading_thread.c:115:0 + (i32.store8 + (i32.const 28824) + (i32.const 0) + ) + ;;@ core/core_loading_thread.c:116:0 + (i32.store + (i32.const 27660) + (i32.const 0) + ) + ;;@ core/core_loading_thread.c:117:0 + (i32.store + (i32.const 27648) + (i32.const 0) + ) + ) + ) + ) + ;;@ core/core_loading_thread.c:126:0 + (call $_BeginDrawing) + ;;@ core/core_loading_thread.c:128:0 + (i32.store8 offset=36 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=37 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=38 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=39 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=36 align=1 + (local.get $0) + ) + ) + (call $_ClearBackground + (local.get $2) + ) + (block $switch2 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + ;;@ core/core_loading_thread.c:130:0 + (br_table $switch-case3 $switch-case4 $switch-case5 $switch2 + (i32.load + (i32.const 27648) + ) + ) + ) + ;;@ core/core_loading_thread.c:132:0 + (i32.store8 offset=32 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=33 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=34 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=35 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=32 align=1 + (local.get $0) + ) + ) + (call $_DrawText + (i32.const 9073) + (i32.const 150) + (i32.const 170) + (i32.const 20) + (local.get $2) + ) + (br $switch2) + ) + ;;@ core/core_loading_thread.c:135:0 + (local.set $1 + (i32.load + (i32.const 27660) + ) + ) + (i32.store8 offset=28 + (local.get $0) + (i32.const 102) + ) + (i32.store8 offset=29 + (local.get $0) + (i32.const -65) + ) + (i32.store8 offset=30 + (local.get $0) + (i32.const -1) + ) + (i32.store8 offset=31 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=28 align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 150) + (i32.const 200) + (local.get $1) + (i32.const 60) + (local.get $2) + ) + ;;@ core/core_loading_thread.c:136:0 + (local.set $1 + (i32.load + (i32.const 27652) + ) + ) + (local.set $1 + (i32.div_s + (local.get $1) + (i32.const 15) + ) + ) + (local.set $1 + (i32.and + (local.get $1) + (i32.const 1) + ) + ) + (if + (local.get $1) + (block + (i32.store8 offset=24 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=25 + (local.get $0) + (i32.const 82) + ) + (i32.store8 offset=26 + (local.get $0) + (i32.const -84) + ) + (i32.store8 offset=27 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=24 align=1 + (local.get $0) + ) + ) + (call $_DrawText + (i32.const 9107) + (i32.const 240) + (i32.const 210) + (i32.const 40) + (local.get $2) + ) + ) + ) + (br $switch2) + ) + ;;@ core/core_loading_thread.c:141:0 + (i32.store8 offset=20 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=21 + (local.get $0) + (i32.const -98) + ) + (i32.store8 offset=22 + (local.get $0) + (i32.const 47) + ) + (i32.store8 offset=23 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=20 align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 150) + (i32.const 200) + (i32.const 500) + (i32.const 60) + (local.get $2) + ) + ;;@ core/core_loading_thread.c:142:0 + (i32.store8 offset=16 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=17 + (local.get $0) + (i32.const -28) + ) + (i32.store8 offset=18 + (local.get $0) + (i32.const 48) + ) + (i32.store8 offset=19 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=16 align=1 + (local.get $0) + ) + ) + (call $_DrawText + (i32.const 9123) + (i32.const 250) + (i32.const 210) + (i32.const 40) + (local.get $2) + ) + ) + ;;@ core/core_loading_thread.c:148:0 + (i32.store8 offset=12 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=13 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=14 + (local.get $0) + (i32.const 80) + ) + (i32.store8 offset=15 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=12 align=1 + (local.get $0) + ) + ) + (call $_DrawRectangleLines + (local.get $2) + ) + ;;@ core/core_loading_thread.c:150:0 + (call $_EndDrawing) + (global.set $STACKTOP + (local.get $0) + ) + ) + (func $_LoadDataThread (; 332 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + ;;@ core/core_loading_thread.c:158:0 + (local.set $2 + (call $_clock) + ) + ;;@ core/core_loading_thread.c:162:0 + (local.set $0 + (i32.load + (i32.const 27664) + ) + ) + (if + (i32.lt_s + (local.get $0) + (i32.const 5000) + ) + (loop $while-in + ;;@ core/core_loading_thread.c:164:0 + (local.set $0 + (call $_clock) + ) + (local.set $0 + (i32.sub + (local.get $0) + (local.get $2) + ) + ) + ;;@ core/core_loading_thread.c:165:0 + (local.set $1 + (i32.div_s + (local.get $0) + (i32.const 1000) + ) + ) + (i32.store + (i32.const 27664) + (local.get $1) + ) + ;;@ core/core_loading_thread.c:169:0 + (local.set $1 + (i32.div_s + (local.get $0) + (i32.const 10000) + ) + ) + (i32.store + (i32.const 27660) + (local.get $1) + ) + ;;@ core/core_loading_thread.c:162:0 + (br_if $while-in + (i32.lt_s + (local.get $0) + (i32.const 5000000) + ) + ) + ) + ) + ;;@ core/core_loading_thread.c:173:0 + (i32.store8 + (i32.const 28824) + (i32.const 1) + ) + ;;@ core/core_loading_thread.c:175:0 + (i32.const 0) + ) + (func $_ma_device_process_pcm_frames_capture__webaudio (; 333 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 4112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 4112) + ) + ) + (local.set $3 + (local.get $5) + ) + (block $folding-inner0 + (if + (i32.ne + (i32.load offset=4 + (local.get $0) + ) + (i32.const 3) + ) + (block + (if + (i32.eqz + (local.get $1) + ) + (call $___assert_fail + (i32.const 9136) + (i32.const 9151) + (i32.const 5409) + (i32.const 9526) + ) + ) + (if + (i32.eqz + (local.get $2) + ) + (call $___assert_fail + (i32.const 9290) + (i32.const 9151) + (i32.const 5410) + (i32.const 9526) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (local.tee $6 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + ) + (if + (i32.and + (i32.load8_s + (i32.add + (local.get $0) + (i32.const 94208) + ) + ) + (i32.const 64) + ) + (block + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (i32.const 0) + (local.get $2) + (local.get $1) + (i32.add + (i32.and + (local.get $6) + (i32.const 31) + ) + (i32.const 290) + ) + ) + (br $folding-inner0) + ) + ) + (i32.store + (i32.add + (local.get $0) + (i32.const 94272) + ) + (local.get $1) + ) + (i32.store + (i32.add + (local.get $0) + (i32.const 94276) + ) + (local.get $2) + ) + (if + (local.tee $1 + (i32.wrap_i64 + (call $_ma_pcm_converter_read + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 47744) + ) + ) + (local.get $3) + (local.tee $8 + (i64.extend_i32_u + (local.tee $4 + (i32.div_u + (i32.const 4096) + (i32.mul + (i32.load + (i32.add + (local.get $0) + (i32.const 47628) + ) + ) + (call $_ma_get_bytes_per_sample + (i32.load + (i32.add + (local.get $0) + (i32.const 47624) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (loop $while-in + (block $label$break$L16 + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (i32.const 0) + (local.get $3) + (local.get $1) + (i32.add + (i32.and + (local.get $6) + (i32.const 31) + ) + (i32.const 290) + ) + ) + (br_if $label$break$L16 + (i32.gt_u + (local.get $4) + (local.get $1) + ) + ) + (br_if $while-in + (local.tee $1 + (i32.wrap_i64 + (call $_ma_pcm_converter_read + (local.get $2) + (local.get $3) + (local.get $8) + ) + ) + ) + ) + ) + ) + ) + (br $folding-inner0) + ) + ) + (if + (i32.eqz + (local.get $1) + ) + (call $___assert_fail + (i32.const 9136) + (i32.const 9151) + (i32.const 5446) + (i32.const 9377) + ) + ) + (if + (i32.eqz + (local.get $2) + ) + (call $___assert_fail + (i32.const 9217) + (i32.const 9151) + (i32.const 5447) + (i32.const 9377) + ) + ) + (i32.store + (i32.add + (local.get $0) + (i32.const 94272) + ) + (local.get $1) + ) + (i32.store + (i32.add + (local.get $0) + (i32.const 94276) + ) + (local.get $2) + ) + (i32.store + (local.get $3) + (i32.const 256) + ) + (if + (i32.eqz + (call $_ma_pcm_rb_acquire_write + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 94344) + ) + ) + (local.get $3) + (local.tee $4 + (i32.add + (local.get $5) + (i32.const 4096) + ) + ) + ) + ) + (block $label$break$L30 + (local.set $9 + (i32.add + (local.get $0) + (i32.const 47744) + ) + ) + (block $__rjti$2 + (loop $while-in2 + (block $__rjti$0 + (if + (i32.eqz + (local.tee $7 + (i32.load + (local.get $3) + ) + ) + ) + (br_if $folding-inner0 + (i32.eq + (call $_ma_pcm_rb_pointer_disance + (local.get $2) + ) + (block $__inlined_func$_ma_pcm_rb_get_subbuffer_size (result i32) + (drop + (br_if $__inlined_func$_ma_pcm_rb_get_subbuffer_size + (i32.const 0) + (i32.eqz + (local.tee $1 + (local.get $2) + ) + ) + ) + ) + (i32.div_u + (block $__inlined_func$_ma_rb_get_subbuffer_size (result i32) + (drop + (br_if $__inlined_func$_ma_rb_get_subbuffer_size + (i32.const 0) + (i32.eqz + (local.tee $6 + (local.get $1) + ) + ) + ) + ) + (i32.load offset=4 + (local.get $6) + ) + ) + (i32.mul + (i32.load offset=32 + (local.get $1) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $1) + ) + ) + ) + ) + ) + ) + ) + ) + (br_if $__rjti$0 + (call $_ma_pcm_rb_commit_write + (local.get $2) + (local.tee $1 + (i32.wrap_i64 + (call $_ma_pcm_converter_read + (local.get $9) + (i32.load + (local.get $4) + ) + (i64.extend_i32_u + (local.get $7) + ) + ) + ) + ) + (i32.load + (local.get $4) + ) + ) + ) + (br_if $__rjti$2 + (i32.gt_u + (local.get $7) + (local.get $1) + ) + ) + (i32.store + (local.get $3) + (i32.const 256) + ) + (br_if $while-in2 + (i32.eqz + (call $_ma_pcm_rb_acquire_write + (local.get $2) + (local.get $3) + (local.get $4) + ) + ) + ) + (br $label$break$L30) + ) + ) + (call $_ma_post_error + (local.get $0) + (i32.const 9474) + ) + (br $folding-inner0) + ) + (br $folding-inner0) + ) + ) + (call $_ma_post_error + (local.get $0) + (i32.const 9419) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_ma_device_process_pcm_frames_playback__webaudio (; 334 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 8208) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 8208) + ) + ) + (if + (i32.ne + (i32.load offset=4 + (local.get $0) + ) + (i32.const 3) + ) + (block + (if + (i32.eqz + (local.get $1) + ) + (call $___assert_fail + (i32.const 9136) + (i32.const 9151) + (i32.const 5389) + (i32.const 9255) + ) + ) + (if + (i32.eqz + (local.get $2) + ) + (call $___assert_fail + (i32.const 9290) + (i32.const 9151) + (i32.const 5390) + (i32.const 9255) + ) + ) + (if + (i32.eqz + (local.tee $3 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + ) + (if + (i32.and + (i32.load8_s + (i32.add + (local.get $0) + (i32.const 47232) + ) + ) + (i32.const 64) + ) + (block + (local.set $7 + (i32.load offset=652 + (local.get $0) + ) + ) + (drop + (call $_memset + (local.get $2) + (i32.const 0) + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=648 + (local.get $0) + ) + ) + (i32.mul + (local.get $1) + (local.get $7) + ) + ) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (local.get $2) + (i32.const 0) + (local.get $1) + (i32.add + (i32.and + (local.get $3) + (i32.const 31) + ) + (i32.const 290) + ) + ) + ) + (drop + (call $_ma_pcm_converter_read + (i32.add + (local.get $0) + (i32.const 768) + ) + (local.get $2) + (i64.extend_i32_u + (local.get $1) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + ) + (if + (i32.eqz + (local.get $1) + ) + (call $___assert_fail + (i32.const 9136) + (i32.const 9151) + (i32.const 5497) + (i32.const 9174) + ) + ) + (if + (i32.eqz + (local.get $2) + ) + (call $___assert_fail + (i32.const 9217) + (i32.const 9151) + (i32.const 5498) + (i32.const 9174) + ) + ) + (local.set $8 + (i32.add + (local.get $4) + (i32.const 4096) + ) + ) + (local.set $5 + (i32.add + (local.get $4) + (i32.const 8196) + ) + ) + (local.set $9 + (i32.sub + (local.get $4) + (i32.const -8192) + ) + ) + (local.set $10 + (i32.add + (local.get $0) + (i32.const 94344) + ) + ) + (drop + (call $_memset + (local.tee $7 + (local.get $4) + ) + (i32.const 0) + (i32.const 4096) + ) + ) + (if + (local.tee $11 + (i32.wrap_i64 + (call $_ma_calculate_frame_count_after_src + (i32.load offset=8 + (local.get $0) + ) + (i32.load offset=696 + (local.get $0) + ) + (i64.extend_i32_u + (local.get $1) + ) + ) + ) + ) + (block $label$break$L24 + (local.set $12 + (i32.add + (local.get $0) + (i32.const 47296) + ) + ) + (local.set $13 + (i32.add + (local.get $0) + (i32.const 47300) + ) + ) + (local.set $14 + (i32.add + (local.get $0) + (i32.const 768) + ) + ) + (local.set $15 + (i32.add + (local.get $0) + (i32.const 47624) + ) + ) + (local.set $16 + (i32.add + (local.get $0) + (i32.const 47628) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in + (block $while-out + (br_if $label$break$L24 + (i32.eqz + (call $_ma_device_is_started + (local.get $0) + ) + ) + ) + (i32.store + (local.get $5) + (select + (local.tee $6 + (i32.sub + (local.get $11) + (local.get $1) + ) + ) + (local.tee $3 + (i32.div_u + (i32.const 4096) + (i32.mul + (i32.load offset=652 + (local.get $0) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=648 + (local.get $0) + ) + ) + ) + ) + ) + (i32.gt_u + (local.get $3) + (local.get $6) + ) + ) + ) + (if + (call $_ma_pcm_rb_acquire_read + (local.get $10) + (local.get $5) + (local.get $9) + ) + (block + (local.set $6 + (i32.div_u + (i32.const 4096) + (local.tee $3 + (i32.mul + (i32.load offset=652 + (local.get $0) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=648 + (local.get $0) + ) + ) + ) + ) + ) + ) + (i32.store + (local.get $5) + (local.tee $3 + (i32.div_u + (i32.const 4096) + (select + (local.get $3) + (local.tee $3 + (i32.mul + (i32.load + (local.get $16) + ) + (call $_ma_get_bytes_per_sample + (i32.load + (local.get $15) + ) + ) + ) + ) + (i32.lt_u + (local.get $6) + (i32.div_u + (i32.const 4096) + (local.get $3) + ) + ) + ) + ) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (local.get $8) + (local.get $7) + (local.get $3) + (i32.add + (i32.and + (i32.load offset=16 + (local.get $0) + ) + (i32.const 31) + ) + (i32.const 290) + ) + ) + ) + (block + (if + (local.tee $3 + (i32.load + (local.get $5) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (local.get $8) + (i32.load + (local.get $9) + ) + (local.get $3) + (i32.add + (i32.and + (i32.load offset=16 + (local.get $0) + ) + (i32.const 31) + ) + (i32.const 290) + ) + ) + (br_if $while-out + (i32.eqz + (call $_ma_pcm_rb_pointer_disance + (local.get $10) + ) + ) + ) + ) + (br_if $while-out + (call $_ma_pcm_rb_commit_read + (local.get $10) + (i32.load + (local.get $5) + ) + (i32.load + (local.get $9) + ) + ) + ) + ) + ) + (i32.store + (local.get $12) + (local.tee $3 + (i32.load + (local.get $5) + ) + ) + ) + (i32.store + (local.get $13) + (local.get $8) + ) + (drop + (call $_ma_pcm_converter_read + (local.get $14) + (local.get $2) + (i64.extend_i32_u + (local.get $3) + ) + ) + ) + (local.set $1 + (i32.add + (local.tee $6 + (i32.load + (local.get $5) + ) + ) + (local.get $1) + ) + ) + (local.set $3 + (i32.load offset=692 + (local.get $0) + ) + ) + (local.set $2 + (i32.add + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=688 + (local.get $0) + ) + ) + (i32.mul + (local.get $3) + (local.get $6) + ) + ) + (local.get $2) + ) + ) + (br_if $while-in + (i32.lt_u + (local.get $1) + (local.get $11) + ) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_ma_calculate_frame_count_after_src (; 335 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 f64) + (local.set $2 + (i64.trunc_f64_u + (local.tee $3 + (f64.mul + (f64.div + (f64.convert_i32_u + (local.get $0) + ) + (f64.convert_i32_u + (local.get $1) + ) + ) + (f64.convert_i64_s + (local.get $2) + ) + ) + ) + ) + ) + (i64.add + (i64.extend_i32_u + (f64.gt + (f64.sub + (local.get $3) + (f64.convert_i64_s + (local.get $2) + ) + ) + (f64.const 0) + ) + ) + (local.get $2) + ) + ) + (func $_ma_device_is_started (; 336 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.get $0) + ) + (block + (global.set $STACKTOP + (local.get $1) + ) + (return + (i32.const 0) + ) + ) + ) + (drop + (i32.atomic.rmw.xchg + (local.get $1) + (i32.load offset=12 + (local.get $0) + ) + ) + ) + (drop + (i32.atomic.rmw.add + (i32.const 0) + (i32.const 0) + ) + ) + (local.set $0 + (i32.eq + (i32.load + (local.get $1) + ) + (i32.const 2) + ) + ) + (global.set $STACKTOP + (local.get $1) + ) + (local.get $0) + ) + (func $_ma_get_bytes_per_sample (; 337 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (i32.const 1024) + ) + ) + ) + (func $_ma_pcm_rb_acquire_read (; 338 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.or + (i32.eqz + (local.get $0) + ) + (i32.eqz + (local.get $1) + ) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return + (i32.const -2) + ) + ) + ) + (local.set $4 + (i32.load + (local.get $1) + ) + ) + (local.set $5 + (i32.load offset=32 + (local.get $0) + ) + ) + (i32.store + (local.tee $6 + (local.get $3) + ) + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.mul + (local.get $4) + (local.get $5) + ) + ) + ) + (if + (local.tee $2 + (call $_ma_rb_acquire_read + (local.get $0) + (local.get $3) + (local.get $2) + ) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $2) + ) + ) + ) + (i32.store + (local.get $1) + (i32.div_u + (i32.load + (local.get $6) + ) + (i32.mul + (i32.load offset=32 + (local.get $0) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 0) + ) + (func $_ma_pcm_rb_pointer_disance (; 339 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const -2) + ) + ) + (i32.div_u + (call $_ma_rb_pointer_distance + (local.get $0) + ) + (i32.mul + (i32.load offset=32 + (local.get $0) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + ) + ) + ) + (func $_ma_pcm_rb_commit_read (; 340 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const -2) + ) + ) + (local.set $3 + (i32.load offset=32 + (local.get $0) + ) + ) + (call $_ma_rb_commit_read + (local.get $0) + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.mul + (local.get $1) + (local.get $3) + ) + ) + (local.get $2) + ) + ) + (func $_ma_pcm_converter_read (; 341 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i64) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.or + (i32.eqz + (local.get $0) + ) + (i32.eqz + (local.get $1) + ) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return + (i64.const 0) + ) + ) + ) + (local.set $4 + (local.get $3) + ) + (if + (i32.eqz + (i32.and + (local.tee $5 + (i32.load8_s + (i32.add + (local.get $0) + (i32.const 46464) + ) + ) + ) + (i32.const 64) + ) + ) + (block + (if + (i32.eqz + (i32.and + (local.get $5) + (i32.const 4) + ) + ) + (call $___assert_fail + (i32.const 9313) + (i32.const 9151) + (i32.const 30469) + (i32.const 9355) + ) + ) + (i32.store + (local.get $4) + (local.get $0) + ) + (i32.store offset=4 + (local.get $4) + (i32.load offset=4 + (local.get $0) + ) + ) + (local.set $2 + (call $_ma_format_converter_read + (i32.sub + (local.get $0) + (i32.const -64) + ) + (local.get $2) + (local.get $1) + (local.get $4) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $2) + ) + ) + ) + (if + (i64.lt_u + (local.get $2) + (i64.const 4294967296) + ) + (block + (drop + (i32.load + (local.get $0) + ) + ) + (local.set $2 + (i64.extend_i32_u + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (local.get $1) + (i32.wrap_i64 + (local.get $2) + ) + (i32.load offset=4 + (local.get $0) + ) + (i32.const 74) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $2) + ) + ) + ) + (loop $while-in + (block $__rjti$0 + (drop + (i32.load + (local.get $0) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (local.tee $5 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (local.get $1) + (i32.wrap_i64 + (select + (local.tee $7 + (i64.sub + (local.get $2) + (local.get $6) + ) + ) + (i64.const 4294967295) + (i64.lt_u + (local.get $7) + (i64.const 4294967295) + ) + ) + ) + (i32.load offset=4 + (local.get $0) + ) + (i32.const 74) + ) + ) + ) + ) + (local.set $4 + (i32.mul + (i32.load offset=124 + (local.get $0) + ) + (local.get $5) + ) + ) + (local.set $1 + (i32.add + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=68 + (local.get $0) + ) + ) + (local.get $4) + ) + (local.get $1) + ) + ) + (br_if $while-in + (i64.lt_u + (local.tee $6 + (i64.add + (i64.extend_i32_u + (local.get $5) + ) + (local.get $6) + ) + ) + (local.get $2) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (local.get $6) + ) + (func $_ma_format_converter_read (; 342 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local.set $10 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 98448) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 98448) + ) + ) + (if + (i32.or + (i32.eqz + (local.get $0) + ) + (i32.eqz + (local.get $2) + ) + ) + (block + (global.set $STACKTOP + (local.get $10) + ) + (return + (i64.const 0) + ) + ) + ) + (local.set $11 + (i32.add + (local.get $8) + (i32.const 65536) + ) + ) + (local.set $16 + (i32.add + (local.get $8) + (i32.const 98436) + ) + ) + (local.set $19 + (i32.add + (local.get $8) + (i32.const 32768) + ) + ) + (local.set $13 + (i32.add + (local.get $8) + (i32.const 98304) + ) + ) + (local.set $17 + (i32.add + (local.get $8) + (i32.const 98432) + ) + ) + (local.set $14 + (call $_ma_get_bytes_per_sample + (local.tee $20 + (i32.load + (local.get $0) + ) + ) + ) + ) + (local.set $5 + (call $_ma_get_bytes_per_sample + (local.tee $12 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + (local.set $15 + (i32.mul + (local.tee $18 + (i32.load offset=8 + (local.get $0) + ) + ) + (local.get $5) + ) + ) + (if + (i32.eqz + (i32.load offset=28 + (local.get $0) + ) + ) + (block + (call $_ma_split_buffer + (local.get $19) + (local.get $18) + (local.get $11) + (local.get $16) + ) + (local.set $1 + (if (result i64) + (i64.eq + (local.get $1) + (i64.const 0) + ) + (i64.const 0) + (block $label$break$L6 (result i64) + (local.set $9 + (i64.extend_i32_u + (i32.div_u + (i32.load + (local.get $16) + ) + (local.get $14) + ) + ) + ) + (loop $while-in + (block $while-out + (local.set $6 + (select + (local.get $9) + (local.tee $6 + (i64.sub + (local.get $1) + (local.get $4) + ) + ) + (i64.gt_u + (local.get $6) + (local.get $9) + ) + ) + ) + (if + (i32.eq + (i32.load + (local.get $0) + ) + (i32.load offset=4 + (local.get $0) + ) + ) + (block + (drop + (i32.load offset=32 + (local.get $0) + ) + ) + (drop + (br_if $label$break$L6 + (local.get $4) + (i32.eqz + (local.tee $5 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (i32.wrap_i64 + (local.get $6) + ) + (local.get $11) + (local.get $3) + (i32.const 74) + ) + ) + ) + ) + ) + ) + (block + (call $_ma_split_buffer + (local.get $8) + (i32.load offset=8 + (local.get $0) + ) + (local.get $13) + (local.get $17) + ) + (drop + (i32.load offset=32 + (local.get $0) + ) + ) + (br_if $while-out + (i32.eqz + (local.tee $12 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (i32.wrap_i64 + (local.tee $6 + (select + (local.tee $7 + (i64.extend_i32_u + (i32.div_u + (i32.load + (local.get $17) + ) + (local.get $14) + ) + ) + ) + (local.get $6) + (i64.gt_u + (local.get $6) + (local.get $7) + ) + ) + ) + ) + (local.get $13) + (local.get $3) + (i32.const 74) + ) + ) + ) + ) + (if + (i32.load offset=8 + (local.get $0) + ) + (block + (local.set $7 + (i64.extend_i32_u + (local.get $12) + ) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in1 + (drop + (i32.load offset=44 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (i32.load + (i32.add + (i32.shl + (local.get $5) + (i32.const 2) + ) + (local.get $11) + ) + ) + (i32.load + (i32.add + (i32.shl + (local.get $5) + (i32.const 2) + ) + (local.get $13) + ) + ) + (local.get $7) + (i32.load offset=20 + (local.get $0) + ) + (i32.const 346) + ) + (br_if $while-in1 + (i32.lt_u + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + (local.set $5 + (local.get $12) + ) + ) + ) + (drop + (i32.load offset=48 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (local.get $2) + (local.get $11) + (local.tee $7 + (i64.extend_i32_u + (local.get $5) + ) + ) + (i32.load offset=8 + (local.get $0) + ) + (i32.const 346) + ) + (local.set $4 + (i64.add + (local.get $4) + (local.get $7) + ) + ) + (drop + (br_if $label$break$L6 + (local.get $4) + (i64.gt_u + (local.get $6) + (local.get $7) + ) + ) + ) + (local.set $2 + (i32.add + (i32.mul + (local.get $5) + (local.get $15) + ) + (local.get $2) + ) + ) + (br_if $while-in + (i64.lt_u + (local.get $4) + (local.get $1) + ) + ) + (br $label$break$L6 + (local.get $4) + ) + ) + ) + (local.get $4) + ) + ) + ) + (global.set $STACKTOP + (local.get $10) + ) + (return + (local.get $1) + ) + ) + ) + (if + (i32.ne + (local.get $12) + (local.get $20) + ) + (block + (if + (i64.ne + (local.get $1) + (i64.const 0) + ) + (block $label$break$L27 + (local.set $9 + (i64.extend_i32_u + (i32.div_u + (i32.div_u + (i32.const 32768) + (local.get $14) + ) + (local.get $18) + ) + ) + ) + (loop $while-in4 + (drop + (i32.load offset=28 + (local.get $0) + ) + ) + (br_if $label$break$L27 + (i32.eqz + (local.tee $5 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (i32.wrap_i64 + (local.tee $7 + (select + (local.get $9) + (local.tee $6 + (i64.sub + (local.get $1) + (local.get $4) + ) + ) + (i64.gt_u + (local.get $6) + (local.get $9) + ) + ) + ) + ) + (local.get $11) + (local.get $3) + (i32.const 74) + ) + ) + ) + ) + (drop + (i32.load offset=44 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiji) + (local.get $2) + (local.get $11) + (i64.extend_i32_u + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (local.get $5) + ) + ) + (i32.load offset=20 + (local.get $0) + ) + (i32.const 346) + ) + (local.set $4 + (i64.add + (local.tee $6 + (i64.extend_i32_u + (local.get $5) + ) + ) + (local.get $4) + ) + ) + (br_if $label$break$L27 + (i64.gt_u + (local.get $7) + (local.get $6) + ) + ) + (local.set $2 + (i32.add + (i32.mul + (local.get $5) + (local.get $15) + ) + (local.get $2) + ) + ) + (br_if $while-in4 + (i64.lt_u + (local.get $4) + (local.get $1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $10) + ) + (return + (local.get $4) + ) + ) + ) + (if + (i64.eq + (local.get $1) + (i64.const 0) + ) + (block + (global.set $STACKTOP + (local.get $10) + ) + (return + (i64.const 0) + ) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (loop $while-in6 + (block $while-out5 + (drop + (i32.load offset=28 + (local.get $0) + ) + ) + (local.set $5 + (i32.eqz + (local.tee $8 + (call_indirect (type $FUNCSIG$iiiii) + (local.get $0) + (i32.wrap_i64 + (local.tee $9 + (select + (local.tee $4 + (i64.sub + (local.get $1) + (local.get $6) + ) + ) + (i64.const 4294967295) + (i64.lt_u + (local.get $4) + (i64.const 4294967295) + ) + ) + ) + ) + (local.get $2) + (local.get $3) + (i32.const 74) + ) + ) + ) + ) + (local.set $4 + (i64.add + (local.tee $7 + (i64.extend_i32_u + (local.get $8) + ) + ) + (local.get $6) + ) + ) + (br_if $while-out5 + (i32.or + (local.get $5) + (i64.gt_u + (local.get $9) + (local.get $7) + ) + ) + ) + (local.set $2 + (i32.add + (i32.mul + (local.get $8) + (local.get $15) + ) + (local.get $2) + ) + ) + (br_if $__rjti$0 + (i64.ge_u + (local.get $4) + (local.get $1) + ) + ) + (local.set $6 + (local.get $4) + ) + (br $while-in6) + ) + ) + (br $__rjto$0) + ) + (global.set $STACKTOP + (local.get $10) + ) + (return + (local.get $4) + ) + ) + (global.set $STACKTOP + (local.get $10) + ) + (select + (local.get $6) + (local.get $4) + (local.get $5) + ) + ) + (func $_ma_split_buffer (; 343 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (local.tee $5 + (i32.ne + (local.get $3) + (i32.const 0) + ) + ) + (i32.store + (local.get $3) + (i32.const 0) + ) + ) + (if + (i32.or + (i32.eqz + (local.get $1) + ) + (i32.eqz + (local.get $0) + ) + ) + (return) + ) + (local.set $4 + (if (result i32) + (i32.gt_u + (local.tee $0 + (i32.sub + (local.tee $6 + (i32.and + (i32.add + (local.get $0) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.get $0) + ) + ) + (i32.const 32768) + ) + (i32.const 0) + (i32.and + (i32.div_u + (i32.sub + (i32.const 32768) + (local.get $0) + ) + (local.get $1) + ) + (i32.const -64) + ) + ) + ) + (if + (local.get $2) + (block + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (i32.store + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $2) + ) + (i32.add + (local.get $6) + (i32.mul + (local.get $0) + (local.get $4) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + ) + ) + (if + (i32.eqz + (local.get $5) + ) + (return) + ) + (i32.store + (local.get $3) + (local.get $4) + ) + ) + (func $_ma_rb_commit_read (; 344 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const -2) + ) + ) + (if + (i32.ne + (local.get $2) + (i32.add + (i32.load + (local.get $0) + ) + (i32.and + (i32.atomic.load + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + (i32.const 2147483647) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.add + (local.get $1) + (i32.and + (local.tee $3 + (i32.atomic.load + (local.get $2) + ) + ) + (i32.const 2147483647) + ) + ) + ) + (local.tee $0 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (drop + (i32.atomic.rmw.xchg + (local.get $2) + (select + (i32.xor + (local.tee $2 + (i32.and + (local.get $3) + (i32.const -2147483648) + ) + ) + (i32.const -2147483648) + ) + (i32.or + (local.get $1) + (local.get $2) + ) + (i32.eq + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (drop + (i32.atomic.rmw.add + (i32.const 0) + (i32.const 0) + ) + ) + (i32.const 0) + ) + (func $_ma_rb_pointer_distance (; 345 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const 0) + ) + ) + (local.set $1 + (i32.and + (local.tee $3 + (i32.atomic.load offset=16 + (local.get $0) + ) + ) + (i32.const 2147483647) + ) + ) + (local.set $2 + (i32.and + (local.tee $4 + (i32.atomic.load offset=20 + (local.get $0) + ) + ) + (i32.const 2147483647) + ) + ) + (if (result i32) + (i32.gt_s + (i32.xor + (local.get $3) + (local.get $4) + ) + (i32.const -1) + ) + (i32.sub + (local.get $2) + (local.get $1) + ) + (i32.add + (i32.load offset=4 + (local.get $0) + ) + (i32.sub + (local.get $2) + (local.get $1) + ) + ) + ) + ) + (func $_ma_rb_acquire_read (; 346 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (if + (i32.or + (i32.eqz + (local.get $2) + ) + (i32.or + (i32.eqz + (local.get $0) + ) + (i32.eqz + (local.get $1) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (i32.store + (local.get $1) + (select + (local.tee $3 + (i32.sub + (if (result i32) + (i32.gt_s + (i32.xor + (local.tee $3 + (i32.atomic.load offset=20 + (local.get $0) + ) + ) + (local.tee $4 + (i32.atomic.load offset=16 + (local.get $0) + ) + ) + ) + (i32.const -1) + ) + (i32.and + (local.get $3) + (i32.const 2147483647) + ) + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.and + (local.get $4) + (i32.const 2147483647) + ) + ) + ) + (local.tee $1 + (i32.load + (local.get $1) + ) + ) + (i32.gt_u + (local.get $1) + (local.get $3) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (i32.load + (local.get $0) + ) + (i32.and + (i32.atomic.load offset=16 + (local.get $0) + ) + (i32.const 2147483647) + ) + ) + ) + (i32.const 0) + ) + (func $_ma_pcm_rb_acquire_write (; 347 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.get $0) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return + (i32.const -2) + ) + ) + ) + (local.set $5 + (i32.load + (local.get $1) + ) + ) + (local.set $6 + (i32.load offset=32 + (local.get $0) + ) + ) + (i32.store + (local.get $4) + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.mul + (local.get $5) + (local.get $6) + ) + ) + ) + (if + (local.tee $2 + (call $_ma_rb_acquire_write + (local.get $0) + (local.get $4) + (local.get $2) + ) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $2) + ) + ) + ) + (i32.store + (local.get $1) + (i32.div_u + (i32.load + (local.get $4) + ) + (i32.mul + (i32.load offset=32 + (local.get $0) + ) + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 0) + ) + (func $_ma_post_error (; 348 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (call $_ma_log + (if (result i32) + (local.get $0) + (i32.load + (local.get $0) + ) + (i32.const 0) + ) + (local.get $0) + (local.get $1) + ) + ) + (func $_ma_pcm_rb_commit_write (; 349 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const -2) + ) + ) + (local.set $3 + (i32.load offset=32 + (local.get $0) + ) + ) + (call $_ma_rb_commit_write + (local.get $0) + (i32.mul + (call $_ma_get_bytes_per_sample + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.mul + (local.get $1) + (local.get $3) + ) + ) + (local.get $2) + ) + ) + (func $_ma_rb_commit_write (; 350 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (i32.const -2) + ) + ) + (if + (i32.ne + (local.get $2) + (i32.add + (i32.load + (local.get $0) + ) + (i32.and + (i32.atomic.load + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + (i32.const 2147483647) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.add + (local.get $1) + (i32.and + (local.tee $3 + (i32.atomic.load + (local.get $2) + ) + ) + (i32.const 2147483647) + ) + ) + ) + (local.tee $0 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (drop + (i32.atomic.rmw.xchg + (local.get $2) + (select + (i32.xor + (local.tee $2 + (i32.and + (local.get $3) + (i32.const -2147483648) + ) + ) + (i32.const -2147483648) + ) + (i32.or + (local.get $1) + (local.get $2) + ) + (i32.eq + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (drop + (i32.atomic.rmw.add + (i32.const 0) + (i32.const 0) + ) + ) + (i32.const 0) + ) + (func $_ma_log (; 351 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return) + ) + (if + (i32.eqz + (local.tee $3 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (return) + ) + (call_indirect (type $FUNCSIG$viiii) + (local.get $0) + (local.get $1) + (i32.const 1) + (local.get $2) + (i32.add + (i32.and + (local.get $3) + (i32.const 31) + ) + (i32.const 290) + ) + ) + ) + (func $_ma_rb_acquire_write (; 352 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (if + (i32.or + (i32.eqz + (local.get $2) + ) + (i32.or + (i32.eqz + (local.get $0) + ) + (i32.eqz + (local.get $1) + ) + ) + ) + (return + (i32.const -2) + ) + ) + (i32.store + (local.get $1) + (select + (local.tee $3 + (i32.sub + (if (result i32) + (i32.gt_s + (i32.xor + (local.tee $3 + (i32.atomic.load offset=16 + (local.get $0) + ) + ) + (local.tee $4 + (i32.atomic.load offset=20 + (local.get $0) + ) + ) + ) + (i32.const -1) + ) + (i32.load offset=4 + (local.get $0) + ) + (i32.and + (local.get $3) + (i32.const 2147483647) + ) + ) + (i32.and + (local.get $4) + (i32.const 2147483647) + ) + ) + ) + (local.tee $4 + (i32.load + (local.get $1) + ) + ) + (i32.gt_u + (local.get $4) + (local.get $3) + ) + ) + ) + (i32.store + (local.get $2) + (local.tee $2 + (i32.add + (i32.load + (local.get $0) + ) + (i32.and + (i32.atomic.load offset=20 + (local.get $0) + ) + (i32.const 2147483647) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load8_s offset=24 + (local.get $0) + ) + (i32.const 2) + ) + ) + (return + (i32.const 0) + ) + ) + (drop + (call $_memset + (local.get $2) + (i32.const 0) + (i32.load + (local.get $1) + ) + ) + ) + (i32.const 0) + ) + (func $_Vector2Distance (; 353 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result f32) + (local $2 f32) + (f32.sqrt + (f32.add + (f32.mul + (local.tee $2 + (f32.sub + (f32.load + (local.get $0) + ) + (f32.load + (local.get $1) + ) + ) + ) + (local.get $2) + ) + (f32.mul + (local.tee $2 + (f32.sub + (f32.load offset=4 + (local.get $0) + ) + (f32.load offset=4 + (local.get $1) + ) + ) + ) + (local.get $2) + ) + ) + ) + ) + (func $_Vector2Angle (; 354 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result f32) + (local $2 f32) + (select + (f32.add + (local.tee $2 + (f32.mul + (call $_atan2f + (f32.sub + (f32.load offset=4 + (local.get $1) + ) + (f32.load offset=4 + (local.get $0) + ) + ) + (f32.sub + (f32.load + (local.get $1) + ) + (f32.load + (local.get $0) + ) + ) + ) + (f32.const 57.2957763671875) + ) + ) + (f32.const 360) + ) + (local.get $2) + (f32.lt + (local.get $2) + (f32.const 0) + ) + ) + ) + (func $_Vector3Length (; 355 ;) (; has Stack IR ;) (param $0 i32) (result f32) + (local $1 f32) + (f32.sqrt + (f32.add + (f32.add + (f32.mul + (local.tee $1 + (f32.load + (local.get $0) + ) + ) + (local.get $1) + ) + (f32.mul + (local.tee $1 + (f32.load offset=4 + (local.get $0) + ) + ) + (local.get $1) + ) + ) + (f32.mul + (local.tee $1 + (f32.load offset=8 + (local.get $0) + ) + ) + (local.get $1) + ) + ) + ) + ) + (func $_Vector3Normalize (; 356 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 f32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $2 + (f32.load + (local.get $1) + ) + ) + (local.set $5 + (f32.load offset=4 + (local.get $1) + ) + ) + (local.set $6 + (f32.load offset=8 + (local.get $1) + ) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $1) + ) + ) + (i32.store offset=8 + (local.get $3) + (i32.load offset=8 + (local.get $1) + ) + ) + (f32.store + (local.get $0) + (f32.mul + (local.get $2) + (local.tee $2 + (select + (f32.const 1) + (f32.div + (f32.const 1) + (local.tee $2 + (call $_Vector3Length + (local.get $3) + ) + ) + ) + (f32.eq + (local.get $2) + (f32.const 0) + ) + ) + ) + ) + ) + (f32.store offset=4 + (local.get $0) + (f32.mul + (local.get $5) + (local.get $2) + ) + ) + (f32.store offset=8 + (local.get $0) + (f32.mul + (local.get $6) + (local.get $2) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_Vector3Transform (; 357 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local.set $6 + (f32.add + (f32.load offset=28 + (local.get $2) + ) + (f32.add + (f32.add + (f32.mul + (local.tee $3 + (f32.load + (local.get $1) + ) + ) + (f32.load offset=16 + (local.get $2) + ) + ) + (f32.mul + (local.tee $4 + (f32.load offset=4 + (local.get $1) + ) + ) + (f32.load offset=20 + (local.get $2) + ) + ) + ) + (f32.mul + (local.tee $5 + (f32.load offset=8 + (local.get $1) + ) + ) + (f32.load offset=24 + (local.get $2) + ) + ) + ) + ) + ) + (local.set $7 + (f32.add + (f32.load offset=44 + (local.get $2) + ) + (f32.add + (f32.add + (f32.mul + (local.get $3) + (f32.load offset=32 + (local.get $2) + ) + ) + (f32.mul + (local.get $4) + (f32.load offset=36 + (local.get $2) + ) + ) + ) + (f32.mul + (local.get $5) + (f32.load offset=40 + (local.get $2) + ) + ) + ) + ) + ) + (f32.store + (local.get $0) + (f32.add + (f32.load offset=12 + (local.get $2) + ) + (f32.add + (f32.add + (f32.mul + (local.get $3) + (f32.load + (local.get $2) + ) + ) + (f32.mul + (local.get $4) + (f32.load offset=4 + (local.get $2) + ) + ) + ) + (f32.mul + (local.get $5) + (f32.load offset=8 + (local.get $2) + ) + ) + ) + ) + ) + (f32.store offset=4 + (local.get $0) + (local.get $6) + ) + (f32.store offset=8 + (local.get $0) + (local.get $7) + ) + ) + (func $_MatrixIdentity (; 358 ;) (; has Stack IR ;) (param $0 i32) + (f32.store + (local.get $0) + (f32.const 1) + ) + (i64.store offset=4 align=4 + (local.get $0) + (i64.const 0) + ) + (i64.store offset=12 align=4 + (local.get $0) + (i64.const 0) + ) + (f32.store offset=20 + (local.get $0) + (f32.const 1) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.const 0) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.const 0) + ) + (f32.store offset=40 + (local.get $0) + (f32.const 1) + ) + (i64.store offset=44 align=4 + (local.get $0) + (i64.const 0) + ) + (i64.store offset=52 align=4 + (local.get $0) + (i64.const 0) + ) + (f32.store offset=60 + (local.get $0) + (f32.const 1) + ) + ) + (func $_MatrixTranslate (; 359 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) + (f32.store + (local.get $0) + (f32.const 1) + ) + (f32.store offset=4 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=8 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=12 + (local.get $0) + (local.get $1) + ) + (f32.store offset=16 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=20 + (local.get $0) + (f32.const 1) + ) + (f32.store offset=24 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=28 + (local.get $0) + (local.get $2) + ) + (f32.store offset=32 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=36 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=40 + (local.get $0) + (f32.const 1) + ) + (f32.store offset=44 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=48 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=52 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=56 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=60 + (local.get $0) + (f32.const 1) + ) + ) + (func $_MatrixRotate (; 360 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local.set $1 + (i32.and + (f32.ne + (local.tee $4 + (f32.sqrt + (f32.add + (f32.add + (f32.mul + (local.tee $2 + (f32.load + (local.get $1) + ) + ) + (local.get $2) + ) + (f32.mul + (local.tee $3 + (f32.load offset=4 + (local.get $1) + ) + ) + (local.get $3) + ) + ) + (f32.mul + (local.tee $5 + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $5) + ) + ) + ) + ) + (f32.const 1) + ) + (f32.ne + (local.get $4) + (f32.const 0) + ) + ) + ) + (local.set $2 + (select + (f32.mul + (local.get $2) + (local.tee $4 + (f32.div + (f32.const 1) + (local.get $4) + ) + ) + ) + (local.get $2) + (local.get $1) + ) + ) + (local.set $3 + (select + (f32.mul + (local.get $3) + (local.get $4) + ) + (local.get $3) + (local.get $1) + ) + ) + (local.set $5 + (select + (f32.mul + (local.get $5) + (local.get $4) + ) + (local.get $5) + (local.get $1) + ) + ) + (local.set $6 + (call $_sinf + (f32.const 0) + ) + ) + (local.set $8 + (f32.mul + (local.tee $4 + (f32.sub + (f32.const 1) + (local.tee $7 + (call $_cosf + (f32.const 0) + ) + ) + ) + ) + (f32.mul + (local.get $3) + (local.get $2) + ) + ) + ) + (f32.store + (local.get $0) + (f32.add + (local.get $7) + (f32.mul + (local.get $4) + (f32.mul + (local.get $2) + (local.get $2) + ) + ) + ) + ) + (f32.store offset=4 + (local.get $0) + (f32.sub + (local.get $8) + (local.tee $9 + (f32.mul + (local.get $6) + (local.get $5) + ) + ) + ) + ) + (f32.store offset=8 + (local.get $0) + (f32.add + (local.tee $10 + (f32.mul + (local.get $6) + (local.get $3) + ) + ) + (local.tee $11 + (f32.mul + (local.get $4) + (f32.mul + (local.get $5) + (local.get $2) + ) + ) + ) + ) + ) + (f32.store offset=12 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=16 + (local.get $0) + (f32.add + (local.get $9) + (local.get $8) + ) + ) + (f32.store offset=20 + (local.get $0) + (f32.add + (local.get $7) + (f32.mul + (local.get $4) + (f32.mul + (local.get $3) + (local.get $3) + ) + ) + ) + ) + (f32.store offset=24 + (local.get $0) + (f32.sub + (local.tee $3 + (f32.mul + (local.get $4) + (f32.mul + (local.get $5) + (local.get $3) + ) + ) + ) + (local.tee $2 + (f32.mul + (local.get $6) + (local.get $2) + ) + ) + ) + ) + (f32.store offset=28 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=32 + (local.get $0) + (f32.sub + (local.get $11) + (local.get $10) + ) + ) + (f32.store offset=36 + (local.get $0) + (f32.add + (local.get $2) + (local.get $3) + ) + ) + (f32.store offset=40 + (local.get $0) + (f32.add + (local.get $7) + (f32.mul + (local.get $4) + (f32.mul + (local.get $5) + (local.get $5) + ) + ) + ) + ) + (i64.store offset=44 align=4 + (local.get $0) + (i64.const 0) + ) + (i64.store offset=52 align=4 + (local.get $0) + (i64.const 0) + ) + (f32.store offset=60 + (local.get $0) + (f32.const 1) + ) + ) + (func $_MatrixMultiply (; 361 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local $12 f32) + (local $13 f32) + (local $14 f32) + (local $15 f32) + (local $16 f32) + (local $17 f32) + (local $18 f32) + (local $19 f32) + (local $20 f32) + (local $21 f32) + (local $22 f32) + (local $23 f32) + (local $24 f32) + (local $25 f32) + (local $26 f32) + (local $27 f32) + (local $28 f32) + (local $29 f32) + (local $30 f32) + (local $31 f32) + (local $32 f32) + (local $33 f32) + (local $34 f32) + (local.set $3 + (f32.load offset=16 + (local.get $2) + ) + ) + (local.set $4 + (f32.load offset=20 + (local.get $2) + ) + ) + (local.set $5 + (f32.load offset=24 + (local.get $2) + ) + ) + (local.set $6 + (f32.load offset=28 + (local.get $2) + ) + ) + (local.set $7 + (f32.load offset=32 + (local.get $2) + ) + ) + (local.set $8 + (f32.load offset=36 + (local.get $2) + ) + ) + (local.set $9 + (f32.load offset=40 + (local.get $2) + ) + ) + (local.set $10 + (f32.load offset=44 + (local.get $2) + ) + ) + (local.set $11 + (f32.load offset=48 + (local.get $2) + ) + ) + (local.set $12 + (f32.load offset=52 + (local.get $2) + ) + ) + (local.set $13 + (f32.load offset=56 + (local.get $2) + ) + ) + (local.set $14 + (f32.load offset=60 + (local.get $2) + ) + ) + (local.set $15 + (f32.load offset=4 + (local.get $1) + ) + ) + (local.set $16 + (f32.load offset=20 + (local.get $1) + ) + ) + (local.set $17 + (f32.load offset=36 + (local.get $1) + ) + ) + (local.set $18 + (f32.load offset=52 + (local.get $1) + ) + ) + (local.set $19 + (f32.load offset=8 + (local.get $1) + ) + ) + (local.set $20 + (f32.load offset=24 + (local.get $1) + ) + ) + (local.set $21 + (f32.load offset=40 + (local.get $1) + ) + ) + (local.set $22 + (f32.load offset=56 + (local.get $1) + ) + ) + (local.set $23 + (f32.load offset=12 + (local.get $1) + ) + ) + (local.set $24 + (f32.load offset=28 + (local.get $1) + ) + ) + (local.set $25 + (f32.load offset=44 + (local.get $1) + ) + ) + (local.set $26 + (f32.load offset=60 + (local.get $1) + ) + ) + (f32.store + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.tee $27 + (f32.load + (local.get $1) + ) + ) + (local.tee $28 + (f32.load + (local.get $2) + ) + ) + ) + (f32.mul + (local.tee $29 + (f32.load offset=16 + (local.get $1) + ) + ) + (local.tee $30 + (f32.load offset=4 + (local.get $2) + ) + ) + ) + ) + (f32.mul + (local.tee $31 + (f32.load offset=32 + (local.get $1) + ) + ) + (local.tee $32 + (f32.load offset=8 + (local.get $2) + ) + ) + ) + ) + (f32.mul + (local.tee $33 + (f32.load offset=48 + (local.get $1) + ) + ) + (local.tee $34 + (f32.load offset=12 + (local.get $2) + ) + ) + ) + ) + ) + (f32.store offset=4 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $28) + (local.get $15) + ) + (f32.mul + (local.get $30) + (local.get $16) + ) + ) + (f32.mul + (local.get $32) + (local.get $17) + ) + ) + (f32.mul + (local.get $34) + (local.get $18) + ) + ) + ) + (f32.store offset=8 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $28) + (local.get $19) + ) + (f32.mul + (local.get $30) + (local.get $20) + ) + ) + (f32.mul + (local.get $32) + (local.get $21) + ) + ) + (f32.mul + (local.get $34) + (local.get $22) + ) + ) + ) + (f32.store offset=12 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $28) + (local.get $23) + ) + (f32.mul + (local.get $30) + (local.get $24) + ) + ) + (f32.mul + (local.get $32) + (local.get $25) + ) + ) + (f32.mul + (local.get $34) + (local.get $26) + ) + ) + ) + (f32.store offset=16 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $27) + (local.get $3) + ) + (f32.mul + (local.get $29) + (local.get $4) + ) + ) + (f32.mul + (local.get $31) + (local.get $5) + ) + ) + (f32.mul + (local.get $33) + (local.get $6) + ) + ) + ) + (f32.store offset=20 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $3) + (local.get $15) + ) + (f32.mul + (local.get $4) + (local.get $16) + ) + ) + (f32.mul + (local.get $5) + (local.get $17) + ) + ) + (f32.mul + (local.get $6) + (local.get $18) + ) + ) + ) + (f32.store offset=24 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $3) + (local.get $19) + ) + (f32.mul + (local.get $4) + (local.get $20) + ) + ) + (f32.mul + (local.get $5) + (local.get $21) + ) + ) + (f32.mul + (local.get $6) + (local.get $22) + ) + ) + ) + (f32.store offset=28 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $3) + (local.get $23) + ) + (f32.mul + (local.get $4) + (local.get $24) + ) + ) + (f32.mul + (local.get $5) + (local.get $25) + ) + ) + (f32.mul + (local.get $6) + (local.get $26) + ) + ) + ) + (f32.store offset=32 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $27) + (local.get $7) + ) + (f32.mul + (local.get $29) + (local.get $8) + ) + ) + (f32.mul + (local.get $31) + (local.get $9) + ) + ) + (f32.mul + (local.get $33) + (local.get $10) + ) + ) + ) + (f32.store offset=36 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $7) + (local.get $15) + ) + (f32.mul + (local.get $8) + (local.get $16) + ) + ) + (f32.mul + (local.get $9) + (local.get $17) + ) + ) + (f32.mul + (local.get $10) + (local.get $18) + ) + ) + ) + (f32.store offset=40 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $7) + (local.get $19) + ) + (f32.mul + (local.get $8) + (local.get $20) + ) + ) + (f32.mul + (local.get $9) + (local.get $21) + ) + ) + (f32.mul + (local.get $10) + (local.get $22) + ) + ) + ) + (f32.store offset=44 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $7) + (local.get $23) + ) + (f32.mul + (local.get $8) + (local.get $24) + ) + ) + (f32.mul + (local.get $9) + (local.get $25) + ) + ) + (f32.mul + (local.get $10) + (local.get $26) + ) + ) + ) + (f32.store offset=48 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $27) + (local.get $11) + ) + (f32.mul + (local.get $29) + (local.get $12) + ) + ) + (f32.mul + (local.get $31) + (local.get $13) + ) + ) + (f32.mul + (local.get $33) + (local.get $14) + ) + ) + ) + (f32.store offset=52 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $11) + (local.get $15) + ) + (f32.mul + (local.get $12) + (local.get $16) + ) + ) + (f32.mul + (local.get $13) + (local.get $17) + ) + ) + (f32.mul + (local.get $14) + (local.get $18) + ) + ) + ) + (f32.store offset=56 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $11) + (local.get $19) + ) + (f32.mul + (local.get $12) + (local.get $20) + ) + ) + (f32.mul + (local.get $13) + (local.get $21) + ) + ) + (f32.mul + (local.get $14) + (local.get $22) + ) + ) + ) + (f32.store offset=60 + (local.get $0) + (f32.add + (f32.add + (f32.add + (f32.mul + (local.get $11) + (local.get $23) + ) + (f32.mul + (local.get $12) + (local.get $24) + ) + ) + (f32.mul + (local.get $13) + (local.get $25) + ) + ) + (f32.mul + (local.get $14) + (local.get $26) + ) + ) + ) + ) + (func $_MatrixOrtho (; 362 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) + (local $3 f32) + (f32.store + (local.get $0) + (f32.div + (f32.const 2) + (local.tee $3 + (f32.demote_f64 + (f64.sub + (local.get $1) + (f64.const 0) + ) + ) + ) + ) + ) + (f32.store offset=4 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=8 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=12 + (local.get $0) + (f32.div + (f32.neg + (f32.add + (f32.const 0) + (f32.demote_f64 + (local.get $1) + ) + ) + ) + (local.get $3) + ) + ) + (f32.store offset=16 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=20 + (local.get $0) + (f32.div + (f32.const 2) + (local.tee $3 + (f32.demote_f64 + (f64.sub + (f64.const 0) + (local.get $2) + ) + ) + ) + ) + ) + (f32.store offset=24 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=28 + (local.get $0) + (f32.div + (f32.neg + (f32.add + (f32.demote_f64 + (local.get $2) + ) + (f32.const 0) + ) + ) + (local.get $3) + ) + ) + (f32.store offset=32 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=36 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=40 + (local.get $0) + (f32.const -2) + ) + (f32.store offset=44 + (local.get $0) + (f32.const -1) + ) + (f32.store offset=48 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=52 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=56 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=60 + (local.get $0) + (f32.const 1) + ) + ) + (func $_MatrixToFloatV (; 363 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local.set $2 + (i32.load offset=16 + (local.get $1) + ) + ) + (local.set $3 + (i32.load offset=32 + (local.get $1) + ) + ) + (local.set $4 + (i32.load offset=48 + (local.get $1) + ) + ) + (local.set $5 + (i32.load offset=4 + (local.get $1) + ) + ) + (local.set $6 + (i32.load offset=20 + (local.get $1) + ) + ) + (local.set $7 + (i32.load offset=36 + (local.get $1) + ) + ) + (local.set $8 + (i32.load offset=52 + (local.get $1) + ) + ) + (local.set $9 + (i32.load offset=8 + (local.get $1) + ) + ) + (local.set $10 + (i32.load offset=24 + (local.get $1) + ) + ) + (local.set $11 + (i32.load offset=40 + (local.get $1) + ) + ) + (local.set $12 + (i32.load offset=56 + (local.get $1) + ) + ) + (local.set $13 + (i32.load offset=12 + (local.get $1) + ) + ) + (local.set $14 + (i32.load offset=28 + (local.get $1) + ) + ) + (local.set $15 + (i32.load offset=44 + (local.get $1) + ) + ) + (local.set $16 + (i32.load offset=60 + (local.get $1) + ) + ) + (i32.store + (local.get $0) + (i32.load + (local.get $1) + ) + ) + (i32.store offset=4 + (local.get $0) + (local.get $2) + ) + (i32.store offset=8 + (local.get $0) + (local.get $3) + ) + (i32.store offset=12 + (local.get $0) + (local.get $4) + ) + (i32.store offset=16 + (local.get $0) + (local.get $5) + ) + (i32.store offset=20 + (local.get $0) + (local.get $6) + ) + (i32.store offset=24 + (local.get $0) + (local.get $7) + ) + (i32.store offset=28 + (local.get $0) + (local.get $8) + ) + (i32.store offset=32 + (local.get $0) + (local.get $9) + ) + (i32.store offset=36 + (local.get $0) + (local.get $10) + ) + (i32.store offset=40 + (local.get $0) + (local.get $11) + ) + (i32.store offset=44 + (local.get $0) + (local.get $12) + ) + (i32.store offset=48 + (local.get $0) + (local.get $13) + ) + (i32.store offset=52 + (local.get $0) + (local.get $14) + ) + (i32.store offset=56 + (local.get $0) + (local.get $15) + ) + (i32.store offset=60 + (local.get $0) + (local.get $16) + ) + ) + (func $_rlMatrixMode (; 364 ;) (; has Stack IR ;) (param $0 i32) + (block $__rjto$0 + (i32.store + (i32.const 27800) + (block $__rjti$0 (result i32) + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-case $__rjto$0 + (i32.sub + (local.get $0) + (i32.const 5888) + ) + ) + ) + (br $__rjti$0 + (i32.const 27736) + ) + ) + (i32.const 27672) + ) + ) + ) + (i32.store + (i32.const 8944) + (local.get $0) + ) + ) + (func $_rlPushMatrix (; 365 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.gt_s + (i32.load + (i32.const 27804) + ) + (i32.const 31) + ) + (call $_TraceLog + (i32.const 5) + (i32.const 9559) + (local.get $0) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 8944) + ) + (i32.const 5888) + ) + (block + (i32.store8 + (i32.const 28825) + (i32.const 1) + ) + (i32.store + (i32.const 27800) + (i32.const 27808) + ) + ) + ) + (i64.store align=4 + (local.tee $0 + (i32.add + (i32.shl + (local.tee $3 + (i32.load + (i32.const 27804) + ) + ) + (i32.const 6) + ) + (i32.const 20544) + ) + ) + (i64.load align=4 + (local.tee $1 + (i32.load + (i32.const 27800) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load offset=24 align=4 + (local.get $1) + ) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load offset=32 align=4 + (local.get $1) + ) + ) + (i64.store offset=40 align=4 + (local.get $0) + (i64.load offset=40 align=4 + (local.get $1) + ) + ) + (i64.store offset=48 align=4 + (local.get $0) + (i64.load offset=48 align=4 + (local.get $1) + ) + ) + (i64.store offset=56 align=4 + (local.get $0) + (i64.load offset=56 align=4 + (local.get $1) + ) + ) + (i32.store + (i32.const 27804) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_TraceLog (; 366 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (if + (i32.gt_s + (i32.const 3) + (local.get $0) + ) + (block + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + ) + (i32.store + (local.tee $5 + (i32.add + (local.get $3) + (i32.const 128) + ) + ) + (local.get $2) + ) + (i64.store + (local.get $3) + (i64.const 0) + ) + (i64.store offset=8 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=16 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=24 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=32 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=40 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=48 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=56 + (local.get $3) + (i64.const 0) + ) + (i64.store + (i32.sub + (local.get $3) + (i32.const -64) + ) + (i64.const 0) + ) + (i64.store offset=72 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=80 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=88 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=96 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=104 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=112 + (local.get $3) + (i64.const 0) + ) + (i64.store offset=120 + (local.get $3) + (i64.const 0) + ) + (block $switch + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch + (i32.sub + (local.get $0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $3) + (i64.const 9071268410249812) + ) + (br $switch) + ) + (i64.store + (local.get $3) + (i64.const 9071277302236484) + ) + (br $switch) + ) + (i32.store align=1 + (local.get $3) + (i32.load align=1 + (i32.const 9581) + ) + ) + (i32.store16 offset=4 align=1 + (local.get $3) + (i32.load16_s align=1 + (i32.const 9585) + ) + ) + (i32.store8 offset=6 + (local.get $3) + (i32.load8_s + (i32.const 9587) + ) + ) + (br $switch) + ) + (i64.store align=1 + (local.get $3) + (i64.load align=1 + (i32.const 9588) + ) + ) + (i32.store16 offset=8 align=1 + (local.get $3) + (i32.load16_s align=1 + (i32.const 9596) + ) + ) + (br $switch) + ) + (i64.store + (local.get $3) + (i64.const 9071324447265349) + ) + (br $switch) + ) + (i64.store + (local.get $3) + (i64.const 9071298442707270) + ) + ) + (call $_strcpy + (i32.add + (call $_strlen + (local.get $3) + ) + (local.get $3) + ) + (local.get $1) + ) + (i32.store16 align=1 + (i32.add + (call $_strlen + (local.get $3) + ) + (local.get $3) + ) + (i32.const 10) + ) + (drop + (call $_vfprintf + (i32.load + (i32.const 8956) + ) + (local.get $3) + (local.get $5) + ) + ) + (if + (i32.le_s + (i32.const 5) + (local.get $0) + ) + (call $_exit + (i32.const 1) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_rlPopMatrix (; 367 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.gt_s + (local.tee $0 + (i32.load + (i32.const 27804) + ) + ) + (i32.const 0) + ) + (block + (drop + (call $_memmove + (i32.load + (i32.const 27800) + ) + (i32.add + (i32.shl + (local.tee $0 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (i32.const 6) + ) + (i32.const 20544) + ) + (i32.const 64) + ) + ) + (i32.store + (i32.const 27804) + (local.get $0) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.eqz + (i32.load + (i32.const 27804) + ) + ) + (i32.eq + (i32.load + (i32.const 8944) + ) + (i32.const 5888) + ) + ) + ) + (return) + ) + (i32.store + (i32.const 27800) + (i32.const 27672) + ) + (i32.store8 + (i32.const 28825) + (i32.const 0) + ) + ) + (func $_rlLoadIdentity (; 368 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.sub + (global.get $STACKTOP) + (i32.const -64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $1 + (i32.load + (i32.const 27800) + ) + ) + (call $_MatrixIdentity + (local.get $0) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_rlTranslatef (; 369 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $4 + (i32.add + (local.get $3) + (i32.const 192) + ) + ) + (local.set $5 + (i32.add + (local.get $3) + (i32.const 128) + ) + ) + (call $_MatrixTranslate + (local.tee $6 + (i32.sub + (local.get $3) + (i32.const -64) + ) + ) + (local.get $0) + (local.get $1) + ) + (local.set $2 + (i32.load + (i32.const 27800) + ) + ) + (i64.store align=4 + (local.get $5) + (i64.load align=4 + (local.get $6) + ) + ) + (i64.store offset=8 align=4 + (local.get $5) + (i64.load offset=8 align=4 + (local.get $6) + ) + ) + (i64.store offset=16 align=4 + (local.get $5) + (i64.load offset=16 align=4 + (local.get $6) + ) + ) + (i64.store offset=24 align=4 + (local.get $5) + (i64.load offset=24 align=4 + (local.get $6) + ) + ) + (i64.store offset=32 align=4 + (local.get $5) + (i64.load offset=32 align=4 + (local.get $6) + ) + ) + (i64.store offset=40 align=4 + (local.get $5) + (i64.load offset=40 align=4 + (local.get $6) + ) + ) + (i64.store offset=48 align=4 + (local.get $5) + (i64.load offset=48 align=4 + (local.get $6) + ) + ) + (i64.store offset=56 align=4 + (local.get $5) + (i64.load offset=56 align=4 + (local.get $6) + ) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (call $_MatrixMultiply + (local.get $3) + (local.get $5) + (local.get $4) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i64.store offset=16 align=4 + (local.get $2) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i64.store offset=24 align=4 + (local.get $2) + (i64.load offset=24 align=4 + (local.get $3) + ) + ) + (i64.store offset=32 align=4 + (local.get $2) + (i64.load offset=32 align=4 + (local.get $3) + ) + ) + (i64.store offset=40 align=4 + (local.get $2) + (i64.load offset=40 align=4 + (local.get $3) + ) + ) + (i64.store offset=48 align=4 + (local.get $2) + (i64.load offset=48 align=4 + (local.get $3) + ) + ) + (i64.store offset=56 align=4 + (local.get $2) + (i64.load offset=56 align=4 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_rlRotatef (; 370 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 288) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 288) + ) + ) + (local.set $1 + (i32.add + (local.get $0) + (i32.const 224) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 160) + ) + ) + (local.set $5 + (i32.add + (local.get $0) + (i32.const 144) + ) + ) + (local.set $3 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (call $_MatrixIdentity + (local.tee $4 + (i32.add + (local.get $0) + (i32.const 80) + ) + ) + ) + (f32.store + (local.get $0) + (f32.const 0) + ) + (f32.store offset=4 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=8 + (local.get $0) + (f32.const 1) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $0) + ) + ) + (i32.store offset=8 + (local.get $1) + (i32.load offset=8 + (local.get $0) + ) + ) + (call $_Vector3Normalize + (local.get $5) + (local.get $1) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $5) + ) + ) + (i32.store offset=8 + (local.get $1) + (i32.load offset=8 + (local.get $5) + ) + ) + (call $_MatrixRotate + (local.get $4) + (local.get $1) + ) + (local.set $0 + (i32.load + (i32.const 27800) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $4) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $4) + ) + ) + (i64.store offset=16 align=4 + (local.get $2) + (i64.load offset=16 align=4 + (local.get $4) + ) + ) + (i64.store offset=24 align=4 + (local.get $2) + (i64.load offset=24 align=4 + (local.get $4) + ) + ) + (i64.store offset=32 align=4 + (local.get $2) + (i64.load offset=32 align=4 + (local.get $4) + ) + ) + (i64.store offset=40 align=4 + (local.get $2) + (i64.load offset=40 align=4 + (local.get $4) + ) + ) + (i64.store offset=48 align=4 + (local.get $2) + (i64.load offset=48 align=4 + (local.get $4) + ) + ) + (i64.store offset=56 align=4 + (local.get $2) + (i64.load offset=56 align=4 + (local.get $4) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + (call $_MatrixMultiply + (local.get $3) + (local.get $2) + (local.get $1) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load offset=24 align=4 + (local.get $3) + ) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load offset=32 align=4 + (local.get $3) + ) + ) + (i64.store offset=40 align=4 + (local.get $0) + (i64.load offset=40 align=4 + (local.get $3) + ) + ) + (i64.store offset=48 align=4 + (local.get $0) + (i64.load offset=48 align=4 + (local.get $3) + ) + ) + (i64.store offset=56 align=4 + (local.get $0) + (i64.load offset=56 align=4 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + (func $_rlMultMatrixf (; 371 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (i32.store + (local.tee $1 + (i32.sub + (local.get $3) + (i32.const -64) + ) + ) + (i32.load + (local.get $0) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.load offset=16 + (local.get $0) + ) + ) + (i32.store offset=8 + (local.get $1) + (i32.load offset=32 + (local.get $0) + ) + ) + (i32.store offset=12 + (local.get $1) + (i32.load offset=48 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $1) + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=20 + (local.get $1) + (i32.load offset=20 + (local.get $0) + ) + ) + (i32.store offset=24 + (local.get $1) + (i32.load offset=36 + (local.get $0) + ) + ) + (i32.store offset=28 + (local.get $1) + (i32.load offset=52 + (local.get $0) + ) + ) + (i32.store offset=32 + (local.get $1) + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.store offset=36 + (local.get $1) + (i32.load offset=24 + (local.get $0) + ) + ) + (i32.store offset=40 + (local.get $1) + (i32.load offset=40 + (local.get $0) + ) + ) + (i32.store offset=44 + (local.get $1) + (i32.load offset=56 + (local.get $0) + ) + ) + (i32.store offset=48 + (local.get $1) + (i32.load offset=12 + (local.get $0) + ) + ) + (i32.store offset=52 + (local.get $1) + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.store offset=56 + (local.get $1) + (i32.load offset=44 + (local.get $0) + ) + ) + (i32.store offset=60 + (local.get $1) + (i32.load offset=60 + (local.get $0) + ) + ) + (i64.store align=4 + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 128) + ) + ) + (i64.load align=4 + (local.tee $2 + (i32.load + (i32.const 27800) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (local.tee $0 + (i32.add + (local.get $3) + (i32.const 192) + ) + ) + (i64.load align=4 + (local.get $1) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load offset=24 align=4 + (local.get $1) + ) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load offset=32 align=4 + (local.get $1) + ) + ) + (i64.store offset=40 align=4 + (local.get $0) + (i64.load offset=40 align=4 + (local.get $1) + ) + ) + (i64.store offset=48 align=4 + (local.get $0) + (i64.load offset=48 align=4 + (local.get $1) + ) + ) + (i64.store offset=56 align=4 + (local.get $0) + (i64.load offset=56 align=4 + (local.get $1) + ) + ) + (call $_MatrixMultiply + (local.get $3) + (local.get $4) + (local.get $0) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i64.store offset=16 align=4 + (local.get $2) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i64.store offset=24 align=4 + (local.get $2) + (i64.load offset=24 align=4 + (local.get $3) + ) + ) + (i64.store offset=32 align=4 + (local.get $2) + (i64.load offset=32 align=4 + (local.get $3) + ) + ) + (i64.store offset=40 align=4 + (local.get $2) + (i64.load offset=40 align=4 + (local.get $3) + ) + ) + (i64.store offset=48 align=4 + (local.get $2) + (i64.load offset=48 align=4 + (local.get $3) + ) + ) + (i64.store offset=56 align=4 + (local.get $2) + (i64.load offset=56 align=4 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_rlOrtho (; 372 ;) (; has Stack IR ;) (param $0 f64) (param $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $4 + (i32.add + (local.get $3) + (i32.const 192) + ) + ) + (local.set $5 + (i32.add + (local.get $3) + (i32.const 128) + ) + ) + (call $_MatrixOrtho + (local.tee $6 + (i32.sub + (local.get $3) + (i32.const -64) + ) + ) + (local.get $0) + (local.get $1) + ) + (i64.store align=4 + (local.get $5) + (i64.load align=4 + (local.tee $2 + (i32.load + (i32.const 27800) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $5) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $5) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $5) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $5) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $5) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $5) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $5) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (local.get $6) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $6) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $6) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $6) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $6) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $6) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $6) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $6) + ) + ) + (call $_MatrixMultiply + (local.get $3) + (local.get $5) + (local.get $4) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i64.store offset=16 align=4 + (local.get $2) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i64.store offset=24 align=4 + (local.get $2) + (i64.load offset=24 align=4 + (local.get $3) + ) + ) + (i64.store offset=32 align=4 + (local.get $2) + (i64.load offset=32 align=4 + (local.get $3) + ) + ) + (i64.store offset=40 align=4 + (local.get $2) + (i64.load offset=40 align=4 + (local.get $3) + ) + ) + (i64.store offset=48 align=4 + (local.get $2) + (i64.load offset=48 align=4 + (local.get $3) + ) + ) + (i64.store offset=56 align=4 + (local.get $2) + (i64.load offset=56 align=4 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_rlViewport (; 373 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (call $_glViewport + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + ) + ) + (func $_rlBegin (; 374 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eq + (local.tee $4 + (i32.load + (i32.add + (local.tee $1 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.tee $2 + (i32.add + (local.tee $3 + (i32.load + (i32.const 27876) + ) + ) + (i32.const -1) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (i32.const 7) + ) + (return) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.le_s + (local.tee $0 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $1) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.store offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $1) + ) + (local.tee $0 + (block $switch (result i32) + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (local.get $4) + (i32.const 1) + ) + ) + ) + (br $switch + (select + (local.get $0) + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.lt_s + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + (br $switch + (select + (i32.const 1) + (i32.sub + (i32.const 4) + (i32.and + (local.get $0) + (i32.const 3) + ) + ) + (i32.lt_s + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + (i32.const 0) + ) + ) + ) + (if + (call $_rlCheckBufferLimit + (local.get $0) + ) + (block + (call $_rlglDraw) + (br $__rjti$0) + ) + (block + (i32.store + (i32.const 22592) + (i32.add + (i32.load + (i32.const 22592) + ) + (local.get $0) + ) + ) + (i32.store + (i32.const 22600) + (i32.add + (i32.load + (i32.const 22600) + ) + (local.get $0) + ) + ) + (i32.store + (i32.const 22596) + (i32.add + (i32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $1) + ) + ) + (i32.load + (i32.const 22596) + ) + ) + ) + (i32.store + (i32.const 27876) + (local.tee $0 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + ) + ) + ) + (br $__rjto$0) + ) + (local.set $0 + (i32.load + (i32.const 27876) + ) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 255) + ) + (call $_rlglDraw) + ) + (i32.store + (i32.add + (local.tee $0 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.tee $1 + (i32.add + (i32.load + (i32.const 27876) + ) + (i32.const -1) + ) + ) + (i32.const 4) + ) + ) + (i32.const 7) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $0) + ) + (i32.const 0) + ) + (i32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $0) + ) + (i32.load + (i32.const 27880) + ) + ) + ) + (func $_rlCheckBufferLimit (; 375 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.gt_s + (i32.add + (local.get $0) + (i32.load + (i32.const 22592) + ) + ) + (i32.const 8191) + ) + ) + (func $_rlglDraw (; 376 ;) (; has Stack IR ;) + (if + (i32.le_s + (i32.load + (i32.const 22592) + ) + (i32.const 0) + ) + (return) + ) + (call $_UpdateBuffersDefault) + (call $_DrawBuffersDefault) + ) + (func $_UpdateBuffersDefault (; 377 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.le_s + (i32.load + (i32.const 22592) + ) + (i32.const 0) + ) + (return) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $0 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.load + (i32.const 22620) + ) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22624) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (i32.mul + (i32.load + (i32.const 22592) + ) + (i32.const 12) + ) + (i32.load + (i32.const 22604) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22628) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (i32.shl + (i32.load + (i32.const 22592) + ) + (i32.const 3) + ) + (i32.load + (i32.const 22608) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22632) + ) + ) + (call $_glBufferSubData + (i32.const 34962) + (i32.const 0) + (i32.shl + (i32.load + (i32.const 22592) + ) + (i32.const 2) + ) + (i32.load + (i32.const 22612) + ) + ) + (if + (i32.eqz + (i32.load8_s + (i32.const 28826) + ) + ) + (return) + ) + (local.set $0 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + (func $_DrawBuffersDefault (; 378 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local.set $10 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 384) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 384) + ) + ) + (local.set $1 + (i32.add + (local.get $0) + (i32.const 320) + ) + ) + (local.set $4 + (i32.add + (local.get $0) + (i32.const 256) + ) + ) + (local.set $5 + (local.get $0) + ) + (local.set $9 + (i32.add + (local.get $0) + (i32.const 192) + ) + ) + (i64.store offset=128 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27736) + ) + ) + (i64.store offset=136 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27744) + ) + ) + (i64.store offset=144 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27752) + ) + ) + (i64.store offset=152 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27760) + ) + ) + (i64.store offset=160 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27768) + ) + ) + (i64.store offset=168 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27776) + ) + ) + (i64.store offset=176 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27784) + ) + ) + (i64.store offset=184 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27792) + ) + ) + (i64.store align=4 + (local.tee $2 + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i64.load align=4 + (i32.const 27672) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27680) + ) + ) + (i64.store offset=16 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27688) + ) + ) + (i64.store offset=24 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27696) + ) + ) + (i64.store offset=32 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27704) + ) + ) + (i64.store offset=40 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27712) + ) + ) + (i64.store offset=48 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27720) + ) + ) + (i64.store offset=56 align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27728) + ) + ) + (local.set $12 + (i32.const 1) + ) + (loop $while-in + (if + (local.get $11) + (block + (i64.store align=4 + (local.get $4) + (i64.load offset=128 align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=136 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=144 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=152 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=160 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=168 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=176 align=4 + (local.get $0) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=184 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (call $_SetStereoView + (local.get $8) + (local.get $4) + (local.get $1) + ) + ) + ) + (if + (i32.gt_s + (i32.load + (i32.const 22592) + ) + (i32.const 0) + ) + (block + (call $_glUseProgram + (i32.load + (i32.const 27264) + ) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27672) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27680) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27688) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27696) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27704) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27712) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27720) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27728) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27736) + ) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27744) + ) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27752) + ) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27760) + ) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27768) + ) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27776) + ) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27784) + ) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27792) + ) + ) + (call $_MatrixMultiply + (local.get $5) + (local.get $4) + (local.get $1) + ) + (local.set $3 + (i32.load offset=24 + (i32.load + (i32.const 27268) + ) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (local.get $5) + ) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.load offset=8 align=4 + (local.get $5) + ) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.load offset=16 align=4 + (local.get $5) + ) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.load offset=24 align=4 + (local.get $5) + ) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.load offset=32 align=4 + (local.get $5) + ) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.load offset=40 align=4 + (local.get $5) + ) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.load offset=48 align=4 + (local.get $5) + ) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.load offset=56 align=4 + (local.get $5) + ) + ) + (call $_MatrixToFloatV + (local.get $9) + (local.get $1) + ) + (call $_glUniformMatrix4fv + (local.get $3) + (i32.const 1) + (i32.const 0) + (local.get $9) + ) + (call $_glUniform4f + (i32.load offset=44 + (i32.load + (i32.const 27268) + ) + ) + (f64.const 1) + (f64.const 1) + (f64.const 1) + (f64.const 1) + ) + (call $_glUniform1i + (i32.load offset=56 + (i32.load + (i32.const 27268) + ) + ) + (i32.const 0) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $3 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.load + (i32.const 22620) + ) + (i32.add + (i32.and + (local.get $3) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + (block + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22624) + ) + ) + (call $_glVertexAttribPointer + (i32.load + (i32.load + (i32.const 27268) + ) + ) + (i32.const 3) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glEnableVertexAttribArray + (i32.load + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22628) + ) + ) + (call $_glVertexAttribPointer + (i32.load offset=4 + (i32.load + (i32.const 27268) + ) + ) + (i32.const 2) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glEnableVertexAttribArray + (i32.load offset=4 + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22632) + ) + ) + (call $_glVertexAttribPointer + (i32.load offset=20 + (i32.load + (i32.const 27268) + ) + ) + (i32.const 4) + (i32.const 5121) + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) + (call $_glEnableVertexAttribArray + (i32.load offset=20 + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.load + (i32.const 22636) + ) + ) + ) + ) + (call $_glActiveTexture + (i32.const 33984) + ) + (if + (i32.gt_s + (i32.load + (i32.const 27876) + ) + (i32.const 0) + ) + (block + (local.set $3 + (i32.const 0) + ) + (local.set $6 + (i32.const 0) + ) + (loop $while-in1 + (call $_glBindTexture + (i32.const 3553) + (i32.load offset=12 + (i32.add + (i32.load + (i32.const 27872) + ) + (i32.shl + (local.get $3) + (i32.const 4) + ) + ) + ) + ) + (block $switch + (block $switch-default + (block $switch-case2 + (br_table $switch-case2 $switch-default $switch-default $switch-case2 $switch-default + (i32.sub + (local.tee $13 + (i32.load + (i32.add + (local.tee $7 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.get $3) + (i32.const 4) + ) + ) + ) + ) + (i32.const 1) + ) + ) + ) + (call $_glDrawArrays + (local.get $13) + (local.get $6) + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $7) + ) + ) + ) + (br $switch) + ) + (call $_glDrawElements + (i32.const 4) + (i32.mul + (i32.div_s + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $7) + ) + ) + (i32.const 4) + ) + (i32.const 6) + ) + (i32.const 5123) + (i32.mul + (i32.and + (i32.shr_u + (local.get $6) + (i32.const 1) + ) + (i32.const 1073741823) + ) + (i32.const 6) + ) + ) + ) + (local.set $6 + (i32.add + (i32.load offset=8 + (i32.add + (local.tee $7 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.get $3) + (i32.const 4) + ) + ) + ) + (i32.add + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $7) + ) + ) + (local.get $6) + ) + ) + ) + (br_if $while-in1 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.load + (i32.const 27876) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.load8_s + (i32.const 28826) + ) + ) + (block + (call $_glBindBuffer + (i32.const 34962) + (i32.const 0) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.const 0) + ) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + ) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $3 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $3) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + ) + (call $_glUseProgram + (i32.const 0) + ) + (br_if $while-in + (i32.lt_u + (local.tee $8 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + (i32.store + (i32.const 22592) + (i32.const 0) + ) + (i32.store + (i32.const 22596) + (i32.const 0) + ) + (i32.store + (i32.const 22600) + (i32.const 0) + ) + (f32.store + (i32.const 8948) + (f32.const -1) + ) + (i64.store align=4 + (i32.const 27736) + (i64.load offset=128 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27744) + (i64.load offset=136 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27752) + (i64.load offset=144 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27760) + (i64.load offset=152 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27768) + (i64.load offset=160 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27776) + (i64.load offset=168 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27784) + (i64.load offset=176 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27792) + (i64.load offset=184 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27672) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27680) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27688) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27696) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27704) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27712) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27720) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 27728) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (local.set $6 + (i32.load + (i32.const 27872) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in4 + (i32.store + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $6) + ) + (i32.const 7) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $6) + ) + (i32.const 0) + ) + (i32.store offset=12 + (i32.add + (i32.shl + (local.get $3) + (i32.const 4) + ) + (local.get $6) + ) + (i32.load + (i32.const 27880) + ) + ) + (br_if $while-in4 + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 256) + ) + ) + ) + (i32.store + (i32.const 27876) + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $10) + ) + ) + (func $_SetStereoView (; 379 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (local.set $3 + (i32.add + (local.get $5) + (i32.const 192) + ) + ) + (local.set $6 + (i32.add + (local.get $5) + (i32.const 128) + ) + ) + (i64.store align=4 + (local.tee $4 + (i32.sub + (local.get $5) + (i32.const -64) + ) + ) + (i64.load align=4 + (local.get $1) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $1) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $1) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $1) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $1) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $1) + ) + ) + (i64.store align=4 + (local.get $5) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $5) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $5) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $5) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $5) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $5) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $5) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $5) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (call $_rlViewport + (i32.div_s + (i32.mul + (local.get $0) + (local.tee $1 + (i32.load + (i32.const 27888) + ) + ) + ) + (i32.const 2) + ) + (i32.const 0) + (i32.div_s + (local.get $1) + (i32.const 2) + ) + (i32.load + (i32.const 27892) + ) + ) + (i64.store align=4 + (local.get $6) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $6) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $6) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $6) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $6) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $6) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $6) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (i64.store offset=56 align=4 + (local.get $6) + (i64.load offset=56 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.tee $1 + (i32.add + (i32.shl + (local.get $0) + (i32.const 6) + ) + (i32.const 27408) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $1) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $1) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $1) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $1) + ) + ) + (i64.store offset=56 align=4 + (local.get $3) + (i64.load offset=56 align=4 + (local.get $1) + ) + ) + (call $_MatrixMultiply + (local.get $5) + (local.get $6) + (local.get $3) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (local.tee $0 + (i32.add + (i32.shl + (local.get $0) + (i32.const 6) + ) + (i32.const 27280) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $5) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $5) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $5) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $5) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $5) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $5) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $5) + ) + ) + (i64.store offset=56 align=4 + (local.get $3) + (i64.load offset=56 align=4 + (local.get $5) + ) + ) + (call $_SetMatrixModelview + (local.get $3) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $4) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $4) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $4) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $4) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $4) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $4) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $4) + ) + ) + (i64.store offset=56 align=4 + (local.get $3) + (i64.load offset=56 align=4 + (local.get $4) + ) + ) + (call $_SetMatrixProjection + (local.get $3) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_SetMatrixModelview (; 380 ;) (; has Stack IR ;) (param $0 i32) + (i64.store align=4 + (i32.const 27672) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27680) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27688) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27696) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27704) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27712) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27720) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27728) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + ) + (func $_SetMatrixProjection (; 381 ;) (; has Stack IR ;) (param $0 i32) + (i64.store align=4 + (i32.const 27736) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27744) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27752) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27760) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27768) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27776) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27784) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 27792) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + ) + (func $_rlEnd (; 382 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (if + (i32.ne + (local.tee $0 + (i32.load + (i32.const 22592) + ) + ) + (local.tee $1 + (i32.load + (i32.const 22600) + ) + ) + ) + (if + (i32.gt_s + (local.tee $1 + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + ) + (block + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (i32.store8 + (i32.add + (local.tee $2 + (i32.load + (i32.const 22612) + ) + ) + (local.tee $3 + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + ) + ) + (i32.load8_s + (i32.add + (local.get $2) + (i32.add + (local.get $3) + (i32.const -4) + ) + ) + ) + ) + (i32.store8 + (i32.add + (local.tee $2 + (i32.load + (i32.const 22612) + ) + ) + (i32.or + (local.tee $3 + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + ) + (i32.const 1) + ) + ) + (i32.load8_s + (i32.add + (local.get $2) + (i32.add + (local.get $3) + (i32.const -3) + ) + ) + ) + ) + (i32.store8 + (i32.add + (local.tee $2 + (i32.load + (i32.const 22612) + ) + ) + (i32.or + (local.tee $3 + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + ) + (i32.const 2) + ) + ) + (i32.load8_s + (i32.add + (local.get $2) + (i32.add + (local.get $3) + (i32.const -2) + ) + ) + ) + ) + (i32.store8 + (i32.add + (local.tee $2 + (i32.load + (i32.const 22612) + ) + ) + (i32.or + (local.tee $3 + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + ) + (i32.const 3) + ) + ) + (i32.load8_s + (i32.add + (local.get $2) + (i32.add + (local.get $3) + (i32.const -1) + ) + ) + ) + ) + (i32.store + (i32.const 22600) + (i32.add + (i32.load + (i32.const 22600) + ) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.ne + (local.tee $0 + (i32.load + (i32.const 22592) + ) + ) + (local.tee $1 + (i32.load + (i32.const 22596) + ) + ) + ) + (block + (if + (i32.gt_s + (local.tee $1 + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + ) + (block + (local.set $0 + (i32.const 0) + ) + (loop $while-in1 + (f32.store + (i32.add + (i32.load + (i32.const 22608) + ) + (i32.shl + (i32.load + (i32.const 22596) + ) + (i32.const 3) + ) + ) + (f32.const 0) + ) + (f32.store + (i32.add + (i32.load + (i32.const 22608) + ) + (i32.shl + (i32.or + (i32.shl + (i32.load + (i32.const 22596) + ) + (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + (f32.const 0) + ) + (i32.store + (i32.const 22596) + (i32.add + (i32.load + (i32.const 22596) + ) + (i32.const 1) + ) + ) + (br_if $while-in1 + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (local.set $0 + (i32.load + (i32.const 22592) + ) + ) + ) + ) + (f32.store + (i32.const 8948) + (f32.add + (f32.load + (i32.const 8948) + ) + (f32.const 4.999999873689376e-05) + ) + ) + (if + (i32.le_s + (local.get $0) + (i32.const 8187) + ) + (return) + ) + (if + (i32.gt_s + (local.tee $0 + (i32.load + (i32.const 27804) + ) + ) + (i32.const -1) + ) + (loop $while-in3 + (call $_rlPopMatrix) + (local.set $1 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in3) + ) + ) + ) + ) + (call $_rlglDraw) + ) + (func $_rlVertex3f (; 383 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (param $2 f32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $4 + (i32.add + (local.get $3) + (i32.const 40) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 28) + ) + ) + (local.set $5 + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + (f32.store offset=16 + (local.get $3) + (local.get $0) + ) + (f32.store offset=20 + (local.get $3) + (local.get $1) + ) + (f32.store offset=24 + (local.get $3) + (local.get $2) + ) + (if + (i32.load8_s + (i32.const 28825) + ) + (block + (i64.store align=4 + (local.get $6) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i32.store offset=8 + (local.get $6) + (i32.load offset=24 + (local.get $3) + ) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27808) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27816) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27824) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27832) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27840) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27848) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27856) + ) + ) + (i64.store offset=56 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 27864) + ) + ) + (call $_Vector3Transform + (local.get $5) + (local.get $6) + (local.get $4) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load align=4 + (local.get $5) + ) + ) + (i32.store offset=24 + (local.get $3) + (i32.load offset=8 + (local.get $5) + ) + ) + ) + ) + (local.set $5 + (local.get $3) + ) + (if + (i32.lt_s + (local.tee $6 + (i32.load + (i32.const 22592) + ) + ) + (i32.const 8192) + ) + (block + (i32.store + (i32.add + (i32.load + (i32.const 22604) + ) + (i32.shl + (i32.mul + (local.get $6) + (i32.const 3) + ) + (i32.const 2) + ) + ) + (i32.load offset=16 + (local.get $3) + ) + ) + (i32.store + (i32.add + (i32.load + (i32.const 22604) + ) + (i32.shl + (i32.add + (i32.mul + (i32.load + (i32.const 22592) + ) + (i32.const 3) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + (i32.load offset=20 + (local.get $3) + ) + ) + (i32.store + (i32.add + (i32.load + (i32.const 22604) + ) + (i32.shl + (i32.add + (i32.mul + (i32.load + (i32.const 22592) + ) + (i32.const 3) + ) + (i32.const 2) + ) + (i32.const 2) + ) + ) + (i32.load offset=24 + (local.get $3) + ) + ) + (i32.store + (i32.const 22592) + (i32.add + (i32.load + (i32.const 22592) + ) + (i32.const 1) + ) + ) + (i32.store offset=4 + (local.tee $5 + (i32.add + (i32.load + (i32.const 27872) + ) + (i32.shl + (i32.add + (i32.load + (i32.const 27876) + ) + (i32.const -1) + ) + (i32.const 4) + ) + ) + ) + (i32.add + (i32.load offset=4 + (local.get $5) + ) + (i32.const 1) + ) + ) + ) + (call $_TraceLog + (i32.const 5) + (i32.const 9598) + (local.get $5) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_rlVertex2f (; 384 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (call $_rlVertex3f + (local.get $0) + (local.get $1) + (f32.load + (i32.const 8948) + ) + ) + ) + (func $_rlTexCoord2f (; 385 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (f32.store + (i32.add + (i32.load + (i32.const 22608) + ) + (i32.shl + (i32.load + (i32.const 22596) + ) + (i32.const 3) + ) + ) + (local.get $0) + ) + (f32.store + (i32.add + (i32.load + (i32.const 22608) + ) + (i32.shl + (i32.or + (i32.shl + (i32.load + (i32.const 22596) + ) + (i32.const 1) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + (local.get $1) + ) + (i32.store + (i32.const 22596) + (i32.add + (i32.load + (i32.const 22596) + ) + (i32.const 1) + ) + ) + ) + (func $_rlColor4ub (; 386 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (i32.store8 + (i32.add + (i32.load + (i32.const 22612) + ) + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + ) + (local.get $0) + ) + (i32.store8 + (i32.add + (i32.load + (i32.const 22612) + ) + (i32.or + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + (i32.const 1) + ) + ) + (local.get $1) + ) + (i32.store8 + (i32.add + (i32.load + (i32.const 22612) + ) + (i32.or + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + (i32.const 2) + ) + ) + (local.get $2) + ) + (i32.store8 + (i32.add + (i32.load + (i32.const 22612) + ) + (i32.or + (i32.shl + (i32.load + (i32.const 22600) + ) + (i32.const 2) + ) + (i32.const 3) + ) + ) + (local.get $3) + ) + (i32.store + (i32.const 22600) + (i32.add + (i32.load + (i32.const 22600) + ) + (i32.const 1) + ) + ) + ) + (func $_rlEnableTexture (; 387 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eq + (local.get $0) + (i32.load offset=12 + (i32.add + (local.tee $3 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.tee $2 + (i32.add + (local.tee $4 + (i32.load + (i32.const 27876) + ) + ) + (i32.const -1) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (return) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.le_s + (local.tee $1 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.store offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + (local.tee $1 + (block $switch (result i32) + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-default $switch-case0 $switch-default + (i32.sub + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (i32.const 1) + ) + ) + ) + (br $switch + (select + (local.get $1) + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.lt_s + (local.get $1) + (i32.const 4) + ) + ) + ) + ) + (br $switch + (select + (i32.const 1) + (i32.sub + (i32.const 4) + (i32.and + (local.get $1) + (i32.const 3) + ) + ) + (i32.lt_s + (local.get $1) + (i32.const 4) + ) + ) + ) + ) + (i32.const 0) + ) + ) + ) + (if + (call $_rlCheckBufferLimit + (local.get $1) + ) + (block + (call $_rlglDraw) + (br $__rjti$0) + ) + (block + (i32.store + (i32.const 22592) + (i32.add + (i32.load + (i32.const 22592) + ) + (local.get $1) + ) + ) + (i32.store + (i32.const 22600) + (i32.add + (i32.load + (i32.const 22600) + ) + (local.get $1) + ) + ) + (i32.store + (i32.const 22596) + (i32.add + (i32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (i32.load + (i32.const 22596) + ) + ) + ) + (i32.store + (i32.const 27876) + (local.tee $1 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + ) + ) + (br $__rjto$0) + ) + (local.set $1 + (i32.load + (i32.const 27876) + ) + ) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const 255) + ) + (call $_rlglDraw) + ) + (i32.store offset=12 + (i32.add + (local.tee $2 + (i32.load + (i32.const 27872) + ) + ) + (i32.shl + (local.tee $1 + (i32.add + (i32.load + (i32.const 27876) + ) + (i32.const -1) + ) + ) + (i32.const 4) + ) + ) + (local.get $0) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.const 0) + ) + ) + (func $_rlDisableTexture (; 388 ;) (; has Stack IR ;) + (if + (i32.le_s + (i32.load + (i32.const 22592) + ) + (i32.const 8191) + ) + (return) + ) + (call $_rlglDraw) + ) + (func $_rlDeleteTextures (; 389 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $2) + (local.get $0) + ) + (if + (i32.eqz + (local.get $0) + ) + (block + (global.set $STACKTOP + (local.get $1) + ) + (return) + ) + ) + (call $_glDeleteTextures + (i32.const 1) + (local.get $2) + ) + (global.set $STACKTOP + (local.get $1) + ) + ) + (func $_rlClearColor (; 390 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (call $_glClearColor + (f64.promote_f32 + (f32.div + (f32.convert_i32_s + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (f32.const 255) + ) + ) + (f64.promote_f32 + (f32.div + (f32.convert_i32_s + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (f32.const 255) + ) + ) + (f64.promote_f32 + (f32.div + (f32.convert_i32_s + (i32.and + (local.get $2) + (i32.const 255) + ) + ) + (f32.const 255) + ) + ) + (f64.promote_f32 + (f32.div + (f32.convert_i32_s + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + (f32.const 255) + ) + ) + ) + ) + (func $_rlglInit (; 391 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) + (local $30 i32) + (local $31 i32) + (local $32 i64) + (local.set $17 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 432) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 432) + ) + ) + (local.set $18 + (i32.add + (local.get $2) + (i32.const 168) + ) + ) + (local.set $19 + (i32.add + (local.get $2) + (i32.const 160) + ) + ) + (local.set $14 + (i32.add + (local.get $2) + (i32.const 152) + ) + ) + (local.set $20 + (i32.add + (local.get $2) + (i32.const 144) + ) + ) + (local.set $21 + (i32.add + (local.get $2) + (i32.const 136) + ) + ) + (local.set $15 + (i32.add + (local.get $2) + (i32.const 128) + ) + ) + (local.set $22 + (i32.add + (local.get $2) + (i32.const 120) + ) + ) + (local.set $23 + (i32.add + (local.get $2) + (i32.const 112) + ) + ) + (local.set $24 + (i32.add + (local.get $2) + (i32.const 104) + ) + ) + (local.set $25 + (i32.add + (local.get $2) + (i32.const 96) + ) + ) + (local.set $26 + (i32.add + (local.get $2) + (i32.const 88) + ) + ) + (local.set $27 + (i32.add + (local.get $2) + (i32.const 80) + ) + ) + (local.set $28 + (i32.add + (local.get $2) + (i32.const 72) + ) + ) + (local.set $29 + (i32.sub + (local.get $2) + (i32.const -64) + ) + ) + (local.set $30 + (i32.add + (local.get $2) + (i32.const 56) + ) + ) + (local.set $10 + (i32.add + (local.get $2) + (i32.const 48) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 40) + ) + ) + (local.set $11 + (i32.add + (local.get $2) + (i32.const 32) + ) + ) + (local.set $4 + (i32.add + (local.get $2) + (i32.const 24) + ) + ) + (local.set $9 + (i32.add + (local.get $2) + (i32.const 16) + ) + ) + (local.set $12 + (local.get $2) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 368) + ) + ) + (local.set $6 + (i32.add + (local.get $2) + (i32.const 304) + ) + ) + (local.set $7 + (i32.add + (local.get $2) + (i32.const 240) + ) + ) + (local.set $8 + (i32.add + (local.get $2) + (i32.const 176) + ) + ) + (i32.store + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (call $_glGetString + (i32.const 7936) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9626) + (local.get $2) + ) + (i32.store + (local.get $9) + (call $_glGetString + (i32.const 7937) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9644) + (local.get $9) + ) + (i32.store + (local.get $4) + (call $_glGetString + (i32.const 7938) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9662) + (local.get $4) + ) + (i32.store + (local.get $11) + (call $_glGetString + (i32.const 35724) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9680) + (local.get $11) + ) + (local.set $9 + (call $_malloc + (i32.const 2048) + ) + ) + (call $_strcpy + (local.tee $13 + (call $_calloc + (local.tee $16 + (i32.add + (call $_strlen + (local.tee $2 + (call $_glGetString + (i32.const 7939) + ) + ) + ) + (i32.const 1) + ) + ) + (i32.const 1) + ) + ) + (local.get $2) + ) + (i32.store + (local.get $9) + (local.get $13) + ) + (if + (i32.gt_s + (local.get $16) + (i32.const 0) + ) + (block + (local.set $3 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in + (local.set $4 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.load8_s + (local.tee $31 + (i32.add + (local.get $3) + (local.get $13) + ) + ) + ) + (i32.const 32) + ) + (block + (i32.store8 + (local.get $31) + (i32.const 0) + ) + (i32.store + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $9) + ) + (i32.add + (i32.add + (local.get $3) + (i32.const 1) + ) + (local.get $13) + ) + ) + (local.set $2 + (local.get $4) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $16) + ) + ) + ) + (i32.store + (local.get $10) + (local.get $2) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9698) + (local.get $10) + ) + (if + (i32.gt_s + (local.get $2) + (i32.const 0) + ) + (block + (local.set $3 + (i32.const 0) + ) + (loop $while-in1 + (if + (i32.eqz + (call $_strcmp + (local.tee $4 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (i32.const 9733) + ) + ) + (block + (i32.store + (i32.const 27904) + (call $_eglGetProcAddress + (i32.const 19598) + ) + ) + (i32.store + (i32.const 27884) + (call $_eglGetProcAddress + (i32.const 19553) + ) + ) + (i32.store + (i32.const 27900) + (local.tee $10 + (call $_eglGetProcAddress + (i32.const 19574) + ) + ) + ) + (if + (i32.and + (i32.and + (i32.ne + (i32.load + (i32.const 27904) + ) + (i32.const 0) + ) + (i32.ne + (i32.load + (i32.const 27884) + ) + (i32.const 0) + ) + ) + (i32.ne + (local.get $10) + (i32.const 0) + ) + ) + (i32.store8 + (i32.const 28826) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9760) + ) + ) + (i32.store8 + (i32.const 28828) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9780) + ) + ) + (i32.store8 + (i32.const 28829) + (i32.const 1) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9852) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9884) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9917) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.const 28830) + (i32.const 1) + ) + ) + (block $__rjto$1 + (block $__rjti$1 + (br_if $__rjti$1 + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9957) + ) + ) + ) + (br_if $__rjti$1 + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 9993) + ) + ) + ) + (br $__rjto$1) + ) + (i32.store8 + (i32.const 28831) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10026) + ) + ) + (i32.store8 + (i32.const 28832) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10051) + ) + ) + (i32.store8 + (i32.const 28833) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10084) + ) + ) + (i32.store8 + (i32.const 28834) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10120) + ) + ) + (block + (i32.store8 + (i32.const 28835) + (i32.const 1) + ) + (call $_glGetFloatv + (i32.const 34047) + (i32.const 27896) + ) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10154) + ) + ) + (i32.store8 + (i32.const 28827) + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $4) + (i32.const 10182) + ) + ) + (i32.store8 + (i32.const 28836) + (i32.const 1) + ) + ) + (br_if $while-in1 + (i32.ne + (local.get $2) + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + ) + (block + (i32.store + (local.get $3) + (i32.const 0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 9698) + (local.get $3) + ) + ) + ) + (call $_free + (local.get $9) + ) + (call $_free + (local.get $13) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10202) + (local.get $30) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 10277) + (local.get $29) + ) + ) + (if + (i32.load8_s + (i32.const 28828) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10338) + (local.get $28) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 10413) + (local.get $27) + ) + ) + (if + (i32.load8_s + (i32.const 28830) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10505) + (local.get $26) + ) + ) + (if + (i32.load8_s + (i32.const 28831) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10551) + (local.get $25) + ) + ) + (if + (i32.load8_s + (i32.const 28832) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10598) + (local.get $24) + ) + ) + (if + (i32.load8_s + (i32.const 28833) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10649) + (local.get $23) + ) + ) + (if + (i32.load8_s + (i32.const 28834) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10696) + (local.get $22) + ) + ) + (if + (i32.load8_s + (i32.const 28835) + ) + (block + (f64.store + (local.get $15) + (f64.promote_f32 + (f32.load + (i32.const 27896) + ) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10743) + (local.get $15) + ) + ) + ) + (if + (i32.load8_s + (i32.const 28827) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10809) + (local.get $21) + ) + ) + (if + (i32.load8_s + (i32.const 28836) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10862) + (local.get $20) + ) + ) + (i32.store + (local.get $11) + (i32.const -1) + ) + (i32.store + (i32.const 27880) + (local.tee $2 + (call $_rlLoadTexture + (local.get $11) + (i32.const 1) + (i32.const 1) + (i32.const 7) + (i32.const 1) + ) + ) + ) + (if + (local.get $2) + (block + (i32.store + (local.get $14) + (local.get $2) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10897) + (local.get $14) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 10948) + (local.get $19) + ) + ) + (call $_LoadShaderDefault + (local.get $12) + ) + (i64.store + (i32.const 27568) + (local.tee $32 + (i64.load + (local.get $12) + ) + ) + ) + (i64.store + (i32.const 27264) + (local.get $32) + ) + (call $_LoadBuffersDefault) + (call $_MatrixIdentity + (local.get $5) + ) + (i64.store align=4 + (i32.const 27808) + (i64.load align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27816) + (i64.load offset=8 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27824) + (i64.load offset=16 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27832) + (i64.load offset=24 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27840) + (i64.load offset=32 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27848) + (i64.load offset=40 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27856) + (i64.load offset=48 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (i32.const 27864) + (i64.load offset=56 align=4 + (local.get $5) + ) + ) + (i32.store + (i32.const 27872) + (local.tee $3 + (call $_malloc + (i32.const 4096) + ) + ) + ) + (local.set $12 + (i32.load + (i32.const 27880) + ) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in3 + (i32.store + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + (i32.const 7) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + (i32.const 0) + ) + (i32.store offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + (i32.const 0) + ) + (i32.store offset=12 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + (local.get $12) + ) + (br_if $while-in3 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 256) + ) + ) + ) + (i32.store + (i32.const 27876) + (i32.const 1) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in5 + (local.set $3 + (i32.add + (i32.shl + (local.get $2) + (i32.const 6) + ) + (i32.const 20544) + ) + ) + (call $_MatrixIdentity + (local.get $6) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $6) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $6) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $6) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $6) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $6) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $6) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $6) + ) + ) + (i64.store offset=56 align=4 + (local.get $3) + (i64.load offset=56 align=4 + (local.get $6) + ) + ) + (br_if $while-in5 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 32) + ) + ) + ) + (call $_MatrixIdentity + (local.get $7) + ) + (i64.store align=4 + (i32.const 27736) + (i64.load align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27744) + (i64.load offset=8 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27752) + (i64.load offset=16 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27760) + (i64.load offset=24 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27768) + (i64.load offset=32 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27776) + (i64.load offset=40 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27784) + (i64.load offset=48 align=4 + (local.get $7) + ) + ) + (i64.store align=4 + (i32.const 27792) + (i64.load offset=56 align=4 + (local.get $7) + ) + ) + (call $_MatrixIdentity + (local.get $8) + ) + (i64.store align=4 + (i32.const 27672) + (i64.load align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27680) + (i64.load offset=8 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27688) + (i64.load offset=16 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27696) + (i64.load offset=24 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27704) + (i64.load offset=32 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27712) + (i64.load offset=40 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27720) + (i64.load offset=48 align=4 + (local.get $8) + ) + ) + (i64.store align=4 + (i32.const 27728) + (i64.load offset=56 align=4 + (local.get $8) + ) + ) + (i32.store + (i32.const 27800) + (i32.const 27672) + ) + (call $_glDepthFunc + (i32.const 515) + ) + (call $_glDisable + (i32.const 2929) + ) + (call $_glBlendFunc + (i32.const 770) + (i32.const 771) + ) + (call $_glEnable + (i32.const 3042) + ) + (call $_glCullFace + (i32.const 1029) + ) + (call $_glFrontFace + (i32.const 2305) + ) + (call $_glEnable + (i32.const 2884) + ) + (call $_glClearColor + (f64.const 0) + (f64.const 0) + (f64.const 0) + (f64.const 1) + ) + (call $_glClearDepthf + (f64.const 1) + ) + (call $_glClear + (i32.const 16640) + ) + (i32.store + (i32.const 27888) + (local.get $0) + ) + (i32.store + (i32.const 27892) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 10987) + (local.get $18) + ) + (global.set $STACKTOP + (local.get $17) + ) + ) + (func $_rlLoadTexture (; 392 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $18 + (i32.add + (local.get $5) + (i32.const 88) + ) + ) + (local.set $12 + (i32.add + (local.get $5) + (i32.const 72) + ) + ) + (local.set $11 + (i32.add + (local.get $5) + (i32.const 48) + ) + ) + (local.set $14 + (i32.add + (local.get $5) + (i32.const 40) + ) + ) + (local.set $9 + (i32.add + (local.get $5) + (i32.const 32) + ) + ) + (local.set $10 + (i32.add + (local.get $5) + (i32.const 24) + ) + ) + (local.set $13 + (i32.add + (local.get $5) + (i32.const 16) + ) + ) + (local.set $15 + (i32.add + (local.get $5) + (i32.const 8) + ) + ) + (local.set $7 + (local.get $5) + ) + (local.set $6 + (i32.add + (local.get $5) + (i32.const 100) + ) + ) + (local.set $16 + (i32.add + (local.get $5) + (i32.const 96) + ) + ) + (local.set $17 + (i32.add + (local.get $5) + (i32.const 92) + ) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + (i32.store + (local.get $6) + (i32.const 0) + ) + (block $folding-inner0 + (if + (i32.and + (i32.eqz + (i32.load8_s + (i32.const 28830) + ) + ) + (i32.lt_u + (i32.add + (local.get $3) + (i32.const -11) + ) + (i32.const 4) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11512) + (local.get $7) + ) + (br $folding-inner0) + ) + ) + (if + (i32.and + (i32.eqz + (i32.load8_s + (i32.const 28831) + ) + ) + (i32.eq + (local.get $3) + (i32.const 15) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11556) + (local.get $15) + ) + (br $folding-inner0) + ) + ) + (if + (i32.and + (i32.eqz + (i32.load8_s + (i32.const 28832) + ) + ) + (i32.eq + (local.tee $5 + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 17) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11601) + (local.get $13) + ) + (br $folding-inner0) + ) + ) + (if + (i32.and + (i32.eqz + (i32.load8_s + (i32.const 28833) + ) + ) + (i32.eq + (local.get $5) + (i32.const 19) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11646) + (local.get $10) + ) + (br $folding-inner0) + ) + ) + (if + (i32.and + (i32.eqz + (i32.load8_s + (i32.const 28834) + ) + ) + (i32.eq + (local.get $5) + (i32.const 21) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 11691) + (local.get $9) + ) + (br $folding-inner0) + ) + ) + (call $_glPixelStorei + (i32.const 3317) + (i32.const 1) + ) + (call $_glGenTextures + (i32.const 1) + (local.get $6) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.load + (local.get $6) + ) + ) + (i32.store + (local.get $14) + (local.get $0) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 11736) + (local.get $14) + ) + (if + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + (block + (local.set $19 + (i32.lt_s + (local.get $3) + (i32.const 11) + ) + ) + (local.set $9 + (i32.const 0) + ) + (local.set $5 + (local.get $2) + ) + (local.set $10 + (i32.const 0) + ) + (local.set $7 + (local.get $1) + ) + (loop $while-in + (local.set $13 + (call $_GetPixelDataSize + (local.get $7) + (local.get $5) + (local.get $3) + ) + ) + (call $_rlGetGlTextureFormats + (local.get $3) + (local.get $14) + (local.get $16) + (local.get $17) + ) + (i32.store + (local.get $11) + (local.get $9) + ) + (i32.store offset=4 + (local.get $11) + (local.get $7) + ) + (i32.store offset=8 + (local.get $11) + (local.get $5) + ) + (i32.store offset=12 + (local.get $11) + (local.get $13) + ) + (i32.store offset=16 + (local.get $11) + (local.get $10) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 11780) + (local.get $11) + ) + (if + (i32.ne + (local.tee $15 + (i32.load + (local.get $14) + ) + ) + (i32.const -1) + ) + (if + (local.get $19) + (call $_glTexImage2D + (i32.const 3553) + (local.get $9) + (local.get $15) + (local.get $7) + (local.get $5) + (i32.const 0) + (i32.load + (local.get $16) + ) + (i32.load + (local.get $17) + ) + (i32.add + (local.get $0) + (local.get $10) + ) + ) + (call $_glCompressedTexImage2D + (i32.const 3553) + (local.get $9) + (local.get $15) + (local.get $7) + (local.get $5) + (i32.const 0) + (local.get $13) + (i32.add + (local.get $0) + (local.get $10) + ) + ) + ) + ) + (local.set $10 + (i32.add + (local.get $10) + (local.get $13) + ) + ) + (local.set $7 + (select + (i32.const 1) + (i32.div_s + (local.get $7) + (i32.const 2) + ) + (i32.lt_s + (local.get $7) + (i32.const 2) + ) + ) + ) + (local.set $5 + (select + (i32.const 1) + (i32.div_s + (local.get $5) + (i32.const 2) + ) + (i32.lt_s + (local.get $5) + (i32.const 2) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $9 + (i32.add + (local.get $9) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (if + (i32.load8_s + (i32.const 28828) + ) + (block + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10242) + (i32.const 10497) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10243) + (i32.const 10497) + ) + ) + (block + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10242) + (i32.const 33071) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10243) + (i32.const 33071) + ) + ) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10240) + (i32.const 9728) + ) + (call $_glTexParameteri + (i32.const 3553) + (i32.const 10241) + (i32.const 9728) + ) + (call $_glBindTexture + (i32.const 3553) + (i32.const 0) + ) + (if + (local.tee $0 + (i32.load + (local.get $6) + ) + ) + (block + (i32.store + (local.get $12) + (local.get $0) + ) + (i32.store offset=4 + (local.get $12) + (local.get $1) + ) + (i32.store offset=8 + (local.get $12) + (local.get $2) + ) + (i32.store offset=12 + (local.get $12) + (local.get $4) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11833) + (local.get $12) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11895) + (local.get $18) + ) + ) + (local.set $0 + (i32.load + (local.get $6) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (return + (local.get $0) + ) + ) + (local.set $0 + (i32.load + (local.get $6) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (local.get $0) + ) + (func $_LoadShaderDefault (; 393 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 960) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 960) + ) + ) + (local.set $4 + (i32.add + (local.get $2) + (i32.const 944) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 936) + ) + ) + (local.set $6 + (i32.add + (local.get $2) + (i32.const 448) + ) + ) + (i64.store align=4 + (local.tee $1 + (call $_calloc + (i32.const 32) + (i32.const 4) + ) + ) + (i64.const -1) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=40 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=48 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=56 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store align=4 + (i32.sub + (local.get $1) + (i32.const -64) + ) + (i64.const -1) + ) + (i64.store offset=72 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=80 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=88 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=96 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=104 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=112 align=4 + (local.get $1) + (i64.const -1) + ) + (i64.store offset=120 align=4 + (local.get $1) + (i64.const -1) + ) + (drop + (call $_memcpy + (local.get $6) + (i32.const 1056) + (i32.const 483) + ) + ) + (drop + (call $_memcpy + (local.get $2) + (i32.const 1552) + (i32.const 441) + ) + ) + (i32.store + (i32.const 27908) + (call $_CompileShader + (local.get $6) + (i32.const 35633) + ) + ) + (i32.store + (i32.const 27912) + (local.tee $2 + (call $_CompileShader + (local.get $2) + (i32.const 35632) + ) + ) + ) + (if + (local.tee $2 + (call $_LoadShaderProgram + (i32.load + (i32.const 27908) + ) + (local.get $2) + ) + ) + (block + (i32.store + (local.get $5) + (local.get $2) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11127) + (local.get $5) + ) + (i32.store + (local.get $1) + (call $_glGetAttribLocation + (local.get $2) + (i32.const 11175) + ) + ) + (i32.store offset=4 + (local.get $1) + (call $_glGetAttribLocation + (local.get $2) + (i32.const 11190) + ) + ) + (i32.store offset=20 + (local.get $1) + (call $_glGetAttribLocation + (local.get $2) + (i32.const 11205) + ) + ) + (i32.store offset=24 + (local.get $1) + (call $_glGetUniformLocation + (local.get $2) + (i32.const 11217) + ) + ) + (i32.store offset=44 + (local.get $1) + (call $_glGetUniformLocation + (local.get $2) + (i32.const 11221) + ) + ) + (i32.store offset=56 + (local.get $1) + (call $_glGetUniformLocation + (local.get $2) + (i32.const 11232) + ) + ) + ) + (block + (i32.store + (local.get $4) + (local.get $2) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11241) + (local.get $4) + ) + ) + ) + (i32.store + (local.get $0) + (local.get $2) + ) + (i32.store offset=4 + (local.get $0) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_LoadBuffersDefault (; 394 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $5 + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + (i32.store + (i32.const 22604) + (call $_malloc + (i32.const 98304) + ) + ) + (i32.store + (i32.const 22608) + (call $_malloc + (i32.const 65536) + ) + ) + (i32.store + (i32.const 22612) + (call $_malloc + (i32.const 32768) + ) + ) + (i32.store + (i32.const 22616) + (call $_malloc + (i32.const 24576) + ) + ) + (loop $while-in + (f32.store + (i32.add + (i32.load + (i32.const 22604) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (f32.const 0) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 24576) + ) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in1 + (f32.store + (i32.add + (i32.load + (i32.const 22608) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (f32.const 0) + ) + (br_if $while-in1 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 16384) + ) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in3 + (i32.store8 + (i32.add + (i32.load + (i32.const 22612) + ) + (local.get $0) + ) + (i32.const 0) + ) + (br_if $while-in3 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 32768) + ) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in5 + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (local.tee $6 + (i32.and + (local.tee $2 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (i32.const 65535) + ) + ) + ) + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (i32.or + (local.get $1) + (i32.const 1) + ) + (i32.const 1) + ) + ) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 2) + ) + (i32.const 1) + ) + ) + (local.tee $7 + (i32.and + (i32.or + (local.get $2) + (i32.const 2) + ) + (i32.const 65535) + ) + ) + ) + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 3) + ) + (i32.const 1) + ) + ) + (local.get $6) + ) + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 4) + ) + (i32.const 1) + ) + ) + (local.get $7) + ) + (i32.store16 + (i32.add + (i32.load + (i32.const 22616) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 5) + ) + (i32.const 1) + ) + ) + (i32.or + (local.get $2) + (i32.const 3) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 6) + ) + ) + (br_if $while-in5 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 2048) + ) + ) + ) + (i32.store + (i32.const 22592) + (i32.const 0) + ) + (i32.store + (i32.const 22596) + (i32.const 0) + ) + (i32.store + (i32.const 22600) + (i32.const 0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11034) + (local.get $4) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $0 + (i32.load + (i32.const 27904) + ) + ) + (call_indirect (type $FUNCSIG$vii) + (i32.const 1) + (i32.const 22620) + (i32.add + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.const 159) + ) + ) + (local.set $0 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.load + (i32.const 22620) + ) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 22624) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22624) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 98304) + (i32.load + (i32.const 22604) + ) + (i32.const 35048) + ) + (call $_glEnableVertexAttribArray + (i32.load + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glVertexAttribPointer + (i32.load + (i32.load + (i32.const 27268) + ) + ) + (i32.const 3) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 22628) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22628) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 65536) + (i32.load + (i32.const 22608) + ) + (i32.const 35048) + ) + (call $_glEnableVertexAttribArray + (i32.load offset=4 + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glVertexAttribPointer + (i32.load offset=4 + (i32.load + (i32.const 27268) + ) + ) + (i32.const 2) + (i32.const 5126) + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 22632) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.load + (i32.const 22632) + ) + ) + (call $_glBufferData + (i32.const 34962) + (i32.const 32768) + (i32.load + (i32.const 22612) + ) + (i32.const 35048) + ) + (call $_glEnableVertexAttribArray + (i32.load offset=20 + (i32.load + (i32.const 27268) + ) + ) + ) + (call $_glVertexAttribPointer + (i32.load offset=20 + (i32.load + (i32.const 27268) + ) + ) + (i32.const 4) + (i32.const 5121) + (i32.const 1) + (i32.const 0) + (i32.const 0) + ) + (call $_glGenBuffers + (i32.const 1) + (i32.const 22636) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.load + (i32.const 22636) + ) + ) + (call $_glBufferData + (i32.const 34963) + (i32.const 24576) + (i32.load + (i32.const 22616) + ) + (i32.const 35044) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11082) + (local.get $5) + ) + (if + (i32.eqz + (i32.load8_s + (i32.const 28826) + ) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return) + ) + ) + (local.set $0 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_CompileShader (; 395 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $7 + (i32.add + (local.get $2) + (i32.const 16) + ) + ) + (local.set $8 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 24) + ) + ) + (local.set $9 + (i32.add + (local.get $2) + (i32.const 20) + ) + ) + (i32.store + (local.tee $4 + (i32.add + (local.get $2) + (i32.const 28) + ) + ) + (local.get $0) + ) + (call $_glShaderSource + (local.tee $3 + (call $_glCreateShader + (local.get $1) + ) + ) + (i32.const 1) + (local.get $4) + (i32.const 0) + ) + (i32.store + (local.get $5) + (i32.const 0) + ) + (call $_glCompileShader + (local.get $3) + ) + (call $_glGetShaderiv + (local.get $3) + (i32.const 35713) + (local.get $5) + ) + (if + (i32.eq + (i32.load + (local.get $5) + ) + (i32.const 1) + ) + (block + (i32.store + (local.get $7) + (local.get $3) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11470) + (local.get $7) + ) + ) + (block + (i32.store + (local.get $2) + (local.get $3) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11429) + (local.get $2) + ) + (i32.store + (local.get $2) + (i32.const 0) + ) + (call $_glGetShaderiv + (local.get $3) + (i32.const 35716) + (local.get $2) + ) + (local.set $0 + (i32.load + (local.get $2) + ) + ) + (local.set $1 + (call $_llvm_stacksave) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.and + (i32.add + (local.get $0) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.and + (i32.add + (local.get $0) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (call $_glGetShaderInfoLog + (local.get $3) + (i32.load + (local.get $2) + ) + (local.get $9) + (local.get $4) + ) + (i32.store + (local.get $8) + (local.get $4) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11378) + (local.get $8) + ) + (call $_llvm_stackrestore + (local.get $1) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $3) + ) + (func $_LoadShaderProgram (; 396 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $4 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (local.set $8 + (i32.add + (local.get $3) + (i32.const 20) + ) + ) + (i32.store + (local.tee $7 + (i32.add + (local.get $3) + (i32.const 24) + ) + ) + (i32.const 0) + ) + (call $_glAttachShader + (local.tee $2 + (call $_glCreateProgram) + ) + (local.get $0) + ) + (call $_glAttachShader + (local.get $2) + (local.get $1) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 0) + (i32.const 11175) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 1) + (i32.const 11190) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 2) + (i32.const 11289) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 3) + (i32.const 11205) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 4) + (i32.const 11302) + ) + (call $_glBindAttribLocation + (local.get $2) + (i32.const 5) + (i32.const 11316) + ) + (call $_glLinkProgram + (local.get $2) + ) + (call $_glGetProgramiv + (local.get $2) + (i32.const 35714) + (local.get $7) + ) + (if (result i32) + (i32.load + (local.get $7) + ) + (block (result i32) + (i32.store + (local.get $4) + (local.get $2) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11381) + (local.get $4) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $2) + ) + (block (result i32) + (i32.store + (local.get $3) + (local.get $2) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11332) + (local.get $3) + ) + (i32.store + (local.get $3) + (i32.const 0) + ) + (call $_glGetProgramiv + (local.get $2) + (i32.const 35716) + (local.get $3) + ) + (local.set $0 + (i32.load + (local.get $3) + ) + ) + (local.set $4 + (call $_llvm_stacksave) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.and + (i32.add + (local.get $0) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.and + (i32.add + (local.get $0) + (i32.const 15) + ) + (i32.const -16) + ) + ) + ) + (call $_glGetProgramInfoLog + (local.get $2) + (i32.load + (local.get $3) + ) + (local.get $8) + (local.get $1) + ) + (i32.store + (local.get $6) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11378) + (local.get $6) + ) + (call $_glDeleteProgram + (local.get $2) + ) + (call $_llvm_stackrestore + (local.get $4) + ) + (global.set $STACKTOP + (local.get $5) + ) + (i32.const 0) + ) + ) + ) + (func $_GetPixelDataSize (; 397 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (i32.div_s + (i32.mul + (block $do-once (result i32) + (block $switch-default + (block $switch-case19 + (block $switch-case18 + (block $switch-case14 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case + (br_table $switch-case $switch-case3 $switch-case3 $switch-case5 $switch-case3 $switch-case3 $switch-case4 $switch-case6 $switch-case7 $switch-case8 $switch-case14 $switch-case14 $switch-case18 $switch-case18 $switch-case14 $switch-case14 $switch-case18 $switch-case14 $switch-case14 $switch-case18 $switch-case19 $switch-default + (i32.sub + (local.get $2) + (i32.const 1) + ) + ) + ) + (br $do-once + (i32.const 8) + ) + ) + (br $do-once + (i32.const 16) + ) + ) + (br $do-once + (i32.const 32) + ) + ) + (br $do-once + (i32.const 24) + ) + ) + (br $do-once + (i32.const 32) + ) + ) + (br $do-once + (i32.const 96) + ) + ) + (br $do-once + (i32.const 128) + ) + ) + (br $do-once + (i32.const 4) + ) + ) + (br $do-once + (i32.const 8) + ) + ) + (br $do-once + (i32.const 2) + ) + ) + (i32.const 0) + ) + (i32.mul + (local.get $0) + (local.get $1) + ) + ) + (i32.const 8) + ) + ) + (func $_rlGetGlTextureFormats (; 398 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $1) + (i32.const -1) + ) + (i32.store + (local.get $2) + (i32.const -1) + ) + (i32.store + (local.get $3) + (i32.const -1) + ) + (block $do-once + (block $switch-default + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (block $switch-case15 + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (block $switch-case10 + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-case5 $switch-case6 $switch-case7 $switch-case8 $switch-case9 $switch-case10 $switch-case11 $switch-case12 $switch-case13 $switch-case14 $switch-case15 $switch-case16 $switch-case17 $switch-case18 $switch-case19 $switch-default + (i32.sub + (local.get $0) + (i32.const 1) + ) + ) + ) + (i32.store + (local.get $1) + (i32.const 6409) + ) + (i32.store + (local.get $2) + (i32.const 6409) + ) + (i32.store + (local.get $3) + (i32.const 5121) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6410) + ) + (i32.store + (local.get $2) + (i32.const 6410) + ) + (i32.store + (local.get $3) + (i32.const 5121) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6407) + ) + (i32.store + (local.get $2) + (i32.const 6407) + ) + (i32.store + (local.get $3) + (i32.const 33635) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6407) + ) + (i32.store + (local.get $2) + (i32.const 6407) + ) + (i32.store + (local.get $3) + (i32.const 5121) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6408) + ) + (i32.store + (local.get $2) + (i32.const 6408) + ) + (i32.store + (local.get $3) + (i32.const 32820) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6408) + ) + (i32.store + (local.get $2) + (i32.const 6408) + ) + (i32.store + (local.get $3) + (i32.const 32819) + ) + (br $do-once) + ) + (i32.store + (local.get $1) + (i32.const 6408) + ) + (i32.store + (local.get $2) + (i32.const 6408) + ) + (i32.store + (local.get $3) + (i32.const 5121) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28829) + ) + (i32.store + (local.get $1) + (i32.const 6409) + ) + ) + (i32.store + (local.get $2) + (i32.const 6409) + ) + (i32.store + (local.get $3) + (i32.const 5126) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28829) + ) + (i32.store + (local.get $1) + (i32.const 6407) + ) + ) + (i32.store + (local.get $2) + (i32.const 6407) + ) + (i32.store + (local.get $3) + (i32.const 5126) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28829) + ) + (i32.store + (local.get $1) + (i32.const 6408) + ) + ) + (i32.store + (local.get $2) + (i32.const 6408) + ) + (i32.store + (local.get $3) + (i32.const 5126) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28830) + ) + (i32.store + (local.get $1) + (i32.const 33776) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28830) + ) + (i32.store + (local.get $1) + (i32.const 33777) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28830) + ) + (i32.store + (local.get $1) + (i32.const 33778) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28830) + ) + (i32.store + (local.get $1) + (i32.const 33779) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28831) + ) + (i32.store + (local.get $1) + (i32.const 36196) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28832) + ) + (i32.store + (local.get $1) + (i32.const 37492) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28832) + ) + (i32.store + (local.get $1) + (i32.const 37496) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28833) + ) + (i32.store + (local.get $1) + (i32.const 35840) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28833) + ) + (i32.store + (local.get $1) + (i32.const 35842) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28834) + ) + (i32.store + (local.get $1) + (i32.const 37808) + ) + ) + (br $do-once) + ) + (if + (i32.load8_s + (i32.const 28834) + ) + (i32.store + (local.get $1) + (i32.const 37815) + ) + ) + (br $do-once) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 11924) + (local.get $5) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_rlglClose (; 399 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (call $_UnloadShaderDefault) + (call $_UnloadBuffersDefault) + (call $_glDeleteTextures + (i32.const 1) + (i32.const 27880) + ) + (i32.store + (local.get $0) + (i32.load + (i32.const 27880) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 11953) + (local.get $0) + ) + (call $_free + (i32.load + (i32.const 27872) + ) + ) + (global.set $STACKTOP + (local.get $1) + ) + ) + (func $_UnloadShaderDefault (; 400 ;) (; has Stack IR ;) + (call $_glUseProgram + (i32.const 0) + ) + (call $_glDetachShader + (i32.load + (i32.const 27568) + ) + (i32.load + (i32.const 27908) + ) + ) + (call $_glDetachShader + (i32.load + (i32.const 27568) + ) + (i32.load + (i32.const 27912) + ) + ) + (call $_glDeleteShader + (i32.load + (i32.const 27908) + ) + ) + (call $_glDeleteShader + (i32.load + (i32.const 27912) + ) + ) + (call $_glDeleteProgram + (i32.load + (i32.const 27568) + ) + ) + ) + (func $_UnloadBuffersDefault (; 401 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $0 + (i32.load + (i32.const 27884) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.const 0) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + ) + (call $_glDisableVertexAttribArray + (i32.const 0) + ) + (call $_glDisableVertexAttribArray + (i32.const 1) + ) + (call $_glDisableVertexAttribArray + (i32.const 2) + ) + (call $_glDisableVertexAttribArray + (i32.const 3) + ) + (call $_glBindBuffer + (i32.const 34962) + (i32.const 0) + ) + (call $_glBindBuffer + (i32.const 34963) + (i32.const 0) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 22624) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 22628) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 22632) + ) + (call $_glDeleteBuffers + (i32.const 1) + (i32.const 22636) + ) + (if + (i32.load8_s + (i32.const 28826) + ) + (block + (local.set $0 + (i32.load + (i32.const 27900) + ) + ) + (call_indirect (type $FUNCSIG$vii) + (i32.const 1) + (i32.const 22620) + (i32.add + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.const 159) + ) + ) + ) + ) + (call $_free + (i32.load + (i32.const 22604) + ) + ) + (call $_free + (i32.load + (i32.const 22608) + ) + ) + (call $_free + (i32.load + (i32.const 22612) + ) + ) + (call $_free + (i32.load + (i32.const 22616) + ) + ) + ) + (func $_rlReadScreenPixels (; 402 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (call $_glReadPixels + (i32.const 0) + (i32.const 0) + (local.get $0) + (local.get $1) + (i32.const 6408) + (i32.const 5121) + (local.tee $3 + (call $_calloc + (local.tee $2 + (i32.mul + (local.get $1) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + ) + (i32.const 1) + ) + ) + ) + (local.set $2 + (call $_malloc + (local.get $2) + ) + ) + (if + (i32.le_s + (local.get $1) + (i32.const 0) + ) + (block + (call $_free + (local.get $3) + ) + (return + (local.get $2) + ) + ) + ) + (local.set $4 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (local.set $5 + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + ) + (local.set $6 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (local.set $7 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (local.set $0 + (local.tee $8 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + ) + (loop $while-in + (if + (local.get $5) + (block + (local.set $9 + (i32.mul + (local.get $0) + (local.get $6) + ) + ) + (local.set $10 + (i32.mul + (local.get $7) + (i32.sub + (local.get $8) + (local.get $0) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in1 + (i32.store8 + (i32.add + (i32.add + (local.get $1) + (local.get $10) + ) + (local.get $2) + ) + (select + (i32.load8_s + (i32.add + (i32.add + (local.get $1) + (local.get $9) + ) + (local.get $3) + ) + ) + (i32.const -1) + (i32.and + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.const 3) + ) + ) + ) + (br_if $while-in1 + (i32.lt_s + (local.get $1) + (local.get $4) + ) + ) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in) + ) + ) + ) + (call $_free + (local.get $3) + ) + (local.get $2) + ) + (func $_ProcessGestureEvent (; 403 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i64) + (local $8 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (i32.store + (i32.const 27920) + (local.tee $8 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (local.set $6 + (i32.eq + (local.tee $5 + (i32.load + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + (block $folding-inner0 + (if + (i32.ge_s + (local.get $8) + (i32.const 2) + ) + (block + (if + (local.get $6) + (block + (i64.store + (i32.const 27576) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store + (i32.const 27608) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i32.store + (i32.const 27916) + (i32.const 4) + ) + (br $folding-inner0) + ) + ) + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case0 $switch-default $switch-case $switch-default + (local.get $5) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27600) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27616) + ) + ) + (local.set $3 + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + ) + (i64.store + (i32.const 27576) + (i64.load + (i32.const 27600) + ) + ) + (i64.store + (i32.const 27608) + (i64.load + (i32.const 27616) + ) + ) + (i64.store + (i32.const 27600) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store + (i32.const 27616) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27576) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27600) + ) + ) + (i32.store + (i32.const 27916) + (block $__rjto$0 (result i32) + (block $__rjti$0 + (br_if $__rjti$0 + (f32.ge + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (f32.const 0.004999999888241291) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27608) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27616) + ) + ) + (br_if $__rjti$0 + (f32.ge + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (f32.const 0.004999999888241291) + ) + ) + (br $__rjto$0 + (i32.const 4) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27600) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27616) + ) + ) + (select + (i32.const 256) + (i32.const 512) + (f32.lt + (f32.sub + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (local.get $3) + ) + (f32.const 0) + ) + ) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27600) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27616) + ) + ) + (br $folding-inner0) + ) + (i32.store + (i32.const 27920) + (i32.const 0) + ) + (i32.store + (i32.const 27916) + (i32.const 0) + ) + (br $folding-inner0) + ) + (br $folding-inner0) + ) + ) + (if + (local.get $6) + (block + (i32.store + (i32.const 27924) + (i32.add + (local.tee $5 + (i32.load + (i32.const 27924) + ) + ) + (i32.const 1) + ) + ) + (block $__rjto$1 + (block $__rjti$1 + (br_if $__rjti$1 + (i32.eqz + (i32.and + (i32.eqz + (i32.load + (i32.const 27916) + ) + ) + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27576) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (br_if $__rjti$1 + (i32.eqz + (f32.lt + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (f32.const 0.029999999329447746) + ) + ) + ) + (i32.store + (i32.const 27916) + (i32.const 2) + ) + (i32.store + (i32.const 27924) + (i32.const 0) + ) + (br $__rjto$1) + ) + (i32.store + (i32.const 27924) + (i32.const 1) + ) + (i32.store + (i32.const 27916) + (i32.const 1) + ) + ) + (i64.store + (i32.const 27576) + (local.tee $7 + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + ) + (i64.store + (i32.const 27584) + (local.get $7) + ) + (i64.store + (i32.const 27592) + (local.get $7) + ) + (i32.store + (i32.const 8952) + (i32.load offset=8 + (local.get $0) + ) + ) + (br $folding-inner0) + ) + ) + (block $switch-default4 + (block $switch-case3 + (block $switch-case2 + (br_table $switch-case2 $switch-default4 $switch-case3 $switch-default4 + (local.get $5) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 27916) + ) + (i32.const 8) + ) + (i64.store + (i32.const 27592) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27576) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27592) + ) + ) + (local.set $3 + (f32.div + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (f32.const 0) + ) + ) + (i32.store8 + (i32.const 28837) + (i32.const 0) + ) + (i32.store + (i32.const 27916) + (if (result i32) + (f32.gt + (local.get $3) + (f32.const 5.000000237487257e-04) + ) + (if (result i32) + (i32.eq + (i32.load + (i32.const 8952) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + (block (result i32) + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27576) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27592) + ) + ) + (if (result i32) + (i32.or + (f32.lt + (local.tee $3 + (f32.sub + (f32.const 360) + (call $_Vector2Angle + (local.get $1) + (local.get $2) + ) + ) + ) + (f32.const 30) + ) + (f32.gt + (local.get $3) + (f32.const 330) + ) + ) + (i32.const 16) + (select + (i32.const 64) + (select + (i32.const 32) + (select + (i32.const 128) + (i32.const 0) + (i32.and + (f32.lt + (local.get $3) + (f32.const 300) + ) + (f32.gt + (local.get $3) + (f32.const 210) + ) + ) + ) + (i32.and + (f32.lt + (local.get $3) + (f32.const 210) + ) + (f32.gt + (local.get $3) + (f32.const 120) + ) + ) + ) + (i32.and + (f32.lt + (local.get $3) + (f32.const 120) + ) + (f32.gt + (local.get $3) + (f32.const 30) + ) + ) + ) + ) + ) + (i32.const 0) + ) + (i32.const 0) + ) + ) + (f32.store + (i32.const 27584) + (f32.const 0) + ) + (f32.store + (i32.const 27588) + (f32.const 0) + ) + (i32.store + (i32.const 27920) + (i32.const 0) + ) + (br $folding-inner0) + ) + (local.set $5 + (i32.load + (i32.const 27916) + ) + ) + (if + (i32.eqz + (i32.load8_s + (i32.const 28837) + ) + ) + (i32.store8 + (i32.const 28837) + (i32.const 1) + ) + ) + (i64.store + (i32.const 27600) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (if + (i32.eq + (local.get $5) + (i32.const 4) + ) + (block + (i64.store align=4 + (local.get $1) + (i64.load align=4 + (i32.const 27576) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (i32.const 27600) + ) + ) + (if + (f32.ge + (call $_Vector2Distance + (local.get $1) + (local.get $2) + ) + (f32.const 0.014999999664723873) + ) + (i32.store + (i32.const 27916) + (i32.const 8) + ) + ) + ) + ) + (br $folding-inner0) + ) + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_UpdateGestures (; 404 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.and + (i32.lt_s + (i32.load + (i32.const 27920) + ) + (i32.const 2) + ) + (i32.lt_u + (i32.add + (i32.load + (i32.const 27916) + ) + (i32.const -1) + ) + (i32.const 2) + ) + ) + (i32.store + (i32.const 27916) + (i32.const 4) + ) + ) + (block $switch + (block $switch-default + (br_table $switch $switch $switch-default $switch $switch-default $switch-default $switch-default $switch $switch-default + (i32.or + (i32.shr_u + (local.tee $0 + (i32.add + (i32.load + (i32.const 27916) + ) + (i32.const -16) + ) + ) + (i32.const 4) + ) + (i32.shl + (local.get $0) + (i32.const 28) + ) + ) + ) + ) + (return) + ) + (i32.store + (i32.const 27916) + (i32.const 0) + ) + ) + (func $_GifBegin (; 405 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (i32.store + (i32.const 27940) + (local.tee $0 + (call $_fopen + (local.get $0) + ) + ) + ) + (if + (i32.eqz + (local.get $0) + ) + (return) + ) + (i32.store + (i32.const 27668) + (call $_malloc + (i32.mul + (local.get $2) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + (drop + (call $_fwrite + (i32.const 12018) + (i32.const 6) + (i32.const 1) + (local.get $0) + ) + ) + (call $_fputc + (i32.and + (local.get $1) + (i32.const 255) + ) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 8) + ) + (i32.const 255) + ) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.and + (local.get $2) + (i32.const 255) + ) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.and + (i32.shr_u + (local.get $2) + (i32.const 8) + ) + (i32.const 255) + ) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 240) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (if + (i32.eqz + (local.get $3) + ) + (return) + ) + (call $_fputc + (i32.const 33) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 255) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 11) + (i32.load + (i32.const 27940) + ) + ) + (drop + (call $_fwrite + (i32.const 12025) + (i32.const 11) + (i32.const 1) + (i32.load + (i32.const 27940) + ) + ) + ) + (call $_fputc + (i32.const 3) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 1) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + (call $_fputc + (i32.const 0) + (i32.load + (i32.const 27940) + ) + ) + ) + (func $_GifWriteFrame (; 406 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1296) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1296) + ) + ) + (if + (i32.eqz + (i32.load + (i32.const 27940) + ) + ) + (block + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + ) + (call $_GifMakePalette + (local.tee $5 + (i32.load + (i32.const 27668) + ) + ) + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + ) + (call $_GifThresholdImage + (local.get $5) + (local.get $0) + (i32.load + (i32.const 27668) + ) + (local.get $1) + (local.get $2) + (local.get $3) + ) + (call $_GifWriteLzwImage + (i32.load + (i32.const 27940) + ) + (i32.load + (i32.const 27668) + ) + (local.get $1) + (local.get $2) + (local.get $3) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_GifMakePalette (; 407 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (i32.store + (local.get $4) + (i32.const 8) + ) + (drop + (call $_memcpy + (local.tee $3 + (call $_malloc + (local.tee $5 + (i32.shl + (local.tee $2 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (i32.const 2) + ) + ) + ) + ) + (local.get $1) + (local.get $5) + ) + ) + (call $_GifSplitPalette + (local.get $3) + (if (result i32) + (local.get $0) + (call $_GifPickChangedPixels + (local.get $0) + (local.get $3) + (local.get $2) + ) + (local.get $2) + ) + (i32.const 1) + (i32.const 256) + (i32.const 128) + (i32.const 64) + (i32.const 1) + (i32.const 0) + (local.get $4) + ) + (call $_free + (local.get $3) + ) + (i32.store8 + (i32.add + (local.get $4) + (i32.const 1155) + ) + (i32.const 0) + ) + (i32.store8 offset=900 + (local.get $4) + (i32.const 0) + ) + (i32.store8 offset=516 + (local.get $4) + (i32.const 0) + ) + (i32.store8 offset=260 + (local.get $4) + (i32.const 0) + ) + (i32.store8 offset=4 + (local.get $4) + (i32.const 0) + ) + ) + (func $_GifThresholdImage (; 408 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.tee $9 + (i32.mul + (local.get $3) + (local.get $4) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $7) + ) + (return) + ) + ) + (local.set $8 + (i32.add + (local.get $6) + (i32.const 4) + ) + ) + (local.set $4 + (local.get $6) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.tee $10 + (i32.ne + (local.get $0) + (i32.const 0) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.ne + (local.tee $11 + (i32.load8_s + (local.get $0) + ) + ) + (i32.load8_s + (local.get $1) + ) + ) + ) + (br_if $__rjti$0 + (i32.ne + (i32.load8_s offset=1 + (local.tee $6 + (local.get $0) + ) + ) + (i32.load8_s offset=1 + (local.get $1) + ) + ) + ) + (br_if $__rjti$0 + (i32.ne + (i32.load8_s offset=2 + (local.tee $12 + (local.get $0) + ) + ) + (i32.load8_s offset=2 + (local.get $1) + ) + ) + ) + (i32.store8 + (local.get $2) + (local.get $11) + ) + (i32.store8 offset=1 + (local.get $2) + (i32.load8_s offset=1 + (local.get $6) + ) + ) + (i32.store8 offset=2 + (local.get $2) + (i32.load8_s offset=2 + (local.get $12) + ) + ) + (i32.store8 offset=3 + (local.get $2) + (i32.const 0) + ) + (br $__rjto$0) + ) + (i32.store + (local.get $8) + (i32.const 1000000) + ) + (i32.store + (local.get $4) + (i32.const 1) + ) + (call $_GifGetClosestPaletteColor + (local.get $5) + (i32.load8_u + (local.get $1) + ) + (i32.load8_u offset=1 + (local.get $1) + ) + (i32.load8_u offset=2 + (local.get $1) + ) + (local.get $4) + (local.get $8) + (i32.const 1) + ) + (i32.store8 + (local.get $2) + (i32.load8_s + (i32.add + (local.tee $6 + (i32.load + (local.get $4) + ) + ) + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + ) + ) + (i32.store8 offset=1 + (local.get $2) + (i32.load8_s + (i32.add + (local.get $6) + (i32.add + (local.get $5) + (i32.const 260) + ) + ) + ) + ) + (i32.store8 offset=2 + (local.get $2) + (i32.load8_s + (i32.add + (i32.load + (local.get $4) + ) + (i32.add + (local.get $5) + (i32.const 516) + ) + ) + ) + ) + (i32.store8 offset=3 + (local.get $2) + (i32.load + (local.get $4) + ) + ) + ) + (local.set $0 + (select + (i32.add + (local.get $0) + (i32.const 4) + ) + (i32.const 0) + (local.get $10) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (i32.const 4) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (br_if $while-in + (i32.ne + (local.get $9) + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_GifWriteLzwImage (; 409 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local.set $14 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 272) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 272) + ) + ) + (call $_fputc + (i32.const 33) + (local.get $0) + ) + (call $_fputc + (i32.const 249) + (local.get $0) + ) + (call $_fputc + (i32.const 4) + (local.get $0) + ) + (call $_fputc + (i32.const 5) + (local.get $0) + ) + (call $_fputc + (i32.const 10) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 44) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_fputc + (i32.and + (local.get $2) + (i32.const 255) + ) + (local.get $0) + ) + (call $_fputc + (i32.and + (i32.shr_u + (local.get $2) + (i32.const 8) + ) + (i32.const 255) + ) + (local.get $0) + ) + (call $_fputc + (i32.and + (local.get $3) + (i32.const 255) + ) + (local.get $0) + ) + (call $_fputc + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + (i32.const 255) + ) + (local.get $0) + ) + (call $_fputc + (i32.add + (i32.load + (local.get $4) + ) + (i32.const 127) + ) + (local.get $0) + ) + (call $_GifWritePalette + (local.get $4) + (local.get $0) + ) + (local.set $8 + (i32.shl + (i32.const 1) + (local.tee $4 + (i32.load + (local.get $4) + ) + ) + ) + ) + (call $_fputc + (local.get $4) + (local.get $0) + ) + (drop + (call $_memset + (local.tee $9 + (call $_malloc + (i32.const 2097152) + ) + ) + (i32.const 0) + (i32.const 2097152) + ) + ) + (local.set $12 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (i32.store8 offset=1 + (local.get $5) + (i32.const 0) + ) + (i32.store8 + (local.get $5) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $5) + (i32.const 0) + ) + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $8) + (local.tee $10 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + (if + (local.get $3) + (block + (local.set $16 + (i32.eqz + (local.get $2) + ) + ) + (local.set $6 + (local.get $10) + ) + (local.set $7 + (i32.const -1) + ) + (local.set $4 + (local.get $12) + ) + (loop $while-in + (if + (i32.eqz + (local.get $16) + ) + (block + (local.set $17 + (i32.mul + (local.get $2) + (local.get $15) + ) + ) + (local.set $11 + (local.get $7) + ) + (local.set $13 + (i32.const 0) + ) + (loop $while-in1 + (local.set $7 + (i32.load8_u + (i32.add + (local.get $1) + (i32.or + (i32.shl + (i32.add + (local.get $13) + (local.get $17) + ) + (i32.const 2) + ) + (i32.const 3) + ) + ) + ) + ) + (if + (i32.ge_s + (local.get $11) + (i32.const 0) + ) + (block $do-once + (if + (local.tee $19 + (i32.load16_s + (local.tee $18 + (i32.add + (i32.add + (i32.shl + (local.get $11) + (i32.const 9) + ) + (local.get $9) + ) + (i32.shl + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + (block + (local.set $7 + (i32.and + (local.get $19) + (i32.const 65535) + ) + ) + (br $do-once) + ) + ) + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $11) + (local.get $6) + ) + (i32.store16 + (local.get $18) + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + (local.set $6 + (i32.add + (local.get $6) + (i32.ge_u + (local.get $4) + (i32.shl + (i32.const 1) + (local.get $6) + ) + ) + ) + ) + (if + (i32.eq + (local.get $4) + (i32.const 4095) + ) + (block + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $8) + (local.get $6) + ) + (drop + (call $_memset + (local.get $9) + (i32.const 0) + (i32.const 2097152) + ) + ) + (local.set $6 + (local.get $10) + ) + (local.set $4 + (local.get $12) + ) + ) + ) + ) + ) + (if + (i32.ne + (local.tee $13 + (i32.add + (local.get $13) + (i32.const 1) + ) + ) + (local.get $2) + ) + (block + (local.set $11 + (local.get $7) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $15 + (i32.add + (local.get $15) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + (block + (local.set $6 + (local.get $10) + ) + (local.set $7 + (i32.const -1) + ) + ) + ) + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $7) + (local.get $6) + ) + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $8) + (local.get $6) + ) + (call $_GifWriteCode + (local.get $0) + (local.get $5) + (local.get $12) + (local.get $10) + ) + (if + (i32.load8_s + (local.get $5) + ) + (loop $while-in3 + (call $_GifWriteBit + (local.get $5) + (i32.const 0) + ) + (br_if $while-in3 + (i32.load8_s + (local.get $5) + ) + ) + ) + ) + (if + (i32.eqz + (i32.load offset=4 + (local.get $5) + ) + ) + (block + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_free + (local.get $9) + ) + (global.set $STACKTOP + (local.get $14) + ) + (return) + ) + ) + (call $_GifWriteChunk + (local.get $0) + (local.get $5) + ) + (call $_fputc + (i32.const 0) + (local.get $0) + ) + (call $_free + (local.get $9) + ) + (global.set $STACKTOP + (local.get $14) + ) + ) + (func $_GifWritePalette (; 410 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (call $_fputc + (i32.const 0) + (local.get $1) + ) + (call $_fputc + (i32.const 0) + (local.get $1) + ) + (call $_fputc + (i32.const 0) + (local.get $1) + ) + (if + (i32.le_s + (i32.shl + (i32.const 1) + (i32.load + (local.get $0) + ) + ) + (i32.const 1) + ) + (return) + ) + (local.set $2 + (i32.const 1) + ) + (loop $while-in + (local.set $3 + (i32.load8_u + (i32.add + (local.get $2) + (i32.add + (local.get $0) + (i32.const 260) + ) + ) + ) + ) + (local.set $4 + (i32.load8_u + (i32.add + (local.get $2) + (i32.add + (local.get $0) + (i32.const 516) + ) + ) + ) + ) + (call $_fputc + (i32.load8_u + (i32.add + (local.get $2) + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + (local.get $1) + ) + (call $_fputc + (local.get $3) + (local.get $1) + ) + (call $_fputc + (local.get $4) + (local.get $1) + ) + (br_if $while-in + (i32.lt_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.shl + (i32.const 1) + (i32.load + (local.get $0) + ) + ) + ) + ) + ) + ) + (func $_GifWriteCode (; 411 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (if + (i32.eqz + (local.get $3) + ) + (return) + ) + (loop $while-in + (call $_GifWriteBit + (local.get $1) + (local.get $2) + ) + (if + (i32.eq + (i32.load offset=4 + (local.get $1) + ) + (i32.const 255) + ) + (call $_GifWriteChunk + (local.get $0) + (local.get $1) + ) + ) + (local.set $2 + (i32.shr_u + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + (func $_GifWriteBit (; 412 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (i32.store8 offset=1 + (local.get $0) + (local.tee $2 + (i32.and + (i32.or + (i32.load8_u offset=1 + (local.get $0) + ) + (i32.shl + (i32.and + (local.get $1) + (i32.const 1) + ) + (i32.and + (local.tee $1 + (i32.load8_s + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + ) + (i32.const 255) + ) + ) + ) + (i32.store8 + (local.get $0) + (local.tee $1 + (i32.shr_s + (i32.shl + (i32.add + (local.get $1) + (i32.const 1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (if + (i32.le_s + (i32.and + (local.get $1) + (i32.const 255) + ) + (i32.const 7) + ) + (return) + ) + (i32.store offset=4 + (local.get $0) + (i32.add + (local.tee $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $1) + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.get $2) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=1 + (local.get $0) + (i32.const 0) + ) + ) + (func $_GifWriteChunk (; 413 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (call $_fputc + (i32.load offset=4 + (local.get $1) + ) + (local.get $0) + ) + (drop + (call $_fwrite + (i32.add + (local.get $1) + (i32.const 8) + ) + (i32.const 1) + (i32.load offset=4 + (local.get $1) + ) + (local.get $0) + ) + ) + (i32.store8 + (local.get $1) + (i32.const 0) + ) + (i32.store8 offset=1 + (local.get $1) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $1) + (i32.const 0) + ) + ) + (func $_GifGetClosestPaletteColor (; 414 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $9 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.le_s + (local.tee $8 + (i32.shl + (i32.const 1) + (i32.load + (local.get $0) + ) + ) + ) + (local.get $6) + ) + (block + (if + (i32.eqz + (local.tee $6 + (i32.sub + (local.get $6) + (local.get $8) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $9) + ) + (return) + ) + ) + (if + (i32.ge_s + (local.tee $0 + (i32.add + (i32.add + (select + (i32.sub + (i32.const 0) + (local.tee $1 + (i32.sub + (local.get $1) + (i32.load8_u + (i32.add + (local.get $6) + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + ) + ) + (local.get $1) + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + ) + (select + (i32.sub + (i32.const 0) + (local.tee $1 + (i32.sub + (local.get $2) + (i32.load8_u + (i32.add + (local.get $6) + (i32.add + (local.get $0) + (i32.const 260) + ) + ) + ) + ) + ) + ) + (local.get $1) + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + ) + ) + (select + (i32.sub + (i32.const 0) + (local.tee $0 + (i32.sub + (local.get $3) + (i32.load8_u + (i32.add + (local.get $6) + (i32.add + (local.get $0) + (i32.const 516) + ) + ) + ) + ) + ) + ) + (local.get $0) + (i32.lt_s + (local.get $0) + (i32.const 0) + ) + ) + ) + ) + (i32.load + (local.get $5) + ) + ) + (block + (global.set $STACKTOP + (local.get $9) + ) + (return) + ) + ) + (i32.store + (local.get $4) + (local.get $6) + ) + (i32.store + (local.get $5) + (local.get $0) + ) + (global.set $STACKTOP + (local.get $9) + ) + (return) + ) + ) + (i32.store + (local.get $7) + (local.get $1) + ) + (i32.store offset=4 + (local.get $7) + (local.get $2) + ) + (i32.store offset=8 + (local.get $7) + (local.get $3) + ) + (local.set $8 + (i32.shl + (local.get $6) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.tee $7 + (i32.load + (i32.add + (i32.shl + (i32.load8_u + (i32.add + (local.get $6) + (i32.add + (local.get $0) + (i32.const 772) + ) + ) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + (local.tee $6 + (i32.load8_u + (i32.add + (local.get $6) + (i32.add + (local.get $0) + (i32.const 1027) + ) + ) + ) + ) + ) + (block + (call $_GifGetClosestPaletteColor + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $8) + ) + (if + (i32.gt_s + (i32.load + (local.get $5) + ) + (i32.sub + (local.get $6) + (local.get $7) + ) + ) + (call $_GifGetClosestPaletteColor + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (i32.or + (local.get $8) + (i32.const 1) + ) + ) + ) + ) + (block + (call $_GifGetClosestPaletteColor + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (i32.or + (local.get $8) + (i32.const 1) + ) + ) + (if + (i32.gt_s + (i32.load + (local.get $5) + ) + (i32.sub + (local.get $7) + (local.get $6) + ) + ) + (call $_GifGetClosestPaletteColor + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $8) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $9) + ) + ) + (func $_GifPickChangedPixels (; 415 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.le_s + (local.get $2) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + (local.set $3 + (local.get $0) + ) + (local.set $0 + (i32.const 0) + ) + (local.set $4 + (local.get $1) + ) + (loop $while-in + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.ne + (local.tee $6 + (i32.load8_s + (local.get $1) + ) + ) + (i32.load8_s + (local.get $3) + ) + ) + ) + (br_if $__rjti$0 + (i32.ne + (i32.load8_s offset=1 + (local.get $3) + ) + (i32.load8_s offset=1 + (local.get $1) + ) + ) + ) + (br_if $__rjti$0 + (i32.ne + (i32.load8_s offset=2 + (local.get $3) + ) + (i32.load8_s offset=2 + (local.get $1) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (local.get $4) + (local.get $6) + ) + (i32.store8 offset=1 + (local.get $4) + (i32.load8_s offset=1 + (local.get $1) + ) + ) + (i32.store8 offset=2 + (local.get $4) + (i32.load8_s offset=2 + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.set $4 + (i32.add + (local.get $4) + (i32.const 4) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $2) + ) + ) + ) + (local.get $0) + ) + (func $_GifSplitPalette (; 416 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i64) + (local $14 i64) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i64) + (local $20 i32) + (local $21 i64) + (local $22 i64) + (if + (i32.or + (i32.eqz + (local.get $1) + ) + (i32.le_s + (local.get $3) + (local.get $2) + ) + ) + (return) + ) + (local.set $9 + (local.get $0) + ) + (local.set $18 + (local.get $6) + ) + (block $__rjto$0 + (block $__rjti$0 + (loop $while-in + (if + (i32.ne + (i32.add + (local.get $2) + (i32.const 1) + ) + (local.get $3) + ) + (block + (local.set $15 + (if (result i32) + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (block (result i32) + (local.set $15 + (i32.const 0) + ) + (local.set $16 + (i32.const 0) + ) + (local.set $11 + (i32.const 0) + ) + (local.set $0 + (i32.const 0) + ) + (local.set $17 + (i32.const 255) + ) + (local.set $12 + (i32.const 255) + ) + (local.set $6 + (i32.const 255) + ) + (loop $while-in1 (result i32) + (local.set $0 + (select + (local.tee $10 + (i32.load8_u + (i32.add + (local.get $9) + (local.tee $20 + (i32.shl + (local.get $15) + (i32.const 2) + ) + ) + ) + ) + ) + (local.get $0) + (i32.lt_s + (local.get $0) + (local.get $10) + ) + ) + ) + (local.set $6 + (select + (local.get $10) + (local.get $6) + (i32.gt_s + (local.get $6) + (local.get $10) + ) + ) + ) + (local.set $11 + (select + (local.tee $10 + (i32.load8_u + (i32.add + (i32.or + (local.get $20) + (i32.const 1) + ) + (local.get $9) + ) + ) + ) + (local.get $11) + (i32.lt_s + (local.get $11) + (local.get $10) + ) + ) + ) + (local.set $12 + (select + (local.get $10) + (local.get $12) + (i32.gt_s + (local.get $12) + (local.get $10) + ) + ) + ) + (local.set $16 + (select + (local.tee $10 + (i32.load8_u + (i32.add + (i32.or + (local.get $20) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (local.get $16) + (i32.lt_s + (local.get $16) + (local.get $10) + ) + ) + ) + (local.set $17 + (select + (local.get $10) + (local.get $17) + (i32.gt_s + (local.get $17) + (local.get $10) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.get $1) + (local.tee $15 + (i32.add + (local.get $15) + (i32.const 1) + ) + ) + ) + ) + (local.get $6) + ) + ) + (block (result i32) + (local.set $16 + (i32.const 0) + ) + (local.set $11 + (i32.const 0) + ) + (local.set $0 + (i32.const 0) + ) + (local.set $17 + (i32.const 255) + ) + (local.set $12 + (i32.const 255) + ) + (i32.const 255) + ) + ) + ) + (local.set $6 + (i32.sub + (local.get $1) + (local.tee $10 + (i32.div_s + (i32.mul + (local.get $1) + (i32.sub + (local.get $4) + (local.get $2) + ) + ) + (i32.sub + (local.get $3) + (local.get $2) + ) + ) + ) + ) + ) + (call $_GifPartitionByMedian + (local.get $9) + (i32.const 0) + (local.get $1) + (local.tee $0 + (select + (i32.const 0) + (select + (i32.const 2) + (i32.const 1) + (i32.gt_s + (local.tee $1 + (i32.sub + (local.get $16) + (local.get $17) + ) + ) + (local.tee $11 + (i32.sub + (local.get $11) + (local.get $12) + ) + ) + ) + ) + (i32.and + (i32.gt_s + (local.tee $0 + (i32.sub + (local.get $0) + (local.get $15) + ) + ) + (local.get $1) + ) + (i32.gt_s + (local.get $0) + (local.get $11) + ) + ) + ) + ) + (local.get $10) + ) + (i32.store8 + (i32.add + (local.get $18) + (i32.add + (local.get $8) + (i32.const 772) + ) + ) + (local.get $0) + ) + (i32.store8 + (i32.add + (local.get $18) + (i32.add + (local.get $8) + (i32.const 1027) + ) + ) + (i32.load8_s + (i32.add + (i32.or + (local.tee $1 + (i32.shl + (local.get $10) + (i32.const 2) + ) + ) + (local.get $0) + ) + (local.get $9) + ) + ) + ) + (call $_GifSplitPalette + (local.get $9) + (local.get $10) + (local.get $2) + (local.get $4) + (i32.sub + (local.get $4) + (local.get $5) + ) + (local.tee $2 + (i32.div_s + (local.get $5) + (i32.const 2) + ) + ) + (local.tee $12 + (i32.shl + (local.get $18) + (i32.const 1) + ) + ) + (local.get $7) + (local.get $8) + ) + (br_if $__rjti$0 + (i32.or + (i32.eqz + (local.get $6) + ) + (i32.ge_s + (local.get $4) + (local.get $3) + ) + ) + ) + (local.set $11 + (i32.add + (local.get $4) + (local.get $5) + ) + ) + (local.set $0 + (local.get $4) + ) + (local.set $9 + (i32.add + (local.get $1) + (local.get $9) + ) + ) + (local.set $1 + (local.get $6) + ) + (local.set $5 + (local.get $2) + ) + (local.set $4 + (local.get $11) + ) + (local.set $18 + (i32.or + (local.get $12) + (i32.const 1) + ) + ) + (local.set $2 + (local.get $0) + ) + (br $while-in) + ) + ) + ) + (br $__rjto$0) + ) + (return) + ) + (block $folding-inner0 + (if + (local.get $7) + (block + (if + (i32.eq + (local.get $2) + (i32.const 1) + ) + (block + (local.set $0 + (if (result i32) + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (block (result i32) + (local.set $0 + (i32.const 255) + ) + (local.set $3 + (i32.const 255) + ) + (local.set $4 + (i32.const 0) + ) + (local.set $5 + (i32.const 255) + ) + (loop $while-in3 + (local.set $5 + (select + (local.get $5) + (local.tee $7 + (i32.load8_u + (i32.add + (local.get $9) + (local.tee $6 + (i32.shl + (local.get $4) + (i32.const 2) + ) + ) + ) + ) + ) + (i32.lt_u + (local.get $5) + (local.get $7) + ) + ) + ) + (local.set $3 + (select + (local.get $3) + (local.tee $7 + (i32.load8_u + (i32.add + (i32.or + (local.get $6) + (i32.const 1) + ) + (local.get $9) + ) + ) + ) + (i32.lt_u + (local.get $3) + (local.get $7) + ) + ) + ) + (local.set $0 + (select + (local.get $0) + (local.tee $6 + (i32.load8_u + (i32.add + (i32.or + (local.get $6) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (i32.lt_u + (local.get $0) + (local.get $6) + ) + ) + ) + (br_if $while-in3 + (i32.ne + (local.get $1) + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + ) + ) + (local.set $1 + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + (local.set $3 + (i32.and + (local.get $5) + (i32.const 255) + ) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (block (result i32) + (local.set $1 + (i32.const -1) + ) + (local.set $3 + (i32.const -1) + ) + (i32.const -1) + ) + ) + ) + (br $folding-inner0) + ) + ) + (if + (i32.eq + (local.get $2) + (i32.add + (i32.shl + (i32.const 1) + (i32.load + (local.get $8) + ) + ) + (i32.const -1) + ) + ) + (block + (local.set $0 + (if (result i32) + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (block (result i32) + (local.set $0 + (i32.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (local.set $4 + (i32.const 0) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in5 + (local.set $5 + (select + (local.get $5) + (local.tee $7 + (i32.load8_u + (i32.add + (local.get $9) + (local.tee $6 + (i32.shl + (local.get $4) + (i32.const 2) + ) + ) + ) + ) + ) + (i32.gt_u + (local.get $5) + (local.get $7) + ) + ) + ) + (local.set $3 + (select + (local.get $3) + (local.tee $7 + (i32.load8_u + (i32.add + (i32.or + (local.get $6) + (i32.const 1) + ) + (local.get $9) + ) + ) + ) + (i32.gt_u + (local.get $3) + (local.get $7) + ) + ) + ) + (local.set $0 + (select + (local.get $0) + (local.tee $6 + (i32.load8_u + (i32.add + (i32.or + (local.get $6) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (i32.gt_u + (local.get $0) + (local.get $6) + ) + ) + ) + (br_if $while-in5 + (i32.ne + (local.get $1) + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + ) + ) + (local.set $1 + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + (local.set $3 + (i32.and + (local.get $5) + (i32.const 255) + ) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (block (result i32) + (local.set $1 + (i32.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (i32.const 0) + ) + ) + ) + (br $folding-inner0) + ) + ) + ) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (block + (local.set $0 + (i32.const 0) + ) + (loop $while-in7 + (local.set $19 + (i64.add + (i64.extend_i32_u + (i32.load8_u + (i32.add + (local.get $9) + (local.tee $3 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + ) + (local.get $19) + ) + ) + (local.set $13 + (i64.add + (i64.extend_i32_u + (i32.load8_u + (i32.add + (i32.or + (local.get $3) + (i32.const 1) + ) + (local.get $9) + ) + ) + ) + (local.get $13) + ) + ) + (local.set $14 + (i64.add + (local.get $14) + (i64.extend_i32_u + (i32.load8_u + (i32.add + (i32.or + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + ) + ) + (br_if $while-in7 + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (local.set $22 + (i64.div_u + (i64.add + (local.tee $21 + (i64.extend_i32_s + (i32.div_s + (local.get $1) + (i32.const 2) + ) + ) + ) + (local.get $13) + ) + (local.tee $13 + (i64.extend_i32_s + (local.get $1) + ) + ) + ) + ) + (local.set $14 + (i64.div_u + (i64.add + (local.get $14) + (local.get $21) + ) + (local.get $13) + ) + ) + (i64.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 4) + ) + ) + (i64.div_u + (i64.add + (local.get $19) + (local.get $21) + ) + (local.get $13) + ) + ) + (i64.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 260) + ) + ) + (local.get $22) + ) + (i64.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 516) + ) + ) + (local.get $14) + ) + (return) + ) + (i32.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 4) + ) + ) + (local.get $3) + ) + (i32.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 260) + ) + ) + (local.get $1) + ) + (i32.store8 + (i32.add + (local.get $2) + (i32.add + (local.get $8) + (i32.const 516) + ) + ) + (local.get $0) + ) + ) + (func $_GifPartitionByMedian (; 417 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.le_s + (local.tee $6 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + (local.get $1) + ) + (return) + ) + (loop $while-in + (if + (i32.gt_s + (local.tee $5 + (call $_GifPartition + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.div_s + (i32.sub + (local.get $2) + (local.get $1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + ) + (local.get $4) + ) + (call $_GifPartitionByMedian + (local.get $0) + (local.get $1) + (local.get $5) + (local.get $3) + (local.get $4) + ) + ) + (br_if $while-in + (i32.and + (i32.lt_s + (local.get $5) + (local.get $4) + ) + (i32.gt_s + (local.get $6) + (local.tee $1 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (func $_GifPartition (; 418 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (i32.load8_s + (i32.add + (local.get $0) + (i32.add + (local.get $3) + (i32.shl + (local.get $4) + (i32.const 2) + ) + ) + ) + ) + ) + (call $_GifSwapPixels + (local.get $0) + (local.get $4) + (local.tee $5 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + ) + (if + (i32.le_s + (local.get $5) + (local.get $1) + ) + (block + (call $_GifSwapPixels + (local.get $0) + (local.get $1) + (local.get $5) + ) + (return + (local.get $1) + ) + ) + ) + (local.set $4 + (local.get $1) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in + (if + (i32.lt_s + (i32.and + (local.tee $6 + (i32.load8_s + (i32.add + (local.get $0) + (i32.add + (local.get $3) + (i32.shl + (local.get $4) + (i32.const 2) + ) + ) + ) + ) + ) + (i32.const 255) + ) + (i32.and + (local.get $7) + (i32.const 255) + ) + ) + (block + (call $_GifSwapPixels + (local.get $0) + (local.get $4) + (local.get $1) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + (if + (i32.eq + (local.get $6) + (local.get $7) + ) + (block + (if + (local.get $2) + (block + (local.set $6 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (call $_GifSwapPixels + (local.get $0) + (local.get $4) + (local.get $1) + ) + (local.set $1 + (local.get $6) + ) + ) + ) + (local.set $2 + (i32.xor + (local.get $2) + (i32.const 1) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.get $5) + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + ) + ) + (call $_GifSwapPixels + (local.get $0) + (local.get $1) + (local.get $5) + ) + (local.get $1) + ) + (func $_GifSwapPixels (; 419 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local.set $4 + (i32.load8_s + (local.tee $3 + (i32.add + (local.get $0) + (local.tee $1 + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + ) + ) + (local.set $6 + (i32.load8_s + (local.tee $5 + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (local.set $8 + (i32.load8_s + (local.tee $7 + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + ) + (local.set $9 + (i32.load8_s + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 3) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (local.tee $1 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + ) + ) + (local.set $11 + (i32.load8_s + (local.tee $10 + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (local.set $13 + (i32.load8_s + (local.tee $12 + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + ) + (i32.store8 + (local.get $3) + (i32.load8_s + (local.get $2) + ) + ) + (i32.store8 + (local.get $5) + (local.get $11) + ) + (i32.store8 + (local.get $7) + (local.get $13) + ) + (i32.store8 + (local.get $2) + (local.get $4) + ) + (i32.store8 + (local.get $10) + (local.get $6) + ) + (i32.store8 + (local.get $12) + (local.get $8) + ) + (i32.store8 + (i32.add + (local.get $0) + (i32.or + (local.get $1) + (i32.const 3) + ) + ) + (local.get $9) + ) + ) + (func $_GifEnd (; 420 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.eqz + (local.tee $0 + (i32.load + (i32.const 27940) + ) + ) + ) + (return) + ) + (call $_fputc + (i32.const 59) + (local.get $0) + ) + (call $_fclose + (i32.load + (i32.const 27940) + ) + ) + (call $_free + (i32.load + (i32.const 27668) + ) + ) + (i32.store + (i32.const 27940) + (i32.const 0) + ) + (i32.store + (i32.const 27668) + (i32.const 0) + ) + ) + (func $_InitWindow (; 421 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $1) + (i32.const 12060) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12037) + (local.get $1) + ) + (i32.store + (i32.const 27944) + (i32.const 8964) + ) + (if + (i32.eqz + (call $_InitGraphicsDevice) + ) + (block + (global.set $STACKTOP + (local.get $0) + ) + (return) + ) + ) + (call $_srand + (call $_time + (i32.const 0) + ) + ) + (f64.store + (i32.const 27624) + (call $_glfwGetTime) + ) + (call $_LoadFontDefault) + (drop + (call $_emscripten_set_fullscreenchange_callback_on_thread + (i32.const 0) + (i32.const 0) + (i32.const 1) + (i32.const 3) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_keypress_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 4) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_click_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 5) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchstart_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 6) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchend_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 6) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchmove_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 6) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_touchcancel_callback_on_thread + (i32.const 19768) + (i32.const 0) + (i32.const 1) + (i32.const 6) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_gamepadconnected_callback_on_thread + (i32.const 0) + (i32.const 1) + (i32.const 7) + (i32.const 2) + ) + ) + (drop + (call $_emscripten_set_gamepaddisconnected_callback_on_thread + (i32.const 0) + (i32.const 1) + (i32.const 7) + (i32.const 2) + ) + ) + (f32.store + (i32.const 27932) + (f32.mul + (f32.convert_i32_s + (i32.load + (i32.const 27948) + ) + ) + (f32.const 0.5) + ) + ) + (f32.store + (i32.const 27936) + (f32.mul + (f32.convert_i32_s + (i32.load + (i32.const 27952) + ) + ) + (f32.const 0.5) + ) + ) + (global.set $STACKTOP + (local.get $0) + ) + ) + (func $_InitGraphicsDevice (; 422 ;) (; has Stack IR ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 56) + ) + ) + (local.set $4 + (i32.add + (local.get $0) + (i32.const 40) + ) + ) + (local.set $5 + (i32.add + (local.get $0) + (i32.const 32) + ) + ) + (local.set $6 + (i32.add + (local.get $0) + (i32.const 24) + ) + ) + (local.set $7 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (local.set $1 + (local.get $0) + ) + (i32.store + (i32.const 27948) + (i32.const 800) + ) + (i32.store + (i32.const 27952) + (i32.const 450) + ) + (call $_MatrixIdentity + (i32.add + (local.get $0) + (i32.const 72) + ) + ) + (i64.store align=4 + (i32.const 27992) + (i64.load offset=72 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28000) + (i64.load offset=80 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28008) + (i64.load offset=88 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28016) + (i64.load offset=96 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28024) + (i64.load offset=104 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28032) + (i64.load offset=112 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28040) + (i64.load offset=120 align=4 + (local.get $0) + ) + ) + (i64.store align=4 + (i32.const 28048) + (i64.load offset=128 align=4 + (local.get $0) + ) + ) + (drop + (call $_glfwSetErrorCallback + (i32.const 1) + ) + ) + (if + (i32.eqz + (call $_glfwInit) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 15544) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (i32.const 0) + ) + ) + ) + (i32.store + (i32.const 28056) + (i32.load + (i32.const 27948) + ) + ) + (i32.store + (i32.const 28060) + (i32.load + (i32.const 27952) + ) + ) + (call $_glfwDefaultWindowHints) + (call $_glfwWindowHint + (i32.const 131076) + (i32.const 1) + ) + (call $_glfwWindowHint + (i32.const 131075) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 131077) + (i32.const 1) + ) + (call $_glfwWindowHint + (i32.const 131082) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 139266) + (i32.const 2) + ) + (call $_glfwWindowHint + (i32.const 139267) + (i32.const 0) + ) + (call $_glfwWindowHint + (i32.const 139265) + (i32.const 196610) + ) + (call $_glfwWindowHint + (i32.const 139275) + (i32.const 221185) + ) + (i32.store + (i32.const 27928) + (local.tee $1 + (call $_glfwCreateWindow + (i32.load + (i32.const 27948) + ) + (i32.load + (i32.const 27952) + ) + (i32.load + (i32.const 27944) + ) + (i32.const 0) + (i32.const 0) + ) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (if + (local.get $1) + (block + (i32.store + (i32.const 28064) + (i32.load + (i32.const 27948) + ) + ) + (i32.store + (i32.const 28068) + (i32.load + (i32.const 27952) + ) + ) + (local.set $1 + (i32.load + (i32.const 27928) + ) + ) + (br $__rjti$0) + ) + ) + (br $__rjto$0) + ) + (if + (local.get $1) + (block + (call $_TraceLog + (i32.const 3) + (i32.const 15641) + (local.get $6) + ) + (local.set $1 + (i32.load + (i32.const 28068) + ) + ) + (i32.store + (local.get $5) + (i32.load + (i32.const 28064) + ) + ) + (i32.store offset=4 + (local.get $5) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15681) + (local.get $5) + ) + (local.set $1 + (i32.load + (i32.const 27952) + ) + ) + (i32.store + (local.get $4) + (i32.load + (i32.const 27948) + ) + ) + (i32.store offset=4 + (local.get $4) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15702) + (local.get $4) + ) + (local.set $1 + (i32.load + (i32.const 28076) + ) + ) + (i32.store + (local.get $2) + (i32.load + (i32.const 28072) + ) + ) + (i32.store offset=4 + (local.get $2) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15723) + (local.get $2) + ) + (drop + (call $_glfwSetWindowSizeCallback + (i32.load + (i32.const 27928) + ) + (i32.const 1) + ) + ) + (drop + (call $_glfwSetCursorEnterCallback + (i32.load + (i32.const 27928) + ) + (i32.const 2) + ) + ) + (drop + (call $_glfwSetKeyCallback + (i32.load + (i32.const 27928) + ) + (i32.const 1) + ) + ) + (drop + (call $_glfwSetMouseButtonCallback + (i32.load + (i32.const 27928) + ) + (i32.const 1) + ) + ) + (drop + (call $_glfwSetCursorPosCallback + (i32.load + (i32.const 27928) + ) + (i32.const 1) + ) + ) + (drop + (call $_glfwSetCharCallback + (i32.load + (i32.const 27928) + ) + (i32.const 3) + ) + ) + (drop + (call $_glfwSetScrollCallback + (i32.load + (i32.const 27928) + ) + (i32.const 2) + ) + ) + (drop + (call $_glfwSetWindowIconifyCallback + (i32.load + (i32.const 27928) + ) + (i32.const 4) + ) + ) + (drop + (call $_glfwSetDropCallback + (i32.load + (i32.const 27928) + ) + (i32.const 2) + ) + ) + (call $_glfwMakeContextCurrent + (i32.load + (i32.const 27928) + ) + ) + (call $_rlglInit + (i32.load + (i32.const 27948) + ) + (i32.load + (i32.const 27952) + ) + ) + (call $_SetupViewport + (i32.load + (i32.const 28064) + ) + (i32.load + (i32.const 28068) + ) + ) + (i32.store8 offset=136 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=137 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=138 + (local.get $0) + (i32.const -11) + ) + (i32.store8 offset=139 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $2) + (i32.load offset=136 align=1 + (local.get $0) + ) + ) + (call $_ClearBackground + (local.get $2) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (i32.const 1) + ) + ) + ) + ) + (call $_glfwTerminate) + (call $_TraceLog + (i32.const 4) + (i32.const 15608) + (local.get $7) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 0) + ) + (func $_LoadFontDefault (; 423 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local.set $11 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const 84) + ) + ) + (local.set $8 + (i32.sub + (local.get $1) + (i32.const -64) + ) + ) + (local.set $9 + (local.get $1) + ) + (local.set $3 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (local.set $4 + (i32.add + (local.get $1) + (i32.const 44) + ) + ) + (local.set $10 + (i32.add + (local.get $1) + (i32.const 24) + ) + ) + (i32.store + (i32.const 27960) + (i32.const 224) + ) + (drop + (call $_memset + (local.tee $7 + (call $_malloc + (i32.const 65536) + ) + ) + (i32.const 0) + (i32.const 65536) + ) + ) + (loop $while-in + (local.set $12 + (i32.load + (i32.add + (i32.shl + (local.get $5) + (i32.const 2) + ) + (i32.const 2000) + ) + ) + ) + (local.set $1 + (i32.const 31) + ) + (loop $while-in1 + (if + (i32.and + (local.get $12) + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + (i32.store align=1 + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $1) + ) + (i32.const 2) + ) + (local.get $7) + ) + (i32.const -1) + ) + ) + (local.set $6 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (if + (local.get $1) + (block + (local.set $1 + (local.get $6) + ) + (br $while-in1) + ) + ) + ) + (local.set $5 + (select + (i32.const 0) + (i32.add + (local.get $5) + (i32.const 1) + ) + (i32.gt_s + (local.get $5) + (i32.const 511) + ) + ) + ) + (br_if $while-in + (i32.lt_u + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 32) + ) + ) + (i32.const 16384) + ) + ) + ) + (call $_LoadImageEx + (local.get $3) + (local.get $7) + (i32.const 128) + (i32.const 128) + ) + (call $_ImageFormat + (local.get $3) + (i32.const 2) + ) + (call $_free + (local.get $7) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $3) + ) + ) + (call $_LoadTextureFromImage + (local.get $4) + (local.get $2) + ) + (i64.store align=4 + (i32.const 27964) + (i64.load align=4 + (local.get $4) + ) + ) + (i64.store align=4 + (i32.const 27972) + (i64.load offset=8 align=4 + (local.get $4) + ) + ) + (i32.store + (i32.const 27980) + (i32.load offset=16 + (local.get $4) + ) + ) + (i32.store + (i32.const 27988) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load + (i32.const 27960) + ) + ) + (i32.const 36) + ) + ) + ) + (i32.store + (i32.const 27984) + (call $_malloc + (i32.shl + (local.get $1) + (i32.const 4) + ) + ) + ) + (if + (i32.le_s + (i32.load + (i32.const 27960) + ) + (i32.const 0) + ) + (block + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $3) + ) + ) + (call $_UnloadImage + (local.get $2) + ) + (i32.store + (i32.const 27956) + (i32.trunc_f32_s + (f32.load offset=12 + (i32.load + (i32.const 27984) + ) + ) + ) + ) + (i32.store + (local.get $9) + (i32.load + (i32.const 27964) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12211) + (local.get $9) + ) + (global.set $STACKTOP + (local.get $11) + ) + (return) + ) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $5 + (i32.const 1) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in3 + (i32.store + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $0) + (i32.const 36) + ) + ) + (i32.add + (local.get $0) + (i32.const 32) + ) + ) + (f32.store + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + (f32.convert_i32_s + (local.get $5) + ) + ) + (f32.store offset=4 + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + (f32.convert_i32_s + (i32.add + (i32.mul + (local.get $1) + (i32.const 11) + ) + (i32.const 1) + ) + ) + ) + (f32.store offset=8 + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + (f32.convert_i32_s + (local.tee $4 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (i32.const 4048) + ) + ) + ) + ) + ) + (f32.store offset=12 + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + (f32.const 10) + ) + (local.set $6 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (if + (i32.ge_s + (local.tee $5 + (i32.add + (i32.trunc_f32_s + (f32.add + (f32.load offset=8 + (i32.add + (local.tee $7 + (i32.load + (i32.const 27984) + ) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + ) + (f32.const 1) + ) + ) + (local.get $5) + ) + ) + (i32.load + (i32.const 27968) + ) + ) + (block + (f32.store + (i32.add + (i32.shl + (local.get $0) + (i32.const 4) + ) + (local.get $7) + ) + (f32.const 1) + ) + (f32.store offset=4 + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + (f32.convert_i32_s + (i32.add + (i32.mul + (local.get $6) + (i32.const 11) + ) + (i32.const 1) + ) + ) + ) + (local.set $1 + (local.get $6) + ) + (local.set $5 + (i32.add + (local.get $4) + (i32.const 2) + ) + ) + ) + ) + (i32.store offset=4 + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $0) + (i32.const 36) + ) + ) + (i32.const 0) + ) + (i32.store offset=8 + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $0) + (i32.const 36) + ) + ) + (i32.const 0) + ) + (i32.store offset=12 + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $0) + (i32.const 36) + ) + ) + (i32.const 0) + ) + (local.set $6 + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $0) + (i32.const 36) + ) + ) + ) + (local.set $4 + (i32.add + (i32.load + (i32.const 27984) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + ) + (i64.store align=4 + (local.get $8) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $8) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i32.store offset=16 + (local.get $8) + (i32.load offset=16 + (local.get $3) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $4) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $4) + ) + ) + (call $_ImageFromImage + (local.get $10) + (local.get $8) + (local.get $2) + ) + (i64.store offset=16 align=4 + (local.get $6) + (i64.load align=4 + (local.get $10) + ) + ) + (i64.store offset=24 align=4 + (local.get $6) + (i64.load offset=8 align=4 + (local.get $10) + ) + ) + (i32.store offset=32 + (local.get $6) + (i32.load offset=16 + (local.get $10) + ) + ) + (br_if $while-in3 + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.load + (i32.const 27960) + ) + ) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $3) + ) + ) + (call $_UnloadImage + (local.get $2) + ) + (i32.store + (i32.const 27956) + (i32.trunc_f32_s + (f32.load offset=12 + (i32.load + (i32.const 27984) + ) + ) + ) + ) + (i32.store + (local.get $9) + (i32.load + (i32.const 27964) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12211) + (local.get $9) + ) + (global.set $STACKTOP + (local.get $11) + ) + ) + (func $_EmscriptenFullscreenChangeCallback (; 424 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (local.set $4 + (i32.load offset=264 + (local.get $1) + ) + ) + (local.set $5 + (i32.load offset=268 + (local.get $1) + ) + ) + (local.set $6 + (i32.load offset=272 + (local.get $1) + ) + ) + (local.set $7 + (i32.load offset=276 + (local.get $1) + ) + ) + (if + (i32.load + (local.get $1) + ) + (block + (i32.store + (local.get $0) + (local.get $4) + ) + (i32.store offset=4 + (local.get $0) + (local.get $5) + ) + (i32.store offset=8 + (local.get $0) + (local.get $6) + ) + (i32.store offset=12 + (local.get $0) + (local.get $7) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12075) + (local.get $0) + ) + ) + (block + (i32.store + (local.get $2) + (local.get $4) + ) + (i32.store offset=4 + (local.get $2) + (local.get $5) + ) + (i32.store offset=8 + (local.get $2) + (local.get $6) + ) + (i32.store offset=12 + (local.get $2) + (local.get $7) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 12144) + (local.get $2) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 0) + ) + (func $_EmscriptenKeyboardCallback (; 425 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (if + (i32.ne + (local.get $0) + (i32.const 1) + ) + (return + (i32.const 0) + ) + ) + (if + (call $_strcmp + (i32.add + (local.get $1) + (i32.const 32) + ) + (i32.const 12068) + ) + (return + (i32.const 0) + ) + ) + (drop + (call $_emscripten_exit_pointerlock) + ) + (i32.const 0) + ) + (func $_EmscriptenMouseCallback (; 426 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 272) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 272) + ) + ) + (if + (i32.or + (i32.ne + (local.get $0) + (i32.const 4) + ) + (i32.const 1) + ) + (block + (global.set $STACKTOP + (local.get $2) + ) + (return + (i32.const 0) + ) + ) + ) + (drop + (call $_emscripten_get_pointerlock_status + (local.get $1) + ) + ) + (if + (i32.load + (local.get $1) + ) + (block + (drop + (call $_emscripten_exit_pointerlock) + ) + (drop + (call $_emscripten_get_pointerlock_status + (local.get $1) + ) + ) + ) + (drop + (call $_emscripten_request_pointerlock + (i32.const 0) + (i32.const 1) + ) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + (i32.const 0) + ) + (func $_EmscriptenTouchCallback (; 427 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 56) + ) + ) + (block $__rjto$0 + (i32.store + (local.get $2) + (block $__rjti$0 (result i32) + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $__rjto$0 + (i32.sub + (local.get $0) + (i32.const 22) + ) + ) + ) + (br $__rjti$0 + (i32.const 1) + ) + ) + (br $__rjti$0 + (i32.const 0) + ) + ) + (i32.const 2) + ) + ) + ) + (i32.store offset=4 + (local.get $2) + (i32.load + (local.get $1) + ) + ) + (i32.store offset=8 + (local.get $2) + (i32.load offset=20 + (local.get $1) + ) + ) + (i32.store offset=12 + (local.get $2) + (i32.load offset=72 + (local.get $1) + ) + ) + (local.set $4 + (f32.convert_i32_s + (i32.load offset=60 + (local.get $1) + ) + ) + ) + (f32.store offset=24 + (local.get $2) + (f32.convert_i32_s + (i32.load offset=56 + (local.get $1) + ) + ) + ) + (f32.store offset=28 + (local.get $2) + (local.get $4) + ) + (local.set $5 + (f32.convert_i32_s + (i32.load offset=112 + (local.get $1) + ) + ) + ) + (f32.store offset=32 + (local.get $2) + (f32.convert_i32_s + (i32.load offset=108 + (local.get $1) + ) + ) + ) + (f32.store offset=36 + (local.get $2) + (local.get $5) + ) + (f32.store offset=24 + (local.get $2) + (f32.div + (f32.load offset=24 + (local.get $2) + ) + (local.tee $7 + (f32.convert_i32_s + (i32.load + (i32.const 27948) + ) + ) + ) + ) + ) + (f32.store offset=28 + (local.get $2) + (f32.div + (local.get $4) + (local.tee $4 + (f32.convert_i32_s + (i32.load + (i32.const 27952) + ) + ) + ) + ) + ) + (f32.store offset=32 + (local.get $2) + (f32.div + (f32.load offset=32 + (local.get $2) + ) + (local.get $7) + ) + ) + (f32.store offset=36 + (local.get $2) + (f32.div + (local.get $5) + (local.get $4) + ) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $2) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $2) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $2) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $2) + ) + ) + (call $_ProcessGestureEvent + (local.get $3) + ) + (global.set $STACKTOP + (local.get $6) + ) + (i32.const 1) + ) + (func $_EmscriptenGamepadCallback (; 428 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (if + (i32.load + (i32.add + (local.get $1) + (i32.const 1296) + ) + ) + (if + (i32.lt_s + (i32.load + (i32.add + (local.get $1) + (i32.const 1300) + ) + ) + (i32.const 4) + ) + (return + (i32.const 0) + ) + ) + ) + (i32.const 0) + ) + (func $_LoadImageEx (; 429 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $6 + (call $_malloc + (local.tee $4 + (i32.mul + (local.get $3) + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + ) + ) + ) + (if + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + (block + (local.set $7 + (i32.shr_u + (i32.add + (local.get $4) + (i32.const -1) + ) + (i32.const 2) + ) + ) + (local.set $4 + (i32.const 0) + ) + (loop $while-in + (i32.store8 + (i32.add + (local.get $5) + (local.get $6) + ) + (i32.load8_s + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + ) + (i32.store8 + (i32.add + (i32.or + (local.get $5) + (i32.const 1) + ) + (local.get $6) + ) + (i32.load8_s offset=1 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + ) + (i32.store8 + (i32.add + (i32.or + (local.get $5) + (i32.const 2) + ) + (local.get $6) + ) + (i32.load8_s offset=2 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + ) + (i32.store8 + (i32.add + (i32.or + (local.get $5) + (i32.const 3) + ) + (local.get $6) + ) + (i32.load8_s offset=3 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + ) + (local.set $8 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.set $5 + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + (if + (i32.ne + (local.get $4) + (local.get $7) + ) + (block + (local.set $4 + (local.get $8) + ) + (br $while-in) + ) + ) + ) + ) + ) + (i32.store + (local.get $0) + (local.get $6) + ) + (i32.store offset=4 + (local.get $0) + (local.get $2) + ) + (i32.store offset=8 + (local.get $0) + (local.get $3) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 7) + ) + ) + (func $_ImageFormat (; 430 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (block $folding-inner0 + (br_if $folding-inner0 + (i32.eqz + (i32.load + (local.get $0) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.and + (i32.ne + (i32.load offset=8 + (local.get $0) + ) + (i32.const 0) + ) + (i32.ne + (local.get $1) + (i32.const 0) + ) + ) + ) + ) + (br_if $folding-inner0 + (i32.eq + (local.get $1) + (local.tee $5 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + ) + (local.set $3 + (local.get $2) + ) + (if + (i32.eqz + (i32.and + (i32.lt_s + (local.get $1) + (i32.const 11) + ) + (i32.lt_s + (local.get $5) + (i32.const 11) + ) + ) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12585) + (local.get $3) + ) + (br $folding-inner0) + ) + ) + (i64.store align=4 + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 4) + ) + ) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $3 + (call $_GetImageDataNormalized + (local.get $2) + ) + ) + (call $_free + (i32.load + (local.get $0) + ) + ) + (i32.store + (local.get $0) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $0) + (local.get $1) + ) + (block $do-once + (block $switch-case26 + (block $switch-case23 + (block $switch-case20 + (block $switch-case17 + (block $switch-case14 + (block $switch-case11 + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-case11 $switch-case14 $switch-case17 $switch-case20 $switch-case23 $switch-case26 $do-once + (i32.sub + (local.get $1) + (i32.const 1) + ) + ) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.tee $2 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (local.get $1) + ) + (i32.trunc_f32_s + (f32.mul + (f32.add + (f32.add + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.29899999499320984) + ) + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.5870000123977661) + ) + ) + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.11400000005960464) + ) + ) + (f32.const 255) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 0) + ) + (block + (local.set $2 + (i32.const 0) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in1 + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.add + (f32.add + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.29899999499320984) + ) + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.5870000123977661) + ) + ) + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.11400000005960464) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (br_if $while-in1 + (i32.lt_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 2) + ) + ) + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (i32.shl + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in4 + (local.set $2 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 31) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $5 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 63) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $6 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 31) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.store16 + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (i32.or + (local.get $6) + (i32.or + (i32.shl + (local.get $2) + (i32.const 11) + ) + (i32.shl + (local.get $5) + (i32.const 5) + ) + ) + ) + ) + (br_if $while-in4 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.mul + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 3) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (i32.mul + (local.get $2) + (i32.const 3) + ) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in7 + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (local.get $1) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.add + (local.get $1) + (i32.const 2) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in7 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 3) + ) + ) + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.const 3) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in10 + (local.set $2 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 31) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $5 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 31) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $6 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 31) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.store16 + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (i32.or + (i32.or + (i32.or + (i32.shl + (local.get $2) + (i32.const 11) + ) + (f32.gt + (f32.load offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.19607843458652496) + ) + ) + (i32.shl + (local.get $5) + (i32.const 6) + ) + ) + (i32.shl + (local.get $6) + (i32.const 1) + ) + ) + ) + (br_if $while-in10 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in13 + (local.set $2 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 15) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $5 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 15) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $6 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 15) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (local.set $7 + (i32.and + (i32.trunc_f32_s + (f32.demote_f64 + (call $_llvm_round_f32 + (f64.promote_f32 + (f32.mul + (f32.load offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 15) + ) + ) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.store16 + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (i32.or + (local.get $7) + (i32.or + (i32.or + (i32.shl + (local.get $2) + (i32.const 12) + ) + (i32.shl + (local.get $5) + (i32.const 8) + ) + ) + (i32.shl + (local.get $6) + (i32.const 4) + ) + ) + ) + ) + (br_if $while-in13 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in16 + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (local.get $1) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.or + (local.get $1) + (i32.const 1) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.or + (local.get $1) + (i32.const 2) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 + (i32.add + (i32.load + (local.get $0) + ) + (i32.or + (local.get $1) + (i32.const 3) + ) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load offset=12 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 255) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in16 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (i32.shl + (i32.load offset=4 + (local.get $0) + ) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in19 + (f32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + (f32.add + (f32.add + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.29899999499320984) + ) + (f32.mul + (f32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.5870000123977661) + ) + ) + (f32.mul + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (f32.const 0.11400000005960464) + ) + ) + ) + (br_if $while-in19 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.mul + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 12) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (i32.mul + (local.get $2) + (i32.const 3) + ) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in22 + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 1) + ) + (i32.const 2) + ) + ) + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (i32.add + (local.get $1) + (i32.const 2) + ) + (i32.const 2) + ) + ) + (i32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in22 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 3) + ) + ) + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.const 3) + ) + ) + ) + ) + ) + ) + ) + (br $do-once) + ) + (i32.store + (local.get $0) + (call $_malloc + (i32.mul + (local.tee $1 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.mul + (local.get $1) + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 0) + ) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in25 + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (i32.or + (local.get $1) + (i32.const 1) + ) + (i32.const 2) + ) + ) + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (i32.or + (local.get $1) + (i32.const 2) + ) + (i32.const 2) + ) + ) + (i32.load offset=8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $0) + ) + (i32.shl + (i32.or + (local.get $1) + (i32.const 3) + ) + (i32.const 2) + ) + ) + (i32.load offset=12 + (i32.add + (i32.shl + (local.get $2) + (i32.const 4) + ) + (local.get $3) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in25 + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i32.mul + (i32.load offset=8 + (local.get $0) + ) + (i32.shl + (i32.load offset=4 + (local.get $0) + ) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + ) + (call $_free + (local.get $3) + ) + (br_if $folding-inner0 + (i32.le_s + (i32.load offset=12 + (local.get $0) + ) + (i32.const 1) + ) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.load + (local.get $0) + ) + ) + ) + (call $_ImageMipmaps + (local.get $0) + ) + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_LoadTextureFromImage (; 431 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $2 + (block $__rjto$0 (result i32) + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.tee $3 + (i32.load + (local.get $1) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (local.tee $4 + (i32.load offset=4 + (local.get $1) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (local.tee $5 + (i32.load offset=8 + (local.get $1) + ) + ) + ) + ) + (br $__rjto$0 + (call $_rlLoadTexture + (local.get $3) + (local.get $4) + (local.get $5) + (i32.load offset=16 + (local.get $1) + ) + (i32.load offset=12 + (local.get $1) + ) + ) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12546) + (local.get $2) + ) + (i32.const 0) + ) + ) + (local.set $3 + (i32.load offset=4 + (local.get $1) + ) + ) + (local.set $4 + (i32.load offset=8 + (local.get $1) + ) + ) + (local.set $5 + (i32.load offset=12 + (local.get $1) + ) + ) + (local.set $1 + (i32.load offset=16 + (local.get $1) + ) + ) + (i32.store + (local.get $0) + (local.get $2) + ) + (i32.store offset=4 + (local.get $0) + (local.get $3) + ) + (i32.store offset=8 + (local.get $0) + (local.get $4) + ) + (i32.store offset=12 + (local.get $0) + (local.get $5) + ) + (i32.store offset=16 + (local.get $0) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + (func $_UnloadImage (; 432 ;) (; has Stack IR ;) (param $0 i32) + (call $_free + (i32.load + (local.get $0) + ) + ) + ) + (func $_ImageFromImage (; 433 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (i64.store align=4 + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 20) + ) + ) + (i64.load align=4 + (local.get $1) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i32.store offset=16 + (local.get $4) + (i32.load offset=16 + (local.get $1) + ) + ) + (call $_ImageCopy + (local.get $3) + (local.get $4) + ) + (i64.store align=4 + (local.get $4) + (i64.load align=4 + (local.get $2) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (call $_ImageCrop + (local.get $3) + (local.get $4) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load offset=16 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_ImageCopy (; 434 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $5 + (i32.load offset=4 + (local.get $1) + ) + ) + (local.set $6 + (i32.load offset=8 + (local.get $1) + ) + ) + (if + (i32.gt_s + (local.tee $2 + (i32.load offset=12 + (local.get $1) + ) + ) + (i32.const 0) + ) + (block + (local.set $9 + (i32.load offset=16 + (local.get $1) + ) + ) + (local.set $7 + (i32.load offset=12 + (local.get $1) + ) + ) + (local.set $2 + (local.get $6) + ) + (local.set $3 + (local.get $5) + ) + (local.set $2 + (loop $while-in (result i32) + (local.set $4 + (i32.add + (call $_GetPixelDataSize + (local.get $3) + (local.get $2) + (local.get $9) + ) + (local.get $4) + ) + ) + (local.set $3 + (select + (i32.const 1) + (i32.div_s + (local.get $3) + (i32.const 2) + ) + (i32.lt_s + (local.get $3) + (i32.const 2) + ) + ) + ) + (local.set $2 + (select + (i32.const 1) + (i32.div_s + (local.get $2) + (i32.const 2) + ) + (i32.lt_s + (local.get $2) + (i32.const 2) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $8 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + (local.get $7) + ) + ) + ) + ) + (local.set $1 + (if (result i32) + (local.tee $3 + (call $_malloc + (local.get $4) + ) + ) + (block (result i32) + (drop + (call $_memcpy + (local.get $3) + (i32.load + (local.get $1) + ) + (local.get $4) + ) + ) + (i32.load offset=16 + (local.get $1) + ) + ) + (block (result i32) + (local.set $5 + (i32.const 0) + ) + (local.set $6 + (i32.const 0) + ) + (local.set $2 + (i32.const 0) + ) + (i32.const 0) + ) + ) + ) + (i32.store + (local.get $0) + (local.get $3) + ) + (i32.store offset=4 + (local.get $0) + (local.get $5) + ) + (i32.store offset=8 + (local.get $0) + (local.get $6) + ) + (i32.store offset=12 + (local.get $0) + (local.get $2) + ) + (i32.store offset=16 + (local.get $0) + (local.get $1) + ) + ) + (func $_ImageCrop (; 435 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + (local $8 f32) + (local $9 f32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.sub + (global.get $STACKTOP) + (i32.const -64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (block $folding-inner0 + (br_if $folding-inner0 + (i32.eqz + (i32.load + (local.get $0) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (local.tee $5 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (local.set $2 + (local.get $3) + ) + (local.set $4 + (f32.sub + (local.tee $6 + (f32.convert_i32_s + (local.get $5) + ) + ) + (local.tee $8 + (f32.load + (local.get $1) + ) + ) + ) + ) + (if + (f32.gt + (f32.add + (local.get $8) + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $6) + ) + (block + (f32.store offset=8 + (local.get $1) + (local.get $4) + ) + (f64.store + (local.get $2) + (f64.promote_f32 + (local.get $4) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12256) + (local.get $2) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (local.set $6 + (f32.sub + (local.tee $9 + (f32.convert_i32_s + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (local.tee $4 + (f32.load offset=4 + (local.get $1) + ) + ) + ) + ) + (if + (f32.gt + (f32.add + (local.get $4) + (f32.load offset=12 + (local.get $1) + ) + ) + (local.get $9) + ) + (block + (f32.store offset=12 + (local.get $1) + (local.get $6) + ) + (f64.store + (local.get $2) + (f64.promote_f32 + (local.get $6) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12316) + (local.get $2) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $3) + (i32.const 40) + ) + ) + (local.set $5 + (i32.add + (local.get $3) + (i32.const 20) + ) + ) + (if + (f32.lt + (local.get $8) + (f32.convert_i32_s + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (if + (f32.lt + (local.get $4) + (f32.convert_i32_s + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (block + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $12 + (call $_GetImageData + (local.get $2) + ) + ) + (local.set $10 + (call $_malloc + (i32.mul + (local.tee $15 + (i32.trunc_f32_s + (local.tee $6 + (f32.load offset=12 + (local.get $1) + ) + ) + ) + ) + (i32.shl + (local.tee $13 + (i32.trunc_f32_s + (local.tee $9 + (f32.load offset=8 + (local.get $1) + ) + ) + ) + ) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.gt_s + (local.tee $3 + (i32.trunc_f32_s + (f32.add + (local.get $4) + (local.get $6) + ) + ) + ) + (local.tee $1 + (i32.trunc_f32_s + (local.get $4) + ) + ) + ) + (block + (local.set $16 + (i32.gt_s + (local.tee $11 + (i32.trunc_f32_s + (f32.add + (local.get $8) + (local.get $9) + ) + ) + ) + (local.tee $14 + (i32.trunc_f32_s + (local.get $8) + ) + ) + ) + ) + (local.set $17 + (i32.shl + (local.get $13) + (i32.const 2) + ) + ) + (local.set $11 + (i32.shl + (i32.sub + (local.get $11) + (local.get $14) + ) + (i32.const 2) + ) + ) + (local.set $18 + (i32.sub + (local.get $3) + (local.get $1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in + (if + (local.get $16) + (drop + (call $_memcpy + (i32.add + (i32.mul + (local.get $3) + (local.get $17) + ) + (local.get $10) + ) + (i32.add + (i32.shl + (i32.add + (local.get $14) + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (local.get $1) + ) + ) + (i32.const 2) + ) + (local.get $12) + ) + (local.get $11) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $18) + ) + ) + ) + ) + ) + (call $_free + (local.get $12) + ) + (local.set $1 + (i32.load offset=16 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + (call $_UnloadImage + (local.get $2) + ) + (call $_LoadImageEx + (local.get $5) + (local.get $10) + (local.get $13) + (local.get $15) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.get $5) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $5) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load offset=16 + (local.get $5) + ) + ) + (call $_free + (local.get $10) + ) + (call $_ImageFormat + (local.get $0) + (local.get $1) + ) + (br $folding-inner0) + ) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12378) + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + (return) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_GetImageData (; 436 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $6 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (local.set $2 + (call $_malloc + (i32.shl + (local.tee $7 + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (i32.const 2) + ) + ) + ) + (if + (i32.gt_s + (local.tee $8 + (i32.load offset=16 + (local.get $0) + ) + ) + (i32.const 10) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12433) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return + (local.get $2) + ) + ) + ) + (if + (i32.lt_u + (i32.add + (local.get $8) + (i32.const -8) + ) + (i32.const 3) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12497) + (local.get $6) + ) + ) + (if + (i32.le_s + (local.get $7) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $5) + ) + (return + (local.get $2) + ) + ) + ) + (local.set $4 + (i32.load + (local.get $0) + ) + ) + (local.set $6 + (i32.load + (local.get $0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (block $__rjto$0 + (block $__rjti$0 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case2 $switch-case5 $switch-case1 $switch-case3 $switch-case4 $switch-case6 $switch-case7 $__rjti$0 $__rjto$0 + (i32.sub + (local.get $8) + (i32.const 1) + ) + ) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.tee $3 + (i32.add + (local.get $1) + (local.get $4) + ) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.get $3) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.get $3) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const -1) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.tee $3 + (i32.add + (local.get $0) + (local.get $4) + ) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.get $3) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (local.get $3) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $3 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $4) + ) + ) + ) + (i32.const 11) + ) + ) + (f32.const 8) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 6) + ) + (i32.const 31) + ) + ) + (f32.const 8) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 1) + ) + (i32.const 31) + ) + ) + (f32.const 8) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.sub + (i32.const 0) + (i32.and + (local.get $3) + (i32.const 1) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $3 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $4) + ) + ) + ) + (i32.const 11) + ) + ) + (f32.const 8) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 5) + ) + (i32.const 63) + ) + ) + (f32.const 4) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (local.get $3) + (i32.const 31) + ) + ) + (f32.const 8) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const -1) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $3 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $4) + ) + ) + ) + (i32.const 12) + ) + ) + (f32.const 17) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + (i32.const 15) + ) + ) + (f32.const 17) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $3) + (i32.const 4) + ) + (i32.const 15) + ) + ) + (f32.const 17) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.convert_i32_s + (i32.and + (local.get $3) + (i32.const 15) + ) + ) + (f32.const 17) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $0) + (local.get $4) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $0) + (local.get $4) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load8_s + (i32.add + (local.get $4) + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const -1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const 0) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const 0) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const -1) + ) + (br $__rjto$0) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.const -1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + ) + (i32.store8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (local.tee $3 + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $6) + ) + ) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=1 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (local.get $3) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (local.get $3) + ) + (f32.const 255) + ) + ) + ) + (i32.store8 offset=3 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.mul + (f32.load + (local.get $3) + ) + (f32.const 255) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.get $7) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $2) + ) + (func $_GetImageDataNormalized (; 437 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $2 + (call $_malloc + (i32.shl + (local.tee $7 + (i32.mul + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (i32.const 4) + ) + ) + ) + (if + (i32.gt_s + (local.tee $8 + (i32.load offset=16 + (local.get $0) + ) + ) + (i32.const 10) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12433) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $6) + ) + (return + (local.get $2) + ) + ) + ) + (if + (i32.le_s + (local.get $7) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $6) + ) + (return + (local.get $2) + ) + ) + ) + (local.set $3 + (i32.load + (local.get $0) + ) + ) + (local.set $5 + (i32.load + (local.get $0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (block $__rjto$0 + (block $__rjti$0 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case2 $switch-case5 $switch-case1 $switch-case3 $switch-case4 $switch-case6 $switch-case7 $__rjti$0 $__rjto$0 + (i32.sub + (local.get $8) + (i32.const 1) + ) + ) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.tee $4 + (i32.add + (local.get $1) + (local.get $3) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 1) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.tee $4 + (i32.add + (local.get $0) + (local.get $3) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (local.get $4) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $4 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $3) + ) + ) + ) + (i32.const 11) + ) + ) + (f32.const 0.032258063554763794) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 6) + ) + (i32.const 31) + ) + ) + (f32.const 0.032258063554763794) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 1) + ) + (i32.const 31) + ) + ) + (f32.const 0.032258063554763794) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (select + (f32.const 1) + (f32.const 0) + (i32.and + (local.get $4) + (i32.const 1) + ) + ) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $4 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $3) + ) + ) + ) + (i32.const 11) + ) + ) + (f32.const 0.032258063554763794) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 5) + ) + (i32.const 63) + ) + ) + (f32.const 0.01587301678955555) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (local.get $4) + (i32.const 31) + ) + ) + (f32.const 0.032258063554763794) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 1) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.shr_u + (local.tee $4 + (i32.load16_u + (i32.add + (i32.shl + (local.get $1) + (i32.const 1) + ) + (local.get $3) + ) + ) + ) + (i32.const 12) + ) + ) + (f32.const 0.06666667014360428) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 8) + ) + (i32.const 15) + ) + ) + (f32.const 0.06666667014360428) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 4) + ) + (i32.const 15) + ) + ) + (f32.const 0.06666667014360428) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.mul + (f32.convert_i32_s + (i32.and + (local.get $4) + (i32.const 15) + ) + ) + (f32.const 0.06666667014360428) + ) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $0) + (local.get $3) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (br $__rjto$0) + ) + (f32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $0) + (local.get $3) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $3) + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + (br $__rjto$0) + ) + (i32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 0) + ) + (f32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 0) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 1) + ) + (br $__rjto$0) + ) + (i32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (i32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (f32.const 1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + (i32.store offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + (i32.store offset=8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + (i32.store offset=12 + (i32.add + (i32.shl + (local.get $1) + (i32.const 4) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (i32.const 3) + ) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.get $7) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $2) + ) + (func $_ImageMipmaps (; 438 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local.set $11 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (block $folding-inner0 + (br_if $folding-inner0 + (i32.eqz + (i32.load + (local.get $0) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (local.tee $3 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (local.tee $2 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $1) + (i32.const 96) + ) + ) + (local.set $15 + (i32.add + (local.get $1) + (i32.const 88) + ) + ) + (local.set $9 + (i32.sub + (local.get $1) + (i32.const -64) + ) + ) + (local.set $16 + (i32.add + (local.get $1) + (i32.const 56) + ) + ) + (local.set $14 + (i32.add + (local.get $1) + (i32.const 48) + ) + ) + (local.set $7 + (i32.add + (local.get $1) + (i32.const 24) + ) + ) + (local.set $13 + (i32.add + (local.get $1) + (i32.const 16) + ) + ) + (local.set $10 + (local.get $1) + ) + (local.set $1 + (call $_GetPixelDataSize + (local.get $3) + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + ) + (local.set $8 + (if (result i32) + (i32.or + (local.tee $4 + (i32.ne + (local.get $3) + (i32.const 1) + ) + ) + (local.tee $6 + (i32.ne + (local.get $2) + (i32.const 1) + ) + ) + ) + (block (result i32) + (local.set $8 + (i32.const 1) + ) + (loop $while-in (result i32) + (local.set $4 + (i32.gt_s + (local.tee $3 + (select + (i32.div_s + (local.get $3) + (i32.const 2) + ) + (i32.const 1) + (local.get $4) + ) + ) + (i32.const 1) + ) + ) + (local.set $6 + (i32.gt_s + (local.tee $2 + (select + (i32.div_s + (local.get $2) + (i32.const 2) + ) + (i32.const 1) + (local.get $6) + ) + ) + (i32.const 1) + ) + ) + (i32.store + (local.get $10) + (local.tee $3 + (select + (local.get $3) + (i32.const 1) + (local.get $4) + ) + ) + ) + (i32.store offset=4 + (local.get $10) + (local.tee $12 + (select + (local.get $2) + (i32.const 1) + (local.get $6) + ) + ) + ) + (i32.store offset=8 + (local.get $10) + (local.get $1) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12639) + (local.get $10) + ) + (local.set $2 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (local.set $1 + (i32.add + (call $_GetPixelDataSize + (local.get $3) + (local.get $12) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.get $1) + ) + ) + (if (result i32) + (i32.or + (local.get $4) + (local.get $6) + ) + (block + (local.set $8 + (local.get $2) + ) + (local.set $2 + (local.get $12) + ) + (br $while-in) + ) + (local.get $2) + ) + ) + ) + (i32.const 1) + ) + ) + (i32.store + (local.get $13) + (i32.load offset=12 + (local.get $0) + ) + ) + (i32.store offset=4 + (local.get $13) + (local.get $8) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12684) + (local.get $13) + ) + (i32.store + (local.get $7) + (local.get $1) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12729) + (local.get $7) + ) + (i32.store + (local.get $5) + (i32.load + (local.get $0) + ) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12761) + (local.get $5) + ) + (if + (i32.ge_s + (i32.load offset=12 + (local.get $0) + ) + (local.get $8) + ) + (block + (call $_TraceLog + (i32.const 4) + (i32.const 12945) + (local.get $15) + ) + (br $folding-inner0) + ) + ) + (if + (local.tee $1 + (call $_realloc + (i32.load + (local.get $0) + ) + (local.get $1) + ) + ) + (block + (i32.store + (local.get $0) + (local.get $1) + ) + (i32.store + (local.get $14) + (local.get $1) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12799) + (local.get $14) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 12841) + (local.get $16) + ) + ) + (local.set $3 + (i32.load + (local.get $0) + ) + ) + (local.set $2 + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $4 + (i32.div_s + (local.tee $12 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + (local.set $1 + (i32.div_s + (local.tee $10 + (i32.load offset=8 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + (i64.store align=4 + (local.get $5) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $5) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $5) + (i32.load offset=16 + (local.get $0) + ) + ) + (call $_ImageCopy + (local.get $7) + (local.get $5) + ) + (if + (i32.gt_u + (local.get $8) + (i32.const 1) + ) + (block + (local.set $6 + (call $_GetPixelDataSize + (local.get $4) + (local.get $1) + (local.get $2) + ) + ) + (local.set $2 + (i32.add + (call $_GetPixelDataSize + (local.get $12) + (local.get $10) + (local.get $2) + ) + (local.get $3) + ) + ) + (local.set $3 + (i32.const 1) + ) + (loop $while-in1 + (i32.store + (local.get $9) + (local.get $3) + ) + (i32.store offset=4 + (local.get $9) + (local.get $4) + ) + (i32.store offset=8 + (local.get $9) + (local.get $1) + ) + (i32.store offset=12 + (local.get $9) + (local.get $6) + ) + (i32.store offset=16 + (local.get $9) + (local.get $2) + ) + (call $_TraceLog + (i32.const 2) + (i32.const 12888) + (local.get $9) + ) + (call $_ImageResize + (local.get $7) + (local.get $4) + (local.get $1) + ) + (drop + (call $_memcpy + (local.get $2) + (i32.load + (local.get $7) + ) + (local.get $6) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (local.get $6) + ) + ) + (i32.store offset=12 + (local.get $0) + (i32.add + (i32.load offset=12 + (local.get $0) + ) + (i32.const 1) + ) + ) + (local.set $6 + (call $_GetPixelDataSize + (local.tee $4 + (select + (i32.const 1) + (i32.div_s + (local.get $4) + (i32.const 2) + ) + (i32.lt_s + (local.get $4) + (i32.const 2) + ) + ) + ) + (local.tee $1 + (select + (i32.const 1) + (i32.div_s + (local.get $1) + (i32.const 2) + ) + (i32.lt_s + (local.get $1) + (i32.const 2) + ) + ) + ) + (i32.load offset=16 + (local.get $0) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.get $8) + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (i64.store align=4 + (local.get $5) + (i64.load align=4 + (local.get $7) + ) + ) + (i64.store offset=8 align=4 + (local.get $5) + (i64.load offset=8 align=4 + (local.get $7) + ) + ) + (i32.store offset=16 + (local.get $5) + (i32.load offset=16 + (local.get $7) + ) + ) + (call $_UnloadImage + (local.get $5) + ) + (global.set $STACKTOP + (local.get $11) + ) + (return) + ) + (global.set $STACKTOP + (local.get $11) + ) + ) + (func $_ImageResize (; 439 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (if + (i32.eqz + (i32.load + (local.get $0) + ) + ) + (block + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (if + (i32.eqz + (i32.load offset=4 + (local.get $0) + ) + ) + (block + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (if + (i32.eqz + (i32.load offset=8 + (local.get $0) + ) + ) + (block + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (i64.store align=4 + (local.tee $3 + (i32.add + (local.get $4) + (i32.const 20) + ) + ) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $3) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $7 + (call $_GetImageData + (local.get $3) + ) + ) + (local.set $6 + (call $_malloc + (i32.mul + (local.get $2) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + (call $_stbir__resize_arbitrary + (local.get $7) + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + (local.get $6) + (local.get $1) + (local.get $2) + ) + (local.set $8 + (i32.load offset=16 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $3) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $3) + (i32.load offset=16 + (local.get $0) + ) + ) + (call $_UnloadImage + (local.get $3) + ) + (call $_LoadImageEx + (local.get $4) + (local.get $6) + (local.get $1) + (local.get $2) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.get $4) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $4) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load offset=16 + (local.get $4) + ) + ) + (call $_ImageFormat + (local.get $0) + (local.get $8) + ) + (call $_free + (local.get $6) + ) + (call $_free + (local.get $7) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_stbir__resize_arbitrary (; 440 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 224) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 224) + ) + ) + (call $_stbir__setup + (local.get $6) + (local.get $1) + (local.get $2) + (local.get $4) + (local.get $5) + ) + (call $_stbir__calculate_transform + (local.get $6) + ) + (call $_stbir__choose_filter + (local.get $6) + ) + (if + (i32.eqz + (local.tee $1 + (call $_malloc + (local.tee $2 + (call $_stbir__calculate_memory + (local.get $6) + ) + ) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $7) + ) + (return) + ) + ) + (call $_stbir__resize_allocated + (local.get $6) + (local.get $0) + (local.get $3) + (local.get $1) + (local.get $2) + ) + (call $_free + (local.get $1) + ) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_stbir__setup (; 441 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (i32.store offset=4 + (local.get $0) + (local.get $1) + ) + (i32.store offset=8 + (local.get $0) + (local.get $2) + ) + (i32.store offset=20 + (local.get $0) + (local.get $3) + ) + (i32.store offset=24 + (local.get $0) + (local.get $4) + ) + (i32.store + (i32.sub + (local.get $0) + (i32.const -64) + ) + (i32.const 4) + ) + ) + (func $_stbir__calculate_transform (; 442 ;) (; has Stack IR ;) (param $0 i32) + (local $1 f32) + (local $2 f32) + (f32.store offset=32 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=36 + (local.get $0) + (f32.const 0) + ) + (f32.store offset=40 + (local.get $0) + (f32.const 1) + ) + (f32.store offset=44 + (local.get $0) + (f32.const 1) + ) + (f32.store offset=56 + (local.get $0) + (f32.div + (local.tee $1 + (f32.convert_i32_s + (i32.load offset=20 + (local.get $0) + ) + ) + ) + (f32.convert_i32_s + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + (f32.store offset=60 + (local.get $0) + (f32.div + (local.tee $2 + (f32.convert_i32_s + (i32.load offset=24 + (local.get $0) + ) + ) + ) + (f32.convert_i32_s + (i32.load offset=8 + (local.get $0) + ) + ) + ) + ) + (f32.store offset=48 + (local.get $0) + (f32.mul + (local.get $1) + (f32.const 0) + ) + ) + (f32.store offset=52 + (local.get $0) + (f32.mul + (local.get $2) + (f32.const 0) + ) + ) + ) + (func $_stbir__choose_filter (; 443 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $1 + (select + (i32.const 4) + (i32.const 5) + (call $_stbir__use_upsampling + (f32.load offset=56 + (local.get $0) + ) + ) + ) + ) + (local.set $2 + (select + (i32.const 4) + (i32.const 5) + (call $_stbir__use_upsampling + (f32.load offset=60 + (local.get $0) + ) + ) + ) + ) + (i32.store offset=80 + (local.get $0) + (local.get $1) + ) + (i32.store offset=84 + (local.get $0) + (local.get $2) + ) + ) + (func $_stbir__calculate_memory (; 444 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $3 + (call $_stbir__get_filter_pixel_margin + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (local.set $1 + (call $_stbir__get_filter_pixel_width + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (i32.store offset=152 + (local.get $0) + (call $_stbir__get_contributors + (f32.load offset=56 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=20 + (local.get $0) + ) + ) + ) + (i32.store offset=156 + (local.get $0) + (call $_stbir__get_contributors + (f32.load offset=60 + (local.get $0) + ) + (i32.load offset=84 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + ) + ) + (i32.store offset=164 + (local.get $0) + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.store offset=188 + (local.get $0) + (i32.shl + (i32.load offset=152 + (local.get $0) + ) + (i32.const 3) + ) + ) + (i32.store offset=192 + (local.get $0) + (i32.shl + (i32.mul + (i32.load offset=152 + (local.get $0) + ) + (call $_stbir__get_coefficient_width + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=196 + (local.get $0) + (i32.shl + (i32.load offset=156 + (local.get $0) + ) + (i32.const 3) + ) + ) + (i32.store offset=200 + (local.get $0) + (local.tee $4 + (i32.shl + (i32.mul + (i32.load offset=156 + (local.get $0) + ) + (call $_stbir__get_coefficient_width + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (i32.const 2) + ) + ) + ) + (i32.store offset=204 + (local.get $0) + (local.tee $5 + (i32.mul + (i32.add + (i32.load offset=4 + (local.get $0) + ) + (i32.shl + (local.get $3) + (i32.const 1) + ) + ) + (i32.shl + (local.tee $1 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (i32.const 2) + ) + ) + ) + ) + (i32.store + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 208) + ) + ) + (local.tee $2 + (i32.shl + (local.tee $1 + (i32.mul + (local.get $1) + (i32.load offset=20 + (local.get $0) + ) + ) + ) + (i32.const 2) + ) + ) + ) + (i32.store offset=212 + (local.get $0) + (local.tee $6 + (i32.mul + (i32.load offset=164 + (local.get $0) + ) + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + ) + ) + (i32.store + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 216) + ) + ) + (local.get $2) + ) + (if + (i32.eqz + (local.tee $2 + (i32.load offset=80 + (local.get $0) + ) + ) + ) + (call $___assert_fail + (i32.const 15464) + (i32.const 13001) + (i32.const 2265) + (i32.const 15493) + ) + ) + (if + (i32.ge_u + (local.get $2) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 13076) + (i32.const 13001) + (i32.const 2266) + (i32.const 15493) + ) + ) + (if + (i32.eqz + (local.tee $2 + (i32.load offset=84 + (local.get $0) + ) + ) + ) + (call $___assert_fail + (i32.const 15517) + (i32.const 13001) + (i32.const 2267) + (i32.const 15493) + ) + ) + (if + (i32.lt_u + (local.get $2) + (i32.const 6) + ) + (block + (i32.store + (select + (local.get $3) + (local.get $1) + (call $_stbir__use_height_upsampling + (local.get $0) + ) + ) + (i32.const 0) + ) + (return + (i32.add + (i32.load + (local.get $1) + ) + (i32.add + (i32.load + (local.get $3) + ) + (i32.add + (i32.load offset=196 + (local.get $0) + ) + (i32.add + (i32.load offset=192 + (local.get $0) + ) + (i32.add + (i32.load offset=188 + (local.get $0) + ) + (i32.add + (i32.add + (local.get $4) + (local.get $5) + ) + (local.get $6) + ) + ) + ) + ) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 13177) + (i32.const 13001) + (i32.const 2268) + (i32.const 15493) + ) + ) + (i32.const 0) + ) + (func $_stbir__resize_allocated (; 445 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $6 + (call $_stbir__calculate_memory + (local.get $0) + ) + ) + (local.set $7 + (i32.mul + (i32.load8_u + (i32.const 12977) + ) + (i32.mul + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + (local.set $8 + (i32.mul + (i32.load8_u + (i32.const 12977) + ) + (i32.mul + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=20 + (local.get $0) + ) + ) + ) + ) + (if + (i32.le_s + (local.tee $5 + (i32.load + (local.tee $9 + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + ) + (i32.const -1) + ) + (call $___assert_fail + (i32.const 12981) + (i32.const 13001) + (i32.const 2312) + (i32.const 13031) + ) + ) + (if + (i32.ge_s + (local.get $5) + (i32.const 65) + ) + (call $___assert_fail + (i32.const 13055) + (i32.const 13001) + (i32.const 2313) + (i32.const 13031) + ) + ) + (if + (i32.ge_u + (i32.load offset=80 + (local.get $0) + ) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 13076) + (i32.const 13001) + (i32.const 2318) + (i32.const 13031) + ) + ) + (if + (i32.ge_u + (i32.load offset=84 + (local.get $0) + ) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 13177) + (i32.const 13001) + (i32.const 2319) + (i32.const 13031) + ) + ) + (if + (i32.le_s + (local.get $5) + (i32.const -1) + ) + (return) + ) + (if + (i32.eqz + (local.get $3) + ) + (call $___assert_fail + (i32.const 13329) + (i32.const 13001) + (i32.const 2336) + (i32.const 13031) + ) + ) + (if + (i32.gt_u + (local.get $6) + (local.get $4) + ) + (call $___assert_fail + (i32.const 13337) + (i32.const 13001) + (i32.const 2341) + (i32.const 13031) + ) + ) + (drop + (call $_memset + (local.get $3) + (i32.const 0) + (local.get $4) + ) + ) + (i32.store + (local.get $0) + (local.get $1) + ) + (i32.store offset=12 + (local.get $0) + (local.get $7) + ) + (i32.store offset=16 + (local.get $0) + (local.get $2) + ) + (i32.store offset=28 + (local.get $0) + (local.get $8) + ) + (i32.store offset=68 + (local.get $0) + (i32.const -1) + ) + (i32.store offset=72 + (local.get $0) + (i32.const 3) + ) + (i32.store offset=76 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=88 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=92 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=96 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=128 + (local.get $0) + (call $_stbir__get_coefficient_width + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (i32.store offset=132 + (local.get $0) + (call $_stbir__get_coefficient_width + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (i32.store offset=136 + (local.get $0) + (call $_stbir__get_filter_pixel_width + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (i32.store offset=140 + (local.get $0) + (call $_stbir__get_filter_pixel_width + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (i32.store offset=144 + (local.get $0) + (call $_stbir__get_filter_pixel_margin + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (i32.store offset=148 + (local.get $0) + (call $_stbir__get_filter_pixel_margin + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (i32.store offset=160 + (local.get $0) + (i32.mul + (i32.load + (local.get $9) + ) + (i32.shl + (local.tee $2 + (i32.load offset=20 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + ) + (i32.store offset=116 + (local.get $0) + (i32.add + (local.tee $5 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.shl + (i32.load offset=144 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (i32.store offset=100 + (local.get $0) + (local.get $3) + ) + (i32.store offset=104 + (local.get $0) + (local.tee $1 + (i32.add + (local.get $3) + (i32.load offset=188 + (local.get $0) + ) + ) + ) + ) + (i32.store offset=108 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=192 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (i32.store offset=112 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=196 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (i32.store offset=120 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=200 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (if + (call $_stbir__use_height_upsampling + (local.get $0) + ) + (block + (i32.store offset=124 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=180 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=204 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (i32.store offset=184 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=212 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (if + (i32.ne + (i32.add + (i32.load offset=216 + (local.get $0) + ) + (local.get $1) + ) + (i32.add + (local.get $3) + (local.get $4) + ) + ) + (call $___assert_fail + (i32.const 13378) + (i32.const 13001) + (i32.const 2385) + (i32.const 13031) + ) + ) + ) + (block + (i32.store offset=124 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=204 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (i32.store offset=180 + (local.get $0) + (local.tee $1 + (i32.add + (i32.load offset=208 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (i32.store offset=184 + (local.get $0) + (i32.const 0) + ) + (if + (i32.ne + (i32.add + (i32.load offset=212 + (local.get $0) + ) + (local.get $1) + ) + (i32.add + (local.get $3) + (local.get $4) + ) + ) + (call $___assert_fail + (i32.const 13512) + (i32.const 13001) + (i32.const 2393) + (i32.const 13031) + ) + ) + ) + ) + (i32.store offset=176 + (local.get $0) + (i32.const -1) + ) + (call $_stbir__calculate_filters + (i32.load offset=100 + (local.get $0) + ) + (i32.load offset=104 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (f32.load offset=56 + (local.get $0) + ) + (f32.load offset=48 + (local.get $0) + ) + (local.get $5) + (local.get $2) + ) + (call $_stbir__calculate_filters + (i32.load offset=108 + (local.get $0) + ) + (i32.load offset=112 + (local.get $0) + ) + (i32.load offset=84 + (local.get $0) + ) + (f32.load offset=60 + (local.get $0) + ) + (f32.load offset=52 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + ) + (if + (call $_stbir__use_height_upsampling + (local.get $0) + ) + (call $_stbir__buffer_loop_upsample + (local.get $0) + ) + (call $_stbir__buffer_loop_downsample + (local.get $0) + ) + ) + ) + (func $_stbir__get_coefficient_width (; 446 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local.set $2 + (i32.eqz + (call $_stbir__use_upsampling + (local.get $1) + ) + ) + ) + (local.set $0 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (i32.trunc_f32_s + (f32.ceil + (f32.mul + (call_indirect (type $FUNCSIG$ff) + (select + (local.get $1) + (f32.div + (f32.const 1) + (local.get $1) + ) + (local.get $2) + ) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + (f32.const 2) + ) + ) + ) + ) + (func $_stbir__get_filter_pixel_width (; 447 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (if + (i32.eqz + (local.get $0) + ) + (call $___assert_fail + (i32.const 15338) + (i32.const 13001) + (i32.const 884) + (i32.const 15350) + ) + ) + (if + (i32.ge_u + (local.get $0) + (i32.const 6) + ) + (call $___assert_fail + (i32.const 15380) + (i32.const 13001) + (i32.const 885) + (i32.const 15350) + ) + ) + (local.set $2 + (i32.eqz + (call $_stbir__use_upsampling + (local.get $1) + ) + ) + ) + (local.set $0 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (if (result i32) + (local.get $2) + (i32.trunc_f32_s + (f32.ceil + (f32.div + (f32.mul + (call_indirect (type $FUNCSIG$ff) + (local.get $1) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + (f32.const 2) + ) + (local.get $1) + ) + ) + ) + (i32.trunc_f32_s + (f32.ceil + (f32.mul + (call_indirect (type $FUNCSIG$ff) + (f32.div + (f32.const 1) + (local.get $1) + ) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + (f32.const 2) + ) + ) + ) + ) + ) + (func $_stbir__get_filter_pixel_margin (; 448 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (result i32) + (i32.div_s + (call $_stbir__get_filter_pixel_width + (local.get $0) + (local.get $1) + ) + (i32.const 2) + ) + ) + (func $_stbir__use_height_upsampling (; 449 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (call $_stbir__use_upsampling + (f32.load offset=60 + (local.get $0) + ) + ) + ) + (func $_stbir__calculate_filters (; 450 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 f32) (param $5 i32) (param $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local.set $13 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $9 + (i32.add + (local.get $7) + (i32.const 8) + ) + ) + (local.set $10 + (i32.add + (local.get $7) + (i32.const 4) + ) + ) + (local.set $11 + (local.get $7) + ) + (local.set $12 + (call $_stbir__get_contributors + (local.get $3) + (local.get $2) + (local.get $5) + (local.get $6) + ) + ) + (local.set $7 + (i32.eqz + (call $_stbir__use_upsampling + (local.get $3) + ) + ) + ) + (local.set $14 + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (if + (local.get $7) + (block + (local.set $8 + (f32.div + (call_indirect (type $FUNCSIG$ff) + (local.get $3) + (i32.and + (local.get $14) + (i32.const 7) + ) + ) + (local.get $3) + ) + ) + (if + (i32.gt_s + (local.get $12) + (i32.const 0) + ) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in + (call $_stbir__calculate_sample_range_downsample + (i32.sub + (local.get $7) + (call $_stbir__get_filter_pixel_margin + (local.get $2) + (local.get $3) + ) + ) + (local.get $8) + (local.get $3) + (local.get $4) + (local.get $10) + (local.get $11) + (local.get $9) + ) + (call $_stbir__calculate_coefficients_downsample + (local.get $2) + (local.get $3) + (i32.load + (local.get $10) + ) + (i32.load + (local.get $11) + ) + (f32.load + (local.get $9) + ) + (call $_stbir__get_contributor + (local.get $0) + (local.get $7) + ) + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $7) + (i32.const 0) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + ) + ) + (call $_stbir__normalize_downsample_coefficients + (local.get $0) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $5) + (local.get $6) + ) + ) + (block + (local.set $8 + (call_indirect (type $FUNCSIG$ff) + (f32.div + (f32.const 1) + (local.get $3) + ) + (i32.and + (local.get $14) + (i32.const 7) + ) + ) + ) + (if + (i32.le_s + (local.get $12) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $13) + ) + (return) + ) + ) + (local.set $8 + (f32.mul + (local.get $8) + (local.get $3) + ) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in1 + (call $_stbir__calculate_sample_range_upsample + (local.get $5) + (local.get $8) + (local.get $3) + (local.get $4) + (local.get $10) + (local.get $11) + (local.get $9) + ) + (call $_stbir__calculate_coefficients_upsample + (local.get $2) + (local.get $3) + (i32.load + (local.get $10) + ) + (i32.load + (local.get $11) + ) + (f32.load + (local.get $9) + ) + (call $_stbir__get_contributor + (local.get $0) + (local.get $5) + ) + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $5) + (i32.const 0) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $13) + ) + ) + (func $_stbir__buffer_loop_upsample (; 451 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 i32) + (local $10 f32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $7 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (local.set $3 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (local.set $4 + (local.get $1) + ) + (local.set $1 + (i32.load + (i32.add + (i32.shl + (i32.load offset=84 + (local.get $0) + ) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (local.set $10 + (f32.mul + (local.tee $8 + (f32.load offset=60 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$ff) + (f32.div + (f32.const 1) + (local.get $8) + ) + (i32.and + (local.get $1) + (i32.const 7) + ) + ) + ) + ) + (if + (i32.eqz + (call $_stbir__use_height_upsampling + (local.get $0) + ) + ) + (call $___assert_fail + (i32.const 14509) + (i32.const 13001) + (i32.const 2069) + (i32.const 14550) + ) + ) + (if + (i32.le_s + (i32.load offset=24 + (local.get $0) + ) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $6) + ) + (return) + ) + ) + (block $__rjto$4 + (block $__rjti$4 + (loop $while-in + (block $__rjti$3 + (f32.store + (local.get $7) + (f32.const 0) + ) + (i32.store + (local.get $3) + (i32.const 0) + ) + (i32.store + (local.get $4) + (i32.const 0) + ) + (call $_stbir__calculate_sample_range_upsample + (local.get $2) + (local.get $10) + (local.get $8) + (f32.load offset=52 + (local.get $0) + ) + (local.get $3) + (local.get $4) + (local.get $7) + ) + (br_if $__rjti$3 + (i32.ge_s + (i32.sub + (local.tee $9 + (i32.load + (local.get $4) + ) + ) + (local.tee $5 + (i32.load + (local.get $3) + ) + ) + ) + (local.tee $11 + (i32.load offset=164 + (local.get $0) + ) + ) + ) + ) + (block $__rjto$2 + (block $__rjti$2 + (br_if $__rjti$2 + (i32.le_s + (i32.load offset=176 + (local.get $0) + ) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $5) + (local.tee $1 + (i32.load offset=168 + (local.get $0) + ) + ) + ) + (block + (local.set $12 + (i32.load offset=172 + (local.get $0) + ) + ) + (block $__rjti$1 + (loop $while-in1 + (if + (i32.ne + (local.get $1) + (local.get $12) + ) + (block + (i32.store offset=168 + (local.get $0) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + (i32.store offset=176 + (local.get $0) + (local.tee $13 + (i32.rem_s + (i32.add + (i32.load offset=176 + (local.get $0) + ) + (i32.const 1) + ) + (local.get $11) + ) + ) + ) + (br_if $while-in1 + (i32.gt_s + (local.get $5) + (local.get $1) + ) + ) + (br $__rjti$1) + ) + ) + ) + (i32.store offset=176 + (local.get $0) + (i32.const -1) + ) + (i32.store offset=168 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=172 + (local.get $0) + (i32.const 0) + ) + (br $__rjti$2) + ) + (br_if $__rjti$2 + (i32.lt_s + (local.get $13) + (i32.const 0) + ) + ) + ) + ) + (br $__rjto$2) + ) + (call $_stbir__decode_and_resample_upsample + (local.get $0) + (local.get $5) + ) + ) + (if + (i32.gt_s + (local.get $9) + (local.tee $1 + (i32.load offset=172 + (local.get $0) + ) + ) + ) + (loop $while-in3 + (call $_stbir__decode_and_resample_upsample + (local.get $0) + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (br_if $while-in3 + (i32.gt_s + (local.get $9) + (local.tee $1 + (i32.load offset=172 + (local.get $0) + ) + ) + ) + ) + ) + ) + (call $_stbir__resample_vertical_upsample + (local.get $0) + (local.get $2) + ) + (br_if $while-in + (i32.lt_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.load offset=24 + (local.get $0) + ) + ) + ) + (br $__rjti$4) + ) + ) + (call $___assert_fail + (i32.const 14578) + (i32.const 13001) + (i32.const 2078) + (i32.const 14550) + ) + (br $__rjto$4) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + ) + (func $_stbir__buffer_loop_downsample (; 452 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $9 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + (local.set $10 + (i32.load offset=24 + (local.get $0) + ) + ) + (local.set $1 + (i32.load + (i32.add + (i32.shl + (i32.load offset=84 + (local.get $0) + ) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (local.set $11 + (f32.div + (call_indirect (type $FUNCSIG$ff) + (local.tee $7 + (f32.load offset=60 + (local.get $0) + ) + ) + (i32.and + (local.get $1) + (i32.const 7) + ) + ) + (local.get $7) + ) + ) + (local.set $8 + (i32.add + (local.tee $1 + (i32.load offset=148 + (local.get $0) + ) + ) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (if + (call $_stbir__use_height_upsampling + (local.get $0) + ) + (call $___assert_fail + (i32.const 13642) + (i32.const 13001) + (i32.const 2170) + (i32.const 13684) + ) + ) + (if + (i32.le_s + (local.get $8) + (local.tee $2 + (i32.sub + (i32.const 0) + (local.get $1) + ) + ) + ) + (block + (call $_stbir__empty_ring_buffer + (local.get $0) + (i32.load offset=24 + (local.get $0) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (block $__rjto$1 + (block $__rjti$1 + (loop $while-in + (block $__rjti$0 + (call $_stbir__calculate_sample_range_downsample + (local.get $2) + (local.get $11) + (local.get $7) + (f32.load offset=52 + (local.get $0) + ) + (local.get $6) + (local.get $3) + (local.get $9) + ) + (br_if $__rjti$0 + (i32.ge_s + (i32.sub + (local.tee $4 + (i32.load + (local.get $3) + ) + ) + (local.tee $1 + (i32.load + (local.get $6) + ) + ) + ) + (i32.load offset=164 + (local.get $0) + ) + ) + ) + (if + (i32.and + (i32.lt_s + (local.get $1) + (local.get $10) + ) + (i32.gt_s + (local.get $4) + (i32.const -1) + ) + ) + (block + (call $_stbir__empty_ring_buffer + (local.get $0) + (local.get $1) + ) + (call $_stbir__decode_and_resample_downsample + (local.get $0) + (local.get $2) + ) + (if + (i32.lt_s + (i32.load offset=176 + (local.get $0) + ) + (i32.const 0) + ) + (drop + (call $_stbir__add_empty_ring_buffer_entry + (local.get $0) + (local.get $1) + ) + ) + ) + (if + (i32.gt_s + (local.get $4) + (local.tee $1 + (i32.load offset=172 + (local.get $0) + ) + ) + ) + (loop $while-in1 + (drop + (call $_stbir__add_empty_ring_buffer_entry + (local.get $0) + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + (br_if $while-in1 + (i32.gt_s + (local.get $4) + (local.tee $1 + (i32.load offset=172 + (local.get $0) + ) + ) + ) + ) + ) + ) + (call $_stbir__resample_vertical_downsample + (local.get $0) + (local.get $2) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (br $__rjti$1) + ) + ) + (call $___assert_fail + (i32.const 13714) + (i32.const 13001) + (i32.const 2179) + (i32.const 13684) + ) + (br $__rjto$1) + ) + (call $_stbir__empty_ring_buffer + (local.get $0) + (i32.load offset=24 + (local.get $0) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + ) + (func $_stbir__calculate_sample_range_downsample (; 453 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (param $5 i32) (param $6 i32) + (local $7 f32) + (f32.store + (local.get $6) + (f32.sub + (f32.mul + (local.tee $7 + (f32.add + (f32.convert_i32_s + (local.get $0) + ) + (f32.const 0.5) + ) + ) + (local.get $2) + ) + (local.get $3) + ) + ) + (i32.store + (local.get $4) + (i32.trunc_f64_s + (f64.floor + (f64.add + (f64.promote_f32 + (f32.sub + (f32.mul + (f32.sub + (local.get $7) + (local.get $1) + ) + (local.get $2) + ) + (local.get $3) + ) + ) + (f64.const 0.5) + ) + ) + ) + ) + (i32.store + (local.get $5) + (i32.trunc_f64_s + (f64.floor + (f64.add + (f64.promote_f32 + (f32.sub + (f32.mul + (f32.add + (local.get $7) + (local.get $1) + ) + (local.get $2) + ) + (local.get $3) + ) + ) + (f64.const -0.5) + ) + ) + ) + ) + ) + (func $_stbir__empty_ring_buffer (; 454 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local.set $5 + (i32.load offset=28 + (local.get $0) + ) + ) + (local.set $6 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $7 + (i32.load offset=68 + (local.get $0) + ) + ) + (local.set $3 + (i32.load offset=76 + (local.get $0) + ) + ) + (local.set $4 + (i32.load offset=96 + (local.get $0) + ) + ) + (local.set $8 + (i32.load offset=20 + (local.get $0) + ) + ) + (local.set $9 + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $10 + (i32.load offset=180 + (local.get $0) + ) + ) + (local.set $11 + (i32.load offset=160 + (local.get $0) + ) + ) + (if + (i32.le_s + (i32.load offset=176 + (local.get $0) + ) + (i32.const -1) + ) + (return) + ) + (if + (i32.ge_s + (local.tee $2 + (i32.load offset=168 + (local.get $0) + ) + ) + (local.get $1) + ) + (return) + ) + (local.set $3 + (i32.add + (local.get $4) + (i32.shl + (local.get $3) + (i32.const 1) + ) + ) + ) + (local.set $4 + (i32.shr_u + (local.get $11) + (i32.const 2) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (loop $while-in + (block $while-out + (if + (i32.gt_s + (local.get $2) + (i32.const -1) + ) + (if + (i32.lt_s + (local.get $2) + (i32.load offset=24 + (local.get $0) + ) + ) + (call $_stbir__encode_scanline + (local.get $0) + (local.get $8) + (i32.add + (local.get $9) + (i32.mul + (local.get $2) + (local.get $5) + ) + ) + (call $_stbir__get_ring_buffer_entry + (local.get $10) + (i32.load offset=176 + (local.get $0) + ) + (local.get $4) + ) + (local.get $6) + (local.get $7) + (local.get $3) + ) + ) + ) + (br_if $while-out + (i32.eq + (local.tee $2 + (i32.load offset=168 + (local.get $0) + ) + ) + (i32.load offset=172 + (local.get $0) + ) + ) + ) + (i32.store offset=168 + (local.get $0) + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + ) + (i32.store offset=176 + (local.get $0) + (i32.rem_s + (i32.add + (i32.load offset=176 + (local.get $0) + ) + (i32.const 1) + ) + (i32.load offset=164 + (local.get $0) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.get $2) + (local.get $1) + ) + ) + (br $__rjti$0) + ) + ) + (br $__rjto$0) + ) + (return) + ) + (i32.store offset=176 + (local.get $0) + (i32.const -1) + ) + (i32.store offset=168 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=172 + (local.get $0) + (i32.const 0) + ) + ) + (func $_stbir__decode_and_resample_downsample (; 455 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (call $_stbir__decode_scanline + (local.get $0) + (local.get $1) + ) + (drop + (call $_memset + (i32.load offset=124 + (local.get $0) + ) + (i32.const 0) + (i32.mul + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.shl + (i32.load offset=20 + (local.get $0) + ) + (i32.const 2) + ) + ) + ) + ) + (local.set $2 + (i32.eqz + (call $_stbir__use_width_upsampling + (local.get $0) + ) + ) + ) + (local.set $1 + (i32.load offset=124 + (local.get $0) + ) + ) + (if + (local.get $2) + (call $_stbir__resample_horizontal_downsample + (local.get $0) + (local.get $1) + ) + (call $_stbir__resample_horizontal_upsample + (local.get $0) + (local.get $1) + ) + ) + ) + (func $_stbir__add_empty_ring_buffer_entry (; 456 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (i32.store offset=172 + (local.get $0) + (local.get $1) + ) + (if + (i32.lt_s + (local.tee $2 + (i32.load offset=176 + (local.get $0) + ) + ) + (i32.const 0) + ) + (block + (i32.store offset=176 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=168 + (local.get $0) + (local.get $1) + ) + ) + (if + (i32.eq + (local.get $2) + (local.tee $1 + (i32.rem_s + (i32.sub + (i32.add + (local.get $1) + (local.get $2) + ) + (i32.load offset=168 + (local.get $0) + ) + ) + (i32.load offset=164 + (local.get $0) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 13832) + (i32.const 13001) + (i32.const 1431) + (i32.const 13889) + ) + (local.set $3 + (local.get $1) + ) + ) + ) + (drop + (call $_memset + (local.tee $1 + (call $_stbir__get_ring_buffer_entry + (i32.load offset=180 + (local.get $0) + ) + (local.get $3) + (i32.shr_u + (local.tee $0 + (i32.load offset=160 + (local.get $0) + ) + ) + (i32.const 2) + ) + ) + ) + (i32.const 0) + (local.get $0) + ) + ) + (local.get $1) + ) + (func $_stbir__resample_vertical_downsample (; 457 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local.set $7 + (i32.load offset=20 + (local.get $0) + ) + ) + (local.set $11 + (i32.load offset=112 + (local.get $0) + ) + ) + (local.set $9 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $12 + (i32.load offset=164 + (local.get $0) + ) + ) + (local.set $5 + (i32.load offset=124 + (local.get $0) + ) + ) + (local.set $4 + (i32.load offset=132 + (local.get $0) + ) + ) + (local.set $13 + (i32.load offset=180 + (local.get $0) + ) + ) + (local.set $14 + (i32.load offset=176 + (local.get $0) + ) + ) + (local.set $15 + (i32.load offset=168 + (local.get $0) + ) + ) + (local.set $16 + (i32.shr_u + (i32.load offset=160 + (local.get $0) + ) + (i32.const 2) + ) + ) + (local.set $1 + (i32.load + (i32.add + (local.tee $10 + (i32.load offset=108 + (local.get $0) + ) + ) + (i32.shl + (local.tee $2 + (i32.add + (local.get $1) + (i32.load offset=148 + (local.get $0) + ) + ) + ) + (i32.const 3) + ) + ) + ) + ) + (local.set $10 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (local.get $10) + ) + ) + ) + (if + (call $_stbir__use_height_upsampling + (local.get $0) + ) + (call $___assert_fail + (i32.const 13642) + (i32.const 13001) + (i32.const 2004) + (i32.const 13796) + ) + ) + (if + (i32.gt_s + (local.get $1) + (local.get $10) + ) + (return) + ) + (local.set $17 + (i32.sub + (i32.mul + (local.get $2) + (local.get $4) + ) + (local.get $1) + ) + ) + (local.set $18 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (local.set $19 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (local.set $20 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (local.set $21 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (local.set $22 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (local.set $23 + (i32.gt_s + (local.get $9) + (i32.const 0) + ) + ) + (local.set $0 + (local.get $1) + ) + (loop $while-in + (local.set $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $17) + ) + (i32.const 2) + ) + (local.get $11) + ) + ) + ) + (local.set $4 + (call $_stbir__get_ring_buffer_scanline + (local.get $0) + (local.get $13) + (local.get $14) + (local.get $15) + (local.get $12) + (local.get $16) + ) + ) + (block $switch + (block $switch-default + (block $switch-case10 + (block $switch-case7 + (block $switch-case4 + (block $switch-case + (br_table $switch-case $switch-case4 $switch-case7 $switch-case10 $switch-default + (i32.sub + (local.get $9) + (i32.const 1) + ) + ) + ) + (if + (local.get $19) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in1 + (f32.store + (local.tee $2 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $2) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (local.get $20) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in3 + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br_if $while-in3 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (local.get $21) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in6 + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.mul + (local.get $1) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $8 + (i32.add + (i32.shl + (local.tee $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $8) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br_if $while-in6 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (local.get $22) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in9 + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $8 + (i32.add + (i32.shl + (local.tee $3 + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $8) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $8 + (i32.add + (i32.shl + (local.tee $3 + (i32.or + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $8) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.tee $2 + (i32.or + (local.get $2) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $3) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br_if $while-in9 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (local.get $18) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in12 + (local.set $3 + (i32.mul + (local.get $1) + (local.get $9) + ) + ) + (if + (local.get $23) + (block + (local.set $2 + (i32.const 0) + ) + (loop $while-in14 + (f32.store + (local.tee $24 + (i32.add + (i32.shl + (local.tee $8 + (i32.add + (local.get $2) + (local.get $3) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $24) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $8) + (i32.const 2) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br_if $while-in14 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + ) + ) + (br_if $while-in12 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $7) + ) + ) + ) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $10) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in) + ) + ) + ) + ) + (func $_stbir__get_ring_buffer_scanline (; 458 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (call $_stbir__get_ring_buffer_entry + (local.get $1) + (i32.rem_s + (i32.sub + (i32.add + (local.get $0) + (local.get $2) + ) + (local.get $3) + ) + (local.get $4) + ) + (local.get $5) + ) + ) + (func $_stbir__get_ring_buffer_entry (; 459 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (i32.add + (i32.shl + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 2) + ) + (local.get $0) + ) + ) + (func $_stbir__decode_scanline (; 460 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 f32) + (local $16 i32) + (local $17 f32) + (local.set $3 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $13 + (i32.load offset=68 + (local.get $0) + ) + ) + (local.set $4 + (i32.load offset=76 + (local.get $0) + ) + ) + (local.set $5 + (i32.load offset=96 + (local.get $0) + ) + ) + (local.set $6 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.set $7 + (i32.load offset=12 + (local.get $0) + ) + ) + (local.set $8 + (call $_stbir__get_decode_buffer + (local.get $0) + ) + ) + (local.set $14 + (i32.load offset=88 + (local.get $0) + ) + ) + (local.set $10 + (call $_stbir__edge_wrap + (local.tee $9 + (i32.load offset=92 + (local.get $0) + ) + ) + (local.get $1) + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (local.set $16 + (i32.load + (local.get $0) + ) + ) + (local.set $12 + (i32.add + (local.tee $11 + (i32.load offset=144 + (local.get $0) + ) + ) + (local.get $6) + ) + ) + (local.set $2 + (i32.sub + (i32.const 0) + (local.get $11) + ) + ) + (if + (i32.eq + (local.get $9) + (i32.const 4) + ) + (block $do-once + (if + (i32.ge_s + (local.get $1) + (i32.const 0) + ) + (br_if $do-once + (i32.gt_s + (i32.load offset=8 + (local.get $0) + ) + (local.get $1) + ) + ) + ) + (if + (i32.le_s + (local.get $12) + (local.get $2) + ) + (return) + ) + (local.set $1 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $2 + (i32.shl + (local.get $3) + (i32.const 2) + ) + ) + (local.set $6 + (i32.add + (i32.shl + (local.get $11) + (i32.const 1) + ) + (local.get $6) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (if + (local.get $1) + (drop + (call $_memset + (i32.add + (i32.shl + (i32.mul + (local.get $3) + (i32.sub + (local.get $0) + (local.get $11) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.const 0) + (local.get $2) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $6) + ) + ) + ) + (return) + ) + ) + (local.set $7 + (i32.add + (local.get $16) + (i32.mul + (local.get $7) + (local.get $10) + ) + ) + ) + (block $switch + (block $switch-default + (block $switch-case38 + (block $switch-case33 + (block $switch-case28 + (block $switch-case23 + (block $switch-case18 + (block $switch-case13 + (block $switch-case8 + (block $switch-case + (br_table $switch-case $switch-case8 $switch-case13 $switch-case18 $switch-case23 $switch-case28 $switch-case33 $switch-case38 $switch-default + (i32.add + (local.get $5) + (i32.shl + (local.get $4) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $4 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $5 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in1 + (local.set $9 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $10 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $4) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in3 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $7) + (i32.add + (local.get $1) + (local.get $10) + ) + ) + ) + ) + (f32.const 255) + ) + ) + (br_if $while-in3 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $9 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $10 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in5 + (local.set $4 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $5 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $9) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in7 + (i32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $4) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.load + (i32.add + (i32.shl + (i32.load8_u + (i32.add + (local.get $7) + (i32.add + (local.get $1) + (local.get $5) + ) + ) + ) + (i32.const 2) + ) + (i32.const 4992) + ) + ) + ) + (br_if $while-in7 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $4) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.div + (f32.convert_i32_s + (i32.load8_u + (i32.add + (local.get $7) + (i32.add + (local.get $5) + (local.get $13) + ) + ) + ) + ) + (f32.const 255) + ) + ) + ) + (br_if $while-in5 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $4 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $5 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in10 + (local.set $9 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $10 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $4) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in12 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.div + (f32.convert_i32_s + (i32.load16_u + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $10) + ) + (i32.const 1) + ) + (local.get $7) + ) + ) + ) + (f32.const 65535) + ) + ) + (br_if $while-in12 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in10 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $9 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $10 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in15 + (local.set $4 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $5 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $9) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in17 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $4) + ) + (i32.const 2) + ) + (local.get $8) + ) + (call $_stbir__srgb_to_linear + (f32.div + (f32.convert_i32_s + (i32.load16_u + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $5) + ) + (i32.const 1) + ) + (local.get $7) + ) + ) + ) + (f32.const 65535) + ) + ) + ) + (br_if $while-in17 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $4) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.div + (f32.convert_i32_s + (i32.load16_u + (i32.add + (i32.shl + (i32.add + (local.get $5) + (local.get $13) + ) + (i32.const 1) + ) + (local.get $7) + ) + ) + ) + (f32.const 65535) + ) + ) + ) + (br_if $while-in15 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $4 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $5 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in20 + (local.set $9 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $10 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $4) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in22 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.demote_f64 + (f64.div + (f64.convert_i32_u + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $10) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + (f64.const 4294967295) + ) + ) + ) + (br_if $while-in22 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in20 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $9 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $10 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in25 + (local.set $4 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $5 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $9) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in27 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $4) + ) + (i32.const 2) + ) + (local.get $8) + ) + (call $_stbir__srgb_to_linear + (f32.demote_f64 + (f64.div + (f64.convert_i32_u + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $5) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + (f64.const 4294967295) + ) + ) + ) + ) + (br_if $while-in27 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $4) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $8) + ) + (f32.demote_f64 + (f64.div + (f64.convert_i32_u + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + (f64.const 4294967295) + ) + ) + ) + ) + (br_if $while-in25 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $4 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $5 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in30 + (local.set $9 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $10 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $4) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in32 + (i32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $10) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + (br_if $while-in32 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in30 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.gt_s + (local.get $12) + (local.get $2) + ) + (block + (local.set $9 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $10 + (i32.add + (local.get $6) + (local.get $11) + ) + ) + (loop $while-in35 + (local.set $4 + (i32.mul + (local.get $2) + (local.get $3) + ) + ) + (local.set $5 + (i32.mul + (call $_stbir__edge_wrap + (local.get $14) + (local.get $2) + (local.get $6) + ) + (local.get $3) + ) + ) + (if + (local.get $9) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in37 + (f32.store + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $4) + ) + (i32.const 2) + ) + (local.get $8) + ) + (call $_stbir__srgb_to_linear + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $5) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + ) + (br_if $while-in37 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (i32.store + (i32.add + (i32.shl + (i32.add + (local.get $4) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + ) + (br_if $while-in35 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + ) + ) + ) + (br $switch) + ) + (call $___assert_fail + (i32.const 14305) + (i32.const 13001) + (i32.const 1368) + (i32.const 14354) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 1) + ) + ) + (if + (i32.gt_s + (local.get $12) + (local.tee $1 + (i32.sub + (i32.const 0) + (i32.load offset=144 + (local.get $0) + ) + ) + ) + ) + (block + (local.set $4 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (loop $while-in40 + (local.set $15 + (f32.add + (local.tee $17 + (f32.load + (local.tee $2 + (i32.add + (i32.shl + (i32.add + (local.get $13) + (local.tee $5 + (i32.mul + (local.get $1) + (local.get $3) + ) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + (f32.const 8.271806125530277e-25) + ) + ) + (if + (i32.eq + (i32.load offset=76 + (local.get $0) + ) + (i32.const 3) + ) + (local.set $15 + (local.get $17) + ) + (f32.store + (local.get $2) + (local.get $15) + ) + ) + (if + (local.get $4) + (block + (local.set $2 + (i32.const 0) + ) + (loop $while-in42 + (local.set $7 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (local.get $5) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + (if + (i32.ne + (local.get $2) + (local.get $13) + ) + (f32.store + (local.get $7) + (f32.mul + (local.get $15) + (f32.load + (local.get $7) + ) + ) + ) + ) + (br_if $while-in42 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in40 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + ) + ) + ) + (if + (i32.ne + (local.get $14) + (i32.const 4) + ) + (return) + ) + (if + (i32.gt_s + (local.tee $1 + (i32.load offset=144 + (local.get $0) + ) + ) + (i32.const 0) + ) + (block + (local.set $2 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $7 + (i32.shl + (local.get $3) + (i32.const 2) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in44 + (if + (local.get $2) + (drop + (call $_memset + (i32.add + (i32.shl + (i32.mul + (local.get $3) + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.const 0) + (local.get $7) + ) + ) + ) + (br_if $while-in44 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + ) + ) + (if + (i32.le_s + (local.get $11) + (i32.const 0) + ) + (return) + ) + (local.set $2 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (local.set $11 + (i32.shl + (local.get $3) + (i32.const 2) + ) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $0 + (local.get $6) + ) + (loop $while-in46 + (if + (local.get $2) + (drop + (call $_memset + (i32.add + (i32.shl + (i32.mul + (local.get $3) + (i32.add + (local.get $1) + (local.get $6) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + (i32.const 0) + (local.get $11) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (br_if $while-in46 + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + ) + (func $_stbir__use_width_upsampling (; 461 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (call $_stbir__use_upsampling + (f32.load offset=56 + (local.get $0) + ) + ) + ) + (func $_stbir__resample_horizontal_upsample (; 462 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local.set $15 + (i32.load offset=20 + (local.get $0) + ) + ) + (local.set $12 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $8 + (call $_stbir__get_decode_buffer + (local.get $0) + ) + ) + (local.set $16 + (i32.load offset=100 + (local.get $0) + ) + ) + (local.set $13 + (i32.load offset=104 + (local.get $0) + ) + ) + (local.set $18 + (i32.load offset=128 + (local.get $0) + ) + ) + (if + (i32.le_s + (local.get $15) + (i32.const 0) + ) + (return) + ) + (local.set $19 + (i32.gt_s + (local.get $12) + (i32.const 0) + ) + ) + (block $switch13 + (block $switch-case23 + (block $switch-case22 + (block $switch-case21 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (block $switch-case15 + (block $switch-case14 + (br_table $switch-case14 $switch13 $switch-case15 $switch13 $switch-case16 $switch13 $switch-case17 $switch13 $switch-case18 $switch13 $switch13 $switch13 $switch13 $switch-case19 $switch13 $switch13 $switch13 $switch13 $switch-case20 $switch13 $switch13 $switch13 $switch13 $switch-case21 $switch13 $switch13 $switch13 $switch13 $switch-case22 $switch13 $switch13 $switch13 $switch13 $switch-case23 $switch13 + (i32.sub + (loop $label$continue$L4 (result i32) + (block $label$break$L4 (result i32) + (drop + (br_if $label$break$L4 + (i32.const 4) + (i32.lt_s + (local.tee $7 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $11) + (i32.const 3) + ) + (local.get $16) + ) + ) + ) + (local.tee $2 + (i32.load + (i32.add + (i32.shl + (local.get $11) + (i32.const 3) + ) + (local.get $16) + ) + ) + ) + ) + ) + ) + (drop + (br_if $label$break$L4 + (i32.const 6) + (i32.lt_s + (local.get $2) + (local.tee $5 + (i32.sub + (i32.const 0) + (local.tee $3 + (i32.load offset=144 + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (drop + (br_if $label$break$L4 + (i32.const 8) + (i32.lt_s + (local.get $7) + (local.get $5) + ) + ) + ) + (drop + (br_if $label$break$L4 + (i32.const 10) + (i32.ge_s + (local.get $2) + (local.tee $3 + (i32.add + (local.get $3) + (i32.load offset=4 + (local.get $0) + ) + ) + ) + ) + ) + ) + (drop + (br_if $label$break$L4 + (i32.const 12) + (i32.ge_s + (local.get $7) + (local.get $3) + ) + ) + ) + (local.set $4 + (i32.mul + (local.get $11) + (local.get $12) + ) + ) + (local.set $14 + (i32.mul + (local.get $11) + (local.get $18) + ) + ) + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-default + (i32.sub + (local.get $12) + (i32.const 1) + ) + ) + ) + (if + (i32.le_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $4 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in + (drop + (br_if $label$break$L4 + (i32.const 17) + (f32.eq + (local.tee $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $14) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.store + (local.get $4) + (f32.add + (f32.load + (local.get $4) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $2 + (local.get $5) + ) + (br $while-in) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $9 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $4 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in1 + (drop + (br_if $label$break$L4 + (i32.const 22) + (f32.eq + (local.tee $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $14) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.store + (local.get $9) + (f32.add + (f32.load + (local.get $9) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.tee $5 + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $4) + (f32.add + (f32.load + (local.get $4) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.or + (local.get $5) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $2 + (local.get $5) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $9 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $4 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in4 + (drop + (br_if $label$break$L4 + (i32.const 27) + (f32.eq + (local.tee $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $14) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.store + (local.get $9) + (f32.add + (f32.load + (local.get $9) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.tee $5 + (i32.mul + (local.get $2) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $10) + (f32.add + (f32.load + (local.get $10) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $4) + (f32.add + (f32.load + (local.get $4) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $2 + (local.get $5) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $9 + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $17 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $4 + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.const 3) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in7 + (drop + (br_if $label$break$L4 + (i32.const 32) + (f32.eq + (local.tee $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $14) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.store + (local.get $9) + (f32.add + (f32.load + (local.get $9) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (local.tee $5 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $10) + (f32.add + (f32.load + (local.get $10) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.or + (local.get $5) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $17) + (f32.add + (f32.load + (local.get $17) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.or + (local.get $5) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (f32.store + (local.get $4) + (f32.add + (f32.load + (local.get $4) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.or + (local.get $5) + (i32.const 3) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $2 + (local.get $5) + ) + (br $while-in7) + ) + ) + ) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $5 + (i32.const 0) + ) + (loop $while-in10 + (drop + (br_if $label$break$L4 + (i32.const 37) + (f32.eq + (local.tee $6 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (local.get $14) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $9 + (i32.mul + (local.get $2) + (local.get $12) + ) + ) + (if + (local.get $19) + (block + (local.set $3 + (i32.const 0) + ) + (loop $while-in12 + (f32.store + (local.tee $10 + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $4) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $10) + ) + (f32.mul + (local.get $6) + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $8) + ) + ) + ) + ) + ) + (br_if $while-in12 + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $12) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $7) + ) + (block + (local.set $2 + (local.get $3) + ) + (br $while-in10) + ) + ) + ) + ) + ) + ) + (br_if $label$continue$L4 + (i32.lt_s + (local.tee $11 + (i32.add + (local.get $11) + (i32.const 1) + ) + ) + (local.get $15) + ) + ) + (i32.const 43) + ) + ) + (i32.const 4) + ) + ) + ) + (call $___assert_fail + (i32.const 14020) + (i32.const 13001) + (i32.const 1460) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14065) + (i32.const 13001) + (i32.const 1461) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14115) + (i32.const 13001) + (i32.const 1462) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14165) + (i32.const 13001) + (i32.const 1463) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14235) + (i32.const 13001) + (i32.const 1464) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1472) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1481) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1491) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1502) + (i32.const 14029) + ) + (br $switch13) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1515) + (i32.const 14029) + ) + ) + ) + (func $_stbir__resample_horizontal_downsample (; 463 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local.set $3 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.set $5 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $6 + (call $_stbir__get_decode_buffer + (local.get $0) + ) + ) + (local.set $7 + (i32.load offset=100 + (local.get $0) + ) + ) + (local.set $15 + (i32.load offset=104 + (local.get $0) + ) + ) + (local.set $16 + (i32.load offset=128 + (local.get $0) + ) + ) + (local.set $8 + (i32.add + (local.get $3) + (i32.shl + (local.tee $17 + (i32.load offset=144 + (local.get $0) + ) + ) + (i32.const 1) + ) + ) + ) + (if + (call $_stbir__use_width_upsampling + (local.get $0) + ) + (call $___assert_fail + (i32.const 13924) + (i32.const 13001) + (i32.const 1536) + (i32.const 13965) + ) + ) + (block $switch + (block $switch-default + (block $switch-case8 + (block $switch-case5 + (block $switch-case2 + (block $switch-case + (br_table $switch-case $switch-case2 $switch-case5 $switch-case8 $switch-default + (i32.sub + (local.get $5) + (i32.const 1) + ) + ) + ) + (if + (i32.le_s + (local.get $8) + (i32.const 0) + ) + (return) + ) + (local.set $3 + (i32.const 0) + ) + (if + (i32.eq + (local.tee $0 + (loop $label$continue$L29 (result i32) + (block $label$break$L29 (result i32) + (if + (i32.le_s + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + (local.tee $5 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + ) + (block + (local.set $9 + (i32.sub + (i32.mul + (local.get $3) + (local.get $16) + ) + (local.get $0) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (i32.sub + (local.get $3) + (local.get $17) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (loop $while-in + (drop + (br_if $label$break$L29 + (i32.const 9) + (f32.eq + (local.tee $4 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $15) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (f32.store + (local.tee $2 + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $2) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $10) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $5) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in) + ) + ) + ) + ) + ) + (br_if $label$continue$L29 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (i32.const 47) + ) + ) + ) + (i32.const 9) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1554) + (i32.const 13965) + ) + (if + (i32.eq + (local.get $0) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $8) + (i32.const 0) + ) + (return) + ) + (local.set $3 + (i32.const 0) + ) + (if + (i32.eq + (local.tee $0 + (loop $label$continue$L44 (result i32) + (block $label$break$L44 (result i32) + (local.set $2 + (i32.shl + (i32.sub + (local.get $3) + (local.get $17) + ) + (i32.const 1) + ) + ) + (if + (i32.le_s + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + (local.tee $5 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + ) + (block + (local.set $9 + (i32.sub + (i32.mul + (local.get $3) + (local.get $16) + ) + (local.get $0) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $11 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (loop $while-in1 + (drop + (br_if $label$break$L44 + (i32.const 17) + (f32.eq + (local.tee $4 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $15) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (f32.store + (local.tee $12 + (i32.add + (i32.shl + (local.tee $2 + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $12) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $10) + ) + ) + ) + ) + (f32.store + (local.tee $2 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $2) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $11) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $5) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (br_if $label$continue$L44 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (i32.const 47) + ) + ) + ) + (i32.const 17) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1575) + (i32.const 13965) + ) + (if + (i32.eq + (local.get $0) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $8) + (i32.const 0) + ) + (return) + ) + (local.set $3 + (i32.const 0) + ) + (if + (i32.eq + (local.tee $0 + (loop $label$continue$L59 (result i32) + (block $label$break$L59 (result i32) + (local.set $2 + (i32.mul + (i32.sub + (local.get $3) + (local.get $17) + ) + (i32.const 3) + ) + ) + (if + (i32.le_s + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + (local.tee $5 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + ) + (block + (local.set $9 + (i32.sub + (i32.mul + (local.get $3) + (local.get $16) + ) + (local.get $0) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $11 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $12 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (loop $while-in4 + (drop + (br_if $label$break$L59 + (i32.const 25) + (f32.eq + (local.tee $4 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $15) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (f32.store + (local.tee $13 + (i32.add + (i32.shl + (local.tee $2 + (i32.mul + (local.get $0) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $13) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $10) + ) + ) + ) + ) + (f32.store + (local.tee $13 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $13) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $11) + ) + ) + ) + ) + (f32.store + (local.tee $2 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $2) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $12) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $5) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in4) + ) + ) + ) + ) + ) + (br_if $label$continue$L59 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (i32.const 47) + ) + ) + ) + (i32.const 25) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1597) + (i32.const 13965) + ) + (if + (i32.eq + (local.get $0) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $8) + (i32.const 0) + ) + (return) + ) + (local.set $3 + (i32.const 0) + ) + (if + (i32.eq + (local.tee $0 + (loop $label$continue$L74 (result i32) + (block $label$break$L74 (result i32) + (local.set $2 + (i32.shl + (i32.sub + (local.get $3) + (local.get $17) + ) + (i32.const 2) + ) + ) + (if + (i32.le_s + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + (local.tee $5 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + ) + (block + (local.set $9 + (i32.sub + (i32.mul + (local.get $3) + (local.get $16) + ) + (local.get $0) + ) + ) + (local.set $10 + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $11 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $12 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (local.set $13 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 3) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + (loop $while-in7 + (drop + (br_if $label$break$L74 + (i32.const 33) + (f32.eq + (local.tee $4 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $9) + ) + (i32.const 2) + ) + (local.get $15) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (f32.store + (local.tee $14 + (i32.add + (i32.shl + (local.tee $2 + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $14) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $10) + ) + ) + ) + ) + (f32.store + (local.tee $14 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 1) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $14) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $11) + ) + ) + ) + ) + (f32.store + (local.tee $14 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 2) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $14) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $12) + ) + ) + ) + ) + (f32.store + (local.tee $2 + (i32.add + (i32.shl + (i32.or + (local.get $2) + (i32.const 3) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $2) + ) + (f32.mul + (local.get $4) + (f32.load + (local.get $13) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $5) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in7) + ) + ) + ) + ) + ) + (br_if $label$continue$L74 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (i32.const 47) + ) + ) + ) + (i32.const 33) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1620) + (i32.const 13965) + ) + (if + (i32.eq + (local.get $0) + (i32.const 47) + ) + (return) + ) + ) + (br $switch) + ) + (if + (i32.le_s + (local.get $8) + (i32.const 0) + ) + (return) + ) + (local.set $9 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $3 + (i32.const 0) + ) + (if + (i32.eq + (loop $label$continue$L9 (result i32) + (block $label$break$L9 (result i32) + (local.set $10 + (i32.mul + (local.get $5) + (i32.sub + (local.get $3) + (local.get $17) + ) + ) + ) + (if + (i32.le_s + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + (local.tee $11 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $7) + ) + ) + ) + ) + (block + (local.set $12 + (i32.sub + (i32.mul + (local.get $3) + (local.get $16) + ) + (local.get $0) + ) + ) + (loop $while-in10 + (drop + (br_if $label$break$L9 + (i32.const 41) + (f32.eq + (local.tee $4 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $0) + (local.get $12) + ) + (i32.const 2) + ) + (local.get $15) + ) + ) + ) + (f32.const 0) + ) + ) + ) + (local.set $13 + (i32.mul + (local.get $0) + (local.get $5) + ) + ) + (if + (local.get $9) + (block + (local.set $2 + (i32.const 0) + ) + (loop $while-in12 + (f32.store + (local.tee $14 + (i32.add + (i32.shl + (i32.add + (local.get $2) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $1) + ) + ) + (f32.add + (f32.load + (local.get $14) + ) + (f32.mul + (local.get $4) + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $2) + (local.get $10) + ) + (i32.const 2) + ) + (local.get $6) + ) + ) + ) + ) + ) + (br_if $while-in12 + (i32.ne + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $0) + (local.get $11) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in10) + ) + ) + ) + ) + ) + (br_if $label$continue$L9 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + (i32.const 47) + ) + ) + (i32.const 41) + ) + (call $___assert_fail + (i32.const 14003) + (i32.const 13001) + (i32.const 1645) + (i32.const 13965) + ) + ) + ) + ) + (func $_stbir__get_decode_buffer (; 464 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.add + (i32.load offset=120 + (local.get $0) + ) + (i32.shl + (i32.mul + (i32.load offset=144 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (i32.const 2) + ) + ) + ) + (func $_stbir__use_upsampling (; 465 ;) (; has Stack IR ;) (param $0 f32) (result i32) + (f32.gt + (local.get $0) + (f32.const 1) + ) + ) + (func $_stbir__edge_wrap (; 466 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (if + (i32.and + (i32.lt_s + (local.get $1) + (local.get $2) + ) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + (return + (local.get $1) + ) + ) + (call $_stbir__edge_wrap_slow + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + (func $_stbir__srgb_to_linear (; 467 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (if (result f32) + (f32.le + (local.get $0) + (f32.const 0.040449999272823334) + ) + (f32.div + (local.get $0) + (f32.const 12.920000076293945) + ) + (f32.demote_f64 + (call $_pow + (f64.promote_f32 + (f32.div + (f32.add + (local.get $0) + (f32.const 0.054999999701976776) + ) + (f32.const 1.0549999475479126) + ) + ) + (f64.const 2.4000000953674316) + ) + ) + ) + ) + (func $_stbir__edge_wrap_slow (; 468 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local.set $3 + (i32.sub + (i32.const 0) + (local.get $1) + ) + ) + (block $switch-default + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-default + (i32.sub + (local.get $0) + (i32.const 1) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + (return + (i32.const 0) + ) + (return + (select + (local.get $1) + (i32.add + (local.get $2) + (i32.const -1) + ) + (i32.lt_s + (local.get $1) + (local.get $2) + ) + ) + ) + ) + ) + (local.set $0 + (i32.lt_s + (local.get $1) + (local.get $2) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + (return + (select + (local.get $3) + (i32.add + (local.get $2) + (i32.const -1) + ) + (local.get $0) + ) + ) + (return + (select + (local.get $1) + (select + (i32.add + (local.tee $2 + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + (i32.xor + (local.get $1) + (i32.const -1) + ) + ) + (i32.const 0) + (i32.gt_s + (local.get $2) + (local.get $1) + ) + ) + (local.get $0) + ) + ) + ) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + (return + (i32.rem_s + (local.get $1) + (local.get $2) + ) + ) + (return + (select + (i32.sub + (local.get $2) + (local.tee $0 + (i32.rem_s + (i32.sub + (i32.const 0) + (local.get $1) + ) + (local.get $2) + ) + ) + ) + (i32.const 0) + (local.get $0) + ) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (call $___assert_fail + (i32.const 14377) + (i32.const 13001) + (i32.const 994) + (i32.const 14404) + ) + (i32.const 0) + ) + (func $_stbir__encode_scanline (; 469 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 f32) + (local $15 i32) + (local.set $10 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $11 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (if + (i32.and + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 1) + ) + ) + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + ) + (block + (local.set $12 + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + ) + (loop $while-in + (local.set $14 + (select + (f32.div + (f32.const 1) + (local.tee $14 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $5) + (local.tee $13 + (i32.mul + (local.get $4) + (local.get $8) + ) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (f32.const 0) + (f32.ne + (local.get $14) + (f32.const 0) + ) + ) + ) + (if + (local.get $12) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in1 + (local.set $9 + (i32.add + (i32.shl + (i32.add + (local.get $7) + (local.get $13) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + (if + (i32.ne + (local.get $5) + (local.get $7) + ) + (f32.store + (local.get $9) + (f32.mul + (local.get $14) + (f32.load + (local.get $9) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $8 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + ) + ) + (local.set $8 + (if (result i32) + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + (block (result i32) + (local.set $7 + (i32.const 0) + ) + (local.set $8 + (i32.const 0) + ) + (loop $while-in3 (result i32) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.ne + (local.get $5) + (local.get $8) + ) + ) + (br_if $__rjti$0 + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (br $__rjto$0) + ) + (i32.store16 + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $11) + ) + (local.get $8) + ) + (local.set $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + (br_if $while-in3 + (i32.ne + (local.tee $8 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + (local.get $7) + ) + ) + (i32.const 0) + ) + ) + (block $folding-inner0 + (block $switch-default + (block $switch-case42 + (block $switch-case37 + (block $switch-case32 + (block $switch-case27 + (block $switch-case22 + (block $switch-case17 + (block $switch-case12 + (block $switch-case + (br_table $switch-case $switch-case12 $switch-case17 $switch-case22 $switch-case27 $switch-case32 $switch-case37 $switch-case42 $switch-default + (local.get $6) + ) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in5 + (local.set $7 + (i32.mul + (local.get $0) + (local.get $4) + ) + ) + (if + (local.get $6) + (block + (local.set $5 + (i32.const 0) + ) + (loop $while-in7 + (local.set $11 + (i32.and + (i32.trunc_f64_s + (f64.add + (f64.promote_f32 + (f32.mul + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $8 + (i32.add + (local.get $5) + (local.get $7) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.const 255) + ) + ) + (f64.const 0.5) + ) + ) + (i32.const 255) + ) + ) + (i32.store8 + (i32.add + (local.get $2) + (local.get $8) + ) + (local.get $11) + ) + (br_if $while-in7 + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in5 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $12 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $6 + (i32.const 0) + ) + (loop $while-in9 + (local.set $9 + (i32.mul + (local.get $4) + (local.get $6) + ) + ) + (if + (local.get $12) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in11 + (local.set $15 + (call $_stbir__linear_to_srgb_uchar + (f32.load + (i32.add + (i32.shl + (local.tee $13 + (i32.add + (i32.load16_u + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $11) + ) + ) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (i32.store8 + (i32.add + (local.get $2) + (local.get $13) + ) + (local.get $15) + ) + (br_if $while-in11 + (i32.ne + (local.get $8) + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (block + (local.set $9 + (i32.and + (i32.trunc_f64_s + (f64.add + (f64.promote_f32 + (f32.mul + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $5) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.const 255) + ) + ) + (f64.const 0.5) + ) + ) + (i32.const 255) + ) + ) + (i32.store8 + (i32.add + (local.get $2) + (local.get $7) + ) + (local.get $9) + ) + ) + ) + (br_if $while-in9 + (i32.ne + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in14 + (local.set $7 + (i32.mul + (local.get $0) + (local.get $4) + ) + ) + (if + (local.get $6) + (block + (local.set $5 + (i32.const 0) + ) + (loop $while-in16 + (local.set $11 + (i32.and + (i32.trunc_f64_s + (f64.add + (f64.promote_f32 + (f32.mul + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $8 + (i32.add + (local.get $5) + (local.get $7) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.const 65535) + ) + ) + (f64.const 0.5) + ) + ) + (i32.const 65535) + ) + ) + (i32.store16 + (i32.add + (i32.shl + (local.get $8) + (i32.const 1) + ) + (local.get $2) + ) + (local.get $11) + ) + (br_if $while-in16 + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in14 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $12 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $6 + (i32.const 0) + ) + (loop $while-in19 + (local.set $9 + (i32.mul + (local.get $4) + (local.get $6) + ) + ) + (if + (local.get $12) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in21 + (local.set $15 + (i32.and + (i32.trunc_f64_s + (f64.add + (f64.promote_f32 + (f32.mul + (call $_stbir__linear_to_srgb + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $13 + (i32.add + (i32.load16_u + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $11) + ) + ) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (f32.const 65535) + ) + ) + (f64.const 0.5) + ) + ) + (i32.const 65535) + ) + ) + (i32.store16 + (i32.add + (i32.shl + (local.get $13) + (i32.const 1) + ) + (local.get $2) + ) + (local.get $15) + ) + (br_if $while-in21 + (i32.ne + (local.get $8) + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (block + (local.set $9 + (i32.and + (i32.trunc_f64_s + (f64.add + (f64.promote_f32 + (f32.mul + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $5) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (f32.const 65535) + ) + ) + (f64.const 0.5) + ) + ) + (i32.const 65535) + ) + ) + (i32.store16 + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $2) + ) + (local.get $9) + ) + ) + ) + (br_if $while-in19 + (i32.ne + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in24 + (local.set $7 + (i32.mul + (local.get $0) + (local.get $4) + ) + ) + (if + (local.get $6) + (block + (local.set $5 + (i32.const 0) + ) + (loop $while-in26 + (local.set $11 + (i32.trunc_f64_u + (f64.add + (f64.mul + (f64.promote_f32 + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $8 + (i32.add + (local.get $5) + (local.get $7) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (f64.const 4294967295) + ) + (f64.const 0.5) + ) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $8) + (i32.const 2) + ) + (local.get $2) + ) + (local.get $11) + ) + (br_if $while-in26 + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in24 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $12 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $6 + (i32.const 0) + ) + (loop $while-in29 + (local.set $9 + (i32.mul + (local.get $4) + (local.get $6) + ) + ) + (if + (local.get $12) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in31 + (local.set $15 + (i32.trunc_f64_u + (f64.add + (f64.mul + (f64.promote_f32 + (call $_stbir__linear_to_srgb + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $13 + (i32.add + (i32.load16_u + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $11) + ) + ) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f64.const 4294967295) + ) + (f64.const 0.5) + ) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $13) + (i32.const 2) + ) + (local.get $2) + ) + (local.get $15) + ) + (br_if $while-in31 + (i32.ne + (local.get $8) + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (block + (local.set $9 + (i32.trunc_f64_s + (f64.add + (f64.mul + (f64.promote_f32 + (call $_stbir__saturate + (f32.load + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $5) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (f64.const 4294967295) + ) + (f64.const 0.5) + ) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $2) + ) + (local.get $9) + ) + ) + ) + (br_if $while-in29 + (i32.ne + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $4) + (i32.const 0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in34 + (local.set $7 + (i32.mul + (local.get $0) + (local.get $4) + ) + ) + (if + (local.get $6) + (block + (local.set $5 + (i32.const 0) + ) + (loop $while-in36 + (i32.store + (i32.add + (i32.shl + (local.tee $8 + (i32.add + (local.get $5) + (local.get $7) + ) + ) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (local.get $8) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + (br_if $while-in36 + (i32.ne + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in34 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.le_s + (local.get $1) + (i32.const 0) + ) + ) + (local.set $12 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $6 + (i32.const 0) + ) + (loop $while-in39 + (local.set $9 + (i32.mul + (local.get $4) + (local.get $6) + ) + ) + (if + (local.get $12) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in41 + (local.set $14 + (call $_stbir__linear_to_srgb + (f32.load + (i32.add + (i32.shl + (local.tee $13 + (i32.add + (i32.load16_u + (i32.add + (i32.shl + (local.get $7) + (i32.const 1) + ) + (local.get $11) + ) + ) + (local.get $9) + ) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (f32.store + (i32.add + (i32.shl + (local.get $13) + (i32.const 2) + ) + (local.get $2) + ) + (local.get $14) + ) + (br_if $while-in41 + (i32.ne + (local.get $8) + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (local.set $7 + (i32.add + (local.get $5) + (local.get $9) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=72 + (local.get $0) + ) + (i32.const 2) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $2) + ) + (i32.load + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + (br_if $while-in39 + (i32.ne + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (br $folding-inner0) + ) + (call $___assert_fail + (i32.const 14305) + (i32.const 13001) + (i32.const 1861) + (i32.const 14426) + ) + (return) + ) + (global.set $STACKTOP + (local.get $10) + ) + ) + (func $_stbir__saturate (; 470 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (select + (f32.const 0) + (select + (f32.const 1) + (local.get $0) + (f32.gt + (local.get $0) + (f32.const 1) + ) + ) + (f32.lt + (local.get $0) + (f32.const 0) + ) + ) + ) + (func $_stbir__linear_to_srgb_uchar (; 471 ;) (; has Stack IR ;) (param $0 f32) (result i32) + (local $1 i32) + (local $2 i32) + (i32.and + (i32.shr_u + (i32.add + (i32.mul + (i32.and + (local.tee $2 + (i32.load + (i32.add + (i32.shl + (i32.shr_u + (i32.add + (local.tee $1 + (i32.reinterpret_f32 + (select + (f32.const 0.9999999403953552) + (local.tee $0 + (select + (local.get $0) + (f32.const 0.0001220703125) + (f32.gt + (local.get $0) + (f32.const 0.0001220703125) + ) + ) + ) + (f32.gt + (local.get $0) + (f32.const 0.9999999403953552) + ) + ) + ) + ) + (i32.const -956301312) + ) + (i32.const 20) + ) + (i32.const 2) + ) + (i32.const 6016) + ) + ) + ) + (i32.const 65535) + ) + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 12) + ) + (i32.const 255) + ) + ) + (i32.shl + (i32.shr_u + (local.get $2) + (i32.const 16) + ) + (i32.const 9) + ) + ) + (i32.const 16) + ) + (i32.const 255) + ) + ) + (func $_stbir__linear_to_srgb (; 472 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (if (result f32) + (f32.le + (local.get $0) + (f32.const 3.1308000907301903e-03) + ) + (f32.mul + (local.get $0) + (f32.const 12.920000076293945) + ) + (f32.add + (f32.mul + (f32.demote_f64 + (call $_pow + (f64.promote_f32 + (local.get $0) + ) + (f64.const 0.4166666567325592) + ) + ) + (f32.const 1.0549999475479126) + ) + (f32.const -0.054999999701976776) + ) + ) + ) + (func $_stbir__support_zero (; 473 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (f32.const 0) + ) + (func $_stbir__filter_trapezoid (; 474 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + (if + (i32.eqz + (f32.le + (local.get $1) + (f32.const 1) + ) + ) + (call $___assert_fail + (i32.const 14449) + (i32.const 13001) + (i32.const 762) + (i32.const 14485) + ) + ) + (if + (f32.ge + (local.tee $0 + (f32.abs + (local.get $0) + ) + ) + (local.tee $3 + (f32.add + (local.tee $2 + (f32.mul + (local.get $1) + (f32.const 0.5) + ) + ) + (f32.const 0.5) + ) + ) + ) + (return + (f32.const 0) + ) + ) + (if + (f32.le + (local.get $0) + (f32.sub + (f32.const 0.5) + (local.get $2) + ) + ) + (return + (f32.const 1) + ) + ) + (f32.div + (f32.sub + (local.get $3) + (local.get $0) + ) + (local.get $1) + ) + ) + (func $_stbir__support_trapezoid (; 475 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (if + (f32.le + (local.get $0) + (f32.const 1) + ) + (return + (f32.add + (f32.mul + (local.get $0) + (f32.const 0.5) + ) + (f32.const 0.5) + ) + ) + (call $___assert_fail + (i32.const 14449) + (i32.const 13001) + (i32.const 780) + (i32.const 14460) + ) + ) + (f32.const 0) + ) + (func $_stbir__filter_triangle (; 476 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (select + (f32.sub + (f32.const 1) + (local.tee $0 + (f32.abs + (local.get $0) + ) + ) + ) + (f32.const 0) + (f32.le + (local.get $0) + (f32.const 1) + ) + ) + ) + (func $_stbir__support_one (; 477 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (f32.const 1) + ) + (func $_stbir__filter_cubic (; 478 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (if + (f32.lt + (local.tee $1 + (f32.abs + (local.get $0) + ) + ) + (f32.const 1) + ) + (return + (f32.div + (f32.add + (f32.mul + (f32.mul + (local.get $0) + (local.get $0) + ) + (f32.add + (f32.mul + (local.get $1) + (f32.const 3) + ) + (f32.const -6) + ) + ) + (f32.const 4) + ) + (f32.const 6) + ) + ) + ) + (if + (i32.eqz + (f32.lt + (local.get $1) + (f32.const 2) + ) + ) + (return + (f32.const 0) + ) + ) + (f32.div + (f32.add + (f32.mul + (local.get $1) + (f32.add + (f32.mul + (local.get $1) + (f32.sub + (f32.const 6) + (local.get $1) + ) + ) + (f32.const -12) + ) + ) + (f32.const 8) + ) + (f32.const 6) + ) + ) + (func $_stbir__support_two (; 479 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (f32.const 2) + ) + (func $_stbir__filter_catmullrom (; 480 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (if + (f32.lt + (local.tee $1 + (f32.abs + (local.get $0) + ) + ) + (f32.const 1) + ) + (return + (f32.sub + (f32.const 1) + (f32.mul + (f32.mul + (local.get $0) + (local.get $0) + ) + (f32.sub + (f32.const 2.5) + (f32.mul + (local.get $1) + (f32.const 1.5) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (f32.lt + (local.get $1) + (f32.const 2) + ) + ) + (return + (f32.const 0) + ) + ) + (f32.sub + (f32.const 2) + (f32.mul + (local.get $1) + (f32.add + (f32.mul + (local.get $1) + (f32.add + (f32.mul + (local.get $1) + (f32.const 0.5) + ) + (f32.const -2.5) + ) + ) + (f32.const 4) + ) + ) + ) + ) + (func $_stbir__filter_mitchell (; 481 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (if + (f32.lt + (local.tee $1 + (f32.abs + (local.get $0) + ) + ) + (f32.const 1) + ) + (return + (f32.div + (f32.add + (f32.mul + (f32.mul + (local.get $0) + (local.get $0) + ) + (f32.add + (f32.mul + (local.get $1) + (f32.const 21) + ) + (f32.const -36) + ) + ) + (f32.const 16) + ) + (f32.const 18) + ) + ) + ) + (if + (i32.eqz + (f32.lt + (local.get $1) + (f32.const 2) + ) + ) + (return + (f32.const 0) + ) + ) + (f32.div + (f32.add + (f32.mul + (local.get $1) + (f32.add + (f32.mul + (local.get $1) + (f32.sub + (f32.const 36) + (f32.mul + (local.get $1) + (f32.const 7) + ) + ) + ) + (f32.const -60) + ) + ) + (f32.const 32) + ) + (f32.const 18) + ) + ) + (func $_stbir__calculate_sample_range_upsample (; 482 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (param $5 i32) (param $6 i32) + (local $7 f32) + (f32.store + (local.get $6) + (f32.div + (f32.add + (local.tee $7 + (f32.add + (f32.convert_i32_s + (local.get $0) + ) + (f32.const 0.5) + ) + ) + (local.get $3) + ) + (local.get $2) + ) + ) + (i32.store + (local.get $4) + (i32.trunc_f64_s + (f64.floor + (f64.add + (f64.promote_f32 + (f32.div + (f32.add + (f32.sub + (local.get $7) + (local.get $1) + ) + (local.get $3) + ) + (local.get $2) + ) + ) + (f64.const 0.5) + ) + ) + ) + ) + (i32.store + (local.get $5) + (i32.trunc_f64_s + (f64.floor + (f64.add + (f64.promote_f32 + (f32.div + (f32.add + (f32.add + (local.get $7) + (local.get $1) + ) + (local.get $3) + ) + (local.get $2) + ) + ) + (f64.const -0.5) + ) + ) + ) + ) + ) + (func $_stbir__decode_and_resample_upsample (; 483 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (call $_stbir__decode_scanline + (local.get $0) + (local.get $1) + ) + (local.set $2 + (i32.eqz + (call $_stbir__use_width_upsampling + (local.get $0) + ) + ) + ) + (local.set $1 + (call $_stbir__add_empty_ring_buffer_entry + (local.get $0) + (local.get $1) + ) + ) + (if + (local.get $2) + (call $_stbir__resample_horizontal_downsample + (local.get $0) + (local.get $1) + ) + (call $_stbir__resample_horizontal_upsample + (local.get $0) + (local.get $1) + ) + ) + ) + (func $_stbir__resample_vertical_upsample (; 484 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local.set $5 + (i32.load offset=20 + (local.get $0) + ) + ) + (local.set $18 + (i32.load offset=112 + (local.get $0) + ) + ) + (local.set $8 + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + ) + (local.set $11 + (i32.load offset=68 + (local.get $0) + ) + ) + (local.set $19 + (i32.load offset=164 + (local.get $0) + ) + ) + (local.set $12 + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $4 + (i32.load offset=184 + (local.get $0) + ) + ) + (local.set $13 + (i32.add + (i32.load offset=96 + (local.get $0) + ) + (i32.shl + (i32.load offset=76 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (local.set $20 + (i32.load offset=180 + (local.get $0) + ) + ) + (local.set $21 + (i32.load offset=176 + (local.get $0) + ) + ) + (local.set $22 + (i32.load offset=168 + (local.get $0) + ) + ) + (local.set $23 + (i32.shr_u + (i32.load offset=160 + (local.get $0) + ) + (i32.const 2) + ) + ) + (local.set $24 + (i32.mul + (local.get $1) + (i32.load offset=132 + (local.get $0) + ) + ) + ) + (local.set $2 + (i32.load + (i32.add + (local.tee $9 + (i32.load offset=108 + (local.get $0) + ) + ) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + ) + ) + (local.set $14 + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (local.get $9) + ) + ) + ) + (local.set $15 + (i32.mul + (local.get $1) + (i32.load offset=28 + (local.get $0) + ) + ) + ) + (if + (i32.eqz + (call $_stbir__use_height_upsampling + (local.get $0) + ) + ) + (call $___assert_fail + (i32.const 14509) + (i32.const 13001) + (i32.const 1897) + (i32.const 14658) + ) + ) + (drop + (call $_memset + (local.get $4) + (i32.const 0) + (i32.mul + (local.get $8) + (i32.shl + (local.get $5) + (i32.const 2) + ) + ) + ) + ) + (block $folding-inner0 + (block $switch-default + (block $switch-case16 + (block $switch-case11 + (block $switch-case6 + (block $switch-case + (br_table $switch-case $switch-case6 $switch-case11 $switch-case16 $switch-default + (i32.sub + (local.get $8) + (i32.const 1) + ) + ) + ) + (br_if $folding-inner0 + (i32.gt_s + (local.get $2) + (local.get $14) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in + (local.set $9 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $3 + (call $_stbir__get_ring_buffer_scanline + (local.get $2) + (local.get $20) + (local.get $21) + (local.get $22) + (local.get $19) + (local.get $23) + ) + ) + (local.set $10 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $24) + ) + (i32.const 2) + ) + (local.get $18) + ) + ) + ) + (if + (local.get $6) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in1 + (f32.store + (local.tee $16 + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $16) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $14) + ) + (block + (local.set $1 + (local.get $9) + ) + (local.set $2 + (local.get $3) + ) + (br $while-in) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.gt_s + (local.get $2) + (local.get $14) + ) + ) + (local.set $16 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in3 + (local.set $9 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $3 + (call $_stbir__get_ring_buffer_scanline + (local.get $2) + (local.get $20) + (local.get $21) + (local.get $22) + (local.get $19) + (local.get $23) + ) + ) + (local.set $10 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $24) + ) + (i32.const 2) + ) + (local.get $18) + ) + ) + ) + (if + (local.get $16) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in5 + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.or + (local.get $6) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in5 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $14) + ) + (block + (local.set $1 + (local.get $9) + ) + (local.set $2 + (local.get $3) + ) + (br $while-in3) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.gt_s + (local.get $2) + (local.get $14) + ) + ) + (local.set $16 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in8 + (local.set $9 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $3 + (call $_stbir__get_ring_buffer_scanline + (local.get $2) + (local.get $20) + (local.get $21) + (local.get $22) + (local.get $19) + (local.get $23) + ) + ) + (local.set $10 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $24) + ) + (i32.const 2) + ) + (local.get $18) + ) + ) + ) + (if + (local.get $16) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in10 + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.mul + (local.get $1) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $17 + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $17) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in10 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $14) + ) + (block + (local.set $1 + (local.get $9) + ) + (local.set $2 + (local.get $3) + ) + (br $while-in8) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.gt_s + (local.get $2) + (local.get $14) + ) + ) + (local.set $16 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in13 + (local.set $9 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $3 + (call $_stbir__get_ring_buffer_scanline + (local.get $2) + (local.get $20) + (local.get $21) + (local.get $22) + (local.get $19) + (local.get $23) + ) + ) + (local.set $10 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $24) + ) + (i32.const 2) + ) + (local.get $18) + ) + ) + ) + (if + (local.get $16) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in15 + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $17 + (i32.add + (i32.shl + (local.tee $7 + (i32.or + (local.get $6) + (i32.const 1) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $17) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $17 + (i32.add + (i32.shl + (local.tee $7 + (i32.or + (local.get $6) + (i32.const 2) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $17) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $7) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (f32.store + (local.tee $7 + (i32.add + (i32.shl + (local.tee $6 + (i32.or + (local.get $6) + (i32.const 3) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $7) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $3) + ) + ) + ) + ) + ) + (br_if $while-in15 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $14) + ) + (block + (local.set $1 + (local.get $9) + ) + (local.set $2 + (local.get $3) + ) + (br $while-in13) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $folding-inner0 + (i32.gt_s + (local.get $2) + (local.get $14) + ) + ) + (local.set $6 + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + ) + (local.set $16 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in18 + (local.set $3 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $7 + (call $_stbir__get_ring_buffer_scanline + (local.get $2) + (local.get $20) + (local.get $21) + (local.get $22) + (local.get $19) + (local.get $23) + ) + ) + (local.set $10 + (f32.load + (i32.add + (i32.shl + (i32.add + (local.get $1) + (local.get $24) + ) + (i32.const 2) + ) + (local.get $18) + ) + ) + ) + (if + (local.get $6) + (block + (local.set $1 + (i32.const 0) + ) + (loop $while-in20 + (local.set $17 + (i32.mul + (local.get $1) + (local.get $8) + ) + ) + (if + (local.get $16) + (block + (local.set $9 + (i32.const 0) + ) + (loop $while-in22 + (f32.store + (local.tee $26 + (i32.add + (i32.shl + (local.tee $25 + (i32.add + (local.get $9) + (local.get $17) + ) + ) + (i32.const 2) + ) + (local.get $4) + ) + ) + (f32.add + (f32.load + (local.get $26) + ) + (f32.mul + (local.get $10) + (f32.load + (i32.add + (i32.shl + (local.get $25) + (i32.const 2) + ) + (local.get $7) + ) + ) + ) + ) + ) + (br_if $while-in22 + (i32.ne + (local.tee $9 + (i32.add + (local.get $9) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + ) + ) + ) + (br_if $while-in20 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + ) + ) + ) + (local.set $9 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $2) + (local.get $14) + ) + (block + (local.set $1 + (local.get $3) + ) + (local.set $2 + (local.get $9) + ) + (br $while-in18) + ) + ) + ) + (call $_stbir__encode_scanline + (local.get $0) + (local.get $5) + (i32.add + (local.get $12) + (local.get $15) + ) + (local.get $4) + (local.get $8) + (local.get $11) + (local.get $13) + ) + (return) + ) + (call $_stbir__encode_scanline + (local.get $0) + (local.get $5) + (i32.add + (local.get $12) + (local.get $15) + ) + (local.get $4) + (local.get $8) + (local.get $11) + (local.get $13) + ) + ) + (func $_stbir__get_contributors (; 485 ;) (; has Stack IR ;) (param $0 f32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (if + (call $_stbir__use_upsampling + (local.get $0) + ) + (return + (local.get $3) + ) + ) + (i32.add + (local.get $2) + (i32.shl + (call $_stbir__get_filter_pixel_margin + (local.get $1) + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (func $_stbir__get_contributor (; 486 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (local.get $0) + ) + ) + (func $_stbir__get_coefficient (; 487 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (result i32) + (i32.add + (i32.shl + (i32.add + (local.get $4) + (i32.mul + (call $_stbir__get_coefficient_width + (local.get $1) + (local.get $2) + ) + (local.get $3) + ) + ) + (i32.const 2) + ) + (local.get $0) + ) + ) + (func $_stbir__calculate_coefficients_upsample (; 488 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (param $4 f32) (param $5 i32) (param $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f32) + (local.set $8 + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4944) + ) + ) + (local.set $0 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (if + (i32.gt_s + (i32.sub + (local.get $3) + (local.get $2) + ) + (i32.trunc_f32_s + (f32.ceil + (f32.mul + (call_indirect (type $FUNCSIG$ff) + (local.tee $9 + (f32.div + (f32.const 1) + (local.get $1) + ) + ) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + (f32.const 2) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 15053) + (i32.const 13001) + (i32.const 1043) + (i32.const 15152) + ) + ) + (i32.store + (local.get $5) + (local.get $2) + ) + (i32.store offset=4 + (local.get $5) + (local.get $3) + ) + (if + (i32.lt_s + (local.get $3) + (local.get $2) + ) + (call $___assert_fail + (i32.const 14905) + (i32.const 13001) + (i32.const 1048) + (i32.const 15152) + ) + ) + (if + (i32.lt_s + (local.tee $0 + (i32.sub + (local.get $3) + (local.get $2) + ) + ) + (i32.const 0) + ) + (local.set $1 + (f32.const 0) + ) + (block + (local.set $0 + (i32.const 0) + ) + (local.set $1 + (f32.const 0) + ) + (local.set $0 + (loop $while-in (result i32) + (local.set $7 + (i32.load + (local.get $8) + ) + ) + (f32.store + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $6) + ) + (local.tee $10 + (call_indirect (type $FUNCSIG$fff) + (f32.sub + (local.get $4) + (f32.add + (f32.convert_i32_s + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (f32.const 0.5) + ) + ) + (local.get $9) + (i32.add + (i32.and + (local.get $7) + (i32.const 7) + ) + (i32.const 8) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.tee $7 + (if (result i32) + (i32.or + (f32.ne + (local.get $10) + (f32.const 0) + ) + (local.get $0) + ) + (block (result i32) + (local.set $1 + (f32.add + (local.get $1) + (local.get $10) + ) + ) + (local.get $0) + ) + (block (result i32) + (i32.store + (local.get $5) + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + ) + (i32.const -1) + ) + ) + ) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.lt_s + (local.get $7) + (local.tee $7 + (i32.sub + (local.get $3) + (local.get $2) + ) + ) + ) + ) + (local.get $7) + ) + ) + ) + ) + (local.set $2 + (i32.load + (local.get $8) + ) + ) + (if + (f32.ne + (call_indirect (type $FUNCSIG$fff) + (f32.sub + (f32.add + (f32.convert_i32_s + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.const 0.5) + ) + (local.get $4) + ) + (local.get $9) + (i32.add + (i32.and + (local.get $2) + (i32.const 7) + ) + (i32.const 8) + ) + ) + (f32.const 0) + ) + (call $___assert_fail + (i32.const 15191) + (i32.const 13001) + (i32.const 1066) + (i32.const 15152) + ) + ) + (if + (i32.eqz + (f64.gt + (f64.promote_f32 + (local.get $1) + ) + (f64.const 0.9) + ) + ) + (call $___assert_fail + (i32.const 15299) + (i32.const 13001) + (i32.const 1068) + (i32.const 15152) + ) + ) + (if + (i32.eqz + (f32.lt + (local.get $1) + (f32.const 1.100000023841858) + ) + ) + (call $___assert_fail + (i32.const 15318) + (i32.const 13001) + (i32.const 1069) + (i32.const 15152) + ) + ) + (if + (i32.lt_s + (local.get $0) + (i32.const 0) + ) + (return) + ) + (local.set $1 + (f32.div + (f32.const 1) + (local.get $1) + ) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in1 + (f32.store + (local.tee $3 + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $6) + ) + ) + (f32.mul + (local.get $1) + (f32.load + (local.get $3) + ) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.ne + (local.get $0) + (local.get $2) + ) + (block + (local.set $2 + (local.get $3) + ) + (br $while-in1) + ) + ) + ) + (if + (i32.le_s + (local.get $0) + (i32.const -1) + ) + (return) + ) + (loop $while-in3 + (if + (f32.eq + (f32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $6) + ) + ) + (f32.const 0) + ) + (block + (i32.store offset=4 + (local.get $5) + (i32.add + (i32.load + (local.get $5) + ) + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in3) + ) + ) + ) + ) + ) + ) + (func $_stbir__calculate_coefficients_downsample (; 489 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (param $4 f32) (param $5 i32) (param $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local.set $8 + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4944) + ) + ) + (local.set $0 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 4948) + ) + ) + ) + (if + (i32.gt_s + (local.tee $7 + (i32.sub + (local.get $3) + (local.get $2) + ) + ) + (i32.trunc_f32_s + (f32.ceil + (f32.mul + (call_indirect (type $FUNCSIG$ff) + (local.get $1) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + (f32.const 2) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 14759) + (i32.const 13001) + (i32.const 1091) + (i32.const 14864) + ) + ) + (i32.store + (local.get $5) + (local.get $2) + ) + (i32.store offset=4 + (local.get $5) + (local.get $3) + ) + (if + (i32.lt_s + (local.get $3) + (local.get $2) + ) + (call $___assert_fail + (i32.const 14905) + (i32.const 13001) + (i32.const 1096) + (i32.const 14864) + ) + ) + (if + (i32.ge_s + (local.get $7) + (i32.const 0) + ) + (block + (local.set $9 + (i32.sub + (i32.add + (local.get $3) + (i32.const 1) + ) + (local.get $2) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (local.set $10 + (i32.load + (local.get $8) + ) + ) + (f32.store + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $6) + ) + (f32.mul + (call_indirect (type $FUNCSIG$fff) + (f32.sub + (f32.add + (f32.convert_i32_s + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (f32.const 0.5) + ) + (local.get $4) + ) + (local.get $1) + (i32.add + (i32.and + (local.get $10) + (i32.const 7) + ) + (i32.const 8) + ) + ) + (local.get $1) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + ) + ) + (local.set $0 + (i32.load + (local.get $8) + ) + ) + (if + (f32.ne + (call_indirect (type $FUNCSIG$fff) + (f32.sub + (f32.add + (f32.convert_i32_s + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (f32.const 0.5) + ) + (local.get $4) + ) + (local.get $1) + (i32.add + (i32.and + (local.get $0) + (i32.const 7) + ) + (i32.const 8) + ) + ) + (f32.const 0) + ) + (call $___assert_fail + (i32.const 14940) + (i32.const 13001) + (i32.const 1105) + (i32.const 14864) + ) + ) + (if + (i32.le_s + (local.get $7) + (i32.const -1) + ) + (return) + ) + (local.set $0 + (local.get $7) + ) + (loop $while-in1 + (if + (f32.eq + (f32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $6) + ) + ) + (f32.const 0) + ) + (block + (i32.store offset=4 + (local.get $5) + (i32.add + (i32.load + (local.get $5) + ) + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in1) + ) + ) + ) + ) + ) + ) + (func $_stbir__normalize_downsample_coefficients (; 490 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 i32) (param $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local $12 i32) + (local $13 i32) + (local.set $9 + (call $_stbir__get_contributors + (local.get $3) + (local.get $2) + (local.get $4) + (local.get $5) + ) + ) + (local.set $13 + (call $_stbir__get_coefficient_width + (local.get $2) + (local.get $3) + ) + ) + (if + (i32.gt_s + (local.get $5) + (i32.const 0) + ) + (block $label$break$L1 + (local.set $8 + (i32.gt_s + (local.get $9) + (i32.const 0) + ) + ) + (local.set $10 + (i32.gt_s + (local.get $9) + (i32.const 0) + ) + ) + (local.set $4 + (i32.const 0) + ) + (block $__rjto$1 + (block $__rjti$1 + (loop $while-in + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.get $8) + ) + ) + (local.set $6 + (i32.const 0) + ) + (local.set $11 + (f32.const 0) + ) + (loop $while-in1 + (if + (i32.ge_s + (local.get $4) + (local.tee $7 + (i32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 3) + ) + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.le_s + (local.get $4) + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $6) + (i32.const 3) + ) + (local.get $0) + ) + ) + ) + (local.set $11 + (f32.add + (local.get $11) + (f32.load + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $6) + (i32.sub + (local.get $4) + (local.get $7) + ) + ) + ) + ) + ) + ) + (br_if $while-in1 + (i32.lt_s + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (f32.gt + (local.get $11) + (f32.const 0.8999999761581421) + ) + ) + ) + (br_if $__rjti$1 + (i32.eqz + (f32.lt + (local.get $11) + (f32.const 1.100000023841858) + ) + ) + ) + (local.set $11 + (f32.div + (f32.const 1) + (local.get $11) + ) + ) + (if + (local.get $10) + (block $label$break$L15 + (local.set $6 + (i32.const 0) + ) + (loop $while-in4 + (br_if $label$break$L15 + (i32.lt_s + (local.get $4) + (local.tee $7 + (i32.load + (i32.add + (i32.shl + (local.get $6) + (i32.const 3) + ) + (local.get $0) + ) + ) + ) + ) + ) + (if + (i32.le_s + (local.get $4) + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $6) + (i32.const 3) + ) + (local.get $0) + ) + ) + ) + (f32.store + (local.tee $7 + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $6) + (i32.sub + (local.get $4) + (local.get $7) + ) + ) + ) + (f32.mul + (local.get $11) + (f32.load + (local.get $7) + ) + ) + ) + ) + (br_if $while-in4 + (i32.lt_s + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.get $5) + ) + ) + (br $label$break$L1) + ) + ) + (call $___assert_fail + (i32.const 14692) + (i32.const 13001) + (i32.const 1140) + (i32.const 14705) + ) + (br $__rjto$1) + ) + (call $___assert_fail + (i32.const 14746) + (i32.const 13001) + (i32.const 1141) + (i32.const 14705) + ) + ) + ) + ) + (if + (i32.le_s + (local.get $9) + (i32.const 0) + ) + (return) + ) + (local.set $4 + (i32.const 0) + ) + (loop $while-in6 + (local.set $6 + (i32.const 0) + ) + (loop $while-in8 + (local.set $10 + (f32.eq + (f32.load + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $6) + ) + ) + (f32.const 0) + ) + ) + (local.set $8 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (if + (local.get $10) + (block + (local.set $6 + (local.get $8) + ) + (br $while-in8) + ) + ) + ) + (local.set $8 + (i32.lt_s + (local.tee $10 + (i32.add + (local.tee $12 + (i32.load + (local.tee $7 + (i32.add + (i32.shl + (local.get $4) + (i32.const 3) + ) + (local.get $0) + ) + ) + ) + ) + (local.get $6) + ) + ) + (i32.const 0) + ) + ) + (local.set $12 + (select + (i32.sub + (i32.const 0) + (local.get $12) + ) + (local.get $6) + (local.get $8) + ) + ) + (i32.store + (local.get $7) + (select + (i32.const 0) + (local.get $10) + (local.get $8) + ) + ) + (local.set $8 + (call $_stbir__min + (local.get $13) + (i32.add + (i32.load offset=4 + (i32.add + (i32.shl + (local.get $4) + (i32.const 3) + ) + (local.get $0) + ) + ) + (select + (i32.const 1) + (i32.sub + (i32.const 1) + (local.get $10) + ) + (local.get $8) + ) + ) + ) + ) + (local.set $10 + (call $_stbir__get_coefficient_width + (local.get $2) + (local.get $3) + ) + ) + (if + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + (block $label$break$L37 + (local.set $6 + (i32.const 0) + ) + (loop $while-in11 + (br_if $label$break$L37 + (i32.ge_s + (local.tee $7 + (i32.add + (local.get $6) + (local.get $12) + ) + ) + (local.get $10) + ) + ) + (local.set $7 + (i32.load + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $7) + ) + ) + ) + (i32.store + (call $_stbir__get_coefficient + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $6) + ) + (local.get $7) + ) + (br_if $while-in11 + (i32.lt_s + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.get $8) + ) + ) + ) + ) + ) + (br_if $while-in6 + (i32.ne + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + (if + (i32.le_s + (local.get $9) + (i32.const 0) + ) + (return) + ) + (local.set $2 + (i32.add + (local.get $5) + (i32.const -1) + ) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in13 + (i32.store offset=4 + (local.tee $4 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (local.get $0) + ) + ) + (call $_stbir__min + (i32.load offset=4 + (local.get $4) + ) + (local.get $2) + ) + ) + (br_if $while-in13 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + ) + (func $_stbir__min (; 491 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (select + (local.get $0) + (local.get $1) + (i32.lt_s + (local.get $0) + (local.get $1) + ) + ) + ) + (func $_ErrorCallback (; 492 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $2) + (local.get $0) + ) + (i32.store offset=4 + (local.get $2) + (local.get $1) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16464) + (local.get $2) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_WindowSizeCallback (; 493 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (call $_SetupViewport + (local.get $1) + (local.get $2) + ) + (i32.store + (i32.const 27948) + (local.get $1) + ) + (i32.store + (i32.const 27952) + (local.get $2) + ) + ) + (func $_CursorEnterCallback (; 494 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (nop) + ) + (func $_KeyCallback (; 495 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 576) + ) + ) + (if + (i32.and + (local.tee $6 + (i32.eq + (local.get $3) + (i32.const 1) + ) + ) + (i32.eq + (local.get $1) + (i32.const 256) + ) + ) + (block + (call $_glfwSetWindowShouldClose + (local.get $0) + (i32.const 1) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (if + (i32.eqz + (i32.and + (local.get $6) + (i32.eq + (local.get $1) + (i32.const 301) + ) + ) + ) + (block + (i32.store8 + (i32.add + (local.get $1) + (i32.const 22640) + ) + (local.get $3) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (local.set $0 + (i32.add + (local.get $2) + (i32.const 568) + ) + ) + (if + (i32.ne + (local.get $4) + (i32.const 2) + ) + (block + (i32.store + (local.get $0) + (i32.load + (i32.const 28092) + ) + ) + (call $_TakeScreenshot + (call $_TextFormat + (i32.const 15904) + (local.get $0) + ) + ) + (i32.store + (i32.const 28092) + (i32.add + (i32.load + (i32.const 28092) + ) + (i32.const 1) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (return) + ) + ) + (local.set $1 + (i32.add + (local.get $2) + (i32.const 560) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 552) + ) + ) + (local.set $4 + (i32.add + (local.get $2) + (i32.const 544) + ) + ) + (local.set $8 + (i32.add + (local.get $2) + (i32.const 536) + ) + ) + (local.set $0 + (i32.add + (local.get $2) + (i32.const 528) + ) + ) + (local.set $6 + (i32.add + (local.get $2) + (i32.const 520) + ) + ) + (local.set $7 + (i32.add + (local.get $2) + (i32.const 512) + ) + ) + (if + (i32.load8_s + (i32.const 28844) + ) + (block + (call $_GifEnd) + (i32.store8 + (i32.const 28844) + (i32.const 0) + ) + (i32.store + (local.get $7) + (i32.add + (i32.load + (i32.const 28092) + ) + (i32.const -1) + ) + ) + (local.set $1 + (call $_TextFormat + (i32.const 15771) + (local.get $7) + ) + ) + (i32.store + (local.get $6) + (i32.add + (i32.load + (i32.const 28092) + ) + (i32.const -1) + ) + ) + (local.set $2 + (call $_TextFormat + (i32.const 15771) + (local.get $6) + ) + ) + (i32.store + (local.get $0) + (local.get $1) + ) + (i32.store offset=4 + (local.get $0) + (local.get $2) + ) + (call $_emscripten_run_script + (call $_TextFormat + (i32.const 15789) + (local.get $0) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15824) + (local.get $8) + ) + ) + (block + (i32.store8 + (i32.const 28844) + (i32.const 1) + ) + (i32.store + (i32.const 28096) + (i32.const 0) + ) + (drop + (call $_memset + (local.get $2) + (i32.const 0) + (i32.const 512) + ) + ) + (i32.store + (local.get $4) + (i32.load + (i32.const 28092) + ) + ) + (call $_strcpy + (local.get $2) + (call $_TextFormat + (i32.const 15851) + (local.get $4) + ) + ) + (call $_GifBegin + (local.get $2) + (i32.load + (i32.const 27948) + ) + (i32.load + (i32.const 27952) + ) + (i32.trunc_f32_s + (f32.mul + (f32.demote_f64 + (f64.load + (i32.const 27632) + ) + ) + (f32.const 10) + ) + ) + ) + (i32.store + (i32.const 28092) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28092) + ) + (i32.const 1) + ) + ) + ) + (i32.store + (local.get $3) + (local.get $0) + ) + (i32.store + (local.get $1) + (call $_TextFormat + (i32.const 15771) + (local.get $3) + ) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15871) + (local.get $1) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_MouseButtonCallback (; 496 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (local.set $4 + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (local.set $3 + (local.get $0) + ) + (i32.store8 + (i32.add + (local.get $1) + (i32.const 28838) + ) + (local.get $2) + ) + (block $__rjto$0 + (block $__rjti$0 + (if + (i32.and + (i32.ne + (local.tee $1 + (i32.load8_s + (i32.const 28838) + ) + ) + (i32.load8_s + (i32.const 28841) + ) + ) + (i32.eq + (local.get $1) + (i32.const 1) + ) + ) + (block + (local.set $1 + (i32.const 1) + ) + (br $__rjti$0) + ) + (if + (i32.and + (i32.ne + (local.tee $1 + (i32.load8_s + (i32.const 28838) + ) + ) + (i32.load8_s + (i32.const 28841) + ) + ) + (i32.eqz + (local.get $1) + ) + ) + (block + (local.set $1 + (i32.const 0) + ) + (br $__rjti$0) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $1) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (local.set $6 + (f32.add + (f32.load + (i32.const 27936) + ) + (f32.const 0) + ) + ) + (f32.store + (local.get $3) + (f32.add + (f32.load + (i32.const 27932) + ) + (f32.const 0) + ) + ) + (f32.store offset=4 + (local.get $3) + (local.get $6) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load + (local.get $3) + ) + ) + (f32.store offset=32 + (local.get $0) + (f32.div + (f32.load offset=32 + (local.get $0) + ) + (f32.convert_i32_s + (i32.load + (i32.const 27948) + ) + ) + ) + ) + (f32.store offset=36 + (local.get $0) + (f32.div + (f32.load offset=36 + (local.get $0) + ) + (f32.convert_i32_s + (i32.load + (i32.const 27952) + ) + ) + ) + ) + (i64.store align=4 + (local.get $4) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $4) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $4) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $4) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $4) + (i64.load offset=56 align=4 + (local.get $0) + ) + ) + (call $_ProcessGestureEvent + (local.get $4) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_MouseCursorPosCallback (; 497 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 112) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 112) + ) + ) + (i32.store + (local.get $0) + (i32.const 2) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1) + ) + (f32.store offset=24 + (local.get $0) + (f32.demote_f64 + (local.get $1) + ) + ) + (f32.store offset=28 + (local.get $0) + (local.tee $5 + (f32.demote_f64 + (local.get $2) + ) + ) + ) + (f32.store offset=24 + (local.get $0) + (f32.div + (f32.load offset=24 + (local.get $0) + ) + (f32.convert_i32_s + (i32.load + (i32.const 27948) + ) + ) + ) + ) + (f32.store offset=28 + (local.get $0) + (f32.div + (local.get $5) + (f32.convert_i32_s + (i32.load + (i32.const 27952) + ) + ) + ) + ) + (i64.store align=4 + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 56) + ) + ) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $3) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $3) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $3) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i64.store offset=32 align=4 + (local.get $3) + (i64.load offset=32 align=4 + (local.get $0) + ) + ) + (i64.store offset=40 align=4 + (local.get $3) + (i64.load offset=40 align=4 + (local.get $0) + ) + ) + (i64.store offset=48 align=4 + (local.get $3) + (i64.load offset=48 align=4 + (local.get $0) + ) + ) + (call $_ProcessGestureEvent + (local.get $3) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_ScrollCallback (; 498 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) + (i32.store + (i32.const 28088) + (i32.trunc_f64_s + (local.get $2) + ) + ) + ) + (func $_WindowIconifyCallback (; 499 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + (i32.store8 + (local.get $0) + (i32.ne + (local.get $1) + (i32.const 0) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_WindowDropCallback (; 500 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (call $_ClearDroppedFiles) + (i32.store + (i32.const 28080) + (call $_malloc + (i32.shl + (local.get $1) + (i32.const 2) + ) + ) + ) + (if + (i32.le_s + (local.get $1) + (i32.const 0) + ) + (block + (i32.store + (i32.const 28084) + (local.get $1) + ) + (return) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (local.set $3 + (call $_malloc + (i32.const 512) + ) + ) + (i32.store + (i32.add + (i32.load + (i32.const 28080) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (local.get $3) + ) + (call $_strcpy + (local.get $3) + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $2) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (i32.store + (i32.const 28084) + (local.get $1) + ) + ) + (func $_SetupViewport (; 501 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (i32.store + (i32.const 28064) + (local.get $0) + ) + (i32.store + (i32.const 28068) + (local.get $1) + ) + (call $_rlViewport + (i32.div_s + (local.tee $2 + (i32.load + (i32.const 28072) + ) + ) + (i32.const 2) + ) + (i32.div_s + (local.tee $3 + (i32.load + (i32.const 28076) + ) + ) + (i32.const 2) + ) + (i32.sub + (local.get $0) + (local.get $2) + ) + (i32.sub + (local.get $1) + (local.get $3) + ) + ) + (call $_rlMatrixMode + (i32.const 5889) + ) + (call $_rlLoadIdentity) + (call $_rlOrtho + (f64.convert_i32_s + (i32.load + (i32.const 28064) + ) + ) + (f64.convert_i32_s + (i32.load + (i32.const 28068) + ) + ) + ) + (call $_rlMatrixMode + (i32.const 5888) + ) + (call $_rlLoadIdentity) + ) + (func $_ClearBackground (; 502 ;) (; has Stack IR ;) (param $0 i32) + (call $_rlClearColor + (i32.load8_s + (local.get $0) + ) + (i32.load8_s offset=1 + (local.get $0) + ) + (i32.load8_s offset=2 + (local.get $0) + ) + (i32.load8_s offset=3 + (local.get $0) + ) + ) + (call $_glClear + (i32.const 16640) + ) + ) + (func $_ClearDroppedFiles (; 503 ;) (; has Stack IR ;) + (local $0 i32) + (if + (i32.le_s + (i32.load + (i32.const 28084) + ) + (i32.const 0) + ) + (return) + ) + (if + (i32.gt_s + (i32.load + (i32.const 28084) + ) + (i32.const 0) + ) + (loop $while-in + (call $_free + (i32.load + (i32.add + (i32.load + (i32.const 28080) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.load + (i32.const 28084) + ) + ) + ) + ) + ) + (call $_free + (i32.load + (i32.const 28080) + ) + ) + (i32.store + (i32.const 28084) + (i32.const 0) + ) + ) + (func $_TextFormat (; 504 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $2) + (local.get $1) + ) + (drop + (call $_vsnprintf + (i32.const 23152) + (i32.const 2147483647) + (local.get $0) + (local.get $2) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 23152) + ) + (func $_TakeScreenshot (; 505 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 576) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 576) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const 544) + ) + ) + (local.set $4 + (i32.add + (local.get $1) + (i32.const 520) + ) + ) + (local.set $3 + (i32.add + (local.get $1) + (i32.const 512) + ) + ) + (i32.store offset=524 + (local.get $1) + (local.tee $6 + (call $_rlReadScreenPixels + (i32.load + (i32.const 28064) + ) + (i32.load + (i32.const 28068) + ) + ) + ) + ) + (i32.store offset=528 + (local.get $1) + (i32.load + (i32.const 28064) + ) + ) + (i32.store offset=532 + (local.get $1) + (i32.load + (i32.const 28068) + ) + ) + (i32.store offset=536 + (local.get $1) + (i32.const 1) + ) + (i32.store offset=540 + (local.get $1) + (i32.const 7) + ) + (drop + (call $_memset + (local.get $1) + (i32.const 0) + (i32.const 512) + ) + ) + (call $_strcpy + (local.get $1) + (local.get $0) + ) + (i64.store align=4 + (local.get $2) + (i64.load offset=524 align=4 + (local.get $1) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=532 align=4 + (local.get $1) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=540 + (local.get $1) + ) + ) + (call $_ExportImage + (local.get $2) + (local.get $1) + ) + (call $_free + (local.get $6) + ) + (i32.store + (local.get $3) + (local.tee $0 + (call $_GetFileName + (local.get $1) + ) + ) + ) + (i32.store offset=4 + (local.get $3) + (local.get $0) + ) + (call $_emscripten_run_script + (call $_TextFormat + (i32.const 15789) + (local.get $3) + ) + ) + (i32.store + (local.get $4) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15923) + (local.get $4) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_ExportImage (; 506 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $6 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (local.set $5 + (local.get $2) + ) + (i64.store align=4 + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 12) + ) + ) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $3 + (call $_GetImageData + (local.get $2) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (if + (call $_IsFileExtension + (local.get $1) + (i32.const 15947) + ) + (block + (local.set $0 + (call $_stbi_write_png + (local.get $1) + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.load offset=8 + (local.get $0) + ) + (local.get $3) + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + ) + (br $__rjti$0) + ) + (block + (if + (call $_IsFileExtension + (local.get $1) + (i32.const 15952) + ) + (block + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $2) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $2) + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $0 + (call $_SaveKTX + (local.get $2) + (local.get $1) + ) + ) + (br $__rjti$0) + ) + ) + (if + (call $_IsFileExtension + (local.get $1) + (i32.const 15957) + ) + (block + (local.set $2 + (call $_fopen + (local.get $1) + ) + ) + (local.set $0 + (call $_fwrite + (i32.load + (local.get $0) + ) + (call $_GetPixelDataSize + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=8 + (local.get $0) + ) + (i32.load offset=16 + (local.get $0) + ) + ) + (i32.const 1) + (local.get $2) + ) + ) + (call $_fclose + (local.get $2) + ) + (br $__rjti$0) + ) + (call $_free + (local.get $3) + ) + ) + ) + ) + (br $__rjto$0) + ) + (call $_free + (local.get $3) + ) + (if + (local.get $0) + (block + (i32.store + (local.get $5) + (local.get $1) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 15965) + (local.get $5) + ) + (global.set $STACKTOP + (local.get $4) + ) + (return) + ) + ) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 15997) + (local.get $6) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_GetFileName (; 507 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (select + (local.get $0) + (i32.add + (local.tee $1 + (if (result i32) + (local.get $0) + (call $_strprbrk + (local.get $0) + ) + (i32.const 0) + ) + ) + (i32.const 1) + ) + (i32.or + (i32.eqz + (local.get $1) + ) + (i32.eq + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (func $_strprbrk (; 508 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (loop $while-in + (local.set $0 + (i32.add + (local.tee $1 + (select + (local.tee $0 + (i32.add + (call $_strcspn + (local.get $0) + ) + (local.get $0) + ) + ) + (i32.const 0) + (i32.load8_s + (local.get $0) + ) + ) + ) + (i32.const 1) + ) + ) + (if + (local.get $1) + (block + (local.set $2 + (local.get $1) + ) + (br $while-in) + ) + ) + ) + (local.get $2) + ) + (func $_IsFileExtension (; 509 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (if (result i32) + (local.tee $0 + (call $___memrchr + (local.get $0) + (i32.add + (call $_strlen + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (i32.eqz + (call $_strcmp + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + ) + ) + (func $_stbi_write_png (; 510 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $0 + (if (result i32) + (local.tee $1 + (call $_stbi_write_png_to_mem + (local.get $3) + (local.get $4) + (local.get $1) + (local.get $2) + (local.get $5) + ) + ) + (if (result i32) + (local.tee $0 + (call $_fopen + (local.get $0) + ) + ) + (block (result i32) + (drop + (call $_fwrite + (local.get $1) + (i32.const 1) + (i32.load + (local.get $5) + ) + (local.get $0) + ) + ) + (call $_fclose + (local.get $0) + ) + (call $_free + (local.get $1) + ) + (i32.const 1) + ) + (block (result i32) + (call $_free + (local.get $1) + ) + (i32.const 0) + ) + ) + (i32.const 0) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $0) + ) + (func $_SaveKTX (; 511 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local.set $9 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 80) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 80) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (local.set $4 + (local.get $3) + ) + (local.set $2 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (local.set $7 + (i32.add + (local.get $3) + (i32.const 12) + ) + ) + (if + (i32.eqz + (local.tee $5 + (call $_fopen + (local.get $1) + ) + ) + ) + (block + (i32.store + (local.get $4) + (local.get $1) + ) + (call $_TraceLog + (i32.const 4) + (i32.const 16026) + (local.get $4) + ) + (global.set $STACKTOP + (local.get $9) + ) + (return + (i32.const 0) + ) + ) + ) + (i64.store align=1 + (local.get $2) + (i64.load align=1 + (i32.const 16067) + ) + ) + (i32.store offset=8 align=1 + (local.get $2) + (i32.load align=1 + (i32.const 16075) + ) + ) + (i32.store offset=12 + (local.get $2) + (i32.const 0) + ) + (i32.store + (local.tee $8 + (i32.add + (local.get $2) + (i32.const 16) + ) + ) + (i32.const 0) + ) + (i32.store offset=20 + (local.get $2) + (i32.const 1) + ) + (i32.store + (local.tee $3 + (i32.add + (local.get $2) + (i32.const 24) + ) + ) + (i32.const 0) + ) + (i32.store + (local.tee $11 + (i32.add + (local.get $2) + (i32.const 28) + ) + ) + (i32.const 0) + ) + (i32.store offset=32 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=36 + (local.get $2) + (local.tee $1 + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (i32.store offset=40 + (local.get $2) + (local.tee $4 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (i32.store offset=44 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=48 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=52 + (local.get $2) + (i32.const 1) + ) + (i32.store offset=56 + (local.get $2) + (local.tee $10 + (i32.load offset=12 + (local.get $0) + ) + ) + ) + (i32.store offset=60 + (local.get $2) + (i32.const 0) + ) + (call $_rlGetGlTextureFormats + (local.tee $12 + (i32.load offset=16 + (local.get $0) + ) + ) + (local.get $11) + (local.get $3) + (local.get $8) + ) + (i32.store offset=32 + (local.get $2) + (local.tee $3 + (i32.load + (local.get $3) + ) + ) + ) + (local.set $0 + (if (result i32) + (i32.eq + (local.get $3) + (i32.const -1) + ) + (block (result i32) + (call $_TraceLog + (i32.const 4) + (i32.const 16079) + (local.get $6) + ) + (i32.const 0) + ) + (block (result i32) + (local.set $3 + (call $_fwrite + (local.get $2) + (i32.const 64) + (i32.const 1) + (local.get $5) + ) + ) + (if (result i32) + (i32.gt_s + (local.get $10) + (i32.const 0) + ) + (block (result i32) + (local.set $6 + (i32.load + (local.get $0) + ) + ) + (local.set $3 + (i32.const 0) + ) + (local.set $0 + (local.get $4) + ) + (local.set $4 + (i32.const 0) + ) + (loop $while-in (result i32) + (i32.store + (local.get $7) + (call $_GetPixelDataSize + (local.get $1) + (local.get $0) + (local.get $12) + ) + ) + (drop + (call $_fwrite + (local.get $7) + (i32.const 4) + (i32.const 1) + (local.get $5) + ) + ) + (local.set $2 + (call $_fwrite + (i32.add + (local.get $3) + (local.get $6) + ) + (local.tee $8 + (i32.load + (local.get $7) + ) + ) + (i32.const 1) + (local.get $5) + ) + ) + (local.set $1 + (i32.div_s + (local.get $1) + (i32.const 2) + ) + ) + (local.set $0 + (i32.div_s + (local.get $0) + (i32.const 2) + ) + ) + (local.set $3 + (i32.add + (local.get $3) + (local.get $8) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + (local.get $2) + ) + ) + (local.get $3) + ) + ) + ) + ) + (call $_fclose + (local.get $5) + ) + (global.set $STACKTOP + (local.get $9) + ) + (local.get $0) + ) + (func $_stbi_write_png_to_mem (; 512 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local.set $16 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $12 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $6 + (i32.add + (local.get $12) + (i32.const 4) + ) + ) + (local.set $11 + (select + (local.get $1) + (local.tee $9 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (local.get $1) + ) + ) + (block $folding-inner0 + (br_if $folding-inner0 + (i32.eqz + (local.tee $15 + (call $_malloc + (local.tee $18 + (i32.mul + (local.get $3) + (local.tee $17 + (i32.add + (local.get $9) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (local.tee $7 + (call $_malloc + (local.get $9) + ) + ) + ) + (block + (call $_free + (local.get $15) + ) + (br $folding-inner0) + ) + ) + (if + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + (block + (local.set $13 + (i32.gt_s + (local.get $9) + (i32.const 0) + ) + ) + (loop $while-in + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 0) + (local.get $7) + ) + (if + (local.get $13) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in1 + (local.set $1 + (i32.add + (local.get $1) + (select + (local.tee $1 + (i32.load8_s + (i32.add + (local.get $5) + (local.get $7) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.get $9) + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + ) + ) + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 1) + (local.get $7) + ) + (if + (local.get $13) + (block + (local.set $5 + (i32.const 0) + ) + (local.set $8 + (i32.const 0) + ) + (loop $while-in3 + (local.set $5 + (i32.add + (local.get $5) + (select + (local.tee $5 + (i32.load8_s + (i32.add + (local.get $7) + (local.get $8) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $5) + ) + (i32.gt_s + (local.get $5) + (i32.const -1) + ) + ) + ) + ) + (br_if $while-in3 + (i32.ne + (local.get $9) + (local.tee $8 + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (local.set $5 + (i32.const 0) + ) + ) + ) + (block + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 1) + (local.get $7) + ) + (local.set $5 + (i32.const 0) + ) + (local.set $1 + (i32.const 0) + ) + ) + ) + (local.set $14 + (local.tee $8 + (i32.lt_s + (local.get $5) + (local.get $1) + ) + ) + ) + (local.set $8 + (select + (local.get $5) + (local.get $1) + (local.get $8) + ) + ) + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 2) + (local.get $7) + ) + (if + (local.get $13) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in5 + (local.set $1 + (i32.add + (local.get $1) + (select + (local.tee $1 + (i32.load8_s + (i32.add + (local.get $5) + (local.get $7) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (br_if $while-in5 + (i32.ne + (local.get $9) + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (local.set $14 + (select + (i32.const 2) + (local.get $14) + (local.tee $5 + (i32.lt_s + (local.get $1) + (local.get $8) + ) + ) + ) + ) + (local.set $8 + (select + (local.get $1) + (local.get $8) + (local.get $5) + ) + ) + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 3) + (local.get $7) + ) + (if + (local.get $13) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in7 + (local.set $1 + (i32.add + (local.get $1) + (select + (local.tee $1 + (i32.load8_s + (i32.add + (local.get $5) + (local.get $7) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (br_if $while-in7 + (i32.ne + (local.get $9) + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (local.set $14 + (select + (i32.const 3) + (local.get $14) + (local.tee $5 + (i32.lt_s + (local.get $1) + (local.get $8) + ) + ) + ) + ) + (local.set $8 + (select + (local.get $1) + (local.get $8) + (local.get $5) + ) + ) + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (i32.const 4) + (local.get $7) + ) + (if + (local.get $13) + (block + (local.set $1 + (i32.const 0) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in9 + (local.set $1 + (i32.add + (local.get $1) + (select + (local.tee $1 + (i32.load8_s + (i32.add + (local.get $5) + (local.get $7) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (br_if $while-in9 + (i32.ne + (local.get $9) + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (call $_stbiw__encode_png_line + (local.get $0) + (local.get $11) + (local.get $2) + (local.get $10) + (local.tee $1 + (select + (i32.const 4) + (local.get $14) + (i32.lt_s + (local.get $1) + (local.get $8) + ) + ) + ) + (local.get $7) + ) + (i32.store8 + (local.tee $5 + (i32.add + (local.get $15) + (i32.mul + (local.get $10) + (local.get $17) + ) + ) + ) + (local.get $1) + ) + (drop + (call $_memcpy + (i32.add + (local.get $5) + (i32.const 1) + ) + (local.get $7) + (local.get $9) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $10 + (i32.add + (local.get $10) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + ) + ) + ) + (call $_free + (local.get $7) + ) + (local.set $5 + (call $_stbi_zlib_compress + (local.get $15) + (local.get $18) + (local.get $12) + ) + ) + (call $_free + (local.get $15) + ) + (br_if $folding-inner0 + (i32.eqz + (local.get $5) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (local.tee $0 + (call $_malloc + (local.tee $12 + (i32.add + (local.tee $1 + (i32.load + (local.get $12) + ) + ) + (i32.const 57) + ) + ) + ) + ) + ) + ) + (i32.store + (local.get $4) + (local.get $12) + ) + (i64.store align=1 + (local.get $0) + (i64.const 727905341920923785) + ) + (i32.store8 offset=8 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=9 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=10 + (local.get $0) + (i32.const 0) + ) + (i32.store8 offset=11 + (local.get $0) + (i32.const 13) + ) + (i32.store8 offset=12 + (local.get $0) + (i32.const 73) + ) + (i32.store8 offset=13 + (local.get $0) + (i32.const 72) + ) + (i32.store8 offset=14 + (local.get $0) + (i32.const 68) + ) + (i32.store8 offset=15 + (local.get $0) + (i32.const 82) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (i32.store8 offset=16 + (local.get $0) + (i32.shr_u + (local.get $2) + (i32.const 24) + ) + ) + (i32.store8 offset=17 + (local.get $0) + (i32.shr_u + (local.get $2) + (i32.const 16) + ) + ) + (i32.store8 offset=18 + (local.get $0) + (i32.shr_u + (local.get $2) + (i32.const 8) + ) + ) + (i32.store8 offset=3 + (i32.load + (local.get $6) + ) + (local.get $2) + ) + (i32.store + (local.get $6) + (i32.add + (local.tee $2 + (i32.load + (local.get $6) + ) + ) + (i32.const 4) + ) + ) + (i32.store8 offset=4 + (local.get $2) + (i32.shr_u + (local.get $3) + (i32.const 24) + ) + ) + (i32.store8 offset=5 + (local.get $2) + (i32.shr_u + (local.get $3) + (i32.const 16) + ) + ) + (i32.store8 offset=6 + (local.get $2) + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + ) + (i32.store8 offset=3 + (i32.load + (local.get $6) + ) + (local.get $3) + ) + (i32.store8 offset=4 + (local.tee $2 + (i32.load + (local.get $6) + ) + ) + (i32.const 8) + ) + (i32.store8 offset=5 + (local.get $2) + (i32.load + (i32.const 6448) + ) + ) + (i32.store8 offset=6 + (local.get $2) + (i32.const 0) + ) + (i32.store8 offset=7 + (local.get $2) + (i32.const 0) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $2) + (i32.const 9) + ) + ) + (i32.store8 offset=8 + (local.get $2) + (i32.const 0) + ) + (call $_stbiw__wpcrc + (local.get $6) + (i32.const 13) + ) + (i32.store8 + (i32.load + (local.get $6) + ) + (i32.shr_u + (local.get $1) + (i32.const 24) + ) + ) + (i32.store8 offset=1 + (i32.load + (local.get $6) + ) + (i32.shr_u + (local.get $1) + (i32.const 16) + ) + ) + (i32.store8 offset=2 + (i32.load + (local.get $6) + ) + (i32.shr_u + (local.get $1) + (i32.const 8) + ) + ) + (i32.store8 offset=3 + (i32.load + (local.get $6) + ) + (local.get $1) + ) + (i32.store8 offset=4 + (local.tee $2 + (i32.load + (local.get $6) + ) + ) + (i32.const 73) + ) + (i32.store8 offset=5 + (local.get $2) + (i32.const 68) + ) + (i32.store8 offset=6 + (local.get $2) + (i32.const 65) + ) + (i32.store8 offset=7 + (local.get $2) + (i32.const 84) + ) + (drop + (call $_memmove + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (local.get $5) + (local.get $1) + ) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $1) + (local.get $2) + ) + ) + (call $_free + (local.get $5) + ) + (call $_stbiw__wpcrc + (local.get $6) + (local.get $1) + ) + (i32.store8 + (i32.load + (local.get $6) + ) + (i32.const 0) + ) + (i32.store8 offset=1 + (i32.load + (local.get $6) + ) + (i32.const 0) + ) + (i32.store8 offset=2 + (i32.load + (local.get $6) + ) + (i32.const 0) + ) + (i32.store8 offset=3 + (i32.load + (local.get $6) + ) + (i32.const 0) + ) + (i32.store8 offset=4 + (local.tee $1 + (i32.load + (local.get $6) + ) + ) + (i32.const 73) + ) + (i32.store8 offset=5 + (local.get $1) + (i32.const 69) + ) + (i32.store8 offset=6 + (local.get $1) + (i32.const 78) + ) + (i32.store8 offset=7 + (local.get $1) + (i32.const 68) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (call $_stbiw__wpcrc + (local.get $6) + (i32.const 0) + ) + (if + (i32.eq + (i32.load + (local.get $6) + ) + (i32.add + (i32.load + (local.get $4) + ) + (local.get $0) + ) + ) + (block + (global.set $STACKTOP + (local.get $16) + ) + (return + (local.get $0) + ) + ) + (call $___assert_fail + (i32.const 16122) + (i32.const 16142) + (i32.const 1155) + (i32.const 16171) + ) + ) + (return + (i32.const 0) + ) + ) + (global.set $STACKTOP + (local.get $16) + ) + (i32.const 0) + ) + (func $_stbiw__encode_png_line (; 513 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (i32.const 4) + ) + (local.set $6 + (i32.add + (local.get $0) + (i32.mul + (local.get $1) + (local.get $3) + ) + ) + ) + (if + (i32.eqz + (local.tee $3 + (i32.load + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (select + (i32.const 7712) + (i32.const 7680) + (local.get $3) + ) + ) + ) + ) + ) + (block + (drop + (call $_memcpy + (local.get $5) + (local.get $6) + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + ) + (return) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (block $__rjto$0 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (block $__rjti$0 (result i32) + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $switch-case3 $switch-case4 $__rjto$0 + (i32.sub + (local.get $3) + (i32.const 1) + ) + ) + ) + (br $__rjti$0 + (i32.load8_s + (i32.add + (local.get $0) + (local.get $6) + ) + ) + ) + ) + (br $__rjti$0 + (i32.and + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (i32.const 255) + ) + ) + ) + (br $__rjti$0 + (i32.and + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.shr_u + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + ) + (i32.const 1) + ) + ) + (i32.const 255) + ) + ) + ) + (br $__rjti$0 + (i32.and + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.and + (call $_stbiw__paeth + (i32.const 0) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + ) + (i32.const 0) + ) + (i32.const 255) + ) + ) + (i32.const 255) + ) + ) + ) + (br $__rjti$0 + (i32.load8_s + (i32.add + (local.get $0) + (local.get $6) + ) + ) + ) + ) + (i32.load8_s + (i32.add + (local.get $0) + (local.get $6) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 4) + ) + ) + ) + (block $switch5 + (block $switch-case23 + (block $switch-case20 + (block $switch-case17 + (block $switch-case14 + (block $switch-case11 + (block $switch-case8 + (br_table $switch-case8 $switch-case11 $switch-case14 $switch-case17 $switch-case20 $switch-case23 $switch5 + (i32.sub + (local.get $3) + (i32.const 1) + ) + ) + ) + (if + (i32.le_s + (local.tee $1 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (local.set $0 + (i32.const 4) + ) + (loop $while-in7 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + ) + (br_if $while-in7 + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (if + (i32.le_s + (local.tee $0 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (loop $while-in10 + (i32.store8 + (i32.add + (local.get $5) + (local.get $7) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $6) + (local.get $7) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $7) + (local.get $1) + ) + ) + ) + ) + ) + (br_if $while-in10 + (i32.ne + (local.get $0) + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (if + (i32.le_s + (local.tee $2 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (local.set $0 + (i32.const 4) + ) + (loop $while-in13 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.shr_u + (i32.add + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (i32.const 1) + ) + ) + ) + (br_if $while-in13 + (i32.ne + (local.get $2) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (if + (i32.le_s + (local.tee $2 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (local.set $0 + (i32.const 4) + ) + (loop $while-in16 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.and + (call $_stbiw__paeth + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (local.tee $3 + (i32.sub + (local.get $0) + (local.get $1) + ) + ) + ) + ) + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $3) + (i32.const 4) + ) + ) + ) + ) + (i32.const 255) + ) + ) + ) + (br_if $while-in16 + (i32.ne + (local.get $2) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (if + (i32.le_s + (local.tee $1 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (local.set $0 + (i32.const 4) + ) + (loop $while-in19 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.shr_u + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.const 1) + ) + ) + ) + (br_if $while-in19 + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (if + (i32.le_s + (local.tee $1 + (i32.shl + (local.get $2) + (i32.const 2) + ) + ) + (i32.const 4) + ) + (return) + ) + (local.set $0 + (i32.const 4) + ) + (loop $while-in22 + (i32.store8 + (i32.add + (local.get $0) + (local.get $5) + ) + (i32.sub + (i32.load8_u + (i32.add + (local.get $0) + (local.get $6) + ) + ) + (i32.and + (call $_stbiw__paeth + (i32.load8_u + (i32.add + (local.get $6) + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.const 0) + (i32.const 0) + ) + (i32.const 255) + ) + ) + ) + (br_if $while-in22 + (i32.ne + (local.get $1) + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (func $_stbi_zlib_compress (; 514 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local.set $20 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.tee $6 + (i32.add + (local.get $5) + (i32.const 8) + ) + ) + (i32.const 0) + ) + (i32.store + (local.tee $7 + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + (i32.const 0) + ) + (i32.store + (local.get $5) + (i32.const 0) + ) + (if + (i32.eqz + (local.tee $13 + (call $_malloc + (i32.const 65536) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $20) + ) + (return + (i32.const 0) + ) + ) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + (local.set $3 + (i32.load + (local.tee $14 + (i32.add + (local.tee $4 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $14) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $3) + (local.get $4) + ) + (i32.const 120) + ) + (block $__rjto$2 + (block $__rjti$2 + (br_if $__rjti$2 + (i32.eqz + (local.tee $3 + (i32.load + (local.get $5) + ) + ) + ) + ) + (br_if $__rjti$2 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $3) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $3) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$2) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + ) + (local.set $3 + (i32.load + (local.tee $14 + (i32.add + (local.tee $4 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $14) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $3) + (local.get $4) + ) + (i32.const 94) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (i32.const 1) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (local.get $5) + (local.tee $3 + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (i32.const 1) + (local.tee $4 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $4) + (i32.const 2) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (local.get $3) + (local.get $6) + (local.get $7) + ) + ) + (drop + (call $_memset + (local.get $13) + (i32.const 0) + (i32.const 65536) + ) + ) + (local.set $21 + (i32.add + (local.get $1) + (i32.const -3) + ) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const 3) + ) + (block $label$break$L9 + (local.set $14 + (local.get $0) + ) + (local.set $22 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (local.set $23 + (local.get $0) + ) + (loop $label$continue$L11 + (block $label$break$L11 + (block $__rjto$0 + (block $__rjti$0 + (if + (local.tee $9 + (i32.load + (local.tee $12 + (i32.add + (i32.shl + (i32.and + (call $_stbiw__zhash + (local.tee $15 + (i32.add + (local.get $0) + (local.get $10) + ) + ) + ) + (i32.const 16383) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + ) + (block + (if + (i32.gt_s + (local.tee $18 + (i32.load + (i32.add + (local.get $9) + (i32.const -4) + ) + ) + ) + (i32.const 0) + ) + (block + (local.set $19 + (i32.add + (local.get $10) + (i32.const -32768) + ) + ) + (local.set $24 + (i32.sub + (local.get $1) + (local.get $10) + ) + ) + (local.set $8 + (i32.const 3) + ) + (local.set $4 + (i32.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in + (if + (i32.gt_s + (i32.sub + (local.tee $16 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (local.get $14) + ) + (local.get $19) + ) + (block + (local.set $17 + (i32.lt_s + (local.tee $25 + (call $_stbiw__zlib_countm + (local.get $16) + (local.get $15) + (local.get $24) + ) + ) + (local.get $8) + ) + ) + (local.set $8 + (select + (local.get $8) + (local.get $25) + (local.get $17) + ) + ) + (local.set $4 + (select + (local.get $4) + (local.get $16) + (local.get $17) + ) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $18) + ) + ) + ) + ) + (block + (local.set $8 + (i32.const 3) + ) + (local.set $4 + (i32.const 0) + ) + ) + ) + (if + (i32.eq + (i32.load + (i32.add + (local.get $9) + (i32.const -4) + ) + ) + (i32.const 16) + ) + (block + (drop + (call $_memmove + (local.get $9) + (i32.add + (local.get $9) + (i32.const 32) + ) + (i32.const 32) + ) + ) + (i32.store + (i32.add + (i32.load + (local.get $12) + ) + (i32.const -4) + ) + (i32.const 8) + ) + ) + ) + (br_if $__rjti$0 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $9) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $9) + (i32.const -8) + ) + ) + ) + ) + ) + (block + (local.set $8 + (i32.const 3) + ) + (local.set $4 + (i32.const 0) + ) + (br $__rjti$0) + ) + ) + (br $__rjto$0) + ) + (call $_stbiw__sbgrowf + (local.get $12) + (i32.const 4) + ) + ) + (local.set $3 + (i32.load + (local.tee $12 + (i32.add + (local.tee $9 + (i32.load + (local.get $12) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $12) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + (local.get $15) + ) + (block $__rjto$1 + (block $__rjti$1 + (br_if $__rjti$1 + (i32.eqz + (local.get $4) + ) + ) + (if + (local.tee $9 + (i32.load + (i32.add + (i32.shl + (i32.and + (call $_stbiw__zhash + (local.tee $12 + (i32.add + (local.get $15) + (i32.const 1) + ) + ) + ) + (i32.const 16383) + ) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (block + (local.set $16 + (i32.sub + (local.get $22) + (local.get $10) + ) + ) + (if + (i32.gt_s + (local.tee $17 + (i32.load + (i32.add + (local.get $9) + (i32.const -4) + ) + ) + ) + (i32.const 0) + ) + (block + (local.set $18 + (i32.add + (local.get $10) + (i32.const -32767) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in2 + (block $while-out1 + (if + (i32.gt_s + (i32.sub + (local.tee $19 + (i32.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (local.get $23) + ) + (local.get $18) + ) + (if + (i32.gt_s + (call $_stbiw__zlib_countm + (local.get $19) + (local.get $12) + (local.get $16) + ) + (local.get $8) + ) + (block + (local.set $4 + (i32.const 0) + ) + (br $while-out1) + ) + ) + ) + (br_if $while-in2 + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $17) + ) + ) + ) + ) + (br_if $__rjti$1 + (i32.eqz + (local.get $4) + ) + ) + ) + ) + ) + ) + (br_if $label$break$L11 + (i32.eqz + (i32.and + (i32.lt_s + (local.tee $9 + (i32.sub + (local.get $15) + (local.get $4) + ) + ) + (i32.const 32768) + ) + (i32.lt_s + (local.get $8) + (i32.const 259) + ) + ) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in4 + (if + (i32.ge_s + (local.get $8) + (i32.load16_u + (i32.add + (i32.shl + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 1) + ) + (i32.const 7488) + ) + ) + ) + (block + (local.set $3 + (local.get $4) + ) + (br $while-in4) + ) + ) + ) + (i32.store + (local.get $7) + (if (result i32) + (i32.lt_u + (i32.add + (local.get $3) + (i32.const 257) + ) + (i32.const 280) + ) + (block (result i32) + (local.set $4 + (call $_stbiw__zlib_bitrev + (local.get $4) + (i32.const 7) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $4) + (local.tee $4 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $4) + (i32.const 7) + ) + ) + (block (result i32) + (local.set $4 + (call $_stbiw__zlib_bitrev + (i32.add + (local.get $3) + (i32.const 169) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $4) + (local.tee $4 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + (if + (i32.lt_u + (i32.add + (local.get $3) + (i32.const -8) + ) + (i32.const 20) + ) + (block + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (i32.sub + (local.get $8) + (i32.load16_u + (i32.add + (i32.shl + (local.get $3) + (i32.const 1) + ) + (i32.const 7488) + ) + ) + ) + (local.tee $4 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $4) + (i32.load8_u + (i32.add + (local.get $3) + (i32.const 7552) + ) + ) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in6 + (if + (i32.ge_s + (local.get $9) + (i32.load16_u + (i32.add + (i32.shl + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 1) + ) + (i32.const 7584) + ) + ) + ) + (block + (local.set $3 + (local.get $4) + ) + (br $while-in6) + ) + ) + ) + (local.set $4 + (call $_stbiw__zlib_bitrev + (local.get $3) + (i32.const 5) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $4) + (local.tee $4 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $4) + (i32.const 5) + ) + ) + (i32.store + (local.get $5) + (local.tee $4 + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + ) + (if + (i32.lt_u + (i32.add + (local.get $3) + (i32.const -4) + ) + (i32.const 26) + ) + (block + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (i32.sub + (local.get $9) + (i32.load16_u + (i32.add + (i32.shl + (local.get $3) + (i32.const 1) + ) + (i32.const 7584) + ) + ) + ) + (local.tee $9 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $9) + (i32.load8_u + (i32.add + (local.get $3) + (i32.const 7648) + ) + ) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (local.get $4) + (local.get $6) + (local.get $7) + ) + ) + ) + ) + (br $__rjto$1) + ) + (local.set $3 + (local.tee $4 + (i32.load8_u + (local.get $15) + ) + ) + ) + (i32.store + (local.get $7) + (if (result i32) + (i32.lt_s + (local.get $4) + (i32.const 144) + ) + (block (result i32) + (local.set $3 + (call $_stbiw__zlib_bitrev + (i32.add + (local.get $3) + (i32.const 48) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $3) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (block (result i32) + (local.set $3 + (call $_stbiw__zlib_bitrev + (i32.or + (local.get $3) + (i32.const 256) + ) + (i32.const 9) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $3) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $3) + (i32.const 9) + ) + ) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + (local.set $8 + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $8) + (local.get $10) + ) + ) + (local.get $21) + ) + (block + (local.set $10 + (local.get $3) + ) + (br $label$continue$L11) + ) + (block + (local.set $11 + (local.get $3) + ) + (br $label$break$L9) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 16193) + (i32.const 16142) + (i32.const 922) + (i32.const 16219) + ) + ) + ) + (if + (i32.lt_s + (local.get $11) + (local.get $1) + ) + (block + (local.set $4 + (local.get $11) + ) + (loop $while-in8 + (local.set $3 + (local.tee $11 + (i32.load8_u + (i32.add + (local.get $0) + (local.get $4) + ) + ) + ) + ) + (i32.store + (local.get $7) + (if (result i32) + (i32.lt_s + (local.get $11) + (i32.const 144) + ) + (block (result i32) + (local.set $3 + (call $_stbiw__zlib_bitrev + (i32.add + (local.get $3) + (i32.const 48) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $3) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (block (result i32) + (local.set $3 + (call $_stbiw__zlib_bitrev + (i32.or + (local.get $3) + (i32.const 256) + ) + (i32.const 9) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $3) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.add + (local.get $3) + (i32.const 9) + ) + ) + ) + ) + (i32.store + (local.get $5) + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + (br_if $while-in8 + (i32.ne + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + ) + ) + (local.set $3 + (call $_stbiw__zlib_bitrev + (i32.const 0) + (i32.const 7) + ) + ) + (i32.store + (local.get $6) + (i32.or + (i32.load + (local.get $6) + ) + (i32.shl + (local.get $3) + (local.tee $3 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $3) + (i32.const 7) + ) + ) + (i32.store + (local.get $5) + (local.tee $4 + (call $_stbiw__zlib_flushf + (i32.load + (local.get $5) + ) + (local.get $6) + (local.get $7) + ) + ) + ) + (if + (local.tee $8 + (i32.load + (local.get $7) + ) + ) + (loop $while-in10 + (i32.store + (local.get $7) + (i32.add + (local.get $8) + (i32.const 1) + ) + ) + (i32.store + (local.get $5) + (local.tee $4 + (call $_stbiw__zlib_flushf + (local.get $4) + (local.get $6) + (local.get $7) + ) + ) + ) + (br_if $while-in10 + (local.tee $8 + (i32.load + (local.get $7) + ) + ) + ) + ) + ) + (local.set $4 + (i32.const 0) + ) + (loop $while-in12 + (if + (local.tee $3 + (i32.load + (i32.add + (i32.shl + (local.get $4) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + (call $_free + (i32.add + (local.get $3) + (i32.const -8) + ) + ) + ) + (br_if $while-in12 + (i32.ne + (local.tee $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (i32.const 16384) + ) + ) + ) + (call $_free + (local.get $13) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (block + (local.set $10 + (i32.rem_u + (local.get $1) + (i32.const 5552) + ) + ) + (local.set $3 + (i32.const 0) + ) + (local.set $8 + (i32.const 1) + ) + (local.set $4 + (i32.const 0) + ) + (loop $while-in14 + (if + (local.get $10) + (block + (local.set $11 + (i32.const 0) + ) + (loop $while-in16 + (local.set $4 + (i32.add + (local.tee $8 + (i32.add + (i32.load8_u + (i32.add + (local.get $0) + (i32.add + (local.get $3) + (local.get $11) + ) + ) + ) + (local.get $8) + ) + ) + (local.get $4) + ) + ) + (br_if $while-in16 + (i32.ne + (local.tee $11 + (i32.add + (local.get $11) + (i32.const 1) + ) + ) + (local.get $10) + ) + ) + ) + ) + ) + (local.set $8 + (i32.rem_u + (local.get $8) + (i32.const 65521) + ) + ) + (local.set $4 + (i32.rem_u + (local.get $4) + (i32.const 65521) + ) + ) + (if + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (local.get $10) + ) + ) + (local.get $1) + ) + (block + (local.set $10 + (i32.const 5552) + ) + (br $while-in14) + ) + ) + ) + ) + (block + (local.set $8 + (i32.const 1) + ) + (local.set $4 + (i32.const 0) + ) + ) + ) + (block $__rjto$3 + (block $__rjti$3 + (br_if $__rjti$3 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $5) + ) + ) + ) + ) + (br_if $__rjti$3 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$3) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + ) + (local.set $0 + (i32.load + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $0) + (local.get $1) + ) + (i32.shr_u + (local.get $4) + (i32.const 8) + ) + ) + (block $__rjto$4 + (block $__rjti$4 + (br_if $__rjti$4 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $5) + ) + ) + ) + ) + (br_if $__rjti$4 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$4) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + ) + (local.set $0 + (i32.load + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $0) + (local.get $1) + ) + (local.get $4) + ) + (block $__rjto$5 + (block $__rjti$5 + (br_if $__rjti$5 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $5) + ) + ) + ) + ) + (br_if $__rjti$5 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$5) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + ) + (local.set $0 + (i32.load + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $0) + (local.get $1) + ) + (i32.shr_u + (local.get $8) + (i32.const 8) + ) + ) + (block $__rjto$6 + (block $__rjti$6 + (br_if $__rjti$6 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $5) + ) + ) + ) + ) + (br_if $__rjti$6 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$6) + ) + (call $_stbiw__sbgrowf + (local.get $5) + (i32.const 1) + ) + ) + (local.set $0 + (i32.load + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $3) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $0) + (local.get $1) + ) + (local.get $8) + ) + (i32.store + (local.get $2) + (local.tee $1 + (i32.load + (i32.add + (local.tee $0 + (i32.load + (local.get $5) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (drop + (call $_memmove + (i32.add + (local.get $0) + (i32.const -8) + ) + (local.get $0) + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (i32.load + (local.get $5) + ) + (i32.const -8) + ) + ) + (global.set $STACKTOP + (local.get $20) + ) + (local.get $0) + ) + (func $_stbiw__wpcrc (; 515 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local.set $1 + (call $_stbiw__crc32 + (i32.add + (i32.sub + (local.tee $2 + (i32.load + (local.get $0) + ) + ) + (local.get $1) + ) + (i32.const -4) + ) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + ) + (i32.store8 + (local.get $2) + (i32.shr_u + (local.get $1) + (i32.const 24) + ) + ) + (i32.store8 offset=1 + (i32.load + (local.get $0) + ) + (i32.shr_u + (local.get $1) + (i32.const 16) + ) + ) + (i32.store8 offset=2 + (i32.load + (local.get $0) + ) + (i32.shr_u + (local.get $1) + (i32.const 8) + ) + ) + (i32.store8 offset=3 + (i32.load + (local.get $0) + ) + (local.get $1) + ) + (i32.store + (local.get $0) + (i32.add + (i32.load + (local.get $0) + ) + (i32.const 4) + ) + ) + ) + (func $_stbiw__crc32 (; 516 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (if + (i32.le_s + (local.get $1) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + (local.set $2 + (i32.const -1) + ) + (loop $while-in + (local.set $2 + (i32.xor + (i32.load + (i32.add + (i32.shl + (i32.xor + (i32.load8_u + (i32.add + (local.get $0) + (local.get $3) + ) + ) + (i32.and + (local.get $2) + (i32.const 255) + ) + ) + (i32.const 2) + ) + (i32.const 6464) + ) + ) + (i32.shr_u + (local.get $2) + (i32.const 8) + ) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + ) + (i32.xor + (local.get $2) + (i32.const -1) + ) + ) + (func $_stbiw__sbgrowf (; 517 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local.set $2 + (if (result i32) + (local.tee $4 + (i32.eqz + (local.tee $3 + (i32.load + (local.get $0) + ) + ) + ) + ) + (i32.const 2) + (i32.or + (i32.shl + (i32.load + (i32.add + (local.get $3) + (i32.const -8) + ) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (if + (i32.eqz + (local.tee $1 + (call $_realloc + (select + (i32.const 0) + (i32.add + (local.get $3) + (i32.const -8) + ) + (local.get $4) + ) + (i32.add + (i32.mul + (local.get $1) + (local.get $2) + ) + (i32.const 8) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 16238) + (i32.const 16142) + (i32.const 793) + (i32.const 16240) + ) + ) + (if + (i32.load + (local.get $0) + ) + (block + (i32.store + (local.get $0) + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (i32.store + (local.get $1) + (local.get $2) + ) + (return) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.const 0) + ) + (i32.store + (local.get $0) + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (i32.store + (local.get $1) + (local.get $2) + ) + ) + (func $_stbiw__zlib_flushf (; 518 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $3) + (local.get $0) + ) + (if + (i32.le_s + (i32.load + (local.get $2) + ) + (i32.const 7) + ) + (block + (global.set $STACKTOP + (local.get $5) + ) + (return + (local.get $0) + ) + ) + ) + (loop $while-in + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.get $0) + ) + ) + (br_if $__rjti$0 + (i32.ge_s + (i32.add + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 1) + ) + (i32.load + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (br $__rjto$0) + ) + (call $_stbiw__sbgrowf + (local.get $3) + (i32.const 1) + ) + ) + (local.set $4 + (i32.and + (i32.load + (local.get $1) + ) + (i32.const 255) + ) + ) + (local.set $0 + (i32.load + (local.tee $7 + (i32.add + (local.tee $6 + (i32.load + (local.get $3) + ) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $7) + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $0) + (local.get $6) + ) + (local.get $4) + ) + (i32.store + (local.get $1) + (i32.shr_u + (i32.load + (local.get $1) + ) + (i32.const 8) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.tee $4 + (i32.load + (local.get $2) + ) + ) + (i32.const -8) + ) + ) + (local.set $0 + (i32.load + (local.get $3) + ) + ) + (br_if $while-in + (i32.gt_s + (local.get $4) + (i32.const 15) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $0) + ) + (func $_stbiw__zhash (; 519 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.add + (i32.shr_u + (local.tee $0 + (i32.xor + (local.tee $0 + (i32.add + (i32.shr_u + (local.tee $0 + (i32.xor + (local.tee $0 + (i32.add + (i32.shr_u + (local.tee $0 + (i32.xor + (local.tee $0 + (i32.or + (i32.or + (i32.load8_u + (local.get $0) + ) + (i32.shl + (i32.load8_u offset=1 + (local.get $0) + ) + (i32.const 8) + ) + ) + (i32.shl + (i32.load8_u offset=2 + (local.get $0) + ) + (i32.const 16) + ) + ) + ) + (i32.shl + (local.get $0) + (i32.const 3) + ) + ) + ) + (i32.const 5) + ) + (local.get $0) + ) + ) + (i32.shl + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.const 17) + ) + (local.get $0) + ) + ) + (i32.shl + (local.get $0) + (i32.const 25) + ) + ) + ) + (i32.const 6) + ) + (local.get $0) + ) + ) + (func $_stbiw__zlib_countm (; 520 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.le_s + (local.get $2) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + (loop $while-in + (if + (i32.eq + (i32.load8_s + (i32.add + (local.get $0) + (local.get $3) + ) + ) + (i32.load8_s + (i32.add + (local.get $1) + (local.get $3) + ) + ) + ) + (br_if $while-in + (i32.and + (i32.lt_s + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $2) + ) + (i32.lt_u + (local.get $3) + (i32.const 258) + ) + ) + ) + ) + ) + (local.get $3) + ) + (func $_stbiw__zlib_bitrev (; 521 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (i32.eqz + (local.get $1) + ) + (return + (i32.const 0) + ) + ) + (loop $while-in + (local.set $2 + (i32.or + (i32.and + (local.get $0) + (i32.const 1) + ) + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + ) + (local.set $0 + (i32.shr_s + (local.get $0) + (i32.const 1) + ) + ) + (br_if $while-in + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (local.get $2) + ) + (func $_stbiw__paeth (; 522 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (if (result i32) + (i32.or + (i32.gt_s + (local.tee $5 + (select + (local.tee $4 + (i32.sub + (local.tee $3 + (i32.sub + (i32.add + (local.get $0) + (local.get $1) + ) + (local.get $2) + ) + ) + (local.get $0) + ) + ) + (i32.sub + (i32.const 0) + (local.get $4) + ) + (i32.gt_s + (local.get $4) + (i32.const -1) + ) + ) + ) + (local.tee $4 + (select + (local.tee $4 + (i32.sub + (local.get $3) + (local.get $1) + ) + ) + (i32.sub + (i32.const 0) + (local.get $4) + ) + (i32.gt_s + (local.get $4) + (i32.const -1) + ) + ) + ) + ) + (i32.gt_s + (local.get $5) + (local.tee $3 + (select + (local.tee $3 + (i32.sub + (local.get $3) + (local.get $2) + ) + ) + (i32.sub + (i32.const 0) + (local.get $3) + ) + (i32.gt_s + (local.get $3) + (i32.const -1) + ) + ) + ) + ) + ) + (i32.and + (select + (local.get $2) + (i32.and + (local.get $1) + (i32.const 255) + ) + (i32.gt_s + (local.get $4) + (local.get $3) + ) + ) + (i32.const 255) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + ) + (func $_CloseWindow (; 523 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.load8_s + (i32.const 28844) + ) + (block + (call $_GifEnd) + (i32.store8 + (i32.const 28844) + (i32.const 0) + ) + ) + ) + (call $_UnloadFontDefault) + (call $_rlglClose) + (call $_glfwDestroyWindow + (i32.load + (i32.const 27928) + ) + ) + (call $_glfwTerminate) + (call $_TraceLog + (i32.const 3) + (i32.const 16502) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $0) + ) + ) + (func $_UnloadFontDefault (; 524 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (if + (i32.gt_s + (i32.load + (i32.const 27960) + ) + (i32.const 0) + ) + (loop $while-in + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.tee $2 + (i32.add + (i32.add + (i32.load + (i32.const 27988) + ) + (i32.mul + (local.get $1) + (i32.const 36) + ) + ) + (i32.const 16) + ) + ) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load offset=16 + (local.get $2) + ) + ) + (call $_UnloadImage + (local.get $0) + ) + (br_if $while-in + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.load + (i32.const 27960) + ) + ) + ) + ) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27964) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27972) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load + (i32.const 27980) + ) + ) + (call $_UnloadTexture + (local.get $0) + ) + (call $_free + (i32.load + (i32.const 27988) + ) + ) + (call $_free + (i32.load + (i32.const 27984) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_UnloadTexture (; 525 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + ) + (block + (global.set $STACKTOP + (local.get $1) + ) + (return) + ) + ) + (call $_rlDeleteTextures + (local.get $0) + ) + (i32.store + (local.get $2) + (local.get $0) + ) + (call $_TraceLog + (i32.const 3) + (i32.const 16529) + (local.get $2) + ) + (global.set $STACKTOP + (local.get $1) + ) + ) + (func $_BeginDrawing (; 526 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 128) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 128) + ) + ) + (local.set $0 + (i32.sub + (local.get $1) + (i32.const -64) + ) + ) + (f64.store + (i32.const 27640) + (f64.sub + (local.tee $3 + (call $_glfwGetTime) + ) + (f64.load + (i32.const 27624) + ) + ) + ) + (f64.store + (i32.const 27624) + (local.get $3) + ) + (call $_rlLoadIdentity) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27992) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28000) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28008) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28016) + ) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28024) + ) + ) + (i64.store offset=40 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28032) + ) + ) + (i64.store offset=48 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28040) + ) + ) + (i64.store offset=56 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28048) + ) + ) + (call $_MatrixToFloatV + (local.get $1) + (local.get $0) + ) + (call $_rlMultMatrixf + (local.get $1) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_EndDrawing (; 527 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $0 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $4 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $2 + (local.get $0) + ) + (call $_rlglDraw) + (if + (i32.load8_s + (i32.const 28844) + ) + (block + (i32.store + (i32.const 28096) + (local.tee $3 + (i32.add + (i32.load + (i32.const 28096) + ) + (i32.const 1) + ) + ) + ) + (if + (i32.eqz + (i32.rem_s + (local.get $3) + (i32.const 10) + ) + ) + (block + (call $_GifWriteFrame + (local.tee $3 + (call $_rlReadScreenPixels + (i32.load + (i32.const 27948) + ) + (i32.load + (i32.const 27952) + ) + ) + ) + (i32.load + (i32.const 27948) + ) + (i32.load + (i32.const 27952) + ) + ) + (call $_free + (local.get $3) + ) + ) + ) + (if + (i32.eq + (i32.rem_s + (i32.div_s + (i32.load + (i32.const 28096) + ) + (i32.const 15) + ) + (i32.const 2) + ) + (i32.const 1) + ) + (block + (local.set $3 + (i32.add + (i32.load + (i32.const 27952) + ) + (i32.const -20) + ) + ) + (i32.store8 offset=4 + (local.get $0) + (i32.const -26) + ) + (i32.store8 offset=5 + (local.get $0) + (i32.const 41) + ) + (i32.store8 offset=6 + (local.get $0) + (i32.const 55) + ) + (i32.store8 offset=7 + (local.get $0) + (i32.const -1) + ) + (i32.store align=1 + (local.get $4) + (i32.load offset=4 align=1 + (local.get $0) + ) + ) + (call $_DrawCircle + (local.get $3) + (local.get $4) + ) + (local.set $0 + (i32.add + (i32.load + (i32.const 27952) + ) + (i32.const -25) + ) + ) + (i32.store8 + (local.get $2) + (i32.const -66) + ) + (i32.store8 offset=1 + (local.get $2) + (i32.const 33) + ) + (i32.store8 offset=2 + (local.get $2) + (i32.const 55) + ) + (i32.store8 offset=3 + (local.get $2) + (i32.const -1) + ) + (i32.store align=1 + (local.get $4) + (i32.load align=1 + (local.get $2) + ) + ) + (call $_DrawText + (i32.const 16579) + (i32.const 50) + (local.get $0) + (i32.const 10) + (local.get $4) + ) + ) + ) + (call $_rlglDraw) + ) + ) + (call $_glfwSwapBuffers + (i32.load + (i32.const 27928) + ) + ) + (call $_PollInputEvents) + (local.set $1 + (f64.sub + (local.tee $5 + (call $_glfwGetTime) + ) + (f64.load + (i32.const 27624) + ) + ) + ) + (f64.store + (i32.const 27624) + (local.get $5) + ) + (f64.store + (i32.const 27632) + (local.tee $1 + (f64.add + (local.get $1) + (f64.load + (i32.const 27640) + ) + ) + ) + ) + (if + (i32.eqz + (f64.lt + (local.get $1) + (f64.const 0) + ) + ) + (block + (global.set $STACKTOP + (local.get $6) + ) + (return) + ) + ) + (call $_Wait + (f32.mul + (f32.demote_f64 + (f64.sub + (f64.const 0) + (local.get $1) + ) + ) + (f32.const 1e3) + ) + ) + (local.set $1 + (f64.sub + (local.tee $5 + (call $_glfwGetTime) + ) + (f64.load + (i32.const 27624) + ) + ) + ) + (f64.store + (i32.const 27624) + (local.get $5) + ) + (f64.store + (i32.const 27632) + (f64.add + (local.get $1) + (f64.load + (i32.const 27632) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + (func $_DrawCircle (; 528 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (f32.store + (local.get $2) + (f32.const 30) + ) + (f32.store offset=4 + (local.get $2) + (f32.convert_i32_s + (local.get $0) + ) + ) + (i64.store align=4 + (local.tee $0 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (i64.load align=4 + (local.get $2) + ) + ) + (i32.store align=1 + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 16) + ) + ) + (i32.load align=1 + (local.get $1) + ) + ) + (call $_DrawCircleV + (local.get $0) + (local.get $2) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_DrawText (; 529 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $9 + (i32.add + (local.get $5) + (i32.const 128) + ) + ) + (local.set $10 + (i32.add + (local.get $5) + (i32.const 120) + ) + ) + (local.set $6 + (i32.add + (local.get $5) + (i32.const 80) + ) + ) + (local.set $7 + (local.get $5) + ) + (call $_GetFontDefault + (local.tee $11 + (i32.add + (local.get $5) + (i32.const 36) + ) + ) + ) + (if + (i32.eqz + (i32.load offset=8 + (local.get $11) + ) + ) + (block + (global.set $STACKTOP + (local.get $8) + ) + (return) + ) + ) + (f32.store offset=72 + (local.get $5) + (f32.convert_i32_s + (local.get $1) + ) + ) + (f32.store offset=76 + (local.get $5) + (f32.convert_i32_s + (local.get $2) + ) + ) + (local.set $1 + (i32.div_u + (local.tee $2 + (select + (local.get $3) + (i32.const 10) + (i32.gt_s + (local.get $3) + (i32.const 10) + ) + ) + ) + (i32.const 10) + ) + ) + (call $_GetFontDefault + (local.get $7) + ) + (i64.store align=4 + (local.get $6) + (i64.load align=4 + (local.get $7) + ) + ) + (i64.store offset=8 align=4 + (local.get $6) + (i64.load offset=8 align=4 + (local.get $7) + ) + ) + (i64.store offset=16 align=4 + (local.get $6) + (i64.load offset=16 align=4 + (local.get $7) + ) + ) + (i64.store offset=24 align=4 + (local.get $6) + (i64.load offset=24 align=4 + (local.get $7) + ) + ) + (i32.store offset=32 + (local.get $6) + (i32.load offset=32 + (local.get $7) + ) + ) + (i64.store align=4 + (local.get $10) + (i64.load offset=72 align=4 + (local.get $5) + ) + ) + (i32.store align=1 + (local.get $9) + (i32.load align=1 + (local.get $4) + ) + ) + (call $_DrawTextEx + (local.get $6) + (local.get $0) + (local.get $10) + (f32.convert_i32_s + (local.get $2) + ) + (f32.convert_i32_s + (local.get $1) + ) + (local.get $9) + ) + (global.set $STACKTOP + (local.get $8) + ) + ) + (func $_PollInputEvents (; 530 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1456) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1456) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const 1440) + ) + ) + (local.set $0 + (i32.add + (local.get $1) + (i32.const 1432) + ) + ) + (call $_UpdateGestures) + (call $_glfwGetCursorPos + (i32.load + (i32.const 27928) + ) + (local.get $2) + (local.get $0) + ) + (f32.store + (i32.const 27932) + (f32.demote_f64 + (f64.load + (local.get $2) + ) + ) + ) + (f32.store + (i32.const 27936) + (f32.demote_f64 + (f64.load + (local.get $0) + ) + ) + ) + (drop + (call $_memcpy + (i32.const 24176) + (i32.const 22640) + (i32.const 512) + ) + ) + (i32.store16 align=1 + (i32.const 28841) + (i32.load16_s align=1 + (i32.const 28838) + ) + ) + (i32.store8 + (i32.const 28843) + (i32.load8_s + (i32.const 28840) + ) + ) + (i32.store + (i32.const 28088) + (i32.const 0) + ) + (if + (call $_emscripten_sample_gamepad_data) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return) + ) + ) + (if + (i32.le_s + (local.tee $5 + (call $_emscripten_get_num_gamepads) + ) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $3) + ) + (return) + ) + ) + (local.set $2 + (i32.const 0) + ) + (loop $while-in + (if + (i32.eqz + (call $_emscripten_get_gamepad_status + (local.get $2) + (local.get $1) + ) + ) + (block + (if + (i32.gt_s + (i32.load offset=12 + (local.get $1) + ) + (i32.const 0) + ) + (block + (local.set $4 + (i32.load offset=12 + (local.get $1) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in1 + (br_if $while-in1 + (i32.and + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $4) + ) + (i32.lt_u + (local.get $0) + (i32.const 32) + ) + ) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.load offset=8 + (local.get $1) + ) + (i32.const 0) + ) + (block + (local.set $4 + (i32.load offset=8 + (local.get $1) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in3 + (br_if $while-in3 + (i32.and + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $4) + ) + (i32.lt_u + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.and + (i32.lt_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (local.get $5) + ) + (i32.lt_u + (local.get $2) + (i32.const 4) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_Wait (; 531 ;) (; has Stack IR ;) (param $0 f32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $1) + (local.tee $3 + (i32.trunc_f32_s + (f32.div + (local.get $0) + (f32.const 1e3) + ) + ) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.trunc_f32_s + (f32.mul + (f32.sub + (local.get $0) + (f32.convert_i32_s + (i32.mul + (local.get $3) + (i32.const 1000) + ) + ) + ) + (f32.const 1e6) + ) + ) + ) + (loop $while-in + (br_if $while-in + (i32.eq + (call $_nanosleep + (local.get $1) + ) + (i32.const -1) + ) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_GetFontDefault (; 532 ;) (; has Stack IR ;) (param $0 i32) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27956) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27964) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27972) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 27980) + ) + ) + (i32.store offset=32 + (local.get $0) + (i32.load + (i32.const 27988) + ) + ) + ) + (func $_DrawTextEx (; 533 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 f32) (param $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 f32) + (local $23 f32) + (local $24 i32) + (local.set $18 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 144) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 144) + ) + ) + (local.set $9 + (i32.add + (local.get $6) + (i32.const 96) + ) + ) + (local.set $19 + (i32.add + (local.get $6) + (i32.const 88) + ) + ) + (local.set $14 + (i32.add + (local.get $6) + (i32.const 72) + ) + ) + (local.set $15 + (i32.add + (local.get $6) + (i32.const 56) + ) + ) + (local.set $12 + (i32.add + (local.get $6) + (i32.const 32) + ) + ) + (local.set $13 + (i32.add + (local.get $6) + (i32.const 8) + ) + ) + (local.set $16 + (local.get $6) + ) + (local.set $20 + (call $_strlen + (local.get $1) + ) + ) + (local.set $11 + (i32.load + (local.get $0) + ) + ) + (if + (i32.le_s + (local.get $20) + (i32.const 0) + ) + (block + (global.set $STACKTOP + (local.get $18) + ) + (return) + ) + ) + (local.set $10 + (f32.div + (local.get $3) + (f32.convert_i32_s + (local.get $11) + ) + ) + ) + (local.set $22 + (f32.load + (local.get $2) + ) + ) + (local.set $23 + (f32.load offset=4 + (local.get $2) + ) + ) + (local.set $3 + (f32.const 0) + ) + (local.set $11 + (i32.const 0) + ) + (loop $while-in + (i32.store + (local.get $13) + (i32.const 0) + ) + (local.set $7 + (call $_GetNextCodepoint + (i32.add + (local.get $1) + (local.get $17) + ) + (local.get $13) + ) + ) + (i64.store align=4 + (local.get $9) + (i64.load align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $9) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=16 align=4 + (local.get $9) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i64.store offset=24 align=4 + (local.get $9) + (i64.load offset=24 align=4 + (local.get $0) + ) + ) + (i32.store offset=32 + (local.get $9) + (i32.load offset=32 + (local.get $0) + ) + ) + (local.set $8 + (call $_GetGlyphIndex + (local.get $9) + (local.get $7) + ) + ) + (local.set $3 + (block $do-once (result f32) + (block $__rjti$1 + (block $__rjti$0 + (br $do-once + (if (result f32) + (i32.eq + (local.get $7) + (i32.const 63) + ) + (block + (i32.store + (local.get $13) + (i32.const 1) + ) + (local.set $2 + (i32.const 1) + ) + (br $__rjti$0) + ) + (block (result f32) + (local.set $2 + (i32.load + (local.get $13) + ) + ) + (if + (local.tee $7 + (i32.sub + (local.get $7) + (i32.const 10) + ) + ) + (block + (br_if $__rjti$1 + (i32.eq + (local.get $7) + (i32.const 22) + ) + ) + (br $__rjti$0) + ) + ) + (local.set $11 + (i32.add + (i32.trunc_f32_s + (f32.mul + (local.get $10) + (f32.convert_i32_s + (i32.add + (local.tee $8 + (i32.load + (local.get $0) + ) + ) + (i32.div_s + (local.get $8) + (i32.const 2) + ) + ) + ) + ) + ) + (local.get $11) + ) + ) + (f32.const 0) + ) + ) + ) + ) + (local.set $21 + (i32.add + (local.tee $7 + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.shl + (local.get $8) + (i32.const 4) + ) + ) + ) + (f32.store offset=16 + (local.get $6) + (f32.add + (f32.add + (local.get $3) + (local.get $22) + ) + (f32.mul + (local.get $10) + (f32.convert_i32_s + (i32.load offset=4 + (i32.add + (local.tee $24 + (i32.load offset=32 + (local.get $0) + ) + ) + (i32.mul + (local.get $8) + (i32.const 36) + ) + ) + ) + ) + ) + ) + ) + (f32.store offset=20 + (local.get $6) + (f32.add + (f32.add + (local.get $23) + (f32.convert_i32_s + (local.get $11) + ) + ) + (f32.mul + (local.get $10) + (f32.convert_i32_s + (i32.load offset=8 + (i32.add + (i32.mul + (local.get $8) + (i32.const 36) + ) + (local.get $24) + ) + ) + ) + ) + ) + ) + (f32.store offset=24 + (local.get $6) + (f32.mul + (local.get $10) + (f32.load offset=8 + (i32.add + (i32.shl + (local.get $8) + (i32.const 4) + ) + (local.get $7) + ) + ) + ) + ) + (f32.store offset=28 + (local.get $6) + (f32.mul + (local.get $10) + (f32.load offset=12 + (i32.add + (i32.shl + (local.get $8) + (i32.const 4) + ) + (local.get $7) + ) + ) + ) + ) + (f32.store + (local.get $16) + (f32.const 0) + ) + (f32.store offset=4 + (local.get $16) + (f32.const 0) + ) + (i64.store align=4 + (local.get $12) + (i64.load offset=8 align=4 + (local.get $0) + ) + ) + (i64.store offset=8 align=4 + (local.get $12) + (i64.load offset=16 align=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $12) + (i32.load offset=24 + (local.get $0) + ) + ) + (i64.store align=4 + (local.get $15) + (i64.load align=4 + (local.get $21) + ) + ) + (i64.store offset=8 align=4 + (local.get $15) + (i64.load offset=8 align=4 + (local.get $21) + ) + ) + (i64.store align=4 + (local.get $14) + (i64.load offset=16 align=4 + (local.get $6) + ) + ) + (i64.store offset=8 align=4 + (local.get $14) + (i64.load offset=24 align=4 + (local.get $6) + ) + ) + (i64.store align=4 + (local.get $19) + (i64.load align=4 + (local.get $16) + ) + ) + (i32.store align=1 + (local.get $9) + (i32.load align=1 + (local.get $5) + ) + ) + (call $_DrawTexturePro + (local.get $12) + (local.get $15) + (local.get $14) + (local.get $19) + (local.get $9) + ) + ) + (if (result f32) + (local.tee $7 + (i32.load offset=12 + (i32.add + (i32.load offset=32 + (local.get $0) + ) + (i32.mul + (local.get $8) + (i32.const 36) + ) + ) + ) + ) + (f32.add + (local.get $3) + (f32.add + (f32.mul + (local.get $10) + (f32.convert_i32_s + (local.get $7) + ) + ) + (local.get $4) + ) + ) + (f32.add + (local.get $3) + (f32.add + (f32.mul + (local.get $10) + (f32.load offset=8 + (i32.add + (i32.load offset=28 + (local.get $0) + ) + (i32.shl + (local.get $8) + (i32.const 4) + ) + ) + ) + ) + (local.get $4) + ) + ) + ) + ) + ) + (br_if $while-in + (i32.lt_s + (local.tee $17 + (i32.add + (local.get $2) + (local.get $17) + ) + ) + (local.get $20) + ) + ) + ) + (global.set $STACKTOP + (local.get $18) + ) + ) + (func $_GetNextCodepoint (; 534 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $3 + (i32.load8_s + (local.get $0) + ) + ) + (i32.store + (local.get $1) + (i32.const 1) + ) + (if + (i32.gt_s + (local.get $3) + (i32.const -1) + ) + (return + (i32.load8_s + (local.get $0) + ) + ) + ) + (block $folding-inner1 + (block $folding-inner0 + (if + (i32.eq + (i32.and + (local.tee $5 + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + (i32.const 224) + ) + (i32.const 192) + ) + (block + (br_if $folding-inner0 + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.tee $2 + (i32.and + (local.tee $0 + (i32.load8_s offset=1 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $0) + (i32.const 0) + ) + ) + ) + ) + (br_if $folding-inner1 + (i32.ge_s + (i32.and + (i32.shr_s + (i32.shl + (i32.add + (local.get $3) + (i32.const 62) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 255) + ) + (i32.const 30) + ) + ) + (i32.store + (local.get $1) + (i32.const 2) + ) + (return + (select + (i32.const 63) + (local.tee $0 + (i32.or + (i32.and + (local.get $2) + (i32.const 63) + ) + (i32.and + (i32.shl + (local.get $5) + (i32.const 6) + ) + (i32.const 1984) + ) + ) + ) + (i32.gt_s + (local.get $0) + (i32.const 1114111) + ) + ) + ) + ) + ) + (if + (i32.eq + (i32.and + (local.get $5) + (i32.const 240) + ) + (i32.const 224) + ) + (block + (local.set $6 + (i32.and + (local.tee $2 + (i32.load8_s offset=1 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.get $6) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $2) + (i32.const 0) + ) + ) + ) + ) + (local.set $0 + (i32.and + (local.tee $4 + (i32.load8_s offset=2 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (if + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.get $0) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $4) + (i32.const 0) + ) + ) + ) + (block + (i32.store + (local.get $1) + (i32.const 3) + ) + (br $folding-inner1) + ) + ) + (block $__rjti$1 + (block $switch-default + (block $switch-case0 + (if + (local.tee $4 + (i32.sub + (local.get $3) + (i32.const -32) + ) + ) + (if + (i32.eq + (local.get $4) + (i32.const 13) + ) + (br $switch-case0) + (br $switch-default) + ) + ) + (br_if $__rjti$1 + (i32.eq + (i32.and + (local.get $2) + (i32.const 224) + ) + (i32.const 160) + ) + ) + (br $folding-inner0) + ) + (br_if $__rjti$1 + (i32.and + (i32.lt_s + (local.get $2) + (i32.const 0) + ) + (i32.lt_s + (i32.and + (local.get $2) + (i32.const 255) + ) + (i32.const 160) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $__rjti$1 + (i32.gt_s + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.const 223) + ) + ) + (br $folding-inner1) + ) + (i32.store + (local.get $1) + (i32.const 3) + ) + (return + (select + (i32.const 63) + (local.tee $0 + (i32.or + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.or + (i32.and + (i32.shl + (local.get $5) + (i32.const 12) + ) + (i32.const 61440) + ) + (i32.and + (i32.shl + (local.get $6) + (i32.const 6) + ) + (i32.const 4032) + ) + ) + ) + ) + (i32.gt_s + (local.get $0) + (i32.const 1114111) + ) + ) + ) + ) + ) + (br_if $folding-inner1 + (i32.or + (i32.ne + (i32.and + (local.get $5) + (i32.const 248) + ) + (i32.const 240) + ) + (i32.gt_s + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.const 244) + ) + ) + ) + (local.set $6 + (i32.and + (local.tee $2 + (i32.load8_s offset=1 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (br_if $folding-inner0 + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.get $6) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $2) + (i32.const 0) + ) + ) + ) + ) + (local.set $4 + (i32.and + (local.tee $7 + (i32.load8_s offset=2 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (if + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.get $4) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $7) + (i32.const 0) + ) + ) + ) + (block + (i32.store + (local.get $1) + (i32.const 3) + ) + (br $folding-inner1) + ) + ) + (local.set $0 + (i32.and + (local.tee $7 + (i32.load8_s offset=3 + (local.get $0) + ) + ) + (i32.const 255) + ) + ) + (if + (i32.eqz + (i32.and + (i32.eq + (i32.and + (local.get $0) + (i32.const 192) + ) + (i32.const 128) + ) + (i32.ne + (local.get $7) + (i32.const 0) + ) + ) + ) + (block + (i32.store + (local.get $1) + (i32.const 4) + ) + (br $folding-inner1) + ) + ) + (block $__rjti$3 + (block $switch-default4 + (block $switch-case3 + (block $switch-case2 + (br_table $switch-case2 $switch-default4 $switch-default4 $switch-default4 $switch-case3 $switch-default4 + (i32.sub + (local.get $3) + (i32.const -16) + ) + ) + ) + (br_if $__rjti$3 + (i32.lt_s + (i32.and + (i32.shr_s + (i32.shl + (i32.add + (local.get $2) + (i32.const 112) + ) + (i32.const 24) + ) + (i32.const 24) + ) + (i32.const 255) + ) + (i32.const 48) + ) + ) + (br $folding-inner0) + ) + (br_if $__rjti$3 + (i32.and + (i32.lt_s + (local.get $2) + (i32.const 0) + ) + (i32.lt_s + (i32.and + (local.get $2) + (i32.const 255) + ) + (i32.const 144) + ) + ) + ) + (br $folding-inner0) + ) + (br_if $__rjti$3 + (i32.gt_s + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.const 239) + ) + ) + (br $folding-inner1) + ) + (i32.store + (local.get $1) + (i32.const 4) + ) + (return + (select + (i32.const 63) + (local.tee $0 + (i32.or + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.or + (i32.and + (i32.shl + (local.get $4) + (i32.const 6) + ) + (i32.const 4032) + ) + (i32.or + (i32.and + (i32.shl + (local.get $5) + (i32.const 18) + ) + (i32.const 1835008) + ) + (i32.and + (i32.shl + (local.get $6) + (i32.const 12) + ) + (i32.const 258048) + ) + ) + ) + ) + ) + (i32.gt_s + (local.get $0) + (i32.const 1114111) + ) + ) + ) + ) + (i32.store + (local.get $1) + (i32.const 2) + ) + ) + (i32.const 63) + ) + (func $_GetGlyphIndex (; 535 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (if + (i32.le_s + (i32.load offset=4 + (local.get $0) + ) + (i32.const 0) + ) + (return + (i32.const 0) + ) + ) + (local.set $2 + (i32.load offset=32 + (local.get $0) + ) + ) + (local.set $3 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (if + (i32.ne + (i32.load + (i32.add + (i32.mul + (local.get $0) + (i32.const 36) + ) + (local.get $2) + ) + ) + (local.get $1) + ) + (block + (br_if $while-in + (i32.lt_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.get $3) + ) + ) + (local.set $0 + (i32.const 0) + ) + ) + ) + ) + (local.get $0) + ) + (func $_DrawTexturePro (; 536 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (if + (i32.eqz + (local.tee $10 + (i32.load + (local.get $0) + ) + ) + ) + (return) + ) + (local.set $11 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.set $0 + (i32.load offset=8 + (local.get $0) + ) + ) + (local.set $12 + (if (result i32) + (f32.lt + (local.tee $5 + (f32.load offset=8 + (local.get $1) + ) + ) + (f32.const 0) + ) + (block (result i32) + (f32.store offset=8 + (local.get $1) + (f32.neg + (local.get $5) + ) + ) + (i32.const 1) + ) + (i32.const 0) + ) + ) + (if + (f32.lt + (local.tee $6 + (f32.load offset=12 + (local.get $1) + ) + ) + (f32.const 0) + ) + (f32.store offset=4 + (local.get $1) + (f32.sub + (f32.load offset=4 + (local.get $1) + ) + (local.get $6) + ) + ) + ) + (local.set $5 + (f32.convert_i32_s + (local.get $11) + ) + ) + (local.set $7 + (f32.convert_i32_s + (local.get $0) + ) + ) + (call $_rlEnableTexture + (local.get $10) + ) + (call $_rlPushMatrix) + (call $_rlTranslatef + (f32.load + (local.get $2) + ) + (f32.load offset=4 + (local.get $2) + ) + ) + (call $_rlRotatef) + (call $_rlTranslatef + (f32.neg + (f32.load + (local.get $3) + ) + ) + (f32.neg + (f32.load offset=4 + (local.get $3) + ) + ) + ) + (call $_rlBegin) + (call $_rlColor4ub + (i32.load8_s + (local.get $4) + ) + (i32.load8_s offset=1 + (local.get $4) + ) + (i32.load8_s offset=2 + (local.get $4) + ) + (i32.load8_s offset=3 + (local.get $4) + ) + ) + (local.set $8 + (f32.load + (local.get $1) + ) + ) + (if + (local.get $12) + (block + (call $_rlTexCoord2f + (f32.div + (f32.add + (local.get $8) + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $5) + ) + (f32.div + (f32.load offset=4 + (local.get $1) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (local.get $8) + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $5) + ) + (f32.div + (f32.add + (local.get $6) + (f32.load offset=4 + (local.get $1) + ) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.tee $9 + (f32.load offset=12 + (local.get $2) + ) + ) + ) + (call $_rlTexCoord2f + (f32.div + (local.get $8) + (local.get $5) + ) + (f32.div + (f32.add + (local.get $6) + (f32.load offset=4 + (local.get $1) + ) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (local.tee $6 + (f32.load offset=8 + (local.get $2) + ) + ) + (local.get $9) + ) + (call $_rlTexCoord2f + (f32.div + (local.get $8) + (local.get $5) + ) + (f32.div + (f32.load offset=4 + (local.get $1) + ) + (local.get $7) + ) + ) + ) + (block + (call $_rlTexCoord2f + (f32.div + (local.get $8) + (local.get $5) + ) + (f32.div + (local.tee $9 + (f32.load offset=4 + (local.get $1) + ) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (call $_rlTexCoord2f + (f32.div + (local.get $8) + (local.get $5) + ) + (f32.div + (f32.add + (local.get $6) + (local.get $9) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.tee $9 + (f32.load offset=12 + (local.get $2) + ) + ) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (local.get $8) + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $5) + ) + (f32.div + (f32.add + (local.get $6) + (f32.load offset=4 + (local.get $1) + ) + ) + (local.get $7) + ) + ) + (call $_rlVertex2f + (local.tee $6 + (f32.load offset=8 + (local.get $2) + ) + ) + (local.get $9) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (local.get $8) + (f32.load offset=8 + (local.get $1) + ) + ) + (local.get $5) + ) + (f32.div + (f32.load offset=4 + (local.get $1) + ) + (local.get $7) + ) + ) + ) + ) + (call $_rlVertex2f + (local.get $6) + (f32.const 0) + ) + (call $_rlEnd) + (call $_rlPopMatrix) + (call $_rlDisableTexture) + ) + (func $_DrawCircleV (; 537 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i64.store align=4 + (local.get $2) + (i64.load align=4 + (local.get $0) + ) + ) + (i32.store align=1 + (local.tee $0 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (i32.load align=1 + (local.get $1) + ) + ) + (call $_DrawCircleSector + (local.get $2) + (local.get $0) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_DrawCircleSector (; 538 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (if + (call $_rlCheckBufferLimit + (i32.const 72) + ) + (call $_rlglDraw) + ) + (call $_GetShapesTexture + (local.get $3) + ) + (call $_rlEnableTexture + (i32.load + (local.get $3) + ) + ) + (call $_rlBegin) + (local.set $3 + (i32.load8_s + (local.get $1) + ) + ) + (local.set $8 + (i32.load8_s offset=1 + (local.get $1) + ) + ) + (local.set $9 + (i32.load8_s offset=2 + (local.get $1) + ) + ) + (local.set $1 + (i32.load8_s offset=3 + (local.get $1) + ) + ) + (local.set $5 + (f32.load + (local.get $0) + ) + ) + (local.set $6 + (f32.load offset=4 + (local.get $0) + ) + ) + (local.set $0 + (i32.const 0) + ) + (loop $while-in + (call $_rlColor4ub + (local.get $3) + (local.get $8) + (local.get $9) + (local.get $1) + ) + (call $_rlTexCoord2f + (f32.div + (f32.load + (i32.const 28808) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.load + (i32.const 28812) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (local.get $5) + (local.get $6) + ) + (call $_rlTexCoord2f + (f32.div + (f32.load + (i32.const 28808) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.add + (f32.load + (i32.const 28812) + ) + (f32.load + (i32.const 28820) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (f32.add + (f32.mul + (f32.const 10) + (call $_sinf + (local.tee $2 + (f32.mul + (local.get $4) + (f32.const 0.01745329238474369) + ) + ) + ) + ) + (local.get $5) + ) + (f32.add + (f32.mul + (f32.const 10) + (call $_cosf + (local.get $2) + ) + ) + (local.get $6) + ) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (f32.load + (i32.const 28808) + ) + (f32.load + (i32.const 28816) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.add + (f32.load + (i32.const 28812) + ) + (f32.load + (i32.const 28820) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (f32.add + (f32.mul + (f32.const 10) + (call $_sinf + (local.tee $2 + (f32.mul + (f32.add + (f32.const 10) + (local.get $4) + ) + (f32.const 0.01745329238474369) + ) + ) + ) + ) + (local.get $5) + ) + (f32.add + (f32.mul + (f32.const 10) + (call $_cosf + (local.get $2) + ) + ) + (local.get $6) + ) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (f32.load + (i32.const 28808) + ) + (f32.load + (i32.const 28816) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.load + (i32.const 28812) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (f32.add + (f32.mul + (f32.const 10) + (call $_sinf + (local.tee $2 + (f32.mul + (local.tee $4 + (f32.add + (f32.const 20) + (local.get $4) + ) + ) + (f32.const 0.01745329238474369) + ) + ) + ) + ) + (local.get $5) + ) + (f32.add + (f32.mul + (f32.const 10) + (call $_cosf + (local.get $2) + ) + ) + (local.get $6) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 18) + ) + ) + ) + (call $_rlEnd) + (call $_rlDisableTexture) + (global.set $STACKTOP + (local.get $7) + ) + ) + (func $_GetShapesTexture (; 539 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 80) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 80) + ) + ) + (if + (i32.load + (i32.const 28100) + ) + (block + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28100) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28108) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load + (i32.const 28116) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return) + ) + ) + (call $_GetFontDefault + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 36) + ) + ) + ) + (i64.store align=4 + (i32.const 28100) + (i64.load offset=8 align=4 + (local.get $2) + ) + ) + (i64.store align=4 + (i32.const 28108) + (i64.load offset=16 align=4 + (local.get $2) + ) + ) + (i32.store + (i32.const 28116) + (i32.load offset=24 + (local.get $2) + ) + ) + (call $_GetFontDefault + (local.get $1) + ) + (local.set $4 + (f32.add + (f32.load + (i32.add + (local.tee $1 + (i32.load offset=28 + (local.get $1) + ) + ) + (i32.const 1524) + ) + ) + (f32.const 1) + ) + ) + (local.set $5 + (f32.add + (f32.load + (i32.add + (local.get $1) + (i32.const 1528) + ) + ) + (f32.const -2) + ) + ) + (local.set $6 + (f32.add + (f32.load + (i32.add + (local.get $1) + (i32.const 1532) + ) + ) + (f32.const -2) + ) + ) + (f32.store + (i32.const 28808) + (f32.add + (f32.load + (i32.add + (local.get $1) + (i32.const 1520) + ) + ) + (f32.const 1) + ) + ) + (f32.store + (i32.const 28812) + (local.get $4) + ) + (f32.store + (i32.const 28816) + (local.get $5) + ) + (f32.store + (i32.const 28820) + (local.get $6) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28100) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load align=4 + (i32.const 28108) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load + (i32.const 28116) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + ) + (func $_IsKeyPressed (; 540 ;) (; has Stack IR ;) (result i32) + (local $0 i32) + (i32.and + (i32.ne + (local.tee $0 + (i32.load8_s + (i32.const 22897) + ) + ) + (i32.load8_s + (i32.const 24433) + ) + ) + (i32.eq + (local.get $0) + (i32.const 1) + ) + ) + ) + (func $_DrawRectangle (; 541 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (f32.store offset=8 + (local.get $5) + (f32.convert_i32_s + (local.get $0) + ) + ) + (f32.store offset=12 + (local.get $5) + (f32.convert_i32_s + (local.get $1) + ) + ) + (f32.store + (local.get $5) + (f32.convert_i32_s + (local.get $2) + ) + ) + (f32.store offset=4 + (local.get $5) + (f32.convert_i32_s + (local.get $3) + ) + ) + (i64.store align=4 + (local.tee $0 + (i32.add + (local.get $5) + (i32.const 16) + ) + ) + (i64.load offset=8 align=4 + (local.get $5) + ) + ) + (i64.store align=4 + (local.tee $1 + (i32.add + (local.get $5) + (i32.const 24) + ) + ) + (i64.load align=4 + (local.get $5) + ) + ) + (i32.store align=1 + (local.tee $2 + (i32.add + (local.get $5) + (i32.const 32) + ) + ) + (i32.load align=1 + (local.get $4) + ) + ) + (call $_DrawRectangleV + (local.get $0) + (local.get $1) + (local.get $2) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + (func $_DrawRectangleV (; 542 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.sub + (global.get $STACKTOP) + (i32.const -64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (i32.store offset=8 + (local.get $3) + (i32.load + (local.get $0) + ) + ) + (i32.store offset=12 + (local.get $3) + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=16 + (local.get $3) + (i32.load + (local.get $1) + ) + ) + (i32.store offset=20 + (local.get $3) + (i32.load offset=4 + (local.get $1) + ) + ) + (f32.store + (local.get $3) + (f32.const 0) + ) + (f32.store offset=4 + (local.get $3) + (f32.const 0) + ) + (i64.store align=4 + (local.tee $0 + (i32.add + (local.get $3) + (i32.const 24) + ) + ) + (i64.load offset=8 align=4 + (local.get $3) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=16 align=4 + (local.get $3) + ) + ) + (i64.store align=4 + (local.tee $1 + (i32.add + (local.get $3) + (i32.const 40) + ) + ) + (i64.load align=4 + (local.get $3) + ) + ) + (i32.store align=1 + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 48) + ) + ) + (i32.load align=1 + (local.get $2) + ) + ) + (call $_DrawRectanglePro + (local.get $0) + (local.get $1) + (local.get $3) + ) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_DrawRectanglePro (; 543 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 f32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (call $_GetShapesTexture + (local.get $3) + ) + (call $_rlEnableTexture + (i32.load + (local.get $3) + ) + ) + (call $_rlPushMatrix) + (call $_rlTranslatef + (f32.load + (local.get $0) + ) + (f32.load offset=4 + (local.get $0) + ) + ) + (call $_rlRotatef) + (call $_rlTranslatef + (f32.neg + (f32.load + (local.get $1) + ) + ) + (f32.neg + (f32.load offset=4 + (local.get $1) + ) + ) + ) + (call $_rlBegin) + (call $_rlColor4ub + (i32.load8_s + (local.get $2) + ) + (i32.load8_s offset=1 + (local.get $2) + ) + (i32.load8_s offset=2 + (local.get $2) + ) + (i32.load8_s offset=3 + (local.get $2) + ) + ) + (call $_rlTexCoord2f + (f32.div + (f32.load + (i32.const 28808) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.load + (i32.const 28812) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (f32.const 0) + ) + (call $_rlTexCoord2f + (f32.div + (f32.load + (i32.const 28808) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.add + (f32.load + (i32.const 28812) + ) + (f32.load + (i32.const 28820) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (f32.const 0) + (local.tee $5 + (f32.load offset=12 + (local.get $0) + ) + ) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (f32.load + (i32.const 28808) + ) + (f32.load + (i32.const 28816) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.add + (f32.load + (i32.const 28812) + ) + (f32.load + (i32.const 28820) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (local.tee $6 + (f32.load offset=8 + (local.get $0) + ) + ) + (local.get $5) + ) + (call $_rlTexCoord2f + (f32.div + (f32.add + (f32.load + (i32.const 28808) + ) + (f32.load + (i32.const 28816) + ) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28104) + ) + ) + ) + (f32.div + (f32.load + (i32.const 28812) + ) + (f32.convert_i32_s + (i32.load + (i32.const 28108) + ) + ) + ) + ) + (call $_rlVertex2f + (local.get $6) + (f32.const 0) + ) + (call $_rlEnd) + (call $_rlPopMatrix) + (call $_rlDisableTexture) + (global.set $STACKTOP + (local.get $4) + ) + ) + (func $_DrawRectangleLines (; 544 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store align=1 + (local.get $1) + (i32.load align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 150) + (i32.const 200) + (i32.const 500) + (i32.const 1) + (local.get $1) + ) + (i32.store align=1 + (local.get $1) + (i32.load align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 649) + (i32.const 201) + (i32.const 1) + (i32.const 58) + (local.get $1) + ) + (i32.store align=1 + (local.get $1) + (i32.load align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 150) + (i32.const 259) + (i32.const 500) + (i32.const 1) + (local.get $1) + ) + (i32.store align=1 + (local.get $1) + (i32.load align=1 + (local.get $0) + ) + ) + (call $_DrawRectangle + (i32.const 150) + (i32.const 201) + (i32.const 1) + (i32.const 58) + (local.get $1) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_emscripten_get_global_libc (; 545 ;) (; has Stack IR ;) (result i32) + (i32.const 28120) + ) + (func $___em_js__initPthreadsJS (; 546 ;) (; has Stack IR ;) (result i32) + (i32.const 16589) + ) + (func $___emscripten_pthread_data_constructor (; 547 ;) (; has Stack IR ;) + (call $_initPthreadsJS) + (i32.store offset=188 + (global.get $__pthread_ptr) + (i32.const 28160) + ) + ) + (func $___stdio_close (; 548 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store + (local.get $1) + (i32.load offset=60 + (local.get $0) + ) + ) + (local.set $0 + (call $___syscall_ret + (call $___syscall6 + (i32.const 6) + (local.get $1) + ) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + (local.get $0) + ) + (func $___stdio_write (; 549 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $9 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (i32.store + (local.get $3) + (local.tee $4 + (i32.load offset=28 + (local.get $0) + ) + ) + ) + (i32.store offset=4 + (local.get $3) + (local.tee $5 + (i32.sub + (i32.load offset=20 + (local.get $0) + ) + (local.get $4) + ) + ) + ) + (i32.store offset=8 + (local.get $3) + (local.get $1) + ) + (i32.store offset=12 + (local.get $3) + (local.get $2) + ) + (local.set $1 + (local.get $3) + ) + (local.set $4 + (i32.const 2) + ) + (local.set $5 + (i32.add + (local.get $2) + (local.get $5) + ) + ) + (block $__rjto$1 + (block $__rjti$1 + (loop $while-in + (if + (i32.ne + (local.get $5) + (local.tee $3 + (if (result i32) + (i32.and + (call $___wasi_fd_write + (i32.load offset=60 + (local.get $0) + ) + (local.get $1) + (local.get $4) + (local.get $6) + ) + (i32.const 65535) + ) + (block (result i32) + (i32.store + (local.get $6) + (i32.const -1) + ) + (i32.const -1) + ) + (i32.load + (local.get $6) + ) + ) + ) + ) + (block + (br_if $__rjti$1 + (i32.lt_s + (local.get $3) + (i32.const 0) + ) + ) + (i32.store + (local.tee $1 + (select + (i32.add + (local.get $1) + (i32.const 8) + ) + (local.get $1) + (local.tee $8 + (i32.gt_u + (local.get $3) + (local.tee $7 + (i32.load offset=4 + (local.get $1) + ) + ) + ) + ) + ) + ) + (i32.add + (local.tee $7 + (i32.sub + (local.get $3) + (select + (local.get $7) + (i32.const 0) + (local.get $8) + ) + ) + ) + (i32.load + (local.get $1) + ) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.sub + (i32.load offset=4 + (local.get $1) + ) + (local.get $7) + ) + ) + (local.set $4 + (i32.add + (i32.shr_s + (i32.shl + (local.get $8) + (i32.const 31) + ) + (i32.const 31) + ) + (local.get $4) + ) + ) + (local.set $5 + (i32.sub + (local.get $5) + (local.get $3) + ) + ) + (br $while-in) + ) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.add + (local.tee $1 + (i32.load offset=44 + (local.get $0) + ) + ) + (i32.load offset=48 + (local.get $0) + ) + ) + ) + (i32.store offset=28 + (local.get $0) + (local.get $1) + ) + (i32.store offset=20 + (local.get $0) + (local.get $1) + ) + (br $__rjto$1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=28 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 0) + ) + (i32.store + (local.get $0) + (i32.or + (i32.load + (local.get $0) + ) + (i32.const 32) + ) + ) + (local.set $2 + (if (result i32) + (i32.eq + (local.get $4) + (i32.const 2) + ) + (i32.const 0) + (i32.sub + (local.get $2) + (i32.load offset=4 + (local.get $1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $9) + ) + (local.get $2) + ) + (func $___stdio_seek (; 550 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (i32.store + (local.tee $3 + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + (i32.load offset=60 + (local.get $0) + ) + ) + (i64.store32 offset=4 + (local.get $3) + (i64.shr_u + (local.get $1) + (i64.const 32) + ) + ) + (i64.store32 offset=8 + (local.get $3) + (local.get $1) + ) + (i32.store offset=12 + (local.get $3) + (local.get $4) + ) + (i32.store offset=16 + (local.get $3) + (local.get $2) + ) + (local.set $1 + (if (result i64) + (i32.lt_s + (call $___syscall_ret + (call $___syscall140 + (i32.const 140) + (local.get $3) + ) + ) + (i32.const 0) + ) + (block (result i64) + (i64.store + (local.get $4) + (i64.const -1) + ) + (i64.const -1) + ) + (i64.load + (local.get $4) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $1) + ) + (func $___syscall_ret (; 551 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if + (i32.gt_u + (local.get $0) + (i32.const -4096) + ) + (block + (local.set $0 + (i32.sub + (i32.const 0) + (local.get $0) + ) + ) + (i32.store + (call $___errno_location) + (local.get $0) + ) + (local.set $0 + (i32.const -1) + ) + ) + ) + (local.get $0) + ) + (func $___errno_location (; 552 ;) (; has Stack IR ;) (result i32) + (i32.sub + (global.get $__pthread_ptr) + (i32.const -64) + ) + ) + (func $___stdio_read (; 553 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (i32.store + (local.get $3) + (local.get $1) + ) + (i32.store offset=4 + (local.get $3) + (i32.sub + (local.get $2) + (i32.ne + (local.tee $4 + (i32.load offset=48 + (local.get $0) + ) + ) + (i32.const 0) + ) + ) + ) + (i32.store offset=8 + (local.get $3) + (i32.load offset=44 + (local.get $0) + ) + ) + (i32.store offset=12 + (local.get $3) + (local.get $4) + ) + (i32.store + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (i32.load offset=60 + (local.get $0) + ) + ) + (i32.store offset=4 + (local.get $4) + (local.get $3) + ) + (i32.store offset=8 + (local.get $4) + (i32.const 2) + ) + (if + (i32.lt_s + (local.tee $4 + (call $___syscall_ret + (call $___syscall145 + (i32.const 145) + (local.get $4) + ) + ) + ) + (i32.const 1) + ) + (block + (i32.store + (local.get $0) + (i32.or + (i32.load + (local.get $0) + ) + (i32.xor + (i32.and + (local.get $4) + (i32.const 48) + ) + (i32.const 16) + ) + ) + ) + (local.set $2 + (local.get $4) + ) + ) + (if + (i32.gt_u + (local.get $4) + (local.tee $6 + (i32.load offset=4 + (local.get $3) + ) + ) + ) + (block + (i32.store offset=4 + (local.get $0) + (local.tee $3 + (i32.load offset=44 + (local.get $0) + ) + ) + ) + (i32.store offset=8 + (local.get $0) + (i32.add + (local.get $3) + (i32.sub + (local.get $4) + (local.get $6) + ) + ) + ) + (if + (i32.load offset=48 + (local.get $0) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.store8 + (i32.add + (local.get $1) + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + (i32.load8_s + (local.get $3) + ) + ) + ) + ) + ) + (local.set $2 + (local.get $4) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $2) + ) + (func $___emscripten_stdout_close (; 554 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.const 0) + ) + (func $___emscripten_stdout_seek (; 555 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i64) + (i64.const 0) + ) + (func $_strcmp (; 556 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local.set $0 + (if (result i32) + (i32.or + (i32.ne + (local.tee $2 + (i32.load8_s + (local.get $0) + ) + ) + (local.tee $3 + (i32.load8_s + (local.get $1) + ) + ) + ) + (i32.eqz + (local.get $2) + ) + ) + (block (result i32) + (local.set $1 + (local.get $2) + ) + (local.get $3) + ) + (loop $while-in (result i32) + (if (result i32) + (i32.or + (i32.ne + (local.tee $2 + (i32.load8_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (local.tee $3 + (i32.load8_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (i32.eqz + (local.get $2) + ) + ) + (block (result i32) + (local.set $1 + (local.get $2) + ) + (local.get $3) + ) + (br $while-in) + ) + ) + ) + ) + (i32.sub + (i32.and + (local.get $1) + (i32.const 255) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + ) + (func $_memcmp (; 557 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (if (result i32) + (local.get $2) + (block $label$break$L1 (result i32) + (loop $while-in + (if + (i32.eq + (local.tee $3 + (i32.load8_s + (local.get $0) + ) + ) + (local.tee $4 + (i32.load8_s + (local.get $1) + ) + ) + ) + (block + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (drop + (br_if $label$break$L1 + (i32.const 0) + (i32.eqz + (local.tee $2 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + ) + ) + ) + (br $while-in) + ) + ) + ) + (i32.sub + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.and + (local.get $4) + (i32.const 255) + ) + ) + ) + (i32.const 0) + ) + ) + (func $_isdigit (; 558 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.lt_u + (i32.add + (local.get $0) + (i32.const -48) + ) + (i32.const 10) + ) + ) + (func $_vsnprintf (; 559 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 160) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 160) + ) + ) + (local.set $5 + (i32.add + (local.get $4) + (i32.const 144) + ) + ) + (drop + (call $_memcpy + (local.get $4) + (i32.const 8800) + (i32.const 144) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.le_u + (i32.add + (local.get $1) + (i32.const -1) + ) + (i32.const 2147483646) + ) + ) + (local.set $0 + (if (result i32) + (local.get $1) + (block (result i32) + (i32.store + (call $___errno_location) + (i32.const 75) + ) + (i32.const -1) + ) + (block + (local.set $1 + (i32.const 1) + ) + (local.set $0 + (local.get $5) + ) + (br $__rjti$0) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store offset=48 + (local.get $4) + (local.tee $1 + (select + (local.tee $5 + (i32.sub + (i32.const -2) + (local.get $0) + ) + ) + (local.get $1) + (i32.gt_u + (local.get $1) + (local.get $5) + ) + ) + ) + ) + (i32.store offset=20 + (local.get $4) + (local.get $0) + ) + (i32.store offset=44 + (local.get $4) + (local.get $0) + ) + (i32.store offset=16 + (local.get $4) + (local.tee $0 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + ) + (i32.store offset=28 + (local.get $4) + (local.get $0) + ) + (local.set $0 + (call $_vfprintf + (local.get $4) + (local.get $2) + (local.get $3) + ) + ) + (if + (local.get $1) + (i32.store8 + (i32.add + (local.tee $1 + (i32.load offset=20 + (local.get $4) + ) + ) + (i32.shr_s + (i32.shl + (i32.eq + (local.get $1) + (i32.load offset=16 + (local.get $4) + ) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) + (i32.const 0) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $0) + ) + (func $_vfprintf (; 560 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (call $___vfprintf_internal + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + (func $_fmt_fp (; 561 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 f64) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i64) + (local $27 i64) + (local $28 i32) + (local $29 i64) + (local.set $28 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $11 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 560) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 560) + ) + ) + (local.set $8 + (i32.add + (local.get $11) + (i32.const 32) + ) + ) + (local.set $21 + (local.get $11) + ) + (i32.store + (local.tee $16 + (i32.add + (local.get $11) + (i32.const 536) + ) + ) + (i32.const 0) + ) + (local.set $18 + (i32.add + (local.tee $6 + (i32.add + (local.get $11) + (i32.const 540) + ) + ) + (i32.const 12) + ) + ) + (local.set $23 + (if (result i32) + (i64.lt_s + (local.tee $26 + (i64.reinterpret_f64 + (local.get $1) + ) + ) + (i64.const 0) + ) + (block (result i32) + (local.set $26 + (i64.reinterpret_f64 + (local.tee $1 + (f64.neg + (local.get $1) + ) + ) + ) + ) + (local.set $22 + (i32.const 16643) + ) + (i32.const 1) + ) + (block (result i32) + (local.set $22 + (select + (i32.const 16646) + (select + (i32.const 16649) + (i32.const 16644) + (i32.and + (local.get $4) + (i32.const 1) + ) + ) + (i32.and + (local.get $4) + (i32.const 2048) + ) + ) + ) + (i32.ne + (i32.and + (local.get $4) + (i32.const 2049) + ) + (i32.const 0) + ) + ) + ) + ) + (local.set $0 + (if (result i32) + (i64.eq + (i64.and + (local.get $26) + (i64.const 9218868437227405312) + ) + (i64.const 9218868437227405312) + ) + (block (result i32) + (local.set $3 + (select + (select + (i32.const 16670) + (i32.const 16674) + (local.tee $3 + (i32.ne + (i32.and + (local.get $5) + (i32.const 32) + ) + (i32.const 0) + ) + ) + ) + (select + (i32.const 16662) + (i32.const 16666) + (local.get $3) + ) + (f64.ne + (local.get $1) + (local.get $1) + ) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.tee $5 + (i32.add + (local.get $23) + (i32.const 3) + ) + ) + (i32.and + (local.get $4) + (i32.const -65537) + ) + ) + (call $_out + (local.get $0) + (local.get $22) + (local.get $23) + ) + (call $_out + (local.get $0) + (local.get $3) + (i32.const 3) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.get $5) + (i32.xor + (local.get $4) + (i32.const 8192) + ) + ) + (local.get $5) + ) + (block $do-once (result i32) + (if + (local.tee $7 + (f64.ne + (local.tee $1 + (f64.mul + (call $_frexp + (local.get $1) + (local.get $16) + ) + (f64.const 2) + ) + ) + (f64.const 0) + ) + ) + (i32.store + (local.get $16) + (i32.add + (i32.load + (local.get $16) + ) + (i32.const -1) + ) + ) + ) + (if + (i32.eq + (local.tee $24 + (i32.or + (local.get $5) + (i32.const 32) + ) + ) + (i32.const 97) + ) + (block + (local.set $9 + (select + (i32.add + (local.get $22) + (i32.const 9) + ) + (local.get $22) + (local.tee $10 + (i32.and + (local.get $5) + (i32.const 32) + ) + ) + ) + ) + (if + (i32.eqz + (i32.or + (i32.eqz + (local.tee $7 + (i32.sub + (i32.const 12) + (local.get $3) + ) + ) + ) + (i32.gt_u + (local.get $3) + (i32.const 11) + ) + ) + ) + (block + (local.set $15 + (f64.const 8) + ) + (loop $while-in + (local.set $15 + (f64.mul + (local.get $15) + (f64.const 16) + ) + ) + (br_if $while-in + (local.tee $7 + (i32.add + (local.get $7) + (i32.const -1) + ) + ) + ) + ) + (local.set $1 + (if (result f64) + (i32.eq + (i32.load8_s + (local.get $9) + ) + (i32.const 45) + ) + (f64.neg + (f64.add + (local.get $15) + (f64.sub + (f64.neg + (local.get $1) + ) + (local.get $15) + ) + ) + ) + (f64.sub + (f64.add + (local.get $1) + (local.get $15) + ) + (local.get $15) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $18) + (local.tee $7 + (call $_fmt_u + (i64.extend_i32_s + (select + (i32.sub + (i32.const 0) + (local.tee $8 + (i32.load + (local.get $16) + ) + ) + ) + (local.get $8) + (i32.lt_s + (local.get $8) + (i32.const 0) + ) + ) + ) + (local.get $18) + ) + ) + ) + (i32.store8 + (local.tee $7 + (i32.add + (local.get $6) + (i32.const 11) + ) + ) + (i32.const 48) + ) + ) + (local.set $14 + (i32.or + (local.get $23) + (i32.const 2) + ) + ) + (i32.store8 + (i32.add + (local.get $7) + (i32.const -1) + ) + (i32.add + (i32.and + (i32.shr_s + (local.get $8) + (i32.const 31) + ) + (i32.const 2) + ) + (i32.const 43) + ) + ) + (i32.store8 + (local.tee $12 + (i32.add + (local.get $7) + (i32.const -2) + ) + ) + (i32.add + (local.get $5) + (i32.const 15) + ) + ) + (local.set $8 + (i32.lt_s + (local.get $3) + (i32.const 1) + ) + ) + (local.set $6 + (i32.eqz + (i32.and + (local.get $4) + (i32.const 8) + ) + ) + ) + (local.set $5 + (local.get $11) + ) + (loop $while-in3 + (i32.store8 + (local.get $5) + (i32.or + (local.get $10) + (i32.load8_u + (i32.add + (local.tee $7 + (i32.trunc_f64_s + (local.get $1) + ) + ) + (i32.const 8208) + ) + ) + ) + ) + (local.set $1 + (f64.mul + (f64.sub + (local.get $1) + (f64.convert_i32_s + (local.get $7) + ) + ) + (f64.const 16) + ) + ) + (local.set $5 + (if (result i32) + (i32.eq + (i32.sub + (local.tee $7 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (local.get $21) + ) + (i32.const 1) + ) + (if (result i32) + (i32.and + (i32.and + (local.get $8) + (f64.eq + (local.get $1) + (f64.const 0) + ) + ) + (local.get $6) + ) + (local.get $7) + (block (result i32) + (i32.store8 + (local.get $7) + (i32.const 46) + ) + (i32.add + (local.get $5) + (i32.const 2) + ) + ) + ) + (local.get $7) + ) + ) + (br_if $while-in3 + (f64.ne + (local.get $1) + (f64.const 0) + ) + ) + ) + (local.set $3 + (block $__rjto$0 (result i32) + (if + (i32.eqz + (i32.or + (i32.eqz + (local.get $3) + ) + (i32.ge_s + (i32.add + (local.get $5) + (i32.sub + (i32.const -2) + (local.get $21) + ) + ) + (local.get $3) + ) + ) + ) + (block + (local.set $8 + (i32.sub + (i32.add + (local.get $18) + (i32.add + (local.get $3) + (i32.const 2) + ) + ) + (local.get $12) + ) + ) + (br $__rjto$0 + (local.get $12) + ) + ) + ) + (local.set $8 + (i32.add + (local.get $5) + (i32.sub + (i32.sub + (local.get $18) + (local.get $21) + ) + (local.get $12) + ) + ) + ) + (local.get $12) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.tee $7 + (i32.add + (local.get $8) + (local.get $14) + ) + ) + (local.get $4) + ) + (call $_out + (local.get $0) + (local.get $9) + (local.get $14) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (local.get $2) + (local.get $7) + (i32.xor + (local.get $4) + (i32.const 65536) + ) + ) + (call $_out + (local.get $0) + (local.get $11) + (local.tee $5 + (i32.sub + (local.get $5) + (local.get $21) + ) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (i32.sub + (local.get $8) + (i32.add + (local.get $5) + (local.tee $3 + (i32.sub + (local.get $18) + (local.get $3) + ) + ) + ) + ) + (i32.const 0) + (i32.const 0) + ) + (call $_out + (local.get $0) + (local.get $12) + (local.get $3) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.get $7) + (i32.xor + (local.get $4) + (i32.const 8192) + ) + ) + (br $do-once + (local.get $7) + ) + ) + ) + (if + (local.get $7) + (block + (i32.store + (local.get $16) + (local.tee $7 + (i32.add + (i32.load + (local.get $16) + ) + (i32.const -28) + ) + ) + ) + (local.set $1 + (f64.mul + (local.get $1) + (f64.const 268435456) + ) + ) + ) + (local.set $7 + (i32.load + (local.get $16) + ) + ) + ) + (local.set $6 + (local.tee $14 + (select + (local.get $8) + (i32.add + (local.get $8) + (i32.const 288) + ) + (i32.lt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + ) + (loop $while-in5 + (i32.store + (local.get $6) + (local.tee $8 + (i32.trunc_f64_u + (local.get $1) + ) + ) + ) + (local.set $6 + (i32.add + (local.get $6) + (i32.const 4) + ) + ) + (br_if $while-in5 + (f64.ne + (local.tee $1 + (f64.mul + (f64.sub + (local.get $1) + (f64.convert_i32_u + (local.get $8) + ) + ) + (f64.const 1e9) + ) + ) + (f64.const 0) + ) + ) + ) + (if + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + (block + (local.set $8 + (local.get $7) + ) + (local.set $7 + (local.get $14) + ) + (loop $while-in7 + (local.set $9 + (select + (local.get $8) + (i32.const 29) + (i32.lt_s + (local.get $8) + (i32.const 29) + ) + ) + ) + (if + (i32.ge_u + (local.tee $8 + (i32.add + (local.get $6) + (i32.const -4) + ) + ) + (local.get $7) + ) + (block + (local.set $29 + (i64.extend_i32_u + (local.get $9) + ) + ) + (local.set $10 + (i32.const 0) + ) + (loop $while-in9 + (local.set $27 + (i64.div_u + (local.tee $26 + (i64.add + (i64.extend_i32_u + (local.get $10) + ) + (i64.shl + (i64.extend_i32_u + (i32.load + (local.get $8) + ) + ) + (local.get $29) + ) + ) + ) + (i64.const 1000000000) + ) + ) + (i64.store32 + (local.get $8) + (i64.sub + (local.get $26) + (i64.mul + (local.get $27) + (i64.const 1000000000) + ) + ) + ) + (local.set $10 + (i32.wrap_i64 + (local.get $27) + ) + ) + (br_if $while-in9 + (i32.ge_u + (local.tee $8 + (i32.add + (local.get $8) + (i32.const -4) + ) + ) + (local.get $7) + ) + ) + ) + (if + (local.get $10) + (i32.store + (local.tee $7 + (i32.add + (local.get $7) + (i32.const -4) + ) + ) + (local.get $10) + ) + ) + ) + ) + (if + (i32.gt_u + (local.get $6) + (local.get $7) + ) + (block $label$break$L57 + (local.set $6 + (loop $while-in12 (result i32) + (br_if $label$break$L57 + (i32.load + (local.tee $8 + (i32.add + (local.get $6) + (i32.const -4) + ) + ) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $8) + (local.get $7) + ) + (block + (local.set $6 + (local.get $8) + ) + (br $while-in12) + ) + (local.get $8) + ) + ) + ) + ) + ) + (i32.store + (local.get $16) + (local.tee $8 + (i32.sub + (i32.load + (local.get $16) + ) + (local.get $9) + ) + ) + ) + (br_if $while-in7 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + ) + ) + (block + (local.set $8 + (local.get $7) + ) + (local.set $7 + (local.get $14) + ) + ) + ) + (local.set $13 + (select + (i32.const 6) + (local.get $3) + (i32.lt_s + (local.get $3) + (i32.const 0) + ) + ) + ) + (local.set $12 + (local.get $14) + ) + (if + (i32.lt_u + (local.tee $3 + (if (result i32) + (i32.lt_s + (local.get $8) + (i32.const 0) + ) + (block (result i32) + (local.set $19 + (i32.add + (i32.div_s + (i32.add + (local.get $13) + (i32.const 25) + ) + (i32.const 9) + ) + (i32.const 1) + ) + ) + (local.set $25 + (i32.eq + (local.get $24) + (i32.const 102) + ) + ) + (local.set $3 + (local.get $6) + ) + (loop $while-in14 (result i32) + (local.set $20 + (select + (local.tee $6 + (i32.sub + (i32.const 0) + (local.get $8) + ) + ) + (i32.const 9) + (i32.lt_s + (local.get $6) + (i32.const 9) + ) + ) + ) + (if + (i32.lt_u + (local.get $7) + (local.get $3) + ) + (block + (local.set $17 + (i32.add + (i32.shl + (i32.const 1) + (local.get $20) + ) + (i32.const -1) + ) + ) + (local.set $9 + (i32.shr_u + (i32.const 1000000000) + (local.get $20) + ) + ) + (local.set $8 + (i32.const 0) + ) + (local.set $6 + (local.get $7) + ) + (loop $while-in16 + (i32.store + (local.get $6) + (i32.add + (local.get $8) + (i32.shr_u + (local.tee $10 + (i32.load + (local.get $6) + ) + ) + (local.get $20) + ) + ) + ) + (local.set $8 + (i32.mul + (i32.and + (local.get $10) + (local.get $17) + ) + (local.get $9) + ) + ) + (br_if $while-in16 + (i32.lt_u + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 4) + ) + ) + (local.get $3) + ) + ) + ) + (local.set $7 + (select + (local.get $7) + (i32.add + (local.get $7) + (i32.const 4) + ) + (i32.load + (local.get $7) + ) + ) + ) + (if + (local.get $8) + (block + (i32.store + (local.get $3) + (local.get $8) + ) + (local.set $3 + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + ) + ) + ) + (local.set $7 + (select + (local.get $7) + (i32.add + (local.get $7) + (i32.const 4) + ) + (i32.load + (local.get $7) + ) + ) + ) + ) + (local.set $10 + (select + (i32.add + (local.tee $6 + (select + (local.get $14) + (local.get $7) + (local.get $25) + ) + ) + (i32.shl + (local.get $19) + (i32.const 2) + ) + ) + (local.get $3) + (i32.gt_s + (i32.shr_s + (i32.sub + (local.get $3) + (local.get $6) + ) + (i32.const 2) + ) + (local.get $19) + ) + ) + ) + (i32.store + (local.get $16) + (local.tee $8 + (i32.add + (i32.load + (local.get $16) + ) + (local.get $20) + ) + ) + ) + (if (result i32) + (i32.lt_s + (local.get $8) + (i32.const 0) + ) + (block + (local.set $3 + (local.get $10) + ) + (br $while-in14) + ) + (local.get $7) + ) + ) + ) + (block (result i32) + (local.set $10 + (local.get $6) + ) + (local.get $7) + ) + ) + ) + (local.get $10) + ) + (block + (local.set $7 + (i32.mul + (i32.shr_s + (i32.sub + (local.get $12) + (local.get $3) + ) + (i32.const 2) + ) + (i32.const 9) + ) + ) + (if + (i32.ge_u + (local.tee $8 + (i32.load + (local.get $3) + ) + ) + (i32.const 10) + ) + (block + (local.set $6 + (i32.const 10) + ) + (loop $while-in18 + (local.set $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + (br_if $while-in18 + (i32.ge_u + (local.get $8) + (local.tee $6 + (i32.mul + (local.get $6) + (i32.const 10) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $7 + (i32.const 0) + ) + ) + (local.set $17 + (if (result i32) + (i32.gt_u + (local.tee $3 + (if (result i32) + (i32.lt_s + (local.tee $6 + (i32.add + (i32.sub + (local.get $13) + (select + (i32.const 0) + (local.get $7) + (i32.eq + (local.get $24) + (i32.const 102) + ) + ) + ) + (i32.shr_s + (i32.shl + (i32.and + (local.tee $19 + (i32.eq + (local.get $24) + (i32.const 103) + ) + ) + (local.tee $25 + (i32.ne + (local.get $13) + (i32.const 0) + ) + ) + ) + (i32.const 31) + ) + (i32.const 31) + ) + ) + ) + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (local.get $10) + (local.get $12) + ) + (i32.const 2) + ) + (i32.const 9) + ) + (i32.const -9) + ) + ) + (block (result i32) + (local.set $17 + (i32.div_s + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 9216) + ) + ) + (i32.const 9) + ) + ) + (if + (i32.lt_s + (local.tee $6 + (i32.sub + (local.get $6) + (i32.mul + (local.get $17) + (i32.const 9) + ) + ) + ) + (i32.const 8) + ) + (block + (local.set $8 + (i32.const 10) + ) + (loop $while-in20 + (local.set $9 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (local.set $8 + (i32.mul + (local.get $8) + (i32.const 10) + ) + ) + (if + (i32.lt_s + (local.get $6) + (i32.const 7) + ) + (block + (local.set $6 + (local.get $9) + ) + (br $while-in20) + ) + ) + ) + ) + (local.set $8 + (i32.const 10) + ) + ) + (local.set $9 + (i32.div_u + (local.tee $24 + (i32.load + (local.tee $6 + (i32.add + (i32.add + (i32.shl + (local.get $17) + (i32.const 2) + ) + (local.get $14) + ) + (i32.const -4092) + ) + ) + ) + ) + (local.get $8) + ) + ) + (if + (i32.eqz + (i32.and + (local.tee $17 + (i32.eq + (i32.add + (local.get $6) + (i32.const 4) + ) + (local.get $10) + ) + ) + (i32.eqz + (local.tee $20 + (i32.sub + (local.get $24) + (i32.mul + (local.get $8) + (local.get $9) + ) + ) + ) + ) + ) + ) + (block + (local.set $1 + (select + (f64.const 9007199254740994) + (f64.const 9007199254740992) + (i32.and + (local.get $9) + (i32.const 1) + ) + ) + ) + (local.set $15 + (select + (f64.const 0.5) + (select + (f64.const 1) + (f64.const 1.5) + (i32.and + (local.get $17) + (i32.eq + (local.get $20) + (local.tee $9 + (i32.shr_u + (local.get $8) + (i32.const 1) + ) + ) + ) + ) + ) + (i32.lt_u + (local.get $20) + (local.get $9) + ) + ) + ) + (if + (local.get $23) + (block + (local.set $1 + (select + (f64.neg + (local.get $1) + ) + (local.get $1) + (local.tee $9 + (i32.eq + (i32.load8_s + (local.get $22) + ) + (i32.const 45) + ) + ) + ) + ) + (local.set $15 + (select + (f64.neg + (local.get $15) + ) + (local.get $15) + (local.get $9) + ) + ) + ) + ) + (i32.store + (local.get $6) + (local.tee $9 + (i32.sub + (local.get $24) + (local.get $20) + ) + ) + ) + (if + (f64.ne + (f64.add + (local.get $1) + (local.get $15) + ) + (local.get $1) + ) + (block + (i32.store + (local.get $6) + (local.tee $7 + (i32.add + (local.get $8) + (local.get $9) + ) + ) + ) + (if + (i32.gt_u + (local.get $7) + (i32.const 999999999) + ) + (loop $while-in22 + (i32.store + (local.get $6) + (i32.const 0) + ) + (if + (i32.lt_u + (local.tee $6 + (i32.add + (local.get $6) + (i32.const -4) + ) + ) + (local.get $3) + ) + (i32.store + (local.tee $3 + (i32.add + (local.get $3) + (i32.const -4) + ) + ) + (i32.const 0) + ) + ) + (i32.store + (local.get $6) + (local.tee $7 + (i32.add + (i32.load + (local.get $6) + ) + (i32.const 1) + ) + ) + ) + (br_if $while-in22 + (i32.gt_u + (local.get $7) + (i32.const 999999999) + ) + ) + ) + ) + (local.set $7 + (i32.mul + (i32.shr_s + (i32.sub + (local.get $12) + (local.get $3) + ) + (i32.const 2) + ) + (i32.const 9) + ) + ) + (if + (i32.ge_u + (local.tee $9 + (i32.load + (local.get $3) + ) + ) + (i32.const 10) + ) + (block + (local.set $8 + (i32.const 10) + ) + (loop $while-in24 + (local.set $7 + (i32.add + (local.get $7) + (i32.const 1) + ) + ) + (br_if $while-in24 + (i32.ge_u + (local.get $9) + (local.tee $8 + (i32.mul + (local.get $8) + (i32.const 10) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $8 + (local.get $3) + ) + (local.set $9 + (local.get $7) + ) + (select + (local.tee $3 + (i32.add + (local.get $6) + (i32.const 4) + ) + ) + (local.get $10) + (i32.gt_u + (local.get $10) + (local.get $3) + ) + ) + ) + (block (result i32) + (local.set $8 + (local.get $3) + ) + (local.set $9 + (local.get $7) + ) + (local.get $10) + ) + ) + ) + (local.get $8) + ) + (loop $while-in27 (result i32) + (block $label$break$L109 (result i32) + (if + (i32.load + (local.tee $7 + (i32.add + (local.get $3) + (i32.const -4) + ) + ) + ) + (block + (local.set $7 + (local.get $3) + ) + (br $label$break$L109 + (i32.const 1) + ) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $7) + (local.get $8) + ) + (block + (local.set $3 + (local.get $7) + ) + (br $while-in27) + ) + (i32.const 0) + ) + ) + ) + (block (result i32) + (local.set $7 + (local.get $3) + ) + (i32.const 0) + ) + ) + ) + (local.set $3 + (if (result i32) + (local.get $19) + (block (result i32) + (local.set $5 + (if (result i32) + (i32.and + (i32.gt_s + (local.tee $3 + (i32.add + (i32.xor + (local.get $25) + (i32.const 1) + ) + (local.get $13) + ) + ) + (local.get $9) + ) + (i32.gt_s + (local.get $9) + (i32.const -5) + ) + ) + (block (result i32) + (local.set $10 + (i32.sub + (i32.add + (local.get $3) + (i32.const -1) + ) + (local.get $9) + ) + ) + (i32.add + (local.get $5) + (i32.const -1) + ) + ) + (block (result i32) + (local.set $10 + (i32.add + (local.get $3) + (i32.const -1) + ) + ) + (i32.add + (local.get $5) + (i32.const -2) + ) + ) + ) + ) + (if (result i32) + (i32.and + (local.get $4) + (i32.const 8) + ) + (local.get $10) + (block (result i32) + (if + (local.get $17) + (if + (local.tee $13 + (i32.load + (i32.add + (local.get $7) + (i32.const -4) + ) + ) + ) + (if + (i32.rem_u + (local.get $13) + (i32.const 10) + ) + (local.set $3 + (i32.const 0) + ) + (block + (local.set $6 + (i32.const 10) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in31 + (local.set $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (br_if $while-in31 + (i32.eqz + (i32.rem_u + (local.get $13) + (local.tee $6 + (i32.mul + (local.get $6) + (i32.const 10) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $3 + (i32.const 9) + ) + ) + (local.set $3 + (i32.const 9) + ) + ) + (local.set $6 + (i32.add + (i32.mul + (i32.shr_s + (i32.sub + (local.get $7) + (local.get $12) + ) + (i32.const 2) + ) + (i32.const 9) + ) + (i32.const -9) + ) + ) + (if (result i32) + (i32.eq + (i32.or + (local.get $5) + (i32.const 32) + ) + (i32.const 102) + ) + (select + (local.get $10) + (local.tee $3 + (select + (local.tee $3 + (i32.sub + (local.get $6) + (local.get $3) + ) + ) + (i32.const 0) + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + ) + (i32.lt_s + (local.get $10) + (local.get $3) + ) + ) + (select + (local.get $10) + (local.tee $3 + (select + (local.tee $3 + (i32.sub + (i32.add + (local.get $6) + (local.get $9) + ) + (local.get $3) + ) + ) + (i32.const 0) + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + ) + (i32.lt_s + (local.get $10) + (local.get $3) + ) + ) + ) + ) + ) + ) + (local.get $13) + ) + ) + (local.set $6 + (i32.sub + (i32.const 0) + (local.get $9) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.tee $19 + (i32.add + (if (result i32) + (local.tee $13 + (i32.eq + (i32.or + (local.get $5) + (i32.const 32) + ) + (i32.const 102) + ) + ) + (block (result i32) + (local.set $10 + (i32.const 0) + ) + (select + (local.get $9) + (i32.const 0) + (i32.gt_s + (local.get $9) + (i32.const 0) + ) + ) + ) + (block (result i32) + (local.set $6 + (call $_fmt_u + (i64.extend_i32_s + (select + (local.get $6) + (local.get $9) + (i32.lt_s + (local.get $9) + (i32.const 0) + ) + ) + ) + (local.get $18) + ) + ) + (if + (i32.lt_s + (i32.sub + (local.tee $12 + (local.get $18) + ) + (local.get $6) + ) + (i32.const 2) + ) + (loop $while-in33 + (i32.store8 + (local.tee $6 + (i32.add + (local.get $6) + (i32.const -1) + ) + ) + (i32.const 48) + ) + (br_if $while-in33 + (i32.lt_s + (i32.sub + (local.get $12) + (local.get $6) + ) + (i32.const 2) + ) + ) + ) + ) + (i32.store8 + (i32.add + (local.get $6) + (i32.const -1) + ) + (i32.add + (i32.and + (i32.shr_s + (local.get $9) + (i32.const 31) + ) + (i32.const 2) + ) + (i32.const 43) + ) + ) + (i32.store8 + (local.tee $10 + (i32.add + (local.get $6) + (i32.const -2) + ) + ) + (local.get $5) + ) + (i32.sub + (local.get $12) + (local.get $10) + ) + ) + ) + (i32.add + (i32.add + (i32.add + (local.get $23) + (i32.const 1) + ) + (local.get $3) + ) + (select + (i32.const 1) + (i32.and + (i32.shr_u + (local.get $4) + (i32.const 3) + ) + (i32.const 1) + ) + (local.tee $12 + (i32.ne + (local.get $3) + (i32.const 0) + ) + ) + ) + ) + ) + ) + (local.get $4) + ) + (call $_out + (local.get $0) + (local.get $22) + (local.get $23) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (local.get $2) + (local.get $19) + (i32.xor + (local.get $4) + (i32.const 65536) + ) + ) + (if + (local.get $13) + (block + (local.set $9 + (local.tee $13 + (i32.add + (local.get $11) + (i32.const 9) + ) + ) + ) + (local.set $10 + (i32.add + (local.get $11) + (i32.const 8) + ) + ) + (local.set $6 + (local.tee $8 + (select + (local.get $14) + (local.get $8) + (i32.gt_u + (local.get $8) + (local.get $14) + ) + ) + ) + ) + (loop $while-in35 + (local.set $5 + (call $_fmt_u + (i64.extend_i32_u + (i32.load + (local.get $6) + ) + ) + (local.get $13) + ) + ) + (if + (i32.eq + (local.get $6) + (local.get $8) + ) + (if + (i32.eq + (local.get $5) + (local.get $13) + ) + (block + (i32.store8 + (local.get $10) + (i32.const 48) + ) + (local.set $5 + (local.get $10) + ) + ) + ) + (if + (i32.gt_u + (local.get $5) + (local.get $11) + ) + (block + (drop + (call $_memset + (local.get $11) + (i32.const 48) + (i32.sub + (local.get $5) + (local.get $21) + ) + ) + ) + (loop $while-in37 + (br_if $while-in37 + (i32.gt_u + (local.tee $5 + (i32.add + (local.get $5) + (i32.const -1) + ) + ) + (local.get $11) + ) + ) + ) + ) + ) + ) + (call $_out + (local.get $0) + (local.get $5) + (i32.sub + (local.get $9) + (local.get $5) + ) + ) + (if + (i32.le_u + (local.tee $5 + (i32.add + (local.get $6) + (i32.const 4) + ) + ) + (local.get $14) + ) + (block + (local.set $6 + (local.get $5) + ) + (br $while-in35) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.eqz + (i32.and + (local.get $4) + (i32.const 8) + ) + ) + (i32.xor + (local.get $12) + (i32.const 1) + ) + ) + ) + (call $_out + (local.get $0) + (i32.const 16678) + (i32.const 1) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (i32.add + (if (result i32) + (i32.and + (i32.lt_u + (local.get $5) + (local.get $7) + ) + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (loop $while-in39 (result i32) + (if + (i32.gt_u + (local.tee $6 + (call $_fmt_u + (i64.extend_i32_u + (i32.load + (local.get $5) + ) + ) + (local.get $13) + ) + ) + (local.get $11) + ) + (block + (drop + (call $_memset + (local.get $11) + (i32.const 48) + (i32.sub + (local.get $6) + (local.get $21) + ) + ) + ) + (loop $while-in41 + (br_if $while-in41 + (i32.gt_u + (local.tee $6 + (i32.add + (local.get $6) + (i32.const -1) + ) + ) + (local.get $11) + ) + ) + ) + ) + ) + (call $_out + (local.get $0) + (local.get $6) + (select + (local.get $3) + (i32.const 9) + (i32.lt_s + (local.get $3) + (i32.const 9) + ) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const -9) + ) + ) + (if (result i32) + (i32.and + (i32.lt_u + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + (local.get $7) + ) + (i32.gt_s + (local.get $3) + (i32.const 9) + ) + ) + (block + (local.set $3 + (local.get $6) + ) + (br $while-in39) + ) + (local.get $6) + ) + ) + (local.get $3) + ) + (i32.const 9) + ) + (i32.const 9) + (i32.const 0) + ) + ) + (block + (call $_pad_660 + (local.get $0) + (i32.const 48) + (i32.add + (if (result i32) + (i32.and + (i32.lt_u + (local.get $8) + (local.tee $17 + (select + (local.get $7) + (i32.add + (local.get $8) + (i32.const 4) + ) + (local.get $17) + ) + ) + ) + (i32.gt_s + (local.get $3) + (i32.const -1) + ) + ) + (block (result i32) + (local.set $13 + (i32.eqz + (i32.and + (local.get $4) + (i32.const 8) + ) + ) + ) + (local.set $12 + (local.tee $25 + (i32.add + (local.get $11) + (i32.const 9) + ) + ) + ) + (local.set $9 + (i32.sub + (i32.const 0) + (local.get $21) + ) + ) + (local.set $14 + (i32.add + (local.get $11) + (i32.const 8) + ) + ) + (local.set $7 + (local.get $8) + ) + (local.set $5 + (local.get $3) + ) + (loop $while-in43 (result i32) + (if + (i32.eq + (local.get $25) + (local.tee $3 + (call $_fmt_u + (i64.extend_i32_u + (i32.load + (local.get $7) + ) + ) + (local.get $25) + ) + ) + ) + (block + (i32.store8 + (local.get $14) + (i32.const 48) + ) + (local.set $3 + (local.get $14) + ) + ) + ) + (block $do-once44 + (if + (i32.eq + (local.get $7) + (local.get $8) + ) + (block + (local.set $6 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (call $_out + (local.get $0) + (local.get $3) + (i32.const 1) + ) + (if + (i32.and + (i32.lt_s + (local.get $5) + (i32.const 1) + ) + (local.get $13) + ) + (block + (local.set $3 + (local.get $6) + ) + (br $do-once44) + ) + ) + (call $_out + (local.get $0) + (i32.const 16678) + (i32.const 1) + ) + (local.set $3 + (local.get $6) + ) + ) + (block + (br_if $do-once44 + (i32.le_u + (local.get $3) + (local.get $11) + ) + ) + (drop + (call $_memset + (local.get $11) + (i32.const 48) + (i32.add + (local.get $3) + (local.get $9) + ) + ) + ) + (loop $while-in47 + (br_if $while-in47 + (i32.gt_u + (local.tee $3 + (i32.add + (local.get $3) + (i32.const -1) + ) + ) + (local.get $11) + ) + ) + ) + ) + ) + ) + (call $_out + (local.get $0) + (local.get $3) + (select + (local.tee $3 + (i32.sub + (local.get $12) + (local.get $3) + ) + ) + (local.get $5) + (i32.gt_s + (local.get $5) + (local.get $3) + ) + ) + ) + (br_if $while-in43 + (i32.and + (i32.lt_u + (local.tee $7 + (i32.add + (local.get $7) + (i32.const 4) + ) + ) + (local.get $17) + ) + (i32.gt_s + (local.tee $5 + (i32.sub + (local.get $5) + (local.get $3) + ) + ) + (i32.const -1) + ) + ) + ) + (local.get $5) + ) + ) + (local.get $3) + ) + (i32.const 18) + ) + (i32.const 18) + (i32.const 0) + ) + (call $_out + (local.get $0) + (local.get $10) + (i32.sub + (local.get $18) + (local.get $10) + ) + ) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $2) + (local.get $19) + (i32.xor + (local.get $4) + (i32.const 8192) + ) + ) + (local.get $19) + ) + ) + ) + (global.set $STACKTOP + (local.get $28) + ) + (select + (local.get $2) + (local.get $0) + (i32.lt_s + (local.get $0) + (local.get $2) + ) + ) + ) + (func $_pop_arg_long_double (; 562 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 f64) + (local.set $3 + (f64.load + (local.tee $2 + (i32.and + (i32.add + (i32.load + (local.get $1) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $1) + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (f64.store + (local.get $0) + (local.get $3) + ) + ) + (func $___vfprintf_internal (; 563 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 224) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 224) + ) + ) + (i64.store + (local.tee $4 + (i32.add + (local.get $3) + (i32.const 160) + ) + ) + (i64.const 0) + ) + (i64.store offset=8 + (local.get $4) + (i64.const 0) + ) + (i64.store offset=16 + (local.get $4) + (i64.const 0) + ) + (i64.store offset=24 + (local.get $4) + (i64.const 0) + ) + (i64.store offset=32 + (local.get $4) + (i64.const 0) + ) + (i32.store + (local.tee $5 + (i32.add + (local.get $3) + (i32.const 208) + ) + ) + (i32.load + (local.get $2) + ) + ) + (local.set $0 + (if (result i32) + (i32.lt_s + (call $_printf_core + (i32.const 0) + (local.get $1) + (local.get $5) + (local.tee $2 + (i32.add + (local.get $3) + (i32.const 80) + ) + ) + (local.get $4) + ) + (i32.const 0) + ) + (i32.const -1) + (block (result i32) + (drop + (if (result i32) + (i32.gt_s + (i32.atomic.load offset=76 + (local.get $0) + ) + (i32.const -1) + ) + (i32.const 1) + (i32.const 0) + ) + ) + (local.set $6 + (i32.load + (local.get $0) + ) + ) + (if + (i32.lt_s + (i32.load8_s offset=74 + (local.get $0) + ) + (i32.const 1) + ) + (i32.store + (local.get $0) + (i32.and + (local.get $6) + (i32.const -33) + ) + ) + ) + (if + (i32.load offset=48 + (local.get $0) + ) + (local.set $1 + (call $_printf_core + (local.get $0) + (local.get $1) + (local.get $5) + (local.get $2) + (local.get $4) + ) + ) + (block + (local.set $7 + (i32.load offset=44 + (local.get $0) + ) + ) + (i32.store offset=44 + (local.get $0) + (local.get $3) + ) + (i32.store offset=28 + (local.get $0) + (local.get $3) + ) + (i32.store offset=20 + (local.get $0) + (local.get $3) + ) + (i32.store offset=48 + (local.get $0) + (i32.const 80) + ) + (i32.store offset=16 + (local.get $0) + (i32.add + (local.get $3) + (i32.const 80) + ) + ) + (local.set $1 + (call $_printf_core + (local.get $0) + (local.get $1) + (local.get $5) + (local.get $2) + (local.get $4) + ) + ) + (if + (local.get $7) + (block + (drop + (call_indirect (type $FUNCSIG$iiii) + (local.get $0) + (i32.const 0) + (i32.const 0) + (i32.add + (i32.and + (i32.load offset=36 + (local.get $0) + ) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (local.set $1 + (select + (local.get $1) + (i32.const -1) + (i32.load offset=20 + (local.get $0) + ) + ) + ) + (i32.store offset=44 + (local.get $0) + (local.get $7) + ) + (i32.store offset=48 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=28 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 0) + ) + ) + ) + ) + ) + (i32.store + (local.get $0) + (i32.or + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + (i32.and + (local.get $6) + (i32.const 32) + ) + ) + ) + (select + (i32.const -1) + (local.get $1) + (i32.and + (local.get $0) + (i32.const 32) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (local.get $0) + ) + (func $_printf_core (; 564 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i64) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local.set $25 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $16 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.sub + (global.get $STACKTOP) + (i32.const -64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $9 + (i32.add + (local.get $16) + (i32.const 40) + ) + ) + (local.set $26 + (i32.add + (local.get $16) + (i32.const 48) + ) + ) + (local.set $22 + (i32.add + (local.get $16) + (i32.const 60) + ) + ) + (i32.store + (local.tee $11 + (i32.add + (local.get $16) + (i32.const 56) + ) + ) + (local.get $1) + ) + (local.set $18 + (i32.ne + (local.get $0) + (i32.const 0) + ) + ) + (local.set $19 + (local.tee $20 + (i32.add + (local.get $16) + (i32.const 40) + ) + ) + ) + (local.set $23 + (i32.add + (local.get $16) + (i32.const 39) + ) + ) + (local.set $1 + (i32.const 0) + ) + (block $label$break$L123 + (block $__rjti$10 + (loop $label$continue$L1 + (block $label$break$L1 + (loop $while-in + (if + (i32.gt_s + (local.get $8) + (i32.const -1) + ) + (local.set $8 + (if (result i32) + (i32.gt_s + (local.get $1) + (i32.sub + (i32.const 2147483647) + (local.get $8) + ) + ) + (block (result i32) + (i32.store + (call $___errno_location) + (i32.const 75) + ) + (i32.const -1) + ) + (i32.add + (local.get $1) + (local.get $8) + ) + ) + ) + ) + (br_if $__rjti$10 + (i32.eqz + (local.tee $6 + (i32.load8_s + (local.tee $10 + (i32.load + (local.get $11) + ) + ) + ) + ) + ) + ) + (local.set $1 + (local.get $10) + ) + (block $label$break$L15 + (block $__rjti$0 + (loop $label$continue$L12 + (block $label$break$L12 + (block $switch + (if + (local.tee $7 + (i32.shr_s + (i32.shl + (local.get $6) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (block + (br_if $switch + (i32.ne + (local.get $7) + (i32.const 37) + ) + ) + (br $__rjti$0) + ) + ) + (br $label$break$L12) + ) + (i32.store + (local.get $11) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + (local.set $6 + (i32.load8_s + (local.get $1) + ) + ) + (br $label$continue$L12) + ) + ) + (br $label$break$L15) + ) + (local.set $6 + (local.get $1) + ) + (loop $while-in3 + (br_if $label$break$L15 + (i32.ne + (i32.load8_s offset=1 + (local.get $6) + ) + (i32.const 37) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.store + (local.get $11) + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 2) + ) + ) + ) + (br_if $while-in3 + (i32.eq + (i32.load8_s + (local.get $6) + ) + (i32.const 37) + ) + ) + ) + ) + (local.set $1 + (i32.sub + (local.get $1) + (local.get $10) + ) + ) + (if + (local.get $18) + (call $_out + (local.get $0) + (local.get $10) + (local.get $1) + ) + ) + (br_if $while-in + (local.get $1) + ) + ) + (local.set $7 + (i32.eqz + (call $_isdigit + (i32.load8_s offset=1 + (i32.load + (local.get $11) + ) + ) + ) + ) + ) + (i32.store + (local.get $11) + (local.tee $1 + (i32.add + (local.tee $1 + (i32.load + (local.get $11) + ) + ) + (if (result i32) + (local.get $7) + (block (result i32) + (local.set $17 + (i32.const -1) + ) + (i32.const 1) + ) + (if (result i32) + (i32.eq + (i32.load8_s offset=2 + (local.get $1) + ) + (i32.const 36) + ) + (block (result i32) + (local.set $17 + (i32.add + (i32.load8_s offset=1 + (local.get $1) + ) + (i32.const -48) + ) + ) + (local.set $5 + (i32.const 1) + ) + (i32.const 3) + ) + (block (result i32) + (local.set $17 + (i32.const -1) + ) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (if + (i32.or + (i32.gt_u + (local.tee $6 + (i32.add + (local.tee $7 + (i32.load8_s + (local.get $1) + ) + ) + (i32.const -32) + ) + ) + (i32.const 31) + ) + (i32.eqz + (i32.and + (i32.shl + (i32.const 1) + (local.get $6) + ) + (i32.const 75913) + ) + ) + ) + (local.set $6 + (i32.const 0) + ) + (block + (local.set $7 + (i32.const 0) + ) + (loop $while-in5 + (local.set $6 + (i32.or + (local.get $7) + (i32.shl + (i32.const 1) + (local.get $6) + ) + ) + ) + (i32.store + (local.get $11) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + (if + (i32.eqz + (i32.or + (i32.gt_u + (local.tee $12 + (i32.add + (local.tee $7 + (i32.load8_s + (local.get $1) + ) + ) + (i32.const -32) + ) + ) + (i32.const 31) + ) + (i32.eqz + (i32.and + (i32.shl + (i32.const 1) + (local.get $12) + ) + (i32.const 75913) + ) + ) + ) + ) + (block + (local.set $7 + (local.get $6) + ) + (local.set $6 + (local.get $12) + ) + (br $while-in5) + ) + ) + ) + ) + ) + (local.set $24 + (if (result i32) + (i32.eq + (i32.and + (local.get $7) + (i32.const 255) + ) + (i32.const 42) + ) + (block (result i32) + (local.set $5 + (block $__rjto$1 (result i32) + (block $__rjti$1 + (br_if $__rjti$1 + (i32.eqz + (call $_isdigit + (i32.load8_s offset=1 + (local.get $1) + ) + ) + ) + ) + (br_if $__rjti$1 + (i32.ne + (i32.load8_s offset=2 + (local.tee $1 + (i32.load + (local.get $11) + ) + ) + ) + (i32.const 36) + ) + ) + (i32.store + (i32.add + (i32.shl + (i32.add + (i32.load8_s offset=1 + (local.get $1) + ) + (i32.const -48) + ) + (i32.const 2) + ) + (local.get $4) + ) + (i32.const 10) + ) + (local.set $13 + (i32.const 1) + ) + (local.set $7 + (i32.add + (local.get $1) + (i32.const 3) + ) + ) + (br $__rjto$1 + (i32.wrap_i64 + (i64.load + (i32.add + (i32.shl + (i32.add + (i32.load8_s offset=1 + (local.get $1) + ) + (i32.const -48) + ) + (i32.const 3) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (local.get $5) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $18) + (block + (local.set $1 + (i32.load + (local.tee $5 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $7 + (i32.add + (i32.load + (local.get $11) + ) + (i32.const 1) + ) + ) + (local.get $1) + ) + ) + (i32.store + (local.get $11) + (local.get $7) + ) + (local.set $1 + (local.get $7) + ) + (local.set $14 + (select + (i32.or + (local.get $6) + (i32.const 8192) + ) + (local.get $6) + (local.tee $7 + (i32.lt_s + (local.get $5) + (i32.const 0) + ) + ) + ) + ) + (local.set $15 + (select + (i32.sub + (i32.const 0) + (local.get $5) + ) + (local.get $5) + (local.get $7) + ) + ) + (local.get $13) + ) + (block (result i32) + (if + (i32.lt_s + (local.tee $15 + (call $_getint + (local.get $11) + ) + ) + (i32.const 0) + ) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (local.set $1 + (i32.load + (local.get $11) + ) + ) + (local.set $14 + (local.get $6) + ) + (local.get $5) + ) + ) + ) + (if + (i32.eq + (i32.load8_s + (local.get $1) + ) + (i32.const 46) + ) + (block $do-once6 + (local.set $5 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (if + (i32.ne + (i32.load8_s offset=1 + (local.get $1) + ) + (i32.const 42) + ) + (block + (i32.store + (local.get $11) + (local.get $5) + ) + (local.set $1 + (call $_getint + (local.get $11) + ) + ) + (local.set $5 + (i32.load + (local.get $11) + ) + ) + (br $do-once6) + ) + ) + (if + (call $_isdigit + (i32.load8_s offset=2 + (local.get $1) + ) + ) + (if + (i32.eq + (i32.load8_s offset=3 + (local.tee $5 + (i32.load + (local.get $11) + ) + ) + ) + (i32.const 36) + ) + (block + (i32.store + (i32.add + (i32.shl + (i32.add + (i32.load8_s offset=2 + (local.get $5) + ) + (i32.const -48) + ) + (i32.const 2) + ) + (local.get $4) + ) + (i32.const 10) + ) + (local.set $1 + (i32.wrap_i64 + (i64.load + (i32.add + (i32.shl + (i32.add + (i32.load8_s offset=2 + (local.get $5) + ) + (i32.const -48) + ) + (i32.const 3) + ) + (local.get $3) + ) + ) + ) + ) + (i32.store + (local.get $11) + (local.tee $5 + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + ) + (br $do-once6) + ) + ) + ) + (if + (local.get $24) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (if + (local.get $18) + (block + (local.set $1 + (i32.load + (local.tee $5 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $5) + (i32.const 4) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (i32.store + (local.get $11) + (local.tee $5 + (i32.add + (i32.load + (local.get $11) + ) + (i32.const 2) + ) + ) + ) + ) + (block + (local.set $5 + (local.get $1) + ) + (local.set $1 + (i32.const -1) + ) + ) + ) + (local.set $12 + (i32.const 0) + ) + (loop $while-in9 + (if + (i32.gt_u + (i32.add + (i32.load8_s + (local.get $5) + ) + (i32.const -65) + ) + (i32.const 57) + ) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (i32.store + (local.get $11) + (local.tee $7 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + ) + (if + (i32.lt_u + (i32.add + (local.tee $6 + (i32.and + (local.tee $5 + (i32.load8_s + (i32.add + (i32.add + (i32.load8_s + (local.get $5) + ) + (i32.mul + (local.get $12) + (i32.const 58) + ) + ) + (i32.const 7679) + ) + ) + ) + (i32.const 255) + ) + ) + (i32.const -1) + ) + (i32.const 8) + ) + (block + (local.set $5 + (local.get $7) + ) + (local.set $12 + (local.get $6) + ) + (br $while-in9) + ) + ) + ) + (if + (i32.eqz + (local.get $5) + ) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (local.set $13 + (i32.gt_s + (local.get $17) + (i32.const -1) + ) + ) + (block $label$break$L77 + (block $__rjti$9 + (if + (i32.eq + (local.get $5) + (i32.const 19) + ) + (if + (local.get $13) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + (block $__rjti$8 + (if + (local.get $13) + (block + (i32.store + (i32.add + (i32.shl + (local.get $17) + (i32.const 2) + ) + (local.get $4) + ) + (local.get $6) + ) + (i64.store + (local.get $9) + (i64.load + (i32.add + (i32.shl + (local.get $17) + (i32.const 3) + ) + (local.get $3) + ) + ) + ) + (br $__rjti$8) + ) + ) + (if + (i32.eqz + (local.get $18) + ) + (block + (local.set $8 + (i32.const 0) + ) + (br $label$break$L1) + ) + ) + (call $_pop_arg + (local.get $9) + (local.get $6) + (local.get $2) + ) + (local.set $7 + (i32.load + (local.get $11) + ) + ) + (br $__rjti$9) + ) + ) + (br_if $__rjti$9 + (local.get $18) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (local.set $5 + (select + (local.tee $6 + (i32.and + (local.get $14) + (i32.const -65537) + ) + ) + (local.get $14) + (i32.and + (local.get $14) + (i32.const 8192) + ) + ) + ) + (block $__rjto$7 + (block $__rjti$7 + (block $__rjti$6 + (block $__rjti$5 + (block $__rjti$4 + (block $__rjti$3 + (block $switch-default44 + (block $switch-case43 + (block $switch-case35 + (block $switch-case34 + (block $switch-case33 + (block $switch-case32 + (block $switch-case31 + (block $switch-case30 + (block $switch-case28 + (block $switch-case25 + (block $switch-case24 + (br_table $switch-case43 $switch-default44 $switch-case34 $switch-default44 $switch-case43 $switch-case43 $switch-case43 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case35 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $__rjti$3 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case43 $switch-default44 $switch-case32 $switch-case30 $switch-case43 $switch-case43 $switch-case43 $switch-default44 $switch-case30 $switch-default44 $switch-default44 $switch-default44 $switch-default44 $switch-case24 $switch-case28 $switch-case25 $switch-default44 $switch-default44 $switch-case33 $switch-default44 $switch-case31 $switch-default44 $switch-default44 $__rjti$3 $switch-default44 + (i32.sub + (local.tee $7 + (select + (i32.and + (local.tee $7 + (i32.load8_s + (i32.add + (local.get $7) + (i32.const -1) + ) + ) + ) + (i32.const -33) + ) + (local.get $7) + (i32.and + (i32.eq + (i32.and + (local.get $7) + (i32.const 15) + ) + (i32.const 3) + ) + (i32.ne + (local.get $12) + (i32.const 0) + ) + ) + ) + ) + (i32.const 65) + ) + ) + ) + (block $switch-default23 + (block $switch-case22 + (block $switch-case21 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (block $switch-case16 + (br_table $switch-case16 $switch-case17 $switch-case18 $switch-case19 $switch-case20 $switch-default23 $switch-case21 $switch-case22 $switch-default23 + (i32.shr_s + (i32.shl + (i32.and + (local.get $12) + (i32.const 255) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.load + (local.get $9) + ) + (local.get $8) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i32.store + (i32.load + (local.get $9) + ) + (local.get $8) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i64.store + (i32.load + (local.get $9) + ) + (i64.extend_i32_s + (local.get $8) + ) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i32.store16 + (i32.load + (local.get $9) + ) + (local.get $8) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i32.store8 + (i32.load + (local.get $9) + ) + (local.get $8) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i32.store + (i32.load + (local.get $9) + ) + (local.get $8) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (i64.store + (i32.load + (local.get $9) + ) + (i64.extend_i32_s + (local.get $8) + ) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (local.set $1 + (i32.const 0) + ) + (br $label$break$L77) + ) + (local.set $5 + (i32.or + (local.get $5) + (i32.const 8) + ) + ) + (local.set $1 + (select + (local.get $1) + (i32.const 8) + (i32.gt_u + (local.get $1) + (i32.const 8) + ) + ) + ) + (local.set $7 + (i32.const 120) + ) + (br $__rjti$3) + ) + (local.set $7 + (i32.sub + (local.get $19) + (local.tee $14 + (call $_fmt_o + (i64.load + (local.get $9) + ) + (local.get $20) + ) + ) + ) + ) + (local.set $6 + (local.get $5) + ) + (local.set $1 + (select + (local.get $1) + (i32.add + (local.get $7) + (i32.const 1) + ) + (i32.or + (i32.eqz + (i32.and + (local.get $5) + (i32.const 8) + ) + ) + (i32.gt_s + (local.get $1) + (local.get $7) + ) + ) + ) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $12 + (i32.const 16626) + ) + (br $__rjti$6) + ) + (local.set $12 + (if (result i32) + (i64.lt_s + (local.tee $21 + (i64.load + (local.get $9) + ) + ) + (i64.const 0) + ) + (block (result i32) + (i64.store + (local.get $9) + (local.tee $21 + (i64.sub + (i64.const 0) + (local.get $21) + ) + ) + ) + (local.set $13 + (i32.const 1) + ) + (i32.const 16626) + ) + (block (result i32) + (local.set $13 + (i32.ne + (i32.and + (local.get $5) + (i32.const 2049) + ) + (i32.const 0) + ) + ) + (select + (i32.const 16627) + (select + (i32.const 16628) + (i32.const 16626) + (i32.and + (local.get $5) + (i32.const 1) + ) + ) + (i32.and + (local.get $5) + (i32.const 2048) + ) + ) + ) + ) + ) + (br $__rjti$4) + ) + (local.set $21 + (i64.load + (local.get $9) + ) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $12 + (i32.const 16626) + ) + (br $__rjti$4) + ) + (i64.store8 + (local.get $23) + (i64.load + (local.get $9) + ) + ) + (local.set $7 + (local.get $23) + ) + (local.set $5 + (local.get $6) + ) + (local.set $6 + (i32.const 1) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $12 + (i32.const 16626) + ) + (local.set $1 + (local.get $19) + ) + (br $__rjto$7) + ) + (local.set $14 + (i32.eqz + (local.tee $10 + (call $_memchr + (local.tee $7 + (select + (local.tee $5 + (i32.load + (local.get $9) + ) + ) + (i32.const 16636) + (local.get $5) + ) + ) + (local.get $1) + ) + ) + ) + ) + (local.set $5 + (local.get $6) + ) + (local.set $6 + (select + (local.get $1) + (i32.sub + (local.get $10) + (local.get $7) + ) + (local.get $14) + ) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $12 + (i32.const 16626) + ) + (local.set $1 + (select + (i32.add + (local.get $1) + (local.get $7) + ) + (local.get $10) + (local.get $14) + ) + ) + (br $__rjto$7) + ) + (i64.store32 offset=48 + (local.get $16) + (i64.load + (local.get $9) + ) + ) + (i32.store offset=52 + (local.get $16) + (i32.const 0) + ) + (i32.store + (local.get $9) + (local.get $26) + ) + (local.set $6 + (i32.const -1) + ) + (br $__rjti$5) + ) + (if + (local.get $1) + (block + (local.set $6 + (local.get $1) + ) + (br $__rjti$5) + ) + (block + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $15) + (i32.const 0) + (local.get $5) + ) + (local.set $1 + (i32.const 0) + ) + (br $__rjti$7) + ) + ) + ) + (local.set $1 + (call_indirect (type $FUNCSIG$iidiiii) + (local.get $0) + (f64.load + (local.get $9) + ) + (local.get $15) + (local.get $1) + (local.get $5) + (local.get $7) + (i32.const 53) + ) + ) + (br $label$break$L77) + ) + (local.set $7 + (local.get $10) + ) + (local.set $6 + (local.get $1) + ) + (local.set $13 + (i32.const 0) + ) + (local.set $12 + (i32.const 16626) + ) + (local.set $1 + (local.get $19) + ) + (br $__rjto$7) + ) + (local.set $14 + (call $_fmt_x + (i64.load + (local.get $9) + ) + (local.get $20) + (i32.and + (local.get $7) + (i32.const 32) + ) + ) + ) + (local.set $13 + (select + (i32.const 0) + (i32.const 2) + (local.tee $5 + (i32.or + (i32.eqz + (i32.and + (local.tee $6 + (local.get $5) + ) + (i32.const 8) + ) + ) + (i64.eq + (i64.load + (local.get $9) + ) + (i64.const 0) + ) + ) + ) + ) + ) + (local.set $12 + (select + (i32.const 16626) + (i32.add + (i32.shr_u + (local.get $7) + (i32.const 4) + ) + (i32.const 16626) + ) + (local.get $5) + ) + ) + (br $__rjti$6) + ) + (local.set $14 + (call $_fmt_u + (local.get $21) + (local.get $20) + ) + ) + (local.set $6 + (local.get $5) + ) + (br $__rjti$6) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $7 + (i32.load + (local.get $9) + ) + ) + (block $__rjto$2 + (block $__rjti$2 + (loop $while-in47 + (if + (local.tee $10 + (i32.load + (local.get $7) + ) + ) + (block + (br_if $__rjti$2 + (i32.or + (local.tee $12 + (i32.lt_s + (local.tee $10 + (call $_wctomb + (local.get $22) + (local.get $10) + ) + ) + (i32.const 0) + ) + ) + (i32.gt_u + (local.get $10) + (i32.sub + (local.get $6) + (local.get $1) + ) + ) + ) + ) + (local.set $7 + (i32.add + (local.get $7) + (i32.const 4) + ) + ) + (br_if $while-in47 + (i32.gt_u + (local.get $6) + (local.tee $1 + (i32.add + (local.get $1) + (local.get $10) + ) + ) + ) + ) + ) + ) + ) + (br $__rjto$2) + ) + (if + (local.get $12) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L1) + ) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $15) + (local.get $1) + (local.get $5) + ) + (if + (local.get $1) + (block + (local.set $6 + (i32.const 0) + ) + (local.set $7 + (i32.load + (local.get $9) + ) + ) + (loop $while-in49 + (br_if $__rjti$7 + (i32.eqz + (local.tee $10 + (i32.load + (local.get $7) + ) + ) + ) + ) + (br_if $__rjti$7 + (i32.gt_s + (local.tee $6 + (i32.add + (local.tee $10 + (call $_wctomb + (local.get $22) + (local.get $10) + ) + ) + (local.get $6) + ) + ) + (local.get $1) + ) + ) + (local.set $7 + (i32.add + (local.get $7) + (i32.const 4) + ) + ) + (call $_out + (local.get $0) + (local.get $22) + (local.get $10) + ) + (br_if $while-in49 + (i32.lt_u + (local.get $6) + (local.get $1) + ) + ) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (br $__rjti$7) + ) + (local.set $7 + (select + (local.get $14) + (local.get $20) + (local.tee $17 + (i32.or + (local.tee $10 + (i64.ne + (i64.load + (local.get $9) + ) + (i64.const 0) + ) + ) + (i32.ne + (local.get $1) + (i32.const 0) + ) + ) + ) + ) + ) + (local.set $5 + (select + (i32.and + (local.get $6) + (i32.const -65537) + ) + (local.get $6) + (i32.gt_s + (local.get $1) + (i32.const -1) + ) + ) + ) + (local.set $6 + (select + (select + (local.get $1) + (local.tee $6 + (i32.add + (i32.sub + (local.get $19) + (local.get $14) + ) + (i32.xor + (local.get $10) + (i32.const 1) + ) + ) + ) + (i32.gt_s + (local.get $1) + (local.get $6) + ) + ) + (i32.const 0) + (local.get $17) + ) + ) + (local.set $1 + (local.get $19) + ) + (br $__rjto$7) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $15) + (local.get $1) + (i32.xor + (local.get $5) + (i32.const 8192) + ) + ) + (local.set $1 + (select + (local.get $15) + (local.get $1) + (i32.gt_s + (local.get $15) + (local.get $1) + ) + ) + ) + (br $label$break$L77) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.tee $1 + (select + (local.tee $6 + (i32.add + (local.get $13) + (local.tee $14 + (select + (local.tee $10 + (i32.sub + (local.get $1) + (local.get $7) + ) + ) + (local.get $6) + (i32.lt_s + (local.get $6) + (local.get $10) + ) + ) + ) + ) + ) + (local.get $15) + (i32.lt_s + (local.get $15) + (local.get $6) + ) + ) + ) + (local.get $6) + (local.get $5) + ) + (call $_out + (local.get $0) + (local.get $12) + (local.get $13) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (local.get $1) + (local.get $6) + (i32.xor + (local.get $5) + (i32.const 65536) + ) + ) + (call $_pad_660 + (local.get $0) + (i32.const 48) + (local.get $14) + (local.get $10) + (i32.const 0) + ) + (call $_out + (local.get $0) + (local.get $7) + (local.get $10) + ) + (call $_pad_660 + (local.get $0) + (i32.const 32) + (local.get $1) + (local.get $6) + (i32.xor + (local.get $5) + (i32.const 8192) + ) + ) + ) + (local.set $5 + (local.get $24) + ) + (br $label$continue$L1) + ) + ) + (br $label$break$L123) + ) + (if + (i32.eqz + (local.get $0) + ) + (local.set $8 + (if (result i32) + (local.get $5) + (block (result i32) + (local.set $0 + (i32.const 1) + ) + (loop $while-in52 + (if + (local.tee $1 + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $4) + ) + ) + ) + (block + (call $_pop_arg + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (local.get $3) + ) + (local.get $1) + (local.get $2) + ) + (br_if $while-in52 + (i32.lt_u + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 10) + ) + ) + (local.set $8 + (i32.const 1) + ) + (br $label$break$L123) + ) + ) + ) + (loop $while-in54 (result i32) + (if + (i32.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (local.get $4) + ) + ) + (block + (local.set $8 + (i32.const -1) + ) + (br $label$break$L123) + ) + ) + (br_if $while-in54 + (i32.lt_u + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 10) + ) + ) + (i32.const 1) + ) + ) + (i32.const 0) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $25) + ) + (local.get $8) + ) + (func $_out (; 565 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (if + (i32.eqz + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 32) + ) + ) + (drop + (call $___fwritex + (local.get $1) + (local.get $2) + (local.get $0) + ) + ) + ) + ) + (func $_getint (; 566 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (if + (call $_isdigit + (i32.load8_s + (i32.load + (local.get $0) + ) + ) + ) + (loop $while-in + (local.set $1 + (i32.add + (i32.load8_s + (local.tee $2 + (i32.load + (local.get $0) + ) + ) + ) + (i32.add + (i32.mul + (local.get $1) + (i32.const 10) + ) + (i32.const -48) + ) + ) + ) + (i32.store + (local.get $0) + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (br_if $while-in + (call $_isdigit + (i32.load8_s offset=1 + (local.get $2) + ) + ) + ) + ) + ) + (local.get $1) + ) + (func $_pop_arg (; 567 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 f64) + (if + (i32.le_u + (local.get $1) + (i32.const 20) + ) + (block $label$break$L1 + (block $switch-case9 + (block $switch-case8 + (block $switch-case7 + (block $switch-case6 + (block $switch-case5 + (block $switch-case4 + (block $switch-case3 + (block $switch-case2 + (block $switch-case1 + (block $switch-case + (br_table $switch-case $switch-case1 $switch-case2 $switch-case3 $switch-case4 $switch-case5 $switch-case6 $switch-case7 $switch-case8 $switch-case9 $label$break$L1 + (i32.sub + (local.get $1) + (i32.const 9) + ) + ) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i32.store + (local.get $0) + (local.get $3) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_s + (local.get $3) + ) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_u + (local.get $3) + ) + ) + (br $label$break$L1) + ) + (local.set $4 + (i64.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (i64.store + (local.get $0) + (local.get $4) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_s + (i32.shr_s + (i32.shl + (i32.and + (local.get $3) + (i32.const 65535) + ) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_u + (i32.and + (local.get $3) + (i32.const 65535) + ) + ) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_s + (i32.shr_s + (i32.shl + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) + (br $label$break$L1) + ) + (local.set $3 + (i32.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i64.store + (local.get $0) + (i64.extend_i32_u + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + ) + (br $label$break$L1) + ) + (local.set $5 + (f64.load + (local.tee $1 + (i32.and + (i32.add + (i32.load + (local.get $2) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $2) + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (f64.store + (local.get $0) + (local.get $5) + ) + (br $label$break$L1) + ) + (call_indirect (type $FUNCSIG$vii) + (local.get $0) + (local.get $2) + (i32.const 164) + ) + ) + ) + ) + (func $_fmt_x (; 568 ;) (; has Stack IR ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (if + (i64.ne + (local.get $0) + (i64.const 0) + ) + (loop $while-in + (i32.store8 + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.or + (local.get $2) + (i32.load8_u + (i32.add + (i32.and + (i32.wrap_i64 + (local.get $0) + ) + (i32.const 15) + ) + (i32.const 8208) + ) + ) + ) + ) + (br_if $while-in + (i64.ne + (local.tee $0 + (i64.shr_u + (local.get $0) + (i64.const 4) + ) + ) + (i64.const 0) + ) + ) + ) + ) + (local.get $1) + ) + (func $_fmt_o (; 569 ;) (; has Stack IR ;) (param $0 i64) (param $1 i32) (result i32) + (if + (i64.ne + (local.get $0) + (i64.const 0) + ) + (loop $while-in + (i32.store8 + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.or + (i32.and + (i32.wrap_i64 + (local.get $0) + ) + (i32.const 7) + ) + (i32.const 48) + ) + ) + (br_if $while-in + (i64.ne + (local.tee $0 + (i64.shr_u + (local.get $0) + (i64.const 3) + ) + ) + (i64.const 0) + ) + ) + ) + ) + (local.get $1) + ) + (func $_fmt_u (; 570 ;) (; has Stack IR ;) (param $0 i64) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local.set $2 + (i32.wrap_i64 + (local.get $0) + ) + ) + (if + (i64.gt_u + (local.get $0) + (i64.const 4294967295) + ) + (block + (loop $while-in + (i32.store8 + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.or + (i32.and + (i32.wrap_i64 + (i64.sub + (local.get $0) + (i64.mul + (local.tee $3 + (i64.div_u + (local.get $0) + (i64.const 10) + ) + ) + (i64.const 10) + ) + ) + ) + (i32.const 255) + ) + (i32.const 48) + ) + ) + (if + (i64.gt_u + (local.get $0) + (i64.const 42949672959) + ) + (block + (local.set $0 + (local.get $3) + ) + (br $while-in) + ) + ) + ) + (local.set $2 + (i32.wrap_i64 + (local.get $3) + ) + ) + ) + ) + (if + (local.get $2) + (loop $while-in1 + (i32.store8 + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.or + (i32.sub + (local.get $2) + (i32.mul + (local.tee $4 + (i32.div_u + (local.get $2) + (i32.const 10) + ) + ) + (i32.const 10) + ) + ) + (i32.const 48) + ) + ) + (if + (i32.ge_u + (local.get $2) + (i32.const 10) + ) + (block + (local.set $2 + (local.get $4) + ) + (br $while-in1) + ) + ) + ) + ) + (local.get $1) + ) + (func $_memchr (; 571 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (block $__rjto$3 + (block $__rjti$3 + (block $__rjti$2 + (if + (i32.and + (local.tee $2 + (i32.ne + (local.get $1) + (i32.const 0) + ) + ) + (i32.ne + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 0) + ) + ) + (loop $while-in + (br_if $__rjti$2 + (i32.eqz + (i32.load8_u + (local.get $0) + ) + ) + ) + (br_if $while-in + (i32.and + (local.tee $2 + (i32.ne + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.const 0) + ) + ) + (i32.ne + (i32.and + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 3) + ) + (i32.const 0) + ) + ) + ) + ) + ) + (br_if $__rjti$3 + (i32.eqz + (local.get $2) + ) + ) + ) + (if + (i32.eqz + (i32.load8_u + (local.get $0) + ) + ) + (block + (br_if $__rjti$3 + (i32.eqz + (local.get $1) + ) + ) + (br $__rjto$3) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.le_u + (local.get $1) + (i32.const 3) + ) + ) + (loop $while-in3 + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $2 + (i32.load + (local.get $0) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $2) + (i32.const -16843009) + ) + ) + ) + (block + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (br_if $while-in3 + (i32.gt_u + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -4) + ) + ) + (i32.const 3) + ) + ) + (br $__rjti$0) + ) + ) + ) + (br $__rjto$0) + ) + (br_if $__rjti$3 + (i32.eqz + (local.get $1) + ) + ) + ) + (loop $while-in5 + (br_if $__rjto$3 + (i32.eqz + (i32.load8_u + (local.get $0) + ) + ) + ) + (br_if $__rjti$3 + (i32.eqz + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br $while-in5) + ) + ) + (local.set $0 + (i32.const 0) + ) + ) + (local.get $0) + ) + (func $_pad_660 (; 572 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 256) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 256) + ) + ) + (if + (i32.and + (i32.eqz + (i32.and + (local.get $4) + (i32.const 73728) + ) + ) + (i32.gt_s + (local.get $2) + (local.get $3) + ) + ) + (block + (drop + (call $_memset + (local.get $5) + (i32.shr_s + (i32.shl + (local.get $1) + (i32.const 24) + ) + (i32.const 24) + ) + (select + (local.tee $1 + (i32.sub + (local.get $2) + (local.get $3) + ) + ) + (i32.const 256) + (i32.lt_u + (local.get $1) + (i32.const 256) + ) + ) + ) + ) + (if + (i32.gt_u + (local.get $1) + (i32.const 255) + ) + (block + (local.set $2 + (i32.sub + (local.get $2) + (local.get $3) + ) + ) + (loop $while-in + (call $_out + (local.get $0) + (local.get $5) + (i32.const 256) + ) + (br_if $while-in + (i32.gt_u + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -256) + ) + ) + (i32.const 255) + ) + ) + ) + (local.set $1 + (i32.and + (local.get $2) + (i32.const 255) + ) + ) + ) + ) + (call $_out + (local.get $0) + (local.get $5) + (local.get $1) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + ) + (func $_wctomb (; 573 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (if (result i32) + (local.get $0) + (call $_wcrtomb + (local.get $0) + (local.get $1) + ) + (i32.const 0) + ) + ) + (func $_wcrtomb (; 574 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (if (result i32) + (local.get $0) + (block $do-once (result i32) + (if + (i32.lt_u + (local.get $1) + (i32.const 128) + ) + (block + (i32.store8 + (local.get $0) + (local.get $1) + ) + (br $do-once + (i32.const 1) + ) + ) + ) + (if + (i32.eqz + (i32.atomic.load + (i32.load offset=188 + (global.get $__pthread_ptr) + ) + ) + ) + (if + (i32.eq + (i32.and + (local.get $1) + (i32.const -128) + ) + (i32.const 57216) + ) + (block + (i32.store8 + (local.get $0) + (local.get $1) + ) + (br $do-once + (i32.const 1) + ) + ) + (block + (i32.store + (call $___errno_location) + (i32.const 84) + ) + (br $do-once + (i32.const -1) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $1) + (i32.const 2048) + ) + (block + (i32.store8 + (local.get $0) + (i32.or + (i32.shr_u + (local.get $1) + (i32.const 6) + ) + (i32.const 192) + ) + ) + (i32.store8 offset=1 + (local.get $0) + (i32.or + (i32.and + (local.get $1) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (br $do-once + (i32.const 2) + ) + ) + ) + (if + (i32.or + (i32.eq + (i32.and + (local.get $1) + (i32.const -8192) + ) + (i32.const 57344) + ) + (i32.lt_u + (local.get $1) + (i32.const 55296) + ) + ) + (block + (i32.store8 + (local.get $0) + (i32.or + (i32.shr_u + (local.get $1) + (i32.const 12) + ) + (i32.const 224) + ) + ) + (i32.store8 offset=1 + (local.get $0) + (i32.or + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 6) + ) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (i32.store8 offset=2 + (local.get $0) + (i32.or + (i32.and + (local.get $1) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (br $do-once + (i32.const 3) + ) + ) + ) + (if (result i32) + (i32.lt_u + (i32.add + (local.get $1) + (i32.const -65536) + ) + (i32.const 1048576) + ) + (block (result i32) + (i32.store8 + (local.get $0) + (i32.or + (i32.shr_u + (local.get $1) + (i32.const 18) + ) + (i32.const 240) + ) + ) + (i32.store8 offset=1 + (local.get $0) + (i32.or + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 12) + ) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (i32.store8 offset=2 + (local.get $0) + (i32.or + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 6) + ) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (i32.store8 offset=3 + (local.get $0) + (i32.or + (i32.and + (local.get $1) + (i32.const 63) + ) + (i32.const 128) + ) + ) + (i32.const 4) + ) + (block (result i32) + (i32.store + (call $___errno_location) + (i32.const 84) + ) + (i32.const -1) + ) + ) + ) + (i32.const 1) + ) + ) + (func $___fwritex (; 575 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (block $label$break$L5 + (block $__rjti$0 + (br_if $__rjti$0 + (local.tee $3 + (i32.load offset=16 + (local.get $2) + ) + ) + ) + (local.set $4 + (if (result i32) + (call $___towrite + (local.get $2) + ) + (i32.const 0) + (block + (local.set $3 + (i32.load offset=16 + (local.get $2) + ) + ) + (br $__rjti$0) + ) + ) + ) + (br $label$break$L5) + ) + (if + (i32.lt_u + (i32.sub + (local.get $3) + (local.tee $4 + (i32.load offset=20 + (local.get $2) + ) + ) + ) + (local.get $1) + ) + (block + (local.set $3 + (i32.load offset=36 + (local.get $2) + ) + ) + (local.set $4 + (call_indirect (type $FUNCSIG$iiii) + (local.get $2) + (local.get $0) + (local.get $1) + (i32.add + (i32.and + (local.get $3) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (br $label$break$L5) + ) + ) + (local.set $5 + (if (result i32) + (i32.or + (i32.eqz + (local.get $1) + ) + (i32.lt_s + (i32.load8_s offset=75 + (local.get $2) + ) + (i32.const 0) + ) + ) + (i32.const 0) + (block $label$break$L10 (result i32) + (local.set $3 + (local.get $1) + ) + (loop $while-in + (if + (i32.ne + (i32.load8_s + (i32.add + (local.get $0) + (local.tee $5 + (i32.add + (local.get $3) + (i32.const -1) + ) + ) + ) + ) + (i32.const 10) + ) + (if + (local.get $5) + (block + (local.set $3 + (local.get $5) + ) + (br $while-in) + ) + (br $label$break$L10 + (i32.const 0) + ) + ) + ) + ) + (local.set $4 + (i32.load offset=36 + (local.get $2) + ) + ) + (br_if $label$break$L5 + (i32.lt_u + (local.tee $4 + (call_indirect (type $FUNCSIG$iiii) + (local.get $2) + (local.get $0) + (local.get $3) + (i32.add + (i32.and + (local.get $4) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (local.get $3) + ) + ) + (local.set $4 + (i32.load offset=20 + (local.get $2) + ) + ) + (local.set $1 + (i32.sub + (local.get $1) + (local.get $3) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (local.get $3) + ) + ) + (local.get $3) + ) + ) + ) + (drop + (call $_memcpy + (local.get $4) + (local.get $0) + (local.get $1) + ) + ) + (i32.store offset=20 + (local.get $2) + (i32.add + (i32.load offset=20 + (local.get $2) + ) + (local.get $1) + ) + ) + (local.set $4 + (i32.add + (local.get $1) + (local.get $5) + ) + ) + ) + (local.get $4) + ) + (func $___towrite (; 576 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (i32.store8 offset=74 + (local.get $0) + (i32.or + (local.tee $1 + (i32.load8_s offset=74 + (local.get $0) + ) + ) + (i32.add + (local.get $1) + (i32.const 255) + ) + ) + ) + (if (result i32) + (i32.and + (local.tee $1 + (i32.load + (local.get $0) + ) + ) + (i32.const 8) + ) + (block (result i32) + (i32.store + (local.get $0) + (i32.or + (local.get $1) + (i32.const 32) + ) + ) + (i32.const -1) + ) + (block (result i32) + (i32.store offset=8 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=28 + (local.get $0) + (local.tee $1 + (i32.load offset=44 + (local.get $0) + ) + ) + ) + (i32.store offset=20 + (local.get $0) + (local.get $1) + ) + (i32.store offset=16 + (local.get $0) + (i32.add + (local.get $1) + (i32.load offset=48 + (local.get $0) + ) + ) + ) + (i32.const 0) + ) + ) + ) + (func $_frexp (; 577 ;) (; has Stack IR ;) (param $0 f64) (param $1 i32) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (block $switch + (block $switch-default + (if + (local.tee $4 + (i32.and + (i32.wrap_i64 + (local.tee $3 + (i64.shr_u + (local.tee $2 + (i64.reinterpret_f64 + (local.get $0) + ) + ) + (i64.const 52) + ) + ) + ) + (i32.const 2047) + ) + ) + (if + (i32.eq + (local.get $4) + (i32.const 2047) + ) + (br $switch) + (br $switch-default) + ) + ) + (i32.store + (local.get $1) + (if (result i32) + (f64.ne + (local.get $0) + (f64.const 0) + ) + (block (result i32) + (local.set $0 + (call $_frexp + (f64.mul + (local.get $0) + (f64.const 18446744073709551615) + ) + (local.get $1) + ) + ) + (i32.add + (i32.load + (local.get $1) + ) + (i32.const -64) + ) + ) + (i32.const 0) + ) + ) + (br $switch) + ) + (i32.store + (local.get $1) + (i32.add + (i32.and + (i32.wrap_i64 + (local.get $3) + ) + (i32.const 2047) + ) + (i32.const -1022) + ) + ) + (local.set $0 + (f64.reinterpret_i64 + (i64.or + (i64.and + (local.get $2) + (i64.const -9218868437227405313) + ) + (i64.const 4602678819172646912) + ) + ) + ) + ) + (local.get $0) + ) + (func $_sn_write (; 578 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local.set $3 + (select + (local.get $2) + (local.tee $3 + (i32.sub + (i32.load offset=16 + (local.get $0) + ) + (local.tee $4 + (i32.load offset=20 + (local.get $0) + ) + ) + ) + ) + (i32.gt_u + (local.get $3) + (local.get $2) + ) + ) + ) + (drop + (call $_memcpy + (local.get $4) + (local.get $1) + (local.get $3) + ) + ) + (i32.store offset=20 + (local.get $0) + (i32.add + (i32.load offset=20 + (local.get $0) + ) + (local.get $3) + ) + ) + (local.get $2) + ) + (func $_scalbn (; 579 ;) (; has Stack IR ;) (param $0 f64) (param $1 i32) (result f64) + (local $2 i32) + (if + (i32.gt_s + (local.get $1) + (i32.const 1023) + ) + (block + (local.set $1 + (select + (select + (local.tee $2 + (i32.add + (local.get $1) + (i32.const -2046) + ) + ) + (i32.const 1023) + (i32.lt_s + (local.get $2) + (i32.const 1023) + ) + ) + (i32.add + (local.get $1) + (i32.const -1023) + ) + (local.tee $2 + (i32.gt_s + (local.get $1) + (i32.const 2046) + ) + ) + ) + ) + (local.set $0 + (select + (f64.mul + (local.tee $0 + (f64.mul + (local.get $0) + (f64.const 8988465674311579538646525e283) + ) + ) + (f64.const 8988465674311579538646525e283) + ) + (local.get $0) + (local.get $2) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const -1022) + ) + (block + (local.set $1 + (select + (select + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 2044) + ) + ) + (i32.const -1022) + (i32.gt_s + (local.get $2) + (i32.const -1022) + ) + ) + (i32.add + (local.get $1) + (i32.const 1022) + ) + (local.tee $2 + (i32.lt_s + (local.get $1) + (i32.const -2044) + ) + ) + ) + ) + (local.set $0 + (select + (f64.mul + (local.tee $0 + (f64.mul + (local.get $0) + (f64.const 2.2250738585072014e-308) + ) + ) + (f64.const 2.2250738585072014e-308) + ) + (local.get $0) + (local.get $2) + ) + ) + ) + ) + ) + (f64.mul + (local.get $0) + (f64.reinterpret_i64 + (i64.shl + (i64.extend_i32_u + (i32.add + (local.get $1) + (i32.const 1023) + ) + ) + (i64.const 52) + ) + ) + ) + ) + (func $_strlen (; 580 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (i32.and + (local.tee $2 + (local.get $0) + ) + (i32.const 3) + ) + ) + ) + (local.set $1 + (local.get $2) + ) + (loop $while-in + (block $label$break$L1 + (if + (i32.eqz + (i32.load8_s + (local.get $0) + ) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + (br_if $while-in + (i32.and + (local.tee $1 + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + (i32.const 3) + ) + ) + (br $__rjti$0) + ) + ) + (br $__rjto$0) + ) + (loop $while-in1 + (local.set $1 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $3 + (i32.load + (local.get $0) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $3) + (i32.const -16843009) + ) + ) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in1) + ) + ) + ) + (if + (i32.and + (local.get $3) + (i32.const 255) + ) + (loop $while-in3 + (br_if $while-in3 + (i32.load8_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (i32.sub + (local.get $0) + (local.get $2) + ) + ) + (func $_strchr (; 581 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (select + (local.tee $0 + (call $___strchrnul + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + (i32.eq + (i32.load8_u + (local.get $0) + ) + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + ) + ) + (func $___strchrnul (; 582 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (local.tee $2 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (block $label$break$L1 + (if + (i32.and + (local.get $0) + (i32.const 3) + ) + (block + (local.set $3 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (loop $while-in + (br_if $label$break$L1 + (i32.or + (i32.eq + (local.tee $4 + (i32.load8_s + (local.get $0) + ) + ) + (i32.shr_s + (i32.shl + (local.get $3) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (i32.eqz + (local.get $4) + ) + ) + ) + (br_if $while-in + (i32.and + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 3) + ) + ) + ) + ) + ) + (local.set $3 + (i32.mul + (local.get $2) + (i32.const 16843009) + ) + ) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $2 + (i32.load + (local.get $0) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $2) + (i32.const -16843009) + ) + ) + ) + (loop $while-in2 + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $2 + (i32.xor + (local.get $2) + (local.get $3) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $2) + (i32.const -16843009) + ) + ) + ) + (br_if $while-in2 + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $2 + (i32.load + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $2) + (i32.const -16843009) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (loop $while-in4 + (local.set $1 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.or + (i32.eq + (local.tee $3 + (i32.load8_s + (local.get $0) + ) + ) + (i32.shr_s + (i32.shl + (local.get $2) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (i32.eqz + (local.get $3) + ) + ) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in4) + ) + ) + ) + ) + (local.set $0 + (i32.add + (call $_strlen + (local.get $0) + ) + (local.get $0) + ) + ) + ) + (local.get $0) + ) + (func $_strcpy (; 583 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (call $___stpcpy + (local.get $0) + (local.get $1) + ) + ) + (func $___stpcpy (; 584 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.and + (i32.xor + (local.tee $2 + (local.get $1) + ) + (local.get $0) + ) + (i32.const 3) + ) + ) + (block $label$break$L1 + (if + (i32.and + (local.get $2) + (i32.const 3) + ) + (loop $while-in + (i32.store8 + (local.get $0) + (local.tee $2 + (i32.load8_s + (local.get $1) + ) + ) + ) + (br_if $label$break$L1 + (i32.eqz + (local.get $2) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.and + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (i32.const 3) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.xor + (i32.and + (local.tee $3 + (i32.load + (local.get $1) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $3) + (i32.const -16843009) + ) + ) + ) + (local.set $0 + (loop $while-in1 (result i32) + (local.set $2 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (i32.store + (local.get $0) + (local.get $3) + ) + (if (result i32) + (i32.and + (i32.xor + (i32.and + (local.tee $3 + (i32.load + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + ) + ) + (i32.const -2139062144) + ) + (i32.const -2139062144) + ) + (i32.add + (local.get $3) + (i32.const -16843009) + ) + ) + (local.get $2) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in1) + ) + ) + ) + ) + ) + (br $__rjti$0) + ) + (br $__rjto$0) + ) + (i32.store8 + (local.get $0) + (local.tee $2 + (i32.load8_s + (local.get $1) + ) + ) + ) + (if + (local.get $2) + (loop $while-in3 + (i32.store8 + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.tee $2 + (i32.load8_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + ) + (br_if $while-in3 + (local.get $2) + ) + ) + ) + ) + ) + (func $___sindf (; 585 ;) (; has Stack IR ;) (param $0 f64) (result f32) + (local $1 f64) + (local $2 f64) + (f32.demote_f64 + (f64.add + (f64.mul + (f64.mul + (local.tee $2 + (f64.mul + (local.tee $1 + (f64.mul + (local.get $0) + (local.get $0) + ) + ) + (local.get $0) + ) + ) + (f64.mul + (local.get $1) + (local.get $1) + ) + ) + (f64.add + (f64.mul + (local.get $1) + (f64.const 2.718311493989822e-06) + ) + (f64.const -1.9839334836096632e-04) + ) + ) + (f64.add + (f64.mul + (local.get $2) + (f64.add + (f64.mul + (local.get $1) + (f64.const 0.008333329385889463) + ) + (f64.const -0.16666666641626524) + ) + ) + (local.get $0) + ) + ) + ) + ) + (func $___cosdf (; 586 ;) (; has Stack IR ;) (param $0 f64) (result f32) + (local $1 f64) + (local.set $1 + (f64.mul + (local.tee $0 + (f64.mul + (local.get $0) + (local.get $0) + ) + ) + (local.get $0) + ) + ) + (f32.demote_f64 + (f64.add + (f64.add + (f64.sub + (f64.const 1) + (f64.mul + (local.get $0) + (f64.const 0.499999997251031) + ) + ) + (f64.mul + (local.get $1) + (f64.const 0.04166662332373906) + ) + ) + (f64.mul + (f64.mul + (local.get $0) + (local.get $1) + ) + (f64.add + (f64.mul + (local.get $0) + (f64.const 2.439044879627741e-05) + ) + (f64.const -0.001388676377460993) + ) + ) + ) + ) + ) + (func $___rem_pio2_large (; 587 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local.set $20 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $11 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 560) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 560) + ) + ) + (local.set $14 + (i32.add + (local.get $11) + (i32.const 320) + ) + ) + (local.set $13 + (select + (local.tee $3 + (i32.div_s + (i32.add + (local.get $2) + (i32.const -3) + ) + (i32.const 24) + ) + ) + (i32.const 0) + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + ) + (if + (i32.ge_s + (local.tee $12 + (i32.load + (i32.const 8224) + ) + ) + (i32.const 0) + ) + (block + (local.set $6 + (i32.add + (local.get $12) + (i32.const 1) + ) + ) + (local.set $3 + (i32.const 0) + ) + (local.set $5 + (local.get $13) + ) + (loop $while-in + (f64.store + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $14) + ) + (if (result f64) + (i32.lt_s + (local.get $5) + (i32.const 0) + ) + (f64.const 0) + (f64.convert_i32_s + (i32.load + (i32.add + (i32.shl + (local.get $5) + (i32.const 2) + ) + (i32.const 8240) + ) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (br_if $while-in + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $6) + ) + ) + ) + ) + ) + (local.set $9 + (i32.add + (local.get $11) + (i32.const 480) + ) + ) + (local.set $16 + (i32.add + (local.get $11) + (i32.const 160) + ) + ) + (local.set $8 + (i32.add + (local.tee $21 + (i32.mul + (local.get $13) + (i32.const -24) + ) + ) + (i32.add + (local.get $2) + (i32.const -24) + ) + ) + ) + (local.set $5 + (i32.const 0) + ) + (loop $while-in1 + (local.set $6 + (local.get $5) + ) + (local.set $4 + (f64.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in3 + (local.set $4 + (f64.add + (local.get $4) + (f64.mul + (f64.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $0) + ) + ) + (f64.load + (i32.add + (i32.shl + (i32.sub + (local.get $6) + (local.get $3) + ) + (i32.const 3) + ) + (local.get $14) + ) + ) + ) + ) + ) + (br_if $while-in3 + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 1) + ) + ) + ) + (f64.store + (i32.add + (i32.shl + (local.get $5) + (i32.const 3) + ) + (local.get $11) + ) + (local.get $4) + ) + (local.set $3 + (i32.add + (local.get $5) + (i32.const 1) + ) + ) + (if + (i32.lt_s + (local.get $5) + (local.get $12) + ) + (block + (local.set $5 + (local.get $3) + ) + (br $while-in1) + ) + ) + ) + (local.set $17 + (i32.gt_s + (local.get $8) + (i32.const 0) + ) + ) + (local.set $18 + (i32.sub + (i32.const 24) + (local.get $8) + ) + ) + (local.set $22 + (i32.sub + (i32.const 23) + (local.get $8) + ) + ) + (local.set $23 + (i32.eqz + (local.get $8) + ) + ) + (local.set $3 + (local.get $12) + ) + (block $__rjto$4 + (block $__rjti$4 + (loop $while-in5 + (block $__rjti$3 + (local.set $4 + (f64.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $11) + ) + ) + ) + (if + (local.tee $10 + (i32.gt_s + (local.get $3) + (i32.const 0) + ) + ) + (block + (local.set $6 + (i32.const 0) + ) + (local.set $5 + (local.get $3) + ) + (loop $while-in7 + (i32.store + (i32.add + (i32.shl + (local.get $6) + (i32.const 2) + ) + (local.get $9) + ) + (i32.trunc_f64_s + (f64.sub + (local.get $4) + (f64.mul + (local.tee $4 + (f64.convert_i32_s + (i32.trunc_f64_s + (f64.mul + (local.get $4) + (f64.const 5.960464477539063e-08) + ) + ) + ) + ) + (f64.const 16777216) + ) + ) + ) + ) + (local.set $4 + (f64.add + (f64.load + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $5) + (i32.const -1) + ) + ) + (i32.const 3) + ) + (local.get $11) + ) + ) + (local.get $4) + ) + ) + (local.set $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (if + (i32.gt_s + (local.get $5) + (i32.const 1) + ) + (block + (local.set $5 + (local.get $7) + ) + (br $while-in7) + ) + ) + ) + ) + ) + (local.set $5 + (i32.trunc_f64_s + (local.tee $4 + (f64.sub + (local.tee $4 + (call $_scalbn + (local.get $4) + (local.get $8) + ) + ) + (f64.mul + (f64.floor + (f64.mul + (local.get $4) + (f64.const 0.125) + ) + ) + (f64.const 8) + ) + ) + ) + ) + ) + (local.set $4 + (f64.sub + (local.get $4) + (f64.convert_i32_s + (local.get $5) + ) + ) + ) + (block $__rjto$2 + (block $__rjti$2 + (block $__rjti$1 + (local.set $7 + (if (result i32) + (local.get $17) + (block + (local.set $6 + (i32.shr_s + (local.tee $15 + (i32.load + (local.tee $7 + (i32.add + (i32.shl + (i32.add + (local.get $3) + (i32.const -1) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + ) + (local.get $18) + ) + ) + (i32.store + (local.get $7) + (local.tee $7 + (i32.sub + (local.get $15) + (i32.shl + (local.get $6) + (local.get $18) + ) + ) + ) + ) + (local.set $7 + (i32.shr_s + (local.get $7) + (local.get $22) + ) + ) + (local.set $5 + (i32.add + (local.get $5) + (local.get $6) + ) + ) + (br $__rjti$1) + ) + (if (result i32) + (local.get $23) + (block + (local.set $7 + (i32.shr_s + (i32.load + (i32.add + (i32.shl + (i32.add + (local.get $3) + (i32.const -1) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + (i32.const 23) + ) + ) + (br $__rjti$1) + ) + (if (result i32) + (f64.ge + (local.get $4) + (f64.const 0.5) + ) + (block + (local.set $7 + (i32.const 2) + ) + (br $__rjti$2) + ) + (i32.const 0) + ) + ) + ) + ) + (br $__rjto$2) + ) + (br_if $__rjti$2 + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + (br $__rjto$2) + ) + (local.set $6 + (local.get $5) + ) + (local.set $10 + (if (result i32) + (local.get $10) + (block (result i32) + (local.set $5 + (i32.const 0) + ) + (local.set $10 + (i32.const 0) + ) + (loop $while-in9 (result i32) + (local.set $15 + (i32.load + (local.tee $24 + (i32.add + (i32.shl + (local.get $10) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (local.set $5 + (if (result i32) + (local.get $5) + (block + (local.set $19 + (i32.const 16777215) + ) + (br $__rjti$0) + ) + (if (result i32) + (local.get $15) + (block + (local.set $19 + (i32.const 16777216) + ) + (local.set $5 + (i32.const 1) + ) + (br $__rjti$0) + ) + (i32.const 0) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store + (local.get $24) + (i32.sub + (local.get $19) + (local.get $15) + ) + ) + ) + (br_if $while-in9 + (i32.ne + (local.get $3) + (local.tee $10 + (i32.add + (local.get $10) + (i32.const 1) + ) + ) + ) + ) + (local.get $5) + ) + ) + (i32.const 0) + ) + ) + (if + (local.get $17) + (block $label$break$L44 + (block $switch-case11 + (block $switch-case + (br_table $switch-case $switch-case11 $label$break$L44 + (i32.sub + (local.get $8) + (i32.const 1) + ) + ) + ) + (i32.store + (local.tee $5 + (i32.add + (i32.shl + (i32.add + (local.get $3) + (i32.const -1) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + (i32.and + (i32.load + (local.get $5) + ) + (i32.const 8388607) + ) + ) + (br $label$break$L44) + ) + (i32.store + (local.tee $5 + (i32.add + (i32.shl + (i32.add + (local.get $3) + (i32.const -1) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + (i32.and + (i32.load + (local.get $5) + ) + (i32.const 4194303) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (if + (i32.eq + (local.get $7) + (i32.const 2) + ) + (block + (local.set $4 + (f64.sub + (f64.const 1) + (local.get $4) + ) + ) + (if + (local.get $10) + (local.set $4 + (f64.sub + (local.get $4) + (call $_scalbn + (f64.const 1) + (local.get $8) + ) + ) + ) + ) + (local.set $7 + (i32.const 2) + ) + ) + ) + ) + (br_if $__rjti$4 + (f64.ne + (local.get $4) + (f64.const 0) + ) + ) + (if + (i32.gt_s + (local.get $3) + (local.get $12) + ) + (block + (local.set $6 + (local.get $3) + ) + (local.set $10 + (i32.const 0) + ) + (loop $while-in13 + (local.set $10 + (i32.or + (i32.load + (i32.add + (i32.shl + (local.tee $6 + (i32.add + (local.get $6) + (i32.const -1) + ) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + (local.get $10) + ) + ) + (br_if $while-in13 + (i32.gt_s + (local.get $6) + (local.get $12) + ) + ) + ) + (br_if $__rjti$3 + (local.get $10) + ) + ) + ) + (local.set $6 + (i32.const 1) + ) + (loop $while-in15 + (local.set $5 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.load + (i32.add + (i32.shl + (i32.sub + (local.get $12) + (local.get $6) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + (block + (local.set $6 + (local.get $5) + ) + (br $while-in15) + ) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (local.get $6) + ) + ) + (loop $while-in17 + (f64.store + (i32.add + (i32.shl + (local.tee $7 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 3) + ) + (local.get $14) + ) + (f64.convert_i32_s + (i32.load + (i32.add + (i32.shl + (i32.add + (local.tee $5 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (local.get $13) + ) + (i32.const 2) + ) + (i32.const 8240) + ) + ) + ) + ) + (local.set $4 + (f64.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in19 + (local.set $4 + (f64.add + (local.get $4) + (f64.mul + (f64.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (local.get $0) + ) + ) + (f64.load + (i32.add + (i32.shl + (i32.sub + (local.get $7) + (local.get $3) + ) + (i32.const 3) + ) + (local.get $14) + ) + ) + ) + ) + ) + (br_if $while-in19 + (i32.ne + (local.tee $3 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (i32.const 1) + ) + ) + ) + (f64.store + (i32.add + (i32.shl + (local.get $5) + (i32.const 3) + ) + (local.get $11) + ) + (local.get $4) + ) + (if + (i32.lt_s + (local.get $5) + (local.get $6) + ) + (block + (local.set $3 + (local.get $5) + ) + (br $while-in17) + ) + ) + ) + (local.set $3 + (local.get $6) + ) + (br $while-in5) + ) + ) + (local.set $0 + (local.get $3) + ) + (local.set $2 + (local.get $8) + ) + (loop $while-in21 + (local.set $2 + (i32.add + (local.get $2) + (i32.const -24) + ) + ) + (br_if $while-in21 + (i32.eqz + (i32.load + (i32.add + (i32.shl + (local.tee $0 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + ) + ) + (br $__rjto$4) + ) + (i32.store + (i32.add + (i32.shl + (local.tee $0 + (if (result i32) + (f64.ge + (local.tee $4 + (call $_scalbn + (local.get $4) + (i32.sub + (i32.const 0) + (local.get $8) + ) + ) + ) + (f64.const 16777216) + ) + (block (result i32) + (i32.store + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $9) + ) + (i32.trunc_f64_s + (f64.sub + (local.get $4) + (f64.mul + (f64.convert_i32_s + (local.tee $6 + (i32.trunc_f64_s + (f64.mul + (local.get $4) + (f64.const 5.960464477539063e-08) + ) + ) + ) + ) + (f64.const 16777216) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $2) + (local.get $21) + ) + ) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (block (result i32) + (local.set $6 + (i32.trunc_f64_s + (local.get $4) + ) + ) + (local.set $2 + (local.get $8) + ) + (local.get $3) + ) + ) + ) + (i32.const 2) + ) + (local.get $9) + ) + (local.get $6) + ) + ) + (local.set $4 + (call $_scalbn + (f64.const 1) + (local.get $2) + ) + ) + (if + (local.tee $8 + (i32.gt_s + (local.get $0) + (i32.const -1) + ) + ) + (block + (local.set $2 + (local.get $0) + ) + (loop $while-in23 + (f64.store + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (local.get $11) + ) + (f64.mul + (local.get $4) + (f64.convert_i32_s + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $9) + ) + ) + ) + ) + ) + (local.set $4 + (f64.mul + (local.get $4) + (f64.const 5.960464477539063e-08) + ) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $2) + (i32.const 0) + ) + (block + (local.set $2 + (local.get $3) + ) + (br $while-in23) + ) + ) + ) + (if + (local.get $8) + (block + (local.set $2 + (local.get $0) + ) + (loop $while-in25 + (local.set $13 + (i32.sub + (local.get $0) + (local.get $2) + ) + ) + (local.set $4 + (f64.const 0) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in27 + (local.set $4 + (f64.add + (local.get $4) + (f64.mul + (f64.load + (i32.add + (i32.shl + (local.get $3) + (i32.const 3) + ) + (i32.const 8512) + ) + ) + (f64.load + (i32.add + (i32.shl + (i32.add + (local.get $2) + (local.get $3) + ) + (i32.const 3) + ) + (local.get $11) + ) + ) + ) + ) + ) + (local.set $6 + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.or + (i32.ge_s + (local.get $3) + (local.get $12) + ) + (i32.ge_u + (local.get $3) + (local.get $13) + ) + ) + ) + (block + (local.set $3 + (local.get $6) + ) + (br $while-in27) + ) + ) + ) + (f64.store + (i32.add + (i32.shl + (local.get $13) + (i32.const 3) + ) + (local.get $16) + ) + (local.get $4) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $2) + (i32.const 0) + ) + (block + (local.set $2 + (local.get $3) + ) + (br $while-in25) + ) + ) + ) + ) + ) + ) + ) + (if + (local.get $8) + (block + (local.set $4 + (f64.const 0) + ) + (loop $while-in31 + (local.set $4 + (f64.add + (local.get $4) + (f64.load + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (local.get $16) + ) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (if + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in31) + ) + ) + ) + ) + (local.set $4 + (f64.const 0) + ) + ) + (f64.store + (local.get $1) + (select + (f64.neg + (local.get $4) + ) + (local.get $4) + (local.get $7) + ) + ) + (global.set $STACKTOP + (local.get $20) + ) + (i32.and + (local.get $5) + (i32.const 7) + ) + ) + (func $___rem_pio2f (; 588 ;) (; has Stack IR ;) (param $0 f32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i32) + (local $6 f64) + (local $7 i32) + (local $8 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $5 + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + (local.set $1 + (if (result i32) + (i32.lt_u + (local.tee $2 + (i32.and + (local.tee $8 + (i32.reinterpret_f32 + (local.get $0) + ) + ) + (i32.const 2147483647) + ) + ) + (i32.const 1305022427) + ) + (block (result i32) + (local.set $2 + (i32.trunc_f64_s + (local.tee $6 + (f64.add + (f64.add + (f64.mul + (local.tee $3 + (f64.promote_f32 + (local.get $0) + ) + ) + (f64.const 0.6366197723675814) + ) + (f64.const 6755399441055744) + ) + (f64.const -6755399441055744) + ) + ) + ) + ) + (f64.store + (local.get $1) + (f64.sub + (f64.sub + (local.get $3) + (f64.mul + (local.get $6) + (f64.const 1.5707963109016418) + ) + ) + (f64.mul + (local.get $6) + (f64.const 1.5893254773528196e-08) + ) + ) + ) + (local.get $2) + ) + (block $do-once (result i32) + (if + (i32.gt_u + (local.get $2) + (i32.const 2139095039) + ) + (block + (f64.store + (local.get $1) + (f64.promote_f32 + (f32.sub + (local.get $0) + (local.get $0) + ) + ) + ) + (br $do-once + (i32.const 0) + ) + ) + ) + (f64.store + (local.get $5) + (f64.promote_f32 + (f32.reinterpret_i32 + (i32.sub + (local.get $2) + (i32.shl + (local.tee $2 + (i32.add + (i32.shr_u + (local.get $2) + (i32.const 23) + ) + (i32.const -150) + ) + ) + (i32.const 23) + ) + ) + ) + ) + ) + (local.set $2 + (call $___rem_pio2_large + (local.get $5) + (local.get $4) + (local.get $2) + ) + ) + (local.set $3 + (f64.load + (local.get $4) + ) + ) + (if (result i32) + (i32.lt_s + (local.get $8) + (i32.const 0) + ) + (block (result i32) + (f64.store + (local.get $1) + (f64.neg + (local.get $3) + ) + ) + (i32.sub + (i32.const 0) + (local.get $2) + ) + ) + (block (result i32) + (f64.store + (local.get $1) + (local.get $3) + ) + (local.get $2) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + (local.get $1) + ) + (func $_fwrite (; 589 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local.set $4 + (i32.mul + (local.get $1) + (local.get $2) + ) + ) + (drop + (i32.atomic.load offset=76 + (local.get $3) + ) + ) + (local.set $0 + (call $___fwritex + (local.get $0) + (local.get $4) + (local.get $3) + ) + ) + (local.set $2 + (select + (local.get $2) + (i32.const 0) + (local.get $1) + ) + ) + (if (result i32) + (i32.ne + (local.get $0) + (local.get $4) + ) + (i32.div_u + (local.get $0) + (local.get $1) + ) + (local.get $2) + ) + ) + (func $___unlist_locked_file (; 590 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (if + (i32.load offset=68 + (local.get $0) + ) + (block + (if + (local.tee $1 + (i32.load offset=132 + (local.get $0) + ) + ) + (i32.store offset=128 + (local.get $1) + (i32.load offset=128 + (local.get $0) + ) + ) + ) + (i32.store + (if (result i32) + (local.tee $0 + (i32.load offset=128 + (local.get $0) + ) + ) + (i32.add + (local.get $0) + (i32.const 132) + ) + (i32.add + (global.get $__pthread_ptr) + (i32.const 232) + ) + ) + (local.get $1) + ) + ) + ) + ) + (func $___overflow (; 591 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i32.store8 + (local.get $2) + (local.tee $6 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + ) + (drop + (block $do-once (result i32) + (block $__rjti$0 + (br $do-once + (if (result i32) + (local.tee $3 + (i32.load offset=16 + (local.get $0) + ) + ) + (br $__rjti$0) + (if (result i32) + (call $___towrite + (local.get $0) + ) + (i32.const -1) + (block + (local.set $3 + (i32.load offset=16 + (local.get $0) + ) + ) + (br $__rjti$0) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.tee $4 + (i32.load offset=20 + (local.get $0) + ) + ) + (local.get $3) + ) + (if + (i32.ne + (local.tee $1 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (i32.load8_s offset=75 + (local.get $0) + ) + ) + (block + (i32.store offset=20 + (local.get $0) + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $4) + (local.get $6) + ) + (br $do-once + (local.get $1) + ) + ) + ) + ) + (if (result i32) + (i32.eq + (call_indirect (type $FUNCSIG$iiii) + (local.get $0) + (local.get $2) + (i32.const 1) + (i32.add + (i32.and + (i32.load offset=36 + (local.get $0) + ) + (i32.const 15) + ) + (i32.const 58) + ) + ) + (i32.const 1) + ) + (i32.load8_u + (local.get $2) + ) + (i32.const -1) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + ) + (func $_fopen (; 592 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (local.set $3 + (i32.add + (local.get $1) + (i32.const 32) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const 16) + ) + ) + (local.set $0 + (if (result i32) + (call $_strchr + (i32.const 16680) + (i32.load8_s + (i32.const 15962) + ) + ) + (block (result i32) + (local.set $4 + (call $___fmodeflags) + ) + (i32.store + (local.get $1) + (local.get $0) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $4) + (i32.const 32768) + ) + ) + (i32.store offset=8 + (local.get $1) + (i32.const 438) + ) + (if (result i32) + (i32.lt_s + (local.tee $1 + (call $___syscall_ret + (call $___syscall5 + (i32.const 5) + (local.get $1) + ) + ) + ) + (i32.const 0) + ) + (i32.const 0) + (block (result i32) + (if + (i32.and + (local.get $4) + (i32.const 524288) + ) + (block + (i32.store + (local.get $2) + (local.get $1) + ) + (i32.store offset=4 + (local.get $2) + (i32.const 2) + ) + (i32.store offset=8 + (local.get $2) + (i32.const 1) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $2) + ) + ) + ) + ) + (if (result i32) + (local.tee $0 + (call $___fdopen + (local.get $1) + ) + ) + (local.get $0) + (block (result i32) + (i32.store + (local.get $3) + (local.get $1) + ) + (drop + (call $___syscall6 + (i32.const 6) + (local.get $3) + ) + ) + (i32.const 0) + ) + ) + ) + ) + ) + (block (result i32) + (i32.store + (call $___errno_location) + (i32.const 22) + ) + (i32.const 0) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $0) + ) + (func $___fmodeflags (; 593 ;) (; has Stack IR ;) (result i32) + (local $0 i32) + (local $1 i32) + (local.set $0 + (i32.eqz + (call $_strchr + (i32.const 15962) + (i32.const 43) + ) + ) + ) + (select + (i32.or + (local.tee $0 + (select + (i32.or + (local.tee $0 + (select + (local.tee $0 + (select + (local.tee $0 + (select + (local.tee $0 + (select + (i32.ne + (local.tee $1 + (i32.load8_s + (i32.const 15962) + ) + ) + (i32.const 114) + ) + (i32.const 2) + (local.get $0) + ) + ) + (i32.or + (local.get $0) + (i32.const 128) + ) + (i32.eqz + (call $_strchr + (i32.const 15962) + (i32.const 120) + ) + ) + ) + ) + (i32.or + (local.get $0) + (i32.const 524288) + ) + (i32.eqz + (call $_strchr + (i32.const 15962) + (i32.const 101) + ) + ) + ) + ) + (i32.or + (local.get $0) + (i32.const 64) + ) + (i32.eq + (local.get $1) + (i32.const 114) + ) + ) + ) + (i32.const 512) + ) + (local.get $0) + (i32.eq + (local.get $1) + (i32.const 119) + ) + ) + ) + (i32.const 1024) + ) + (local.get $0) + (i32.eq + (local.get $1) + (i32.const 97) + ) + ) + ) + (func $___fdopen (; 594 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.sub + (global.get $STACKTOP) + (i32.const -64) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 64) + ) + ) + (local.set $3 + (i32.add + (local.get $1) + (i32.const 40) + ) + ) + (local.set $4 + (i32.add + (local.get $1) + (i32.const 24) + ) + ) + (local.set $5 + (i32.add + (local.get $1) + (i32.const 16) + ) + ) + (local.set $2 + (local.get $1) + ) + (local.set $7 + (i32.add + (local.get $1) + (i32.const 56) + ) + ) + (if + (call $_strchr + (i32.const 16680) + (i32.load8_s + (i32.const 15962) + ) + ) + (if + (local.tee $1 + (call $_malloc + (i32.const 1176) + ) + ) + (block + (drop + (call $_memset + (local.get $1) + (i32.const 0) + (i32.const 144) + ) + ) + (if + (i32.eqz + (call $_strchr + (i32.const 15962) + (i32.const 43) + ) + ) + (i32.store + (local.get $1) + (select + (i32.const 8) + (i32.const 4) + (i32.eq + (i32.load8_s + (i32.const 15962) + ) + (i32.const 114) + ) + ) + ) + ) + (if + (call $_strchr + (i32.const 15962) + (i32.const 101) + ) + (block + (i32.store + (local.get $2) + (local.get $0) + ) + (i32.store offset=4 + (local.get $2) + (i32.const 2) + ) + (i32.store offset=8 + (local.get $2) + (i32.const 1) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $2) + ) + ) + ) + ) + (if + (i32.eq + (i32.load8_s + (i32.const 15962) + ) + (i32.const 97) + ) + (block + (i32.store + (local.get $5) + (local.get $0) + ) + (i32.store offset=4 + (local.get $5) + (i32.const 3) + ) + (if + (i32.eqz + (i32.and + (local.tee $2 + (call $___syscall221 + (i32.const 221) + (local.get $5) + ) + ) + (i32.const 1024) + ) + ) + (block + (i32.store + (local.get $4) + (local.get $0) + ) + (i32.store offset=4 + (local.get $4) + (i32.const 4) + ) + (i32.store offset=8 + (local.get $4) + (i32.or + (local.get $2) + (i32.const 1024) + ) + ) + (drop + (call $___syscall221 + (i32.const 221) + (local.get $4) + ) + ) + ) + ) + (i32.store + (local.get $1) + (local.tee $2 + (i32.or + (i32.load + (local.get $1) + ) + (i32.const 128) + ) + ) + ) + ) + (local.set $2 + (i32.load + (local.get $1) + ) + ) + ) + (i32.store offset=60 + (local.get $1) + (local.get $0) + ) + (i32.store offset=44 + (local.get $1) + (i32.add + (local.get $1) + (i32.const 152) + ) + ) + (i32.store offset=48 + (local.get $1) + (i32.const 1024) + ) + (i32.store8 offset=75 + (local.get $1) + (i32.const -1) + ) + (if + (i32.eqz + (i32.and + (local.get $2) + (i32.const 8) + ) + ) + (block + (i32.store + (local.get $3) + (local.get $0) + ) + (i32.store offset=4 + (local.get $3) + (i32.const 21523) + ) + (i32.store offset=8 + (local.get $3) + (local.get $7) + ) + (if + (i32.eqz + (call $___syscall54 + (i32.const 54) + (local.get $3) + ) + ) + (i32.store8 offset=75 + (local.get $1) + (i32.const 10) + ) + ) + ) + ) + (i32.store offset=32 + (local.get $1) + (i32.const 8) + ) + (i32.store offset=36 + (local.get $1) + (i32.const 1) + ) + (i32.store offset=40 + (local.get $1) + (i32.const 2) + ) + (i32.store offset=12 + (local.get $1) + (i32.const 3) + ) + (if + (i32.eqz + (i32.load + (i32.const 28124) + ) + ) + (i32.atomic.store offset=76 + (local.get $1) + (i32.const -1) + ) + ) + (call $___ofl_add + (local.get $1) + ) + ) + (local.set $1 + (i32.const 0) + ) + ) + (block + (i32.store + (call $___errno_location) + (i32.const 22) + ) + (local.set $1 + (i32.const 0) + ) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $1) + ) + (func $___ofl_add (; 595 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (i32.store offset=56 + (local.get $0) + (i32.load + (local.tee $1 + (call $___ofl_lock) + ) + ) + ) + (if + (local.tee $2 + (i32.load + (local.get $1) + ) + ) + (i32.store offset=52 + (local.get $2) + (local.get $0) + ) + ) + (i32.store + (local.get $1) + (local.get $0) + ) + (call $___unlock + (i32.const 28184) + ) + ) + (func $___ofl_lock (; 596 ;) (; has Stack IR ;) (result i32) + (call $___lock + (i32.const 28184) + ) + (i32.const 28192) + ) + (func $_fclose (; 597 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (drop + (if (result i32) + (i32.gt_s + (i32.atomic.load offset=76 + (local.get $0) + ) + (i32.const -1) + ) + (i32.const 1) + (i32.const 0) + ) + ) + (call $___unlist_locked_file + (local.get $0) + ) + (if + (i32.eqz + (local.tee $4 + (i32.ne + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 1) + ) + (i32.const 0) + ) + ) + ) + (block + (local.set $1 + (call $___ofl_lock) + ) + (if + (local.tee $2 + (i32.load offset=52 + (local.get $0) + ) + ) + (i32.store offset=56 + (local.get $2) + (i32.load offset=56 + (local.get $0) + ) + ) + ) + (if + (local.tee $3 + (i32.load offset=56 + (local.get $0) + ) + ) + (i32.store offset=52 + (local.get $3) + (local.get $2) + ) + ) + (if + (i32.eq + (local.get $0) + (i32.load + (local.get $1) + ) + ) + (i32.store + (local.get $1) + (local.get $3) + ) + ) + (call $___unlock + (i32.const 28184) + ) + ) + ) + (drop + (call $_fflush + (local.get $0) + ) + ) + (drop + (call_indirect (type $FUNCSIG$ii) + (local.get $0) + (i32.add + (i32.and + (i32.load offset=12 + (local.get $0) + ) + (i32.const 31) + ) + (i32.const 20) + ) + ) + ) + (if + (local.tee $1 + (i32.load offset=96 + (local.get $0) + ) + ) + (call $_free + (local.get $1) + ) + ) + (if + (i32.eqz + (local.get $4) + ) + (call $_free + (local.get $0) + ) + ) + ) + (func $_fflush (; 598 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (if + (local.get $0) + (local.set $0 + (block $do-once (result i32) + (if + (i32.le_s + (i32.atomic.load offset=76 + (local.get $0) + ) + (i32.const -1) + ) + (br $do-once + (call $___fflush_unlocked + (local.get $0) + ) + ) + ) + (call $___fflush_unlocked + (local.get $0) + ) + ) + ) + (block + (local.set $0 + (if (result i32) + (i32.atomic.load + (i32.const 8960) + ) + (call $_fflush + (i32.atomic.load + (i32.const 8960) + ) + ) + (i32.const 0) + ) + ) + (if + (local.tee $1 + (i32.load + (call $___ofl_lock) + ) + ) + (loop $while-in + (drop + (if (result i32) + (i32.gt_s + (i32.atomic.load offset=76 + (local.get $1) + ) + (i32.const -1) + ) + (i32.const 1) + (i32.const 0) + ) + ) + (if + (i32.gt_u + (i32.load offset=20 + (local.get $1) + ) + (i32.load offset=28 + (local.get $1) + ) + ) + (local.set $0 + (i32.or + (call $___fflush_unlocked + (local.get $1) + ) + (local.get $0) + ) + ) + ) + (br_if $while-in + (local.tee $1 + (i32.load offset=56 + (local.get $1) + ) + ) + ) + ) + ) + (call $___unlock + (i32.const 28184) + ) + ) + ) + (local.get $0) + ) + (func $___fflush_unlocked (; 599 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (block $__rjto$0 (result i32) + (block $__rjti$0 + (br_if $__rjti$0 + (i32.le_u + (i32.load offset=20 + (local.get $0) + ) + (i32.load offset=28 + (local.get $0) + ) + ) + ) + (local.set $1 + (i32.load offset=36 + (local.get $0) + ) + ) + (drop + (call_indirect (type $FUNCSIG$iiii) + (local.get $0) + (i32.const 0) + (i32.const 0) + (i32.add + (i32.and + (local.get $1) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (br_if $__rjti$0 + (i32.load offset=20 + (local.get $0) + ) + ) + (br $__rjto$0 + (i32.const -1) + ) + ) + (if + (i32.lt_u + (local.tee $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (local.tee $2 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (block + (local.set $3 + (i32.load offset=40 + (local.get $0) + ) + ) + (drop + (call_indirect (type $FUNCSIG$jiji) + (local.get $0) + (i64.extend_i32_s + (i32.sub + (local.get $1) + (local.get $2) + ) + ) + (i32.const 1) + (i32.add + (i32.and + (local.get $3) + (i32.const 3) + ) + (i32.const 80) + ) + ) + ) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=28 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 0) + ) + (i32.const 0) + ) + ) + (func $_strstr (; 600 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (local.tee $2 + (i32.load8_s + (local.get $1) + ) + ) + (if + (local.tee $0 + (call $_strchr + (local.get $0) + (local.get $2) + ) + ) + (if + (i32.load8_s offset=1 + (local.get $1) + ) + (local.set $0 + (if (result i32) + (i32.load8_s offset=1 + (local.get $0) + ) + (block $do-once (result i32) + (if + (i32.eqz + (i32.load8_s offset=2 + (local.get $1) + ) + ) + (br $do-once + (call $_twobyte_strstr + (local.get $0) + (local.get $1) + ) + ) + ) + (if (result i32) + (i32.load8_s offset=2 + (local.get $0) + ) + (block (result i32) + (if + (i32.eqz + (i32.load8_s offset=3 + (local.get $1) + ) + ) + (br $do-once + (call $_threebyte_strstr + (local.get $0) + (local.get $1) + ) + ) + ) + (if (result i32) + (i32.load8_s offset=3 + (local.get $0) + ) + (if (result i32) + (i32.load8_s offset=4 + (local.get $1) + ) + (call $_twoway_strstr + (local.get $0) + (local.get $1) + ) + (call $_fourbyte_strstr + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + ) + ) + (i32.const 0) + ) + ) + (i32.const 0) + ) + ) + ) + (local.set $0 + (i32.const 0) + ) + ) + ) + (local.get $0) + ) + (func $_twobyte_strstr (; 601 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (i32.or + (i32.load8_u offset=1 + (local.get $1) + ) + (i32.shl + (i32.load8_u + (local.get $1) + ) + (i32.const 8) + ) + ) + ) + (if (result i32) + (local.tee $2 + (i32.load8_s + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (block $label$break$L1 (result i32) + (local.set $0 + (i32.or + (i32.and + (local.get $2) + (i32.const 255) + ) + (i32.shl + (i32.load8_u + (local.get $0) + ) + (i32.const 8) + ) + ) + ) + (loop $while-in + (if + (i32.ne + (local.get $3) + (local.tee $0 + (i32.and + (local.get $0) + (i32.const 65535) + ) + ) + ) + (block + (local.set $0 + (i32.or + (i32.and + (local.tee $2 + (i32.load8_s + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + (i32.const 255) + ) + (i32.shl + (local.get $0) + (i32.const 8) + ) + ) + ) + (drop + (br_if $label$break$L1 + (i32.const 0) + (i32.eqz + (local.get $2) + ) + ) + ) + (br $while-in) + ) + ) + ) + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (i32.const 0) + ) + ) + (func $_threebyte_strstr (; 602 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eqz + (i32.or + (i32.eq + (local.tee $2 + (i32.or + (i32.or + (i32.shl + (i32.load8_u + (local.get $0) + ) + (i32.const 24) + ) + (i32.shl + (i32.load8_u offset=1 + (local.get $0) + ) + (i32.const 16) + ) + ) + (i32.shl + (i32.and + (local.tee $3 + (i32.load8_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (i32.const 255) + ) + (i32.const 8) + ) + ) + ) + (local.tee $4 + (i32.or + (i32.or + (i32.shl + (i32.load8_u + (local.get $1) + ) + (i32.const 24) + ) + (i32.shl + (i32.load8_u offset=1 + (local.get $1) + ) + (i32.const 16) + ) + ) + (i32.shl + (i32.load8_u offset=2 + (local.get $1) + ) + (i32.const 8) + ) + ) + ) + ) + (local.tee $1 + (i32.eqz + (local.get $3) + ) + ) + ) + ) + (block + (local.set $1 + (local.get $2) + ) + (local.set $1 + (loop $while-in (result i32) + (if (result i32) + (i32.or + (i32.eq + (local.get $4) + (local.tee $1 + (i32.shl + (i32.or + (i32.and + (local.tee $2 + (i32.load8_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 255) + ) + (local.get $1) + ) + (i32.const 8) + ) + ) + ) + (local.tee $2 + (i32.eqz + (local.get $2) + ) + ) + ) + (local.get $2) + (br $while-in) + ) + ) + ) + ) + ) + (select + (i32.const 0) + (i32.add + (local.get $0) + (i32.const -2) + ) + (local.get $1) + ) + ) + (func $_fourbyte_strstr (; 603 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eqz + (i32.or + (i32.eq + (local.tee $3 + (i32.or + (i32.load8_u offset=3 + (local.get $1) + ) + (i32.or + (i32.or + (i32.shl + (i32.load8_u + (local.get $1) + ) + (i32.const 24) + ) + (i32.shl + (i32.load8_u offset=1 + (local.get $1) + ) + (i32.const 16) + ) + ) + (i32.shl + (i32.load8_u offset=2 + (local.get $1) + ) + (i32.const 8) + ) + ) + ) + ) + (local.tee $2 + (i32.or + (i32.and + (local.tee $4 + (i32.load8_s + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 3) + ) + ) + ) + ) + (i32.const 255) + ) + (i32.or + (i32.or + (i32.shl + (i32.load8_u + (local.get $0) + ) + (i32.const 24) + ) + (i32.shl + (i32.load8_u offset=1 + (local.get $0) + ) + (i32.const 16) + ) + ) + (i32.shl + (i32.load8_u offset=2 + (local.get $0) + ) + (i32.const 8) + ) + ) + ) + ) + ) + (local.tee $0 + (i32.eqz + (local.get $4) + ) + ) + ) + ) + (block + (local.set $0 + (local.get $1) + ) + (local.set $1 + (local.get $2) + ) + (local.set $0 + (loop $while-in (result i32) + (if (result i32) + (i32.or + (i32.eq + (local.get $3) + (local.tee $1 + (i32.or + (i32.and + (local.tee $2 + (i32.load8_s + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 255) + ) + (i32.shl + (local.get $1) + (i32.const 8) + ) + ) + ) + ) + (local.tee $2 + (i32.eqz + (local.get $2) + ) + ) + ) + (block (result i32) + (local.set $1 + (local.get $0) + ) + (local.get $2) + ) + (br $while-in) + ) + ) + ) + ) + ) + (select + (i32.const 0) + (i32.add + (local.get $1) + (i32.const -3) + ) + (local.get $0) + ) + ) + (func $_twoway_strstr (; 604 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local.set $15 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $13 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 1056) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 1056) + ) + ) + (i64.store + (local.tee $12 + (i32.add + (local.get $13) + (i32.const 1024) + ) + ) + (i64.const 0) + ) + (i64.store offset=8 + (local.get $12) + (i64.const 0) + ) + (i64.store offset=16 + (local.get $12) + (i64.const 0) + ) + (i64.store offset=24 + (local.get $12) + (i64.const 0) + ) + (block $label$break$L34 + (block $__rjti$0 + (if + (local.tee $3 + (i32.load8_s + (local.get $1) + ) + ) + (block $label$break$L1 + (loop $while-in + (if + (i32.eqz + (i32.load8_s + (i32.add + (local.get $0) + (local.get $6) + ) + ) + ) + (block + (local.set $0 + (i32.const 0) + ) + (br $label$break$L1) + ) + ) + (i32.store + (local.tee $2 + (i32.add + (i32.shl + (i32.shr_u + (local.tee $3 + (i32.and + (local.get $3) + (i32.const 255) + ) + ) + (i32.const 5) + ) + (i32.const 2) + ) + (local.get $12) + ) + ) + (i32.or + (i32.load + (local.get $2) + ) + (i32.shl + (i32.const 1) + (i32.and + (local.get $3) + (i32.const 31) + ) + ) + ) + ) + (i32.store + (i32.add + (i32.shl + (local.get $3) + (i32.const 2) + ) + (local.get $13) + ) + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + ) + (br_if $while-in + (local.tee $3 + (i32.load8_s + (i32.add + (local.get $1) + (local.get $6) + ) + ) + ) + ) + ) + (if + (local.tee $10 + (i32.gt_u + (local.get $6) + (i32.const 1) + ) + ) + (block + (local.set $7 + (i32.const 1) + ) + (local.set $2 + (i32.const -1) + ) + (local.set $4 + (i32.const 1) + ) + (local.set $5 + (i32.const 1) + ) + (loop $while-in1 + (if + (i32.eq + (local.tee $3 + (i32.load8_s + (i32.add + (local.get $1) + (i32.add + (local.get $2) + (local.get $4) + ) + ) + ) + ) + (local.tee $9 + (i32.load8_s + (i32.add + (local.get $1) + (local.get $7) + ) + ) + ) + ) + (block + (if + (i32.eq + (local.get $4) + (local.get $5) + ) + (block + (local.set $8 + (i32.add + (local.get $5) + (local.get $8) + ) + ) + (local.set $4 + (i32.const 1) + ) + ) + (local.set $4 + (i32.add + (local.get $4) + (i32.const 1) + ) + ) + ) + (local.set $3 + (local.get $2) + ) + ) + (local.set $5 + (if (result i32) + (i32.gt_s + (i32.and + (local.get $3) + (i32.const 255) + ) + (i32.and + (local.get $9) + (i32.const 255) + ) + ) + (block (result i32) + (local.set $3 + (local.get $2) + ) + (local.set $4 + (i32.const 1) + ) + (i32.sub + (local.tee $8 + (local.get $7) + ) + (local.get $2) + ) + ) + (block (result i32) + (local.set $8 + (i32.add + (local.tee $3 + (local.get $8) + ) + (i32.const 1) + ) + ) + (local.set $4 + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + ) + (if + (i32.lt_u + (local.tee $7 + (i32.add + (local.get $4) + (local.get $8) + ) + ) + (local.get $6) + ) + (block + (local.set $2 + (local.get $3) + ) + (br $while-in1) + ) + ) + ) + (if + (local.get $10) + (block + (local.set $10 + (i32.const 1) + ) + (local.set $8 + (i32.const -1) + ) + (local.set $4 + (i32.const 0) + ) + (local.set $9 + (i32.const 1) + ) + (local.set $7 + (i32.const 1) + ) + (loop $while-in4 + (if + (i32.eq + (local.tee $2 + (i32.load8_s + (i32.add + (local.get $1) + (i32.add + (local.get $8) + (local.get $9) + ) + ) + ) + ) + (local.tee $11 + (i32.load8_s + (i32.add + (local.get $1) + (local.get $10) + ) + ) + ) + ) + (block + (if + (i32.eq + (local.get $7) + (local.get $9) + ) + (block + (local.set $4 + (i32.add + (local.get $4) + (local.get $7) + ) + ) + (local.set $9 + (i32.const 1) + ) + ) + (local.set $9 + (i32.add + (local.get $9) + (i32.const 1) + ) + ) + ) + (local.set $2 + (local.get $8) + ) + ) + (local.set $7 + (if (result i32) + (i32.lt_s + (i32.and + (local.get $2) + (i32.const 255) + ) + (i32.and + (local.get $11) + (i32.const 255) + ) + ) + (block (result i32) + (local.set $9 + (i32.const 1) + ) + (i32.sub + (local.tee $4 + (local.get $10) + ) + (local.tee $2 + (local.get $8) + ) + ) + ) + (block (result i32) + (local.set $4 + (i32.add + (local.tee $2 + (local.get $4) + ) + (i32.const 1) + ) + ) + (local.set $9 + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.ge_u + (local.tee $10 + (i32.add + (local.get $4) + (local.get $9) + ) + ) + (local.get $6) + ) + ) + (local.set $8 + (local.get $2) + ) + (br $while-in4) + ) + ) + (block + (local.set $2 + (i32.const -1) + ) + (local.set $7 + (i32.const 1) + ) + (br $__rjti$0) + ) + ) + ) + (block + (local.set $3 + (i32.const -1) + ) + (local.set $2 + (i32.const -1) + ) + (local.set $5 + (i32.const 1) + ) + (local.set $7 + (i32.const 1) + ) + (br $__rjti$0) + ) + ) + ) + (block + (local.set $3 + (i32.const -1) + ) + (local.set $2 + (i32.const -1) + ) + (local.set $5 + (i32.const 1) + ) + (local.set $7 + (i32.const 1) + ) + (br $__rjti$0) + ) + ) + (br $label$break$L34) + ) + (local.set $10 + (if (result i32) + (call $_memcmp + (local.get $1) + (i32.add + (local.get $1) + (local.tee $8 + (select + (local.get $7) + (local.get $5) + (local.tee $5 + (i32.gt_u + (i32.add + (local.get $2) + (i32.const 1) + ) + (i32.add + (local.get $3) + (i32.const 1) + ) + ) + ) + ) + ) + ) + (local.tee $4 + (i32.add + (local.tee $11 + (select + (local.get $2) + (local.get $3) + (local.get $5) + ) + ) + (i32.const 1) + ) + ) + ) + (block (result i32) + (local.set $8 + (local.tee $3 + (i32.add + (select + (local.get $11) + (local.tee $3 + (i32.add + (i32.sub + (local.get $6) + (local.get $11) + ) + (i32.const -1) + ) + ) + (i32.gt_u + (local.get $11) + (local.get $3) + ) + ) + (i32.const 1) + ) + ) + ) + (local.set $9 + (i32.sub + (local.get $6) + (local.get $3) + ) + ) + (i32.const 0) + ) + (local.tee $9 + (i32.sub + (local.get $6) + (local.get $8) + ) + ) + ) + ) + (local.set $14 + (i32.or + (local.get $6) + (i32.const 63) + ) + ) + (local.set $16 + (i32.add + (local.get $6) + (i32.const -1) + ) + ) + (local.set $17 + (i32.ne + (local.get $10) + (i32.const 0) + ) + ) + (local.set $7 + (i32.const 0) + ) + (local.set $3 + (local.get $0) + ) + (loop $while-in9 + (if + (i32.lt_u + (i32.sub + (local.get $3) + (local.tee $5 + (local.get $0) + ) + ) + (local.get $6) + ) + (local.set $3 + (if (result i32) + (local.tee $2 + (call $_memchr + (local.get $3) + (local.get $14) + ) + ) + (if (result i32) + (i32.lt_u + (i32.sub + (local.get $2) + (local.get $5) + ) + (local.get $6) + ) + (block + (local.set $0 + (i32.const 0) + ) + (br $label$break$L34) + ) + (local.get $2) + ) + (i32.add + (local.get $3) + (local.get $14) + ) + ) + ) + ) + (if + (i32.and + (i32.load + (i32.add + (i32.shl + (i32.shr_u + (local.tee $2 + (i32.load8_u + (i32.add + (local.get $0) + (local.get $16) + ) + ) + ) + (i32.const 5) + ) + (i32.const 2) + ) + (local.get $12) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (local.get $2) + (i32.const 31) + ) + ) + ) + (block $label$break$L48 + (if + (local.tee $2 + (i32.sub + (local.get $6) + (i32.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 2) + ) + (local.get $13) + ) + ) + ) + ) + (block + (local.set $5 + (select + (local.get $9) + (local.get $2) + (i32.and + (i32.and + (local.get $17) + (i32.ne + (local.get $7) + (i32.const 0) + ) + ) + (i32.lt_u + (local.get $2) + (local.get $8) + ) + ) + ) + ) + (local.set $2 + (i32.const 0) + ) + (br $label$break$L48) + ) + ) + (if + (local.tee $5 + (i32.load8_s + (i32.add + (local.get $1) + (local.tee $2 + (select + (local.get $4) + (local.get $7) + (local.tee $18 + (i32.gt_u + (local.get $4) + (local.get $7) + ) + ) + ) + ) + ) + ) + ) + (block $label$break$L53 + (loop $while-in15 + (if + (i32.eq + (i32.load8_u + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (i32.and + (local.get $5) + (i32.const 255) + ) + ) + (block + (br_if $label$break$L53 + (i32.eqz + (local.tee $5 + (i32.load8_s + (i32.add + (local.get $1) + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (br $while-in15) + ) + ) + ) + (local.set $5 + (i32.sub + (local.get $2) + (local.get $11) + ) + ) + (local.set $2 + (i32.const 0) + ) + (br $label$break$L48) + ) + ) + (br_if $label$break$L34 + (i32.eqz + (local.get $18) + ) + ) + (local.set $2 + (local.get $4) + ) + (loop $while-in17 + (if + (i32.ne + (i32.load8_s + (i32.add + (local.get $1) + (local.tee $2 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + ) + ) + (i32.load8_s + (i32.add + (local.get $0) + (local.get $2) + ) + ) + ) + (block + (local.set $5 + (local.get $8) + ) + (local.set $2 + (local.get $10) + ) + (br $label$break$L48) + ) + ) + (br_if $while-in17 + (i32.gt_u + (local.get $2) + (local.get $7) + ) + ) + ) + (br $label$break$L34) + ) + (block + (local.set $5 + (local.get $6) + ) + (local.set $2 + (i32.const 0) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (local.get $5) + ) + ) + (local.set $7 + (local.get $2) + ) + (br $while-in9) + ) + ) + (global.set $STACKTOP + (local.get $15) + ) + (local.get $0) + ) + (func $___memrchr (; 605 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (if (result i32) + (local.get $1) + (block $label$break$L1 (result i32) + (loop $while-in + (if + (i32.ne + (i32.load8_u + (i32.add + (local.get $0) + (local.tee $1 + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + ) + ) + (i32.const 46) + ) + (if + (local.get $1) + (br $while-in) + (br $label$break$L1 + (i32.const 0) + ) + ) + ) + ) + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (i32.const 0) + ) + ) + (func $_srand (; 606 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (i64.store + (local.get $1) + (i64.const 0) + ) + (i64.store + (local.get $1) + (i64.extend_i32_u + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_fputc (; 607 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (block $do-once + (if + (i32.ge_s + (i32.atomic.load offset=76 + (local.get $1) + ) + (i32.const 0) + ) + (block + (local.set $3 + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eq + (i32.load8_s offset=75 + (local.get $1) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + ) + (br_if $__rjti$0 + (i32.ge_u + (local.tee $2 + (i32.load offset=20 + (local.get $1) + ) + ) + (i32.load offset=16 + (local.get $1) + ) + ) + ) + (i32.store offset=20 + (local.get $1) + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $2) + (local.get $3) + ) + (br $__rjto$0) + ) + (call $___overflow + (local.get $1) + (local.get $0) + ) + ) + (br $do-once) + ) + ) + (local.set $3 + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (if + (i32.ne + (i32.load8_s offset=75 + (local.get $1) + ) + (i32.and + (local.get $0) + (i32.const 255) + ) + ) + (if + (i32.lt_u + (local.tee $2 + (i32.load offset=20 + (local.get $1) + ) + ) + (i32.load offset=16 + (local.get $1) + ) + ) + (block + (i32.store offset=20 + (local.get $1) + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + (i32.store8 + (local.get $2) + (local.get $3) + ) + (br $do-once) + ) + ) + ) + (call $___overflow + (local.get $1) + (local.get $0) + ) + ) + ) + (func $_strcspn (; 608 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local.set $2 + (i32.const 15944) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.tee $1 + (i32.load8_s + (i32.const 15944) + ) + ) + ) + ) + (br_if $__rjti$0 + (i32.eqz + (i32.load8_s + (i32.const 15945) + ) + ) + ) + (drop + (call $_memset + (local.get $3) + (i32.const 0) + (i32.const 32) + ) + ) + (if + (local.tee $1 + (i32.load8_s + (i32.const 15944) + ) + ) + (loop $while-in + (i32.store + (local.tee $5 + (i32.add + (i32.shl + (i32.shr_u + (local.tee $1 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (i32.const 5) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + (i32.or + (i32.load + (local.get $5) + ) + (i32.shl + (i32.const 1) + (i32.and + (local.get $1) + (i32.const 31) + ) + ) + ) + ) + (br_if $while-in + (local.tee $1 + (i32.load8_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (if + (local.tee $1 + (i32.load8_s + (local.get $0) + ) + ) + (block $label$break$L1 + (local.set $2 + (local.get $0) + ) + (loop $while-in1 + (br_if $label$break$L1 + (i32.and + (i32.load + (i32.add + (i32.shl + (i32.shr_u + (local.tee $1 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (i32.const 5) + ) + (i32.const 2) + ) + (local.get $3) + ) + ) + (i32.shl + (i32.const 1) + (i32.and + (local.get $1) + (i32.const 31) + ) + ) + ) + ) + (br_if $while-in1 + (local.tee $1 + (i32.load8_s + (local.tee $2 + (i32.add + (local.get $2) + (i32.const 1) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (local.get $0) + ) + ) + (br $__rjto$0) + ) + (local.set $2 + (call $___strchrnul + (local.get $0) + (local.get $1) + ) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + (i32.sub + (local.get $2) + (local.get $0) + ) + ) + (func $_cosf (; 609 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $4 + (i32.shr_u + (local.tee $2 + (i32.reinterpret_f32 + (local.get $0) + ) + ) + (i32.const 31) + ) + ) + (local.set $0 + (if (result f32) + (i32.lt_u + (local.tee $2 + (i32.and + (local.get $2) + (i32.const 2147483647) + ) + ) + (i32.const 1061752795) + ) + (if (result f32) + (i32.lt_u + (local.get $2) + (i32.const 964689920) + ) + (f32.const 1) + (call $___cosdf + (f64.promote_f32 + (local.get $0) + ) + ) + ) + (block $label$break$L1 (result f32) + (if + (i32.lt_u + (local.get $2) + (i32.const 1081824210) + ) + (block + (local.set $1 + (i32.ne + (local.get $4) + (i32.const 0) + ) + ) + (local.set $3 + (f64.promote_f32 + (local.get $0) + ) + ) + (if + (i32.gt_u + (local.get $2) + (i32.const 1075235811) + ) + (br $label$break$L1 + (f32.neg + (call $___cosdf + (f64.add + (select + (f64.const 3.141592653589793) + (f64.const -3.141592653589793) + (local.get $1) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (local.get $1) + (br $label$break$L1 + (call $___sindf + (f64.add + (local.get $3) + (f64.const 1.5707963267948966) + ) + ) + ) + (br $label$break$L1 + (call $___sindf + (f64.sub + (f64.const 1.5707963267948966) + (local.get $3) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $2) + (i32.const 1088565718) + ) + (block + (local.set $1 + (i32.ne + (local.get $4) + (i32.const 0) + ) + ) + (if + (i32.gt_u + (local.get $2) + (i32.const 1085271519) + ) + (br $label$break$L1 + (call $___cosdf + (f64.add + (select + (f64.const 6.283185307179586) + (f64.const -6.283185307179586) + (local.get $1) + ) + (f64.promote_f32 + (local.get $0) + ) + ) + ) + ) + ) + (if + (local.get $1) + (br $label$break$L1 + (call $___sindf + (f64.add + (f64.promote_f32 + (f32.neg + (local.get $0) + ) + ) + (f64.const -4.71238898038469) + ) + ) + ) + (br $label$break$L1 + (call $___sindf + (f64.add + (f64.promote_f32 + (local.get $0) + ) + (f64.const -4.71238898038469) + ) + ) + ) + ) + ) + ) + (drop + (br_if $label$break$L1 + (f32.sub + (local.get $0) + (local.get $0) + ) + (i32.gt_u + (local.get $2) + (i32.const 2139095039) + ) + ) + ) + (block $switch-default + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-default + (i32.and + (call $___rem_pio2f + (local.get $0) + (local.get $1) + ) + (i32.const 3) + ) + ) + ) + (br $label$break$L1 + (call $___cosdf + (f64.load + (local.get $1) + ) + ) + ) + ) + (br $label$break$L1 + (call $___sindf + (f64.neg + (f64.load + (local.get $1) + ) + ) + ) + ) + ) + (br $label$break$L1 + (f32.neg + (call $___cosdf + (f64.load + (local.get $1) + ) + ) + ) + ) + ) + (call $___sindf + (f64.load + (local.get $1) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $0) + ) + (func $_sinf (; 610 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $4 + (i32.shr_u + (local.tee $2 + (i32.reinterpret_f32 + (local.get $0) + ) + ) + (i32.const 31) + ) + ) + (if + (i32.lt_u + (local.tee $2 + (i32.and + (local.get $2) + (i32.const 2147483647) + ) + ) + (i32.const 1061752795) + ) + (if + (i32.ge_u + (local.get $2) + (i32.const 964689920) + ) + (local.set $0 + (call $___sindf + (f64.promote_f32 + (local.get $0) + ) + ) + ) + ) + (local.set $0 + (block $label$break$L1 (result f32) + (if + (i32.lt_u + (local.get $2) + (i32.const 1081824210) + ) + (block + (local.set $1 + (i32.ne + (local.get $4) + (i32.const 0) + ) + ) + (local.set $3 + (f64.promote_f32 + (local.get $0) + ) + ) + (if + (i32.ge_u + (local.get $2) + (i32.const 1075235812) + ) + (br $label$break$L1 + (call $___sindf + (f64.neg + (f64.add + (select + (f64.const 3.141592653589793) + (f64.const -3.141592653589793) + (local.get $1) + ) + (local.get $3) + ) + ) + ) + ) + ) + (if + (local.get $1) + (br $label$break$L1 + (f32.neg + (call $___cosdf + (f64.add + (local.get $3) + (f64.const 1.5707963267948966) + ) + ) + ) + ) + (br $label$break$L1 + (call $___cosdf + (f64.add + (local.get $3) + (f64.const -1.5707963267948966) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $2) + (i32.const 1088565718) + ) + (block + (local.set $1 + (i32.ne + (local.get $4) + (i32.const 0) + ) + ) + (local.set $3 + (f64.promote_f32 + (local.get $0) + ) + ) + (if + (i32.ge_u + (local.get $2) + (i32.const 1085271520) + ) + (br $label$break$L1 + (call $___sindf + (f64.add + (select + (f64.const 6.283185307179586) + (f64.const -6.283185307179586) + (local.get $1) + ) + (local.get $3) + ) + ) + ) + ) + (if + (local.get $1) + (br $label$break$L1 + (call $___cosdf + (f64.add + (local.get $3) + (f64.const 4.71238898038469) + ) + ) + ) + (br $label$break$L1 + (f32.neg + (call $___cosdf + (f64.add + (local.get $3) + (f64.const -4.71238898038469) + ) + ) + ) + ) + ) + ) + ) + (drop + (br_if $label$break$L1 + (f32.sub + (local.get $0) + (local.get $0) + ) + (i32.gt_u + (local.get $2) + (i32.const 2139095039) + ) + ) + ) + (block $switch-default + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-default + (i32.and + (call $___rem_pio2f + (local.get $0) + (local.get $1) + ) + (i32.const 3) + ) + ) + ) + (br $label$break$L1 + (call $___sindf + (f64.load + (local.get $1) + ) + ) + ) + ) + (br $label$break$L1 + (call $___cosdf + (f64.load + (local.get $1) + ) + ) + ) + ) + (br $label$break$L1 + (call $___sindf + (f64.neg + (f64.load + (local.get $1) + ) + ) + ) + ) + ) + (f32.neg + (call $___cosdf + (f64.load + (local.get $1) + ) + ) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $0) + ) + (func $_atanf (; 611 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local.set $4 + (i32.shr_u + (local.tee $1 + (i32.reinterpret_f32 + (local.get $0) + ) + ) + (i32.const 31) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.and + (local.get $1) + (i32.const 2147483647) + ) + ) + (i32.const 1283457023) + ) + (return + (select + (local.get $0) + (select + (f32.const -1.570796251296997) + (f32.const 1.570796251296997) + (local.get $4) + ) + (i32.gt_u + (local.get $1) + (i32.const 2139095040) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $1) + (i32.const 1054867456) + ) + (local.set $1 + (if (result i32) + (i32.lt_u + (local.get $1) + (i32.const 964689920) + ) + (return + (local.get $0) + ) + (i32.const -1) + ) + ) + (block + (local.set $0 + (f32.abs + (local.get $0) + ) + ) + (local.set $0 + (if (result f32) + (i32.lt_u + (local.get $1) + (i32.const 1066926080) + ) + (if (result f32) + (i32.lt_u + (local.get $1) + (i32.const 1060110336) + ) + (block (result f32) + (local.set $1 + (i32.const 0) + ) + (f32.div + (f32.add + (f32.mul + (local.get $0) + (f32.const 2) + ) + (f32.const -1) + ) + (f32.add + (local.get $0) + (f32.const 2) + ) + ) + ) + (block (result f32) + (local.set $1 + (i32.const 1) + ) + (f32.div + (f32.add + (local.get $0) + (f32.const -1) + ) + (f32.add + (local.get $0) + (f32.const 1) + ) + ) + ) + ) + (if (result f32) + (i32.lt_u + (local.get $1) + (i32.const 1075576832) + ) + (block (result f32) + (local.set $1 + (i32.const 2) + ) + (f32.div + (f32.add + (local.get $0) + (f32.const -1.5) + ) + (f32.add + (f32.mul + (local.get $0) + (f32.const 1.5) + ) + (f32.const 1) + ) + ) + ) + (block (result f32) + (local.set $1 + (i32.const 3) + ) + (f32.div + (f32.const -1) + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (f32.mul + (local.tee $3 + (f32.mul + (local.get $0) + (local.get $0) + ) + ) + (local.get $3) + ) + ) + (local.set $3 + (f32.mul + (local.get $3) + (f32.add + (f32.mul + (local.get $2) + (f32.add + (f32.mul + (local.get $2) + (f32.const 0.06168760731816292) + ) + (f32.const 0.14253635704517365) + ) + ) + (f32.const 0.333333283662796) + ) + ) + ) + (local.set $2 + (f32.mul + (local.get $2) + (f32.sub + (f32.const -0.19999158382415771) + (f32.mul + (local.get $2) + (f32.const 0.106480173766613) + ) + ) + ) + ) + (if (result f32) + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + (f32.sub + (local.get $0) + (f32.mul + (local.get $0) + (f32.add + (local.get $2) + (local.get $3) + ) + ) + ) + (select + (local.tee $0 + (f32.sub + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (i32.const 8576) + ) + ) + (f32.sub + (f32.sub + (f32.mul + (local.get $0) + (f32.add + (local.get $2) + (local.get $3) + ) + ) + (f32.load + (i32.add + (i32.shl + (local.get $1) + (i32.const 2) + ) + (i32.const 8592) + ) + ) + ) + (local.get $0) + ) + ) + ) + (f32.neg + (local.get $0) + ) + (i32.eqz + (local.get $4) + ) + ) + ) + ) + (func $_atan2f (; 612 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.gt_u + (local.tee $6 + (i32.and + (local.tee $5 + (i32.reinterpret_f32 + (local.get $1) + ) + ) + (i32.const 2147483647) + ) + ) + (i32.const 2139095040) + ) + ) + (br_if $__rjti$0 + (i32.gt_u + (local.tee $3 + (i32.and + (local.tee $2 + (i32.reinterpret_f32 + (local.get $0) + ) + ) + (i32.const 2147483647) + ) + ) + (i32.const 2139095040) + ) + ) + (block $label$break$L1 + (if + (i32.eq + (local.get $5) + (i32.const 1065353216) + ) + (block + (local.set $0 + (call $_atanf + (local.get $0) + ) + ) + (br $label$break$L1) + ) + ) + (local.set $2 + (i32.or + (local.tee $7 + (i32.shr_u + (local.get $2) + (i32.const 31) + ) + ) + (i32.and + (i32.shr_u + (local.get $5) + (i32.const 30) + ) + (i32.const 2) + ) + ) + ) + (if + (i32.eqz + (local.get $3) + ) + (block $switch + (block $switch-case2 + (block $switch-case1 + (br_table $label$break$L1 $label$break$L1 $switch-case1 $switch-case2 $switch + (i32.and + (local.get $2) + (i32.const 3) + ) + ) + ) + (local.set $0 + (f32.const 3.1415927410125732) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const -3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + (block $label$break$L14 + (if + (i32.lt_s + (local.tee $4 + (i32.and + (local.get $5) + (i32.const 2147483647) + ) + ) + (i32.const 2139095040) + ) + (block + (br_if $label$break$L14 + (local.get $4) + ) + (local.set $0 + (select + (f32.const -1.5707963705062866) + (f32.const 1.5707963705062866) + (local.get $7) + ) + ) + (br $label$break$L1) + ) + (block + (br_if $label$break$L14 + (i32.sub + (local.get $4) + (i32.const 2139095040) + ) + ) + (local.set $4 + (i32.and + (local.get $2) + (i32.const 255) + ) + ) + (if + (i32.eq + (local.get $3) + (i32.const 2139095040) + ) + (block $switch10 + (block $switch-case14 + (block $switch-case13 + (block $switch-case12 + (block $switch-case11 + (br_table $switch-case11 $switch-case12 $switch-case13 $switch-case14 $switch10 + (i32.and + (local.get $4) + (i32.const 3) + ) + ) + ) + (local.set $0 + (f32.const 0.7853981852531433) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const -0.7853981852531433) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const 2.356194496154785) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const -2.356194496154785) + ) + (br $label$break$L1) + ) + (block $switch16 + (block $switch-case20 + (block $switch-case19 + (block $switch-case18 + (block $switch-case17 + (br_table $switch-case17 $switch-case18 $switch-case19 $switch-case20 $switch16 + (i32.and + (local.get $4) + (i32.const 3) + ) + ) + ) + (local.set $0 + (f32.const 0) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const -0) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const 3.1415927410125732) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.const -3.1415927410125732) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + (if + (i32.or + (i32.eq + (local.get $3) + (i32.const 2139095040) + ) + (i32.lt_u + (i32.add + (local.get $6) + (i32.const 218103808) + ) + (local.get $3) + ) + ) + (block + (local.set $0 + (select + (f32.const -1.5707963705062866) + (f32.const 1.5707963705062866) + (local.get $7) + ) + ) + (br $label$break$L1) + ) + ) + (local.set $0 + (if (result f32) + (i32.and + (i32.lt_s + (local.get $5) + (i32.const 0) + ) + (i32.lt_u + (i32.add + (local.get $3) + (i32.const 218103808) + ) + (local.get $6) + ) + ) + (f32.const 0) + (call $_atanf + (f32.abs + (f32.div + (local.get $0) + (local.get $1) + ) + ) + ) + ) + ) + (block $switch-default26 + (block $switch-case25 + (block $switch-case24 + (br_table $label$break$L1 $switch-case24 $switch-case25 $switch-default26 + (i32.and + (local.get $2) + (i32.const 3) + ) + ) + ) + (local.set $0 + (f32.neg + (local.get $0) + ) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.sub + (f32.const 3.1415927410125732) + (f32.add + (local.get $0) + (f32.const 8.742277657347586e-08) + ) + ) + ) + (br $label$break$L1) + ) + (local.set $0 + (f32.add + (f32.add + (local.get $0) + (f32.const 8.742277657347586e-08) + ) + (f32.const -3.1415927410125732) + ) + ) + ) + (br $__rjto$0) + ) + (local.set $0 + (f32.add + (local.get $0) + (local.get $1) + ) + ) + ) + (local.get $0) + ) + (func $_pow (; 613 ;) (; has Stack IR ;) (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 f64) + (local $7 i32) + (local $8 f64) + (local $9 i64) + (local $10 i32) + (local $11 f64) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i64) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (if + (i32.eqz + (i32.or + (local.tee $3 + (i32.and + (local.tee $7 + (i32.wrap_i64 + (i64.shr_u + (local.tee $9 + (i64.reinterpret_f64 + (local.get $1) + ) + ) + (i64.const 32) + ) + ) + ) + (i32.const 2147483647) + ) + ) + (local.tee $10 + (i32.wrap_i64 + (local.get $9) + ) + ) + ) + ) + (return + (f64.const 1) + ) + ) + (if + (i32.and + (i32.eq + (local.tee $13 + (i32.wrap_i64 + (i64.shr_u + (local.tee $16 + (i64.reinterpret_f64 + (local.get $0) + ) + ) + (i64.const 32) + ) + ) + ) + (i32.const 1072693248) + ) + (local.tee $17 + (i32.eqz + (local.tee $14 + (i32.wrap_i64 + (local.get $16) + ) + ) + ) + ) + ) + (return + (f64.const 1) + ) + ) + (block $folding-inner2 + (block $folding-inner1 + (block $folding-inner0 + (if + (i32.le_u + (local.tee $5 + (i32.and + (local.get $13) + (i32.const 2147483647) + ) + ) + (i32.const 2146435072) + ) + (if + (i32.eqz + (i32.or + (i32.and + (i32.eq + (local.get $5) + (i32.const 2146435072) + ) + (i32.ne + (local.get $14) + (i32.const 0) + ) + ) + (i32.gt_u + (local.get $3) + (i32.const 2146435072) + ) + ) + ) + (if + (i32.eqz + (i32.and + (local.tee $18 + (i32.eq + (local.get $3) + (i32.const 2146435072) + ) + ) + (i32.ne + (local.get $10) + (i32.const 0) + ) + ) + ) + (block + (block $__rjto$1 + (block $__rjti$1 + (block $__rjti$0 + (br_if $__rjti$0 + (i32.eqz + (local.tee $15 + (i32.lt_s + (local.get $13) + (i32.const 0) + ) + ) + ) + ) + (local.set $2 + (if (result i32) + (i32.gt_u + (local.get $3) + (i32.const 1128267775) + ) + (block + (local.set $2 + (i32.const 2) + ) + (br $__rjti$0) + ) + (if (result i32) + (i32.gt_u + (local.get $3) + (i32.const 1072693247) + ) + (block (result i32) + (local.set $2 + (i32.shr_u + (local.get $3) + (i32.const 20) + ) + ) + (if + (i32.gt_u + (local.get $3) + (i32.const 1094713343) + ) + (block + (local.set $2 + (select + (i32.sub + (i32.const 2) + (i32.and + (local.tee $19 + (i32.shr_u + (local.get $10) + (local.tee $2 + (i32.sub + (i32.const 1075) + (local.get $2) + ) + ) + ) + ) + (i32.const 1) + ) + ) + (i32.const 0) + (i32.eq + (local.get $10) + (i32.shl + (local.get $19) + (local.get $2) + ) + ) + ) + ) + (br $__rjti$0) + ) + ) + (if (result i32) + (local.get $10) + (i32.const 0) + (block + (local.set $2 + (select + (i32.sub + (i32.const 2) + (i32.and + (local.tee $10 + (i32.shr_u + (local.get $3) + (local.tee $2 + (i32.sub + (i32.const 1043) + (local.get $2) + ) + ) + ) + ) + (i32.const 1) + ) + ) + (i32.const 0) + (i32.eq + (local.get $3) + (i32.shl + (local.get $10) + (local.get $2) + ) + ) + ) + ) + (br $__rjti$1) + ) + ) + ) + (br $__rjti$0) + ) + ) + ) + (br $__rjto$1) + ) + (br_if $__rjti$1 + (i32.eqz + (local.get $10) + ) + ) + (br $__rjto$1) + ) + (if + (local.get $18) + (block + (if + (i32.eqz + (i32.or + (local.get $14) + (i32.add + (local.get $5) + (i32.const -1072693248) + ) + ) + ) + (return + (f64.const 1) + ) + ) + (local.set $2 + (i32.gt_s + (local.get $7) + (i32.const -1) + ) + ) + (if + (i32.gt_u + (local.get $5) + (i32.const 1072693247) + ) + (return + (select + (local.get $1) + (f64.const 0) + (local.get $2) + ) + ) + (return + (select + (f64.const 0) + (f64.neg + (local.get $1) + ) + (local.get $2) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $3) + (i32.const 1072693248) + ) + (return + (select + (local.get $0) + (f64.div + (f64.const 1) + (local.get $0) + ) + (i32.gt_s + (local.get $7) + (i32.const -1) + ) + ) + ) + ) + (if + (i32.eq + (local.get $7) + (i32.const 1073741824) + ) + (return + (f64.mul + (local.get $0) + (local.get $0) + ) + ) + ) + (if + (i32.and + (i32.eq + (local.get $7) + (i32.const 1071644672) + ) + (i32.gt_s + (local.get $13) + (i32.const -1) + ) + ) + (return + (f64.sqrt + (local.get $0) + ) + ) + ) + ) + (local.set $4 + (f64.abs + (local.get $0) + ) + ) + (if + (local.get $17) + (if + (i32.or + (i32.eqz + (local.get $5) + ) + (i32.eq + (i32.or + (local.get $5) + (i32.const 1073741824) + ) + (i32.const 2146435072) + ) + ) + (block + (local.set $0 + (select + (f64.div + (f64.const 1) + (local.get $4) + ) + (local.get $4) + (i32.lt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + (if + (i32.eqz + (local.get $15) + ) + (return + (local.get $0) + ) + ) + (if + (i32.or + (i32.add + (local.get $5) + (i32.const -1072693248) + ) + (local.get $2) + ) + (return + (select + (f64.neg + (local.get $0) + ) + (local.get $0) + (i32.eq + (local.get $2) + (i32.const 1) + ) + ) + ) + ) + (br $folding-inner0) + ) + ) + ) + (if + (local.get $15) + (block $label$break$L55 + (block $switch-default + (block $switch-case1 + (br_table $folding-inner0 $switch-case1 $switch-default + (local.get $2) + ) + ) + (local.set $8 + (f64.const -1) + ) + (br $label$break$L55) + ) + (local.set $8 + (f64.const 1) + ) + ) + (local.set $8 + (f64.const 1) + ) + ) + (if + (i32.gt_u + (local.get $3) + (i32.const 1105199104) + ) + (block $do-once2 + (if + (i32.gt_u + (local.get $3) + (i32.const 1139802112) + ) + (if + (i32.lt_u + (local.get $5) + (i32.const 1072693248) + ) + (return + (select + (global.get $inf$asm2wasm$import) + (f64.const 0) + (i32.lt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + (return + (select + (global.get $inf$asm2wasm$import) + (f64.const 0) + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $5) + (i32.const 1072693247) + ) + (return + (select + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1.e+300) + ) + (f64.const 1.e+300) + ) + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1e-300) + ) + (f64.const 1e-300) + ) + (i32.lt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + ) + (if + (i32.le_u + (local.get $5) + (i32.const 1072693248) + ) + (block + (local.set $6 + (f64.sub + (local.tee $0 + (f64.reinterpret_i64 + (i64.and + (i64.reinterpret_f64 + (f64.add + (local.tee $6 + (f64.mul + (local.tee $0 + (f64.add + (local.get $4) + (f64.const -1) + ) + ) + (f64.const 1.4426950216293335) + ) + ) + (local.tee $4 + (f64.sub + (f64.mul + (local.get $0) + (f64.const 1.9259629911266175e-08) + ) + (f64.mul + (f64.mul + (f64.mul + (local.get $0) + (local.get $0) + ) + (f64.sub + (f64.const 0.5) + (f64.mul + (local.get $0) + (f64.sub + (f64.const 0.3333333333333333) + (f64.mul + (local.get $0) + (f64.const 0.25) + ) + ) + ) + ) + ) + (f64.const 1.4426950408889634) + ) + ) + ) + ) + ) + (i64.const -4294967296) + ) + ) + ) + (local.get $6) + ) + ) + (br $do-once2) + ) + ) + (return + (select + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1.e+300) + ) + (f64.const 1.e+300) + ) + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1e-300) + ) + (f64.const 1e-300) + ) + (i32.gt_s + (local.get $7) + (i32.const 0) + ) + ) + ) + ) + (block + (local.set $5 + (i32.add + (i32.shr_s + (local.tee $2 + (select + (i32.wrap_i64 + (i64.shr_u + (i64.reinterpret_f64 + (local.tee $0 + (f64.mul + (local.get $4) + (f64.const 9007199254740992) + ) + ) + ) + (i64.const 32) + ) + ) + (local.get $5) + (local.tee $7 + (i32.lt_u + (local.get $5) + (i32.const 1048576) + ) + ) + ) + ) + (i32.const 20) + ) + (select + (i32.const -1076) + (i32.const -1023) + (local.get $7) + ) + ) + ) + (local.set $2 + (i32.or + (local.tee $3 + (i32.and + (local.get $2) + (i32.const 1048575) + ) + ) + (i32.const 1072693248) + ) + ) + (if + (i32.lt_u + (local.get $3) + (i32.const 235663) + ) + (block + (local.set $3 + (local.get $2) + ) + (local.set $2 + (i32.const 0) + ) + ) + (block + (local.set $3 + (select + (local.get $2) + (i32.add + (local.get $2) + (i32.const -1048576) + ) + (local.tee $2 + (i32.lt_u + (local.get $3) + (i32.const 767610) + ) + ) + ) + ) + (local.set $5 + (i32.add + (local.get $5) + (i32.and + (i32.xor + (local.get $2) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + ) + ) + (local.set $6 + (f64.sub + (f64.sub + (f64.sub + (local.tee $0 + (f64.reinterpret_i64 + (i64.and + (i64.reinterpret_f64 + (f64.add + (f64.add + (local.tee $20 + (f64.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 8640) + ) + ) + ) + (f64.add + (local.tee $6 + (f64.mul + (local.tee $0 + (f64.reinterpret_i64 + (i64.and + (i64.reinterpret_f64 + (f64.add + (local.tee $12 + (f64.mul + (local.tee $0 + (f64.reinterpret_i64 + (i64.and + (i64.reinterpret_f64 + (local.tee $4 + (f64.mul + (local.tee $12 + (f64.sub + (local.tee $6 + (f64.reinterpret_i64 + (i64.or + (i64.and + (i64.reinterpret_f64 + (select + (local.get $0) + (local.get $4) + (local.get $7) + ) + ) + (i64.const 4294967295) + ) + (i64.shl + (i64.extend_i32_u + (local.get $3) + ) + (i64.const 32) + ) + ) + ) + ) + (local.tee $11 + (f64.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 8608) + ) + ) + ) + ) + ) + (local.tee $21 + (f64.div + (f64.const 1) + (f64.add + (local.get $11) + (local.get $6) + ) + ) + ) + ) + ) + ) + (i64.const -4294967296) + ) + ) + ) + (local.tee $0 + (f64.reinterpret_i64 + (i64.and + (i64.reinterpret_f64 + (f64.add + (f64.add + (local.tee $22 + (f64.mul + (local.get $0) + (local.get $0) + ) + ) + (f64.const 3) + ) + (local.tee $11 + (f64.add + (f64.mul + (f64.add + (local.get $4) + (local.get $0) + ) + (local.tee $6 + (f64.mul + (local.get $21) + (f64.sub + (f64.sub + (local.get $12) + (f64.mul + (local.tee $12 + (f64.reinterpret_i64 + (i64.shl + (i64.extend_i32_u + (i32.add + (i32.add + (i32.or + (i32.shr_s + (local.get $3) + (i32.const 1) + ) + (i32.const 536870912) + ) + (i32.const 524288) + ) + (i32.shl + (local.get $2) + (i32.const 18) + ) + ) + ) + (i64.const 32) + ) + ) + ) + (local.get $0) + ) + ) + (f64.mul + (f64.sub + (local.get $6) + (f64.sub + (local.get $12) + (local.get $11) + ) + ) + (local.get $0) + ) + ) + ) + ) + ) + (f64.mul + (f64.mul + (local.tee $0 + (f64.mul + (local.get $4) + (local.get $4) + ) + ) + (local.get $0) + ) + (f64.add + (f64.mul + (local.get $0) + (f64.add + (f64.mul + (local.get $0) + (f64.add + (f64.mul + (local.get $0) + (f64.add + (f64.mul + (local.get $0) + (f64.add + (f64.mul + (local.get $0) + (f64.const 0.20697501780033842) + ) + (f64.const 0.23066074577556175) + ) + ) + (f64.const 0.272728123808534) + ) + ) + (f64.const 0.33333332981837743) + ) + ) + (f64.const 0.4285714285785502) + ) + ) + (f64.const 0.5999999999999946) + ) + ) + ) + ) + ) + ) + (i64.const -4294967296) + ) + ) + ) + ) + ) + (local.tee $4 + (f64.add + (f64.mul + (local.get $6) + (local.get $0) + ) + (f64.mul + (local.get $4) + (f64.sub + (local.get $11) + (f64.sub + (f64.add + (local.get $0) + (f64.const -3) + ) + (local.get $22) + ) + ) + ) + ) + ) + ) + ) + (i64.const -4294967296) + ) + ) + ) + (f64.const 0.9617967009544373) + ) + ) + (local.tee $4 + (f64.add + (f64.load + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 8624) + ) + ) + (f64.sub + (f64.mul + (f64.sub + (local.get $4) + (f64.sub + (local.get $0) + (local.get $12) + ) + ) + (f64.const 0.9617966939259756) + ) + (f64.mul + (local.get $0) + (f64.const 7.028461650952758e-09) + ) + ) + ) + ) + ) + ) + (local.tee $11 + (f64.convert_i32_s + (local.get $5) + ) + ) + ) + ) + (i64.const -4294967296) + ) + ) + ) + (local.get $11) + ) + (local.get $20) + ) + (local.get $6) + ) + ) + ) + ) + (local.set $1 + (f64.add + (f64.mul + (f64.sub + (local.get $4) + (local.get $6) + ) + (local.get $1) + ) + (f64.mul + (f64.sub + (local.get $1) + (local.tee $4 + (f64.reinterpret_i64 + (i64.and + (local.get $9) + (i64.const -4294967296) + ) + ) + ) + ) + (local.get $0) + ) + ) + ) + (local.set $2 + (i32.wrap_i64 + (i64.shr_u + (local.tee $9 + (i64.reinterpret_f64 + (local.tee $4 + (f64.add + (local.tee $0 + (f64.mul + (local.get $0) + (local.get $4) + ) + ) + (local.get $1) + ) + ) + ) + ) + (i64.const 32) + ) + ) + ) + (local.set $3 + (i32.wrap_i64 + (local.get $9) + ) + ) + (if + (i32.gt_s + (local.get $2) + (i32.const 1083179007) + ) + (br_if $folding-inner1 + (i32.or + (i32.or + (local.get $3) + (i32.add + (local.get $2) + (i32.const -1083179008) + ) + ) + (f64.gt + (f64.add + (local.get $1) + (f64.const 8.008566259537294e-17) + ) + (f64.sub + (local.get $4) + (local.get $0) + ) + ) + ) + ) + (br_if $folding-inner2 + (select + (i32.gt_u + (i32.and + (local.get $2) + (i32.const 2147482624) + ) + (i32.const 1083231231) + ) + (i32.const 0) + (i32.or + (i32.or + (local.get $3) + (i32.add + (local.get $2) + (i32.const 1064252416) + ) + ) + (f64.le + (local.get $1) + (f64.sub + (local.get $4) + (local.get $0) + ) + ) + ) + ) + ) + ) + (local.set $2 + (if (result i32) + (i32.gt_u + (local.tee $3 + (i32.and + (local.get $2) + (i32.const 2147483647) + ) + ) + (i32.const 1071644672) + ) + (block (result i32) + (local.set $5 + (i32.and + (i32.shr_u + (local.tee $3 + (i32.add + (local.get $2) + (i32.shr_u + (i32.const 1048576) + (i32.add + (i32.shr_u + (local.get $3) + (i32.const 20) + ) + (i32.const -1022) + ) + ) + ) + ) + (i32.const 20) + ) + (i32.const 2047) + ) + ) + (local.set $9 + (i64.reinterpret_f64 + (f64.add + (local.get $1) + (local.tee $0 + (f64.sub + (local.get $0) + (f64.reinterpret_i64 + (i64.shl + (i64.extend_i32_u + (i32.and + (local.get $3) + (i32.shr_s + (i32.const -1048576) + (i32.add + (local.get $5) + (i32.const -1023) + ) + ) + ) + ) + (i64.const 32) + ) + ) + ) + ) + ) + ) + ) + (select + (i32.sub + (i32.const 0) + (local.tee $3 + (i32.shr_u + (i32.or + (i32.and + (local.get $3) + (i32.const 1048575) + ) + (i32.const 1048576) + ) + (i32.sub + (i32.const 1043) + (local.get $5) + ) + ) + ) + ) + (local.get $3) + (i32.lt_s + (local.get $2) + (i32.const 0) + ) + ) + ) + (i32.const 0) + ) + ) + (return + (f64.mul + (local.get $8) + (if (result f64) + (i32.lt_s + (local.tee $3 + (i32.add + (i32.wrap_i64 + (i64.shr_u + (local.tee $9 + (i64.reinterpret_f64 + (local.tee $0 + (f64.sub + (f64.const 1) + (f64.sub + (f64.sub + (f64.div + (f64.mul + (local.tee $0 + (f64.add + (local.tee $6 + (f64.mul + (local.tee $4 + (f64.reinterpret_i64 + (i64.and + (local.get $9) + (i64.const -4294967296) + ) + ) + ) + (f64.const 0.6931471824645996) + ) + ) + (local.tee $4 + (f64.sub + (f64.mul + (f64.sub + (local.get $1) + (f64.sub + (local.get $4) + (local.get $0) + ) + ) + (f64.const 0.6931471805599453) + ) + (f64.mul + (local.get $4) + (f64.const 1.904654299957768e-09) + ) + ) + ) + ) + ) + (local.tee $1 + (f64.sub + (local.get $0) + (f64.mul + (local.tee $1 + (f64.mul + (local.get $0) + (local.get $0) + ) + ) + (f64.add + (f64.mul + (local.get $1) + (f64.add + (f64.mul + (local.get $1) + (f64.add + (f64.mul + (local.get $1) + (f64.add + (f64.mul + (local.get $1) + (f64.const 4.1381367970572385e-08) + ) + (f64.const -1.6533902205465252e-06) + ) + ) + (f64.const 6.613756321437934e-05) + ) + ) + (f64.const -2.7777777777015593e-03) + ) + ) + (f64.const 0.16666666666666602) + ) + ) + ) + ) + ) + (f64.add + (local.get $1) + (f64.const -2) + ) + ) + (f64.add + (local.tee $1 + (f64.sub + (local.get $4) + (f64.sub + (local.get $0) + (local.get $6) + ) + ) + ) + (f64.mul + (local.get $0) + (local.get $1) + ) + ) + ) + (local.get $0) + ) + ) + ) + ) + ) + (i64.const 32) + ) + ) + (i32.shl + (local.get $2) + (i32.const 20) + ) + ) + ) + (i32.const 1048576) + ) + (call $_scalbn + (local.get $0) + (local.get $2) + ) + (f64.reinterpret_i64 + (i64.or + (i64.and + (local.get $9) + (i64.const 4294967295) + ) + (i64.shl + (i64.extend_i32_u + (local.get $3) + ) + (i64.const 32) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (return + (f64.add + (local.get $0) + (local.get $1) + ) + ) + ) + (return + (f64.div + (local.tee $0 + (f64.sub + (local.get $0) + (local.get $0) + ) + ) + (local.get $0) + ) + ) + ) + (return + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1.e+300) + ) + (f64.const 1.e+300) + ) + ) + ) + (f64.mul + (f64.mul + (local.get $8) + (f64.const 1e-300) + ) + (f64.const 1e-300) + ) + ) + (func $_emscripten_GetProcAddress (; 614 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (call $_strcpy + (local.tee $1 + (call $_malloc + (i32.add + (call $_strlen + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (local.get $0) + ) + (if + (local.tee $0 + (call $_strstr + (local.get $1) + (i32.const 16684) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + ) + (if + (local.tee $0 + (call $_strstr + (local.get $1) + (i32.const 16688) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + ) + (if + (local.tee $0 + (call $_strstr + (local.get $1) + (i32.const 16692) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + ) + (if + (local.tee $0 + (call $_strstr + (local.get $1) + (i32.const 16696) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + ) + (if + (local.tee $0 + (call $_strstr + (local.get $1) + (i32.const 16702) + ) + ) + (i32.store8 + (local.get $0) + (i32.const 0) + ) + ) + (if + (i32.eqz + (local.tee $0 + (call $_emscripten_webgl1_get_proc_address + (local.get $1) + ) + ) + ) + (local.set $0 + (call $__webgl1_match_ext_proc_address_without_suffix + (local.get $1) + ) + ) + ) + (call $_free + (local.get $1) + ) + (local.get $0) + ) + (func $_emscripten_webgl1_get_proc_address (; 615 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if + (call $_strcmp + (local.get $0) + (i32.const 17036) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17052) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17067) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17088) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17101) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17119) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17138) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17152) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17165) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17181) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17205) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17217) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17237) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17250) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17266) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17291) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17299) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17312) + ) + (if + (call $_strcmp + (local.get $0) + (i32.const 17326) + ) + (block $do-once + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17341) + ) + ) + (block + (local.set $0 + (i32.const 5) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17353) + ) + ) + (block + (local.set $0 + (i32.const 5) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17369) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17392) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17418) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17435) + ) + ) + (block + (local.set $0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17455) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17471) + ) + ) + (block + (local.set $0 + (i32.const 5) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17486) + ) + ) + (block + (local.set $0 + (i32.const 6) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17497) + ) + ) + (block + (local.set $0 + (i32.const 14) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17513) + ) + ) + (block + (local.set $0 + (i32.const 15) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17534) + ) + ) + (block + (local.set $0 + (i32.const 7) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17550) + ) + ) + (block + (local.set $0 + (i32.const 16) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17572) + ) + ) + (block + (local.set $0 + (i32.const 8) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17587) + ) + ) + (block + (local.set $0 + (i32.const 17) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17604) + ) + ) + (block + (local.set $0 + (i32.const 9) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17616) + ) + ) + (block + (local.set $0 + (i32.const 10) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17628) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17642) + ) + ) + (block + (local.set $0 + (i32.const 18) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17657) + ) + ) + (block + (local.set $0 + (i32.const 11) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17667) + ) + ) + (block + (local.set $0 + (i32.const 12) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17694) + ) + ) + (block + (local.set $0 + (i32.const 4) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17707) + ) + ) + (block + (local.set $0 + (i32.const 6) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17722) + ) + ) + (block + (local.set $0 + (i32.const 13) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17731) + ) + ) + (block + (local.set $0 + (i32.const 14) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17757) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17766) + ) + ) + (block + (local.set $0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17774) + ) + ) + (block + (local.set $0 + (i32.const 7) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17800) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17823) + ) + ) + (block + (local.set $0 + (i32.const 15) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17835) + ) + ) + (block + (local.set $0 + (i32.const 19) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17848) + ) + ) + (block + (local.set $0 + (i32.const 16) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17865) + ) + ) + (block + (local.set $0 + (i32.const 20) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17883) + ) + ) + (block + (local.set $0 + (i32.const 21) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17902) + ) + ) + (block + (local.set $0 + (i32.const 22) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17916) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17934) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17953) + ) + ) + (block + (local.set $0 + (i32.const 8) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17974) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 17994) + ) + ) + (block + (local.set $0 + (i32.const 23) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18008) + ) + ) + (block + (local.set $0 + (i32.const 5) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18031) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18042) + ) + ) + (block + (local.set $0 + (i32.const 24) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18054) + ) + ) + (block + (local.set $0 + (i32.const 9) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18092) + ) + ) + (block + (local.set $0 + (i32.const 25) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18106) + ) + ) + (block + (local.set $0 + (i32.const 6) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18121) + ) + ) + (block + (local.set $0 + (i32.const 10) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18141) + ) + ) + (block + (local.set $0 + (i32.const 7) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18170) + ) + ) + (block + (local.set $0 + (i32.const 8) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18184) + ) + ) + (block + (local.set $0 + (i32.const 11) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18203) + ) + ) + (block + (local.set $0 + (i32.const 12) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18230) + ) + ) + (block + (local.set $0 + (i32.const 13) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18248) + ) + ) + (block + (local.set $0 + (i32.const 6) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18260) + ) + ) + (block + (local.set $0 + (i32.const 9) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18280) + ) + ) + (block + (local.set $0 + (i32.const 10) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18300) + ) + ) + (block + (local.set $0 + (i32.const 11) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18315) + ) + ) + (block + (local.set $0 + (i32.const 12) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18330) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18351) + ) + ) + (block + (local.set $0 + (i32.const 13) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18371) + ) + ) + (block + (local.set $0 + (i32.const 14) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18391) + ) + ) + (block + (local.set $0 + (i32.const 15) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18417) + ) + ) + (block + (local.set $0 + (i32.const 26) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18424) + ) + ) + (block + (local.set $0 + (i32.const 7) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18435) + ) + ) + (block + (local.set $0 + (i32.const 8) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18447) + ) + ) + (block + (local.set $0 + (i32.const 9) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18463) + ) + ) + (block + (local.set $0 + (i32.const 10) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18475) + ) + ) + (block + (local.set $0 + (i32.const 11) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18492) + ) + ) + (block + (local.set $0 + (i32.const 12) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18503) + ) + ) + (block + (local.set $0 + (i32.const 13) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18515) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18527) + ) + ) + (block + (local.set $0 + (i32.const 17) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18541) + ) + ) + (block + (local.set $0 + (i32.const 27) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18555) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18571) + ) + ) + (block + (local.set $0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18584) + ) + ) + (block + (local.set $0 + (i32.const 4) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18608) + ) + ) + (block + (local.set $0 + (i32.const 14) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18630) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18647) + ) + ) + (block + (local.set $0 + (i32.const 15) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18657) + ) + ) + (block + (local.set $0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18672) + ) + ) + (block + (local.set $0 + (i32.const 16) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18687) + ) + ) + (block + (local.set $0 + (i32.const 16) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18701) + ) + ) + (block + (local.set $0 + (i32.const 17) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18723) + ) + ) + (block + (local.set $0 + (i32.const 18) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18737) + ) + ) + (block + (local.set $0 + (i32.const 28) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18759) + ) + ) + (block + (local.set $0 + (i32.const 17) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18771) + ) + ) + (block + (local.set $0 + (i32.const 18) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18791) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18804) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18820) + ) + ) + (block + (local.set $0 + (i32.const 18) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18837) + ) + ) + (block + (local.set $0 + (i32.const 19) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18853) + ) + ) + (block + (local.set $0 + (i32.const 20) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18870) + ) + ) + (block + (local.set $0 + (i32.const 3) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18886) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18898) + ) + ) + (block + (local.set $0 + (i32.const 21) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18911) + ) + ) + (block + (local.set $0 + (i32.const 29) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18923) + ) + ) + (block + (local.set $0 + (i32.const 22) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18936) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18948) + ) + ) + (block + (local.set $0 + (i32.const 23) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18961) + ) + ) + (block + (local.set $0 + (i32.const 24) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18973) + ) + ) + (block + (local.set $0 + (i32.const 25) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18986) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 18998) + ) + ) + (block + (local.set $0 + (i32.const 26) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19011) + ) + ) + (block + (local.set $0 + (i32.const 19) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19023) + ) + ) + (block + (local.set $0 + (i32.const 27) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19036) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19048) + ) + ) + (block + (local.set $0 + (i32.const 28) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19061) + ) + ) + (block + (local.set $0 + (i32.const 4) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19073) + ) + ) + (block + (local.set $0 + (i32.const 29) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19086) + ) + ) + (block + (local.set $0 + (i32.const 20) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19105) + ) + ) + (block + (local.set $0 + (i32.const 21) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19124) + ) + ) + (block + (local.set $0 + (i32.const 22) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19143) + ) + ) + (block + (local.set $0 + (i32.const 19) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19156) + ) + ) + (block + (local.set $0 + (i32.const 20) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19174) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19191) + ) + ) + (block + (local.set $0 + (i32.const 30) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19209) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19226) + ) + ) + (block + (local.set $0 + (i32.const 31) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19244) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19261) + ) + ) + (block + (local.set $0 + (i32.const 32) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19279) + ) + ) + (block + (local.set $0 + (i32.const 2) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19296) + ) + ) + (block + (local.set $0 + (i32.const 33) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19314) + ) + ) + (block + (local.set $0 + (i32.const 1) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19336) + ) + ) + (block + (local.set $0 + (i32.const 23) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19347) + ) + ) + (block + (local.set $0 + (i32.const 34) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19363) + ) + ) + (block + (local.set $0 + (i32.const 35) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19382) + ) + ) + (block + (local.set $0 + (i32.const 14) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19395) + ) + ) + (block + (local.set $0 + (i32.const 36) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19411) + ) + ) + (block + (local.set $0 + (i32.const 21) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19425) + ) + ) + (block + (local.set $0 + (i32.const 37) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19443) + ) + ) + (block + (local.set $0 + (i32.const 30) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19459) + ) + ) + (block + (local.set $0 + (i32.const 31) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19481) + ) + ) + (block + (local.set $0 + (i32.const 32) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19504) + ) + ) + (block + (local.set $0 + (i32.const 33) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19528) + ) + ) + (block + (local.set $0 + (i32.const 34) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19553) + ) + ) + (block + (local.set $0 + (i32.const 22) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19574) + ) + ) + (block + (local.set $0 + (i32.const 38) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19598) + ) + ) + (block + (local.set $0 + (i32.const 39) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19619) + ) + ) + (block + (local.set $0 + (i32.const 15) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19638) + ) + ) + (block + (local.set $0 + (i32.const 40) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19657) + ) + ) + (block + (local.set $0 + (i32.const 24) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_strcmp + (local.get $0) + (i32.const 19684) + ) + ) + (block + (local.set $0 + (i32.const 5) + ) + (br $do-once) + ) + ) + (return + (select + (i32.const 0) + (i32.const 6) + (call $_strcmp + (local.get $0) + (i32.const 19713) + ) + ) + ) + ) + (local.set $0 + (i32.const 4) + ) + ) + (local.set $0 + (i32.const 1) + ) + ) + (local.set $0 + (i32.const 2) + ) + ) + (local.set $0 + (i32.const 3) + ) + ) + (local.set $0 + (i32.const 4) + ) + ) + (local.set $0 + (i32.const 4) + ) + ) + (local.set $0 + (i32.const 3) + ) + ) + (local.set $0 + (i32.const 2) + ) + ) + (local.set $0 + (i32.const 13) + ) + ) + (local.set $0 + (i32.const 12) + ) + ) + (local.set $0 + (i32.const 2) + ) + ) + (local.set $0 + (i32.const 1) + ) + ) + (local.set $0 + (i32.const 11) + ) + ) + (local.set $0 + (i32.const 10) + ) + ) + (local.set $0 + (i32.const 9) + ) + ) + (local.set $0 + (i32.const 8) + ) + ) + (local.set $0 + (i32.const 3) + ) + ) + (local.set $0 + (i32.const 7) + ) + ) + (local.set $0 + (i32.const 1) + ) + ) + (local.get $0) + ) + (func $__webgl1_match_ext_proc_address_without_suffix (; 616 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16708) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16721) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16737) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16747) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16760) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16771) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16786) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16799) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16818) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16838) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16859) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16881) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16899) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16920) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16938) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16954) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16968) + ) + (if (result i32) + (call $_strcmp + (local.get $0) + (i32.const 16990) + ) + (select + (i32.const 0) + (i32.const 6) + (call $_strcmp + (local.get $0) + (i32.const 17014) + ) + ) + (i32.const 5) + ) + (i32.const 24) + ) + (i32.const 40) + ) + (i32.const 15) + ) + (i32.const 39) + ) + (i32.const 38) + ) + (i32.const 22) + ) + (i32.const 34) + ) + (i32.const 33) + ) + (i32.const 32) + ) + (i32.const 31) + ) + (i32.const 30) + ) + (i32.const 37) + ) + (i32.const 21) + ) + (i32.const 36) + ) + (i32.const 14) + ) + (i32.const 35) + ) + (i32.const 34) + ) + ) + (func $___pthread_tsd_run_dtors (; 617 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.eqz + (i32.load offset=60 + (local.tee $2 + (global.get $__pthread_ptr) + ) + ) + ) + (return) + ) + (loop $while-in + (local.set $0 + (i32.const 0) + ) + (local.set $1 + (i32.const 0) + ) + (loop $while-in1 + (if + (local.tee $4 + (i32.load + (local.tee $3 + (i32.add + (i32.load offset=116 + (local.get $2) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + ) + (if + (i32.atomic.load + (local.tee $5 + (i32.add + (i32.shl + (local.get $0) + (i32.const 2) + ) + (i32.const 26752) + ) + ) + ) + (block + (i32.store + (local.get $3) + (i32.const 0) + ) + (call_indirect (type $FUNCSIG$vi) + (local.get $4) + (i32.add + (i32.and + (i32.atomic.load + (local.get $5) + ) + (i32.const 31) + ) + (i32.const 107) + ) + ) + (local.set $1 + (i32.const 1) + ) + ) + ) + ) + (br_if $while-in1 + (i32.ne + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (i32.const 128) + ) + ) + ) + (br_if $while-in + (i32.and + (i32.ne + (local.get $1) + (i32.const 0) + ) + (i32.lt_u + (local.tee $6 + (i32.add + (local.get $6) + (i32.const 1) + ) + ) + (i32.const 4) + ) + ) + ) + ) + ) + (func $_emscripten_async_queue_call_on_thread (; 618 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (if + (i32.eqz + (local.get $1) + ) + (call $___assert_fail + (i32.const 19821) + (i32.const 19826) + (i32.const 456) + (i32.const 20147) + ) + ) + (block $switch + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-default + (local.get $0) + ) + ) + (call $___assert_fail + (i32.const 20185) + (i32.const 19826) + (i32.const 466) + (i32.const 20147) + ) + (br $switch) + ) + (local.set $2 + (i32.load + (i32.const 28204) + ) + ) + (br $switch) + ) + (local.set $2 + (local.get $0) + ) + ) + (if + (i32.ne + (local.get $2) + (i32.const 2) + ) + (if + (i32.ne + (local.get $2) + (global.get $__pthread_ptr) + ) + (block + (drop + (call $___pthread_mutex_lock + (i32.const 28212) + ) + ) + (if + (i32.eqz + (local.get $2) + ) + (call $___assert_fail + (i32.const 19996) + (i32.const 19826) + (i32.const 383) + (i32.const 20003) + ) + ) + (block $__rjto$0 + (block $__rjti$0 + (br_if $__rjti$0 + (local.tee $5 + (i32.eqz + (local.tee $3 + (i32.load + (i32.const 28240) + ) + ) + ) + ) + ) + (local.set $0 + (local.get $3) + ) + (loop $while-in + (if + (i32.ne + (local.get $2) + (i32.load + (local.get $0) + ) + ) + (block + (br_if $while-in + (local.tee $0 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + (br $__rjti$0) + ) + ) + ) + (br $__rjto$0) + ) + (i32.store + (local.tee $4 + (call $_malloc + (i32.const 20) + ) + ) + (local.get $2) + ) + (i64.store offset=4 align=4 + (local.get $4) + (i64.const 0) + ) + (i64.store offset=12 align=4 + (local.get $4) + (i64.const 0) + ) + (i32.store + (if (result i32) + (local.get $5) + (i32.const 28240) + (block (result i32) + (local.set $0 + (local.get $3) + ) + (loop $while-in2 + (if + (local.tee $3 + (i32.load offset=16 + (local.get $0) + ) + ) + (block + (local.set $0 + (local.get $3) + ) + (br $while-in2) + ) + ) + ) + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + (local.get $4) + ) + (local.set $0 + (local.get $4) + ) + ) + (if + (i32.eqz + (i32.load offset=4 + (local.tee $4 + (local.get $0) + ) + ) + ) + (i32.store offset=4 + (local.get $4) + (call $_malloc + (i32.const 512) + ) + ) + ) + (if + (i32.eq + (local.tee $3 + (i32.atomic.load + (local.tee $6 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + (local.tee $7 + (i32.rem_s + (i32.add + (local.tee $0 + (i32.atomic.load offset=12 + (local.tee $5 + (local.get $0) + ) + ) + ) + (i32.const 1) + ) + (i32.const 128) + ) + ) + ) + (block $label$break$L31 + (local.set $0 + (local.get $3) + ) + (loop $while-in5 + (block $while-out4 + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (br_if $while-out4 + (i32.ne + (local.get $2) + (i32.load + (i32.const 28204) + ) + ) + ) + (drop + (call $_emscripten_futex_wait + (local.get $6) + (local.get $0) + (global.get $inf$asm2wasm$import) + ) + ) + (drop + (call $___pthread_mutex_lock + (i32.const 28212) + ) + ) + (br_if $while-in5 + (i32.eq + (local.tee $0 + (i32.atomic.load + (local.get $6) + ) + ) + (local.tee $7 + (i32.rem_s + (i32.add + (local.tee $8 + (i32.atomic.load offset=12 + (local.get $5) + ) + ) + (i32.const 1) + ) + (i32.const 128) + ) + ) + ) + ) + (local.set $3 + (local.get $0) + ) + (local.set $0 + (local.get $8) + ) + (br $label$break$L31) + ) + ) + (call $_free + (i32.load offset=184 + (local.get $1) + ) + ) + (call $_free + (local.get $1) + ) + (return) + ) + ) + (i32.store + (i32.add + (i32.load offset=4 + (local.get $4) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + (local.get $1) + ) + (if + (i32.eq + (local.get $0) + (local.get $3) + ) + (block $do-once + (if + (i32.eq + (i32.load + (i32.const 28204) + ) + (local.get $2) + ) + (block + (drop + (call $_emscripten_asm_const_i + (i32.const 0) + ) + ) + (br $do-once) + ) + ) + (if + (i32.eqz + (call $_emscripten_asm_const_ii + (i32.const 1) + (local.get $2) + ) + ) + (block + (call $_free + (i32.load offset=184 + (local.get $1) + ) + ) + (call $_free + (local.get $1) + ) + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (return) + ) + ) + ) + ) + (i32.atomic.store offset=12 + (local.get $5) + (local.get $7) + ) + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (return) + ) + ) + ) + (call $__do_call + (local.get $1) + ) + ) + (func $_emscripten_async_queue_on_thread_ (; 619 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $9 + (i32.and + (i32.shr_u + (local.get $1) + (i32.const 25) + ) + (i32.const 15) + ) + ) + (if + (i32.eqz + (local.tee $5 + (call $_malloc + (i32.const 192) + ) + ) + ) + (call $___assert_fail + (i32.const 19821) + (i32.const 19826) + (i32.const 172) + (i32.const 19892) + ) + ) + (i32.store offset=8 + (local.get $5) + (i32.const 0) + ) + (i32.store + (local.get $5) + (local.get $1) + ) + (i32.store offset=4 + (local.get $5) + (local.get $2) + ) + (i32.store offset=184 + (local.get $5) + (local.get $3) + ) + (i32.store + (local.get $6) + (local.get $4) + ) + (if + (i32.eqz + (local.get $9) + ) + (block + (i32.store offset=188 + (local.get $5) + (i32.const 1) + ) + (call $_emscripten_async_queue_call_on_thread + (local.get $0) + (local.get $5) + ) + (global.set $STACKTOP + (local.get $8) + ) + (return) + ) + ) + (local.set $2 + (i32.and + (local.get $1) + (i32.const 33554431) + ) + ) + (local.set $1 + (i32.const 0) + ) + (block $__rjto$1 + (loop $label$continue$L7 + (block $switch + (block $switch-case2 + (block $switch-case1 + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-case0 $switch-case1 $switch-case2 $__rjto$1 + (i32.and + (local.get $2) + (i32.const 3) + ) + ) + ) + (local.set $4 + (i32.load + (local.tee $3 + (i32.and + (i32.add + (i32.load + (local.get $6) + ) + (i32.const 3) + ) + (i32.const -4) + ) + ) + ) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + (i32.store + (i32.add + (i32.add + (local.get $5) + (i32.const 16) + ) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + (local.get $4) + ) + (br $switch) + ) + (local.set $10 + (i64.load + (local.tee $3 + (i32.and + (i32.add + (i32.load + (local.get $6) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (i64.store + (i32.add + (i32.add + (local.get $5) + (i32.const 16) + ) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + (local.get $10) + ) + (br $switch) + ) + (local.set $7 + (f64.load + (local.tee $3 + (i32.and + (i32.add + (i32.load + (local.get $6) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (f32.store + (i32.add + (i32.add + (local.get $5) + (i32.const 16) + ) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + (f32.demote_f64 + (local.get $7) + ) + ) + (br $switch) + ) + (local.set $7 + (f64.load + (local.tee $3 + (i32.and + (i32.add + (i32.load + (local.get $6) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + ) + ) + (i32.store + (local.get $6) + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (f64.store + (i32.add + (i32.add + (local.get $5) + (i32.const 16) + ) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + (local.get $7) + ) + ) + (local.set $2 + (i32.shr_u + (local.get $2) + (i32.const 2) + ) + ) + (br_if $label$continue$L7 + (i32.lt_u + (local.tee $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.get $9) + ) + ) + ) + (i32.store offset=188 + (local.get $5) + (i32.const 1) + ) + (call $_emscripten_async_queue_call_on_thread + (local.get $0) + (local.get $5) + ) + (global.set $STACKTOP + (local.get $8) + ) + ) + ) + (func $_emscripten_async_run_in_main_thread (; 620 ;) (; has Stack IR ;) (param $0 i32) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $0) + ) + ) + (func $_emscripten_current_thread_process_queued_calls (; 621 ;) (; has Stack IR ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (global.get $__pthread_is_main_browser_thread) + (if + (i32.load + (i32.const 28208) + ) + (return) + (i32.store + (i32.const 28208) + (i32.const 1) + ) + ) + ) + (drop + (call $___pthread_mutex_lock + (i32.const 28212) + ) + ) + (if + (i32.eqz + (local.tee $1 + (global.get $__pthread_ptr) + ) + ) + (call $___assert_fail + (i32.const 19996) + (i32.const 19826) + (i32.const 383) + (i32.const 20003) + ) + ) + (if + (local.tee $0 + (i32.load + (i32.const 28240) + ) + ) + (block $label$break$L10 + (loop $while-in + (if + (i32.ne + (local.get $1) + (i32.load + (local.get $0) + ) + ) + (block + (br_if $label$break$L10 + (i32.eqz + (local.tee $0 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $2 + (i32.eq + (local.tee $1 + (i32.atomic.load + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + (i32.atomic.load offset=12 + (local.tee $4 + (local.get $0) + ) + ) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (if + (i32.eqz + (local.get $2) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $0 + (local.get $1) + ) + (loop $while-in2 + (call $__do_call + (i32.load + (i32.add + (i32.load offset=4 + (local.get $2) + ) + (i32.shl + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (drop + (call $___pthread_mutex_lock + (i32.const 28212) + ) + ) + (i32.atomic.store + (local.get $3) + (local.tee $0 + (i32.rem_s + (i32.add + (local.get $0) + (i32.const 1) + ) + (i32.const 128) + ) + ) + ) + (local.set $1 + (i32.eq + (i32.atomic.load offset=12 + (local.get $4) + ) + (local.get $0) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (br_if $while-in2 + (i32.eqz + (local.get $1) + ) + ) + ) + ) + ) + (drop + (call $_emscripten_futex_wake + (local.get $3) + (i32.const 2147483647) + ) + ) + (if + (i32.eqz + (global.get $__pthread_is_main_browser_thread) + ) + (return) + ) + (i32.store + (i32.const 28208) + (i32.const 0) + ) + (return) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28212) + ) + (if + (i32.eqz + (global.get $__pthread_is_main_browser_thread) + ) + (return) + ) + (i32.store + (i32.const 28208) + (i32.const 0) + ) + ) + (func $_emscripten_main_browser_thread_id (; 622 ;) (; has Stack IR ;) (result i32) + (i32.load + (i32.const 28204) + ) + ) + (func $_emscripten_main_thread_process_queued_calls (; 623 ;) (; has Stack IR ;) + (if + (i32.eqz + (global.get $__pthread_is_main_browser_thread) + ) + (return) + ) + (call $_emscripten_current_thread_process_queued_calls) + ) + (func $_emscripten_register_main_browser_thread_id (; 624 ;) (; has Stack IR ;) (param $0 i32) + (i32.store + (i32.const 28204) + (local.get $0) + ) + ) + (func $_emscripten_run_in_main_runtime_thread_js (; 625 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result f64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 f64) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (if + (local.tee $9 + (i32.ne + (local.get $3) + (i32.const 0) + ) + ) + (block + (i32.store offset=8 + (local.get $5) + (i32.const 0) + ) + (local.set $8 + (i32.add + (local.get $5) + (i32.const 184) + ) + ) + (local.set $4 + (local.get $5) + ) + ) + (if + (local.tee $6 + (call $_malloc + (i32.const 192) + ) + ) + (block + (i32.store offset=8 + (local.get $6) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $6) + (i32.const 0) + ) + (local.set $8 + (i32.add + (local.get $6) + (i32.const 184) + ) + ) + (local.set $4 + (local.get $6) + ) + ) + (call $___assert_fail + (i32.const 19821) + (i32.const 19826) + (i32.const 172) + (i32.const 19892) + ) + ) + ) + (i32.store + (local.get $8) + (i32.const 0) + ) + (i32.store offset=188 + (local.get $4) + (i32.sub + (i32.const 1) + (local.get $3) + ) + ) + (i32.store + (local.get $4) + (i32.const -2126512128) + ) + (i32.store offset=4 + (local.get $4) + (local.get $0) + ) + (if + (i32.ge_s + (local.get $1) + (i32.const 20) + ) + (call $___assert_fail + (i32.const 19914) + (i32.const 19826) + (i32.const 782) + (i32.const 19955) + ) + ) + (i32.store offset=16 + (local.get $4) + (local.get $1) + ) + (if + (i32.gt_s + (local.get $1) + (i32.const 0) + ) + (drop + (call $_memcpy + (i32.add + (local.get $4) + (i32.const 24) + ) + (local.get $2) + (i32.shl + (local.get $1) + (i32.const 3) + ) + ) + ) + ) + (local.set $0 + (i32.load + (i32.const 28204) + ) + ) + (if (result f64) + (local.get $9) + (block (result f64) + (call $_emscripten_async_queue_call_on_thread + (local.get $0) + (local.get $5) + ) + (call $_emscripten_wait_for_call_v + (local.get $5) + (global.get $inf$asm2wasm$import) + ) + (local.set $10 + (f64.load offset=176 + (local.get $5) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + (local.get $10) + ) + (block (result f64) + (call $_emscripten_async_queue_call_on_thread + (local.get $0) + (local.get $4) + ) + (global.set $STACKTOP + (local.get $7) + ) + (f64.const 0) + ) + ) + ) + (func $_emscripten_sync_run_in_main_thread (; 626 ;) (; has Stack IR ;) (param $0 i32) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $0) + ) + (call $_emscripten_wait_for_call_v + (local.get $0) + (global.get $inf$asm2wasm$import) + ) + ) + (func $_emscripten_sync_run_in_main_thread_0 (; 627 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $1) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $1) + (local.get $0) + ) + (i32.store offset=176 + (local.get $1) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $1) + ) + (call $_emscripten_wait_for_call_v + (local.get $1) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $1) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_1 (; 628 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $2) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $2) + (local.get $0) + ) + (i32.store offset=16 + (local.get $2) + (local.get $1) + ) + (i32.store offset=176 + (local.get $2) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $2) + ) + (call $_emscripten_wait_for_call_v + (local.get $2) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $2) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_2 (; 629 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $3) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $3) + (local.get $0) + ) + (i32.store offset=16 + (local.get $3) + (local.get $1) + ) + (i32.store offset=24 + (local.get $3) + (local.get $2) + ) + (i32.store offset=176 + (local.get $3) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $3) + ) + (call $_emscripten_wait_for_call_v + (local.get $3) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $3) + ) + ) + (global.set $STACKTOP + (local.get $4) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_3 (; 630 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $4) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $4) + (local.get $0) + ) + (i32.store offset=16 + (local.get $4) + (local.get $1) + ) + (i32.store offset=24 + (local.get $4) + (local.get $2) + ) + (i32.store offset=32 + (local.get $4) + (local.get $3) + ) + (i32.store offset=176 + (local.get $4) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $4) + ) + (call $_emscripten_wait_for_call_v + (local.get $4) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $4) + ) + ) + (global.set $STACKTOP + (local.get $5) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_4 (; 631 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $5) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $5) + (local.get $0) + ) + (i32.store offset=16 + (local.get $5) + (local.get $1) + ) + (i32.store offset=24 + (local.get $5) + (local.get $2) + ) + (i32.store offset=32 + (local.get $5) + (local.get $3) + ) + (i32.store offset=40 + (local.get $5) + (local.get $4) + ) + (i32.store offset=176 + (local.get $5) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $5) + ) + (call $_emscripten_wait_for_call_v + (local.get $5) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $5) + ) + ) + (global.set $STACKTOP + (local.get $6) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_5 (; 632 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $6 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $6) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $6) + (local.get $0) + ) + (i32.store offset=16 + (local.get $6) + (local.get $1) + ) + (i32.store offset=24 + (local.get $6) + (local.get $2) + ) + (i32.store offset=32 + (local.get $6) + (local.get $3) + ) + (i32.store offset=40 + (local.get $6) + (local.get $4) + ) + (i32.store offset=48 + (local.get $6) + (local.get $5) + ) + (i32.store offset=176 + (local.get $6) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $6) + ) + (call $_emscripten_wait_for_call_v + (local.get $6) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $6) + ) + ) + (global.set $STACKTOP + (local.get $7) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_6 (; 633 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i32) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $7 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $7) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $7) + (local.get $0) + ) + (i32.store offset=16 + (local.get $7) + (local.get $1) + ) + (i32.store offset=24 + (local.get $7) + (local.get $2) + ) + (i32.store offset=32 + (local.get $7) + (local.get $3) + ) + (i32.store offset=40 + (local.get $7) + (local.get $4) + ) + (i32.store offset=48 + (local.get $7) + (local.get $5) + ) + (i32.store offset=56 + (local.get $7) + (local.get $6) + ) + (i32.store offset=176 + (local.get $7) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $7) + ) + (call $_emscripten_wait_for_call_v + (local.get $7) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $7) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_7 (; 634 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (result i32) + (local $8 i32) + (local $9 i32) + (local.set $9 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 192) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 192) + ) + ) + (drop + (call $_memset + (local.get $8) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $8) + (local.get $0) + ) + (i32.store offset=16 + (local.get $8) + (local.get $1) + ) + (i32.store offset=24 + (local.get $8) + (local.get $2) + ) + (i32.store offset=32 + (local.get $8) + (local.get $3) + ) + (i32.store offset=40 + (local.get $8) + (local.get $4) + ) + (i32.store offset=48 + (local.get $8) + (local.get $5) + ) + (i32.store offset=56 + (local.get $8) + (local.get $6) + ) + (i32.store + (i32.sub + (local.get $8) + (i32.const -64) + ) + (local.get $7) + ) + (i32.store offset=176 + (local.get $8) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $8) + ) + (call $_emscripten_wait_for_call_v + (local.get $8) + (global.get $inf$asm2wasm$import) + ) + (local.set $0 + (i32.load offset=176 + (local.get $8) + ) + ) + (global.set $STACKTOP + (local.get $9) + ) + (local.get $0) + ) + (func $_emscripten_sync_run_in_main_thread_xprintf_varargs (; 635 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local.set $8 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $5 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 336) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 336) + ) + ) + (local.set $4 + (i32.add + (local.get $5) + (i32.const 144) + ) + ) + (i32.store + (local.tee $7 + (i32.add + (local.get $5) + (i32.const 128) + ) + ) + (local.get $3) + ) + (local.set $9 + (i32.add + (local.tee $6 + (call $_vsnprintf + (local.get $5) + (i32.const 128) + (local.get $2) + (local.get $7) + ) + ) + (i32.const 1) + ) + ) + (local.set $2 + (if (result i32) + (i32.gt_s + (local.get $6) + (i32.const 127) + ) + (block (result i32) + (local.set $6 + (call $_malloc + (local.get $9) + ) + ) + (i32.store + (local.get $7) + (local.get $3) + ) + (drop + (call $_vsnprintf + (local.get $6) + (local.get $9) + (local.get $2) + (local.get $7) + ) + ) + (local.get $6) + ) + (local.get $5) + ) + ) + (drop + (call $_memset + (local.get $4) + (i32.const 0) + (i32.const 192) + ) + ) + (i32.store + (local.get $4) + (local.get $0) + ) + (i32.store offset=16 + (local.get $4) + (local.get $1) + ) + (i32.store offset=24 + (local.get $4) + (local.get $2) + ) + (i32.store offset=176 + (local.get $4) + (i32.const 0) + ) + (call $_emscripten_async_queue_call_on_thread + (i32.load + (i32.const 28204) + ) + (local.get $4) + ) + (call $_emscripten_wait_for_call_v + (local.get $4) + (global.get $inf$asm2wasm$import) + ) + (if + (i32.eq + (local.get $2) + (local.get $5) + ) + (block + (local.set $0 + (i32.load offset=176 + (local.get $4) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (return + (local.get $0) + ) + ) + ) + (call $_free + (local.get $2) + ) + (local.set $0 + (i32.load offset=176 + (local.get $4) + ) + ) + (global.set $STACKTOP + (local.get $8) + ) + (local.get $0) + ) + (func $_proxy_main (; 636 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $4 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (if + (i32.eqz + (call $_emscripten_has_threading_support) + ) + (block + (local.set $0 + (call $___call_main + (i32.load + (i32.const 28196) + ) + (i32.load + (i32.const 28200) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $0) + ) + ) + ) + (call $_pthread_attr_init + (local.tee $2 + (i32.add + (local.get $4) + (i32.const 4) + ) + ) + ) + (i32.store offset=12 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=8 + (local.get $2) + (i32.const 0) + ) + (i32.store + (local.get $2) + (i32.const 49152) + ) + (if + (call $_emscripten_asm_const_i + (i32.const 2) + ) + (i32.store offset=36 + (local.get $2) + (i32.const 19768) + ) + ) + (i32.store + (i32.const 28196) + (local.get $0) + ) + (i32.store + (i32.const 28200) + (local.get $1) + ) + (local.set $0 + (if (result i32) + (call $_pthread_create + (local.get $4) + (local.get $2) + (i32.const 16) + (i32.const 28196) + ) + (call $___call_main + (i32.load + (i32.const 28196) + ) + (i32.load + (i32.const 28200) + ) + ) + (block (result i32) + (drop + (call $_emscripten_asm_const_i + (i32.const 3) + ) + ) + (i32.const 0) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (local.get $0) + ) + (func $__emscripten_atomic_fetch_and_add_u64 (; 637 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (i64.add + (local.get $1) + (local.tee $1 + (i64.load + (local.get $0) + ) + ) + ) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $__emscripten_atomic_fetch_and_and_u64 (; 638 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (i64.and + (local.get $1) + (local.tee $1 + (i64.load + (local.get $0) + ) + ) + ) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $__emscripten_atomic_fetch_and_or_u64 (; 639 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (i64.or + (local.get $1) + (local.tee $1 + (i64.load + (local.get $0) + ) + ) + ) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $__emscripten_atomic_fetch_and_sub_u64 (; 640 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local $3 i64) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (i64.sub + (local.tee $3 + (i64.load + (local.get $0) + ) + ) + (local.get $1) + ) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $3) + ) + (func $__emscripten_atomic_fetch_and_xor_u64 (; 641 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (i64.xor + (local.get $1) + (local.tee $1 + (i64.load + (local.get $0) + ) + ) + ) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $_emscripten_atomic_cas_u64 (; 642 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i64) + (local $3 i32) + (local.set $3 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $3) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (if + (i64.eq + (local.get $1) + (local.tee $1 + (i64.load + (local.get $0) + ) + ) + ) + (i64.store + (local.get $0) + (local.get $2) + ) + ) + (i32.atomic.store + (local.get $3) + (i32.const 0) + ) + (local.get $1) + ) + (func $_emscripten_atomic_exchange_u64 (; 643 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local $3 i64) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (local.set $3 + (i64.load + (local.get $0) + ) + ) + (i64.store + (local.get $0) + (local.get $1) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $3) + ) + (func $_emscripten_atomic_load_f32 (; 644 ;) (; has Stack IR ;) (param $0 i32) (result f32) + (f32.reinterpret_i32 + (i32.atomic.load + (local.get $0) + ) + ) + ) + (func $_emscripten_atomic_load_f64 (; 645 ;) (; has Stack IR ;) (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) + (local.set $1 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $1) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (local.set $2 + (f64.load + (local.get $0) + ) + ) + (i32.atomic.store + (local.get $1) + (i32.const 0) + ) + (local.get $2) + ) + (func $_emscripten_atomic_load_u64 (; 646 ;) (; has Stack IR ;) (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local.set $1 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $1) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (local.set $2 + (i64.load + (local.get $0) + ) + ) + (i32.atomic.store + (local.get $1) + (i32.const 0) + ) + (local.get $2) + ) + (func $_emscripten_atomic_store_f32 (; 647 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (result f32) + (i32.atomic.store + (local.get $0) + (local.tee $0 + (i32.reinterpret_f32 + (local.get $1) + ) + ) + ) + (f32.convert_i32_u + (local.get $0) + ) + ) + (func $_emscripten_atomic_store_f64 (; 648 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (result f64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (f64.store + (local.get $0) + (local.get $1) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $_emscripten_atomic_store_u64 (; 649 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (result i64) + (local $2 i32) + (local.set $2 + (i32.add + (i32.shl + (i32.and + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + (i32.const 255) + ) + (i32.const 2) + ) + (i32.const 25728) + ) + ) + (loop $while-in + (br_if $while-in + (i32.atomic.rmw.cmpxchg + (local.get $2) + (i32.const 0) + (i32.const 1) + ) + ) + ) + (i64.store + (local.get $0) + (local.get $1) + ) + (i32.atomic.store + (local.get $2) + (i32.const 0) + ) + (local.get $1) + ) + (func $_pthread_attr_init (; 650 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 48) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 48) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=24 align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=32 align=4 + (local.get $1) + (i64.const 0) + ) + (i32.store offset=40 + (local.get $1) + (i32.const 0) + ) + (i64.store align=4 + (local.get $0) + (i64.load align=4 + (local.get $1) + ) + ) + (i64.store offset=8 align=4 + (local.get $0) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store offset=16 align=4 + (local.get $0) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i64.store offset=24 align=4 + (local.get $0) + (i64.load offset=24 align=4 + (local.get $1) + ) + ) + (i64.store offset=32 align=4 + (local.get $0) + (i64.load offset=32 align=4 + (local.get $1) + ) + ) + (i32.store offset=40 + (local.get $0) + (i32.load offset=40 + (local.get $1) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $___emscripten_thread_main (; 651 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (call $___call_main + (i32.load + (local.get $0) + ) + (i32.load offset=4 + (local.get $0) + ) + ) + ) + (func $_emscripten_wait_for_call_v (; 652 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) + (local $2 f64) + (local $3 f64) + (if + (i32.atomic.load + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + (return) + ) + (local.set $2 + (f64.add + (local.tee $3 + (call $_emscripten_get_now) + ) + (local.get $1) + ) + ) + (if + (f64.lt + (local.get $3) + (local.get $2) + ) + (block + (local.set $1 + (local.get $3) + ) + (loop $while-in + (drop + (call $_emscripten_futex_wait + (local.get $0) + (i32.const 0) + (f64.sub + (local.get $2) + (local.get $1) + ) + ) + ) + (br_if $while-in + (i32.and + (i32.eqz + (i32.atomic.load + (local.get $0) + ) + ) + (f64.lt + (local.tee $1 + (call $_emscripten_get_now) + ) + (local.get $2) + ) + ) + ) + ) + ) + ) + ) + (func $__do_call (; 653 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (if + (i32.eq + (i32.and + (local.tee $1 + (i32.load + (local.get $0) + ) + ) + (i32.const 402653184) + ) + (i32.const 402653184) + ) + (call $___assert_fail + (i32.const 20012) + (i32.const 19826) + (i32.const 202) + (i32.const 20087) + ) + ) + (block $label$break$L4 + (if + (i32.lt_s + (local.get $1) + (i32.const 234881024) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 100663336) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 67108864) + ) + (block + (if + (i32.ge_s + (local.get $1) + (i32.const 33554432) + ) + (block + (block $switch-default + (block $switch-case0 + (block $switch-case + (br_table $switch-case $switch-default $switch-case0 $switch-default + (i32.sub + (local.get $1) + (i32.const 33554432) + ) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vi) + (i32.load offset=16 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 31) + ) + (i32.const 107) + ) + ) + (br $label$break$L4) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vf) + (f32.load offset=16 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 92) + ) + ) + (br $label$break$L4) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const -2126512128) + ) + ) + (block + (f64.store offset=176 + (local.get $0) + (call $_emscripten_receive_on_main_thread_js + (i32.load offset=4 + (local.get $0) + ) + (i32.load offset=16 + (local.get $0) + ) + (i32.add + (local.get $0) + (i32.const 24) + ) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (local.get $1) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$v) + (i32.add + (i32.and + (local.get $1) + (i32.const 7) + ) + (i32.const 84) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 67108874) + ) + (block + (block $switch-default10 + (block $switch-case9 + (block $switch-case8 + (br_table $switch-case8 $switch-default10 $switch-default10 $switch-default10 $switch-default10 $switch-default10 $switch-default10 $switch-default10 $switch-case9 $switch-default10 + (i32.sub + (local.get $1) + (i32.const 67108864) + ) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 63) + ) + (i32.const 159) + ) + ) + (br $label$break$L4) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vif) + (i32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 143) + ) + ) + (br $label$break$L4) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 100663296) + ) + (block + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 67108874) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vff) + (f32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 96) + ) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (block $switch-default17 + (block $switch-case16 + (if + (local.tee $1 + (i32.sub + (local.get $1) + (i32.const 100663296) + ) + ) + (if + (i32.eq + (local.get $1) + (i32.const 32) + ) + (br $switch-case16) + (br $switch-default17) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 63) + ) + (i32.const 226) + ) + ) + (br $label$break$L4) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viif) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 1) + ) + (i32.const 223) + ) + ) + (br $label$break$L4) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 134217896) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 134217728) + ) + (block $switch-default21 + (block $switch-case20 + (block $switch-case19 + (br_table $switch-case19 $switch-default21 $switch-case20 $switch-default21 + (i32.sub + (local.get $1) + (i32.const 100663336) + ) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viff) + (i32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 147) + ) + ) + (br $label$break$L4) + ) + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vfff) + (f32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (i32.const 100) + ) + (br $label$break$L4) + ) + (block $switch-default25 + (block $switch-case24 + (if + (local.tee $2 + (i32.add + (local.get $1) + (i32.const -134217728) + ) + ) + (if + (i32.eq + (local.get $2) + (i32.const 32) + ) + (br $switch-case24) + (br $switch-default25) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 31) + ) + (i32.const 290) + ) + ) + (br $label$break$L4) + ) + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viifi) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.const 225) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 167772160) + ) + (block + (block $switch-default29 + (block $switch-case28 + (block $switch-case27 + (br_table $switch-case27 $switch-default29 $switch-case28 $switch-default29 + (i32.sub + (local.get $1) + (i32.const 134217896) + ) + ) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vifff) + (i32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (f32.load offset=40 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 151) + ) + ) + (br $label$break$L4) + ) + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$vffff) + (f32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (f32.load offset=40 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 101) + ) + ) + (br $label$break$L4) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 167772840) + ) + (block + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 167772160) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 7) + ) + (i32.const 322) + ) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 201326592) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 167772840) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viffff) + (i32.load offset=16 + (local.get $0) + ) + (f32.load offset=24 + (local.get $0) + ) + (f32.load offset=32 + (local.get $0) + ) + (f32.load offset=40 + (local.get $0) + ) + (f32.load offset=48 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 155) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 201326592) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 1) + ) + (i32.const 330) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 622854144) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 369098752) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 301989888) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 268435456) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 234881024) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 332) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 268435456) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 336) + ) + ) + (br $label$break$L4) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 335544320) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 301989888) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 340) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 335544320) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (i32.load offset=88 + (local.get $0) + ) + (i32.const 344) + ) + (br $label$break$L4) + ) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 570425344) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 536870912) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 369098752) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (call_indirect (type $FUNCSIG$viiiiiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (i32.load offset=88 + (local.get $0) + ) + (i32.load offset=96 + (local.get $0) + ) + (i32.const 345) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 536870912) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$i) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 16) + ) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 603979776) + ) + (block + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 570425344) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$ii) + (i32.load offset=16 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 31) + ) + (i32.const 20) + ) + ) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 621805568) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 603979776) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 54) + ) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 621805568) + ) + ) + (block + (i32.store offset=176 + (local.get $0) + (call $_emscripten_syscall + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 704643072) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 657457152) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 637534208) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 622854144) + ) + ) + (block + (i32.store offset=176 + (local.get $0) + (call $_emscripten_webgl_create_context + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 637534208) + ) + ) + (block + (local.set $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.add + (i32.and + (local.get $1) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 671088640) + ) + (block + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 657457152) + ) + ) + (block + (i32.store offset=176 + (local.get $0) + (call $_emscripten_set_canvas_element_size + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + ) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 687865856) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 671088640) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.const 74) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 687865856) + ) + ) + (block + (i32.store offset=176 + (local.get $0) + (call $_pthread_create + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 771751936) + ) + (block + (if + (i32.lt_s + (local.get $1) + (i32.const 738197504) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 704643072) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.const 75) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 738197504) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.const 76) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 805306368) + ) + (block + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 771751936) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.const 77) + ) + ) + (br $label$break$L4) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + (if + (i32.lt_s + (local.get $1) + (i32.const 838860800) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 805306368) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.const 78) + ) + ) + (br $label$break$L4) + ) + ) + (if + (i32.eqz + (i32.sub + (local.get $1) + (i32.const 838860800) + ) + ) + (block + (drop + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.store offset=176 + (local.get $0) + (call_indirect (type $FUNCSIG$iiiiiiiiii) + (i32.load offset=16 + (local.get $0) + ) + (i32.load offset=24 + (local.get $0) + ) + (i32.load offset=32 + (local.get $0) + ) + (i32.load offset=40 + (local.get $0) + ) + (i32.load offset=48 + (local.get $0) + ) + (i32.load offset=56 + (local.get $0) + ) + (i32.load + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (i32.load offset=72 + (local.get $0) + ) + (i32.load offset=80 + (local.get $0) + ) + (i32.const 79) + ) + ) + (br $label$break$L4) + ) + ) + ) + (call $___assert_fail + (i32.const 20096) + (i32.const 19826) + (i32.const 349) + (i32.const 20087) + ) + ) + ) + ) + ) + ) + (if + (i32.load offset=188 + (local.get $0) + ) + (block + (call $_free + (i32.load offset=184 + (local.get $0) + ) + ) + (call $_free + (local.get $0) + ) + ) + (block + (i32.store + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (i32.const 1) + ) + (drop + (call $_emscripten_futex_wake + (local.get $0) + (i32.const 2147483647) + ) + ) + ) + ) + ) + (func $___pthread_mutex_unlock (; 654 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local.set $6 + (i32.atomic.load offset=8 + (local.get $0) + ) + ) + (local.set $5 + (i32.xor + (i32.and + (local.tee $2 + (i32.load + (local.get $0) + ) + ) + (i32.const 128) + ) + (i32.const 128) + ) + ) + (local.set $3 + (if (result i32) + (local.tee $7 + (i32.eqz + (i32.and + (local.get $2) + (i32.const 15) + ) + ) + ) + (block (result i32) + (local.set $4 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (i32.const 0) + ) + (block (result i32) + (local.set $1 + (i32.and + (i32.atomic.load + (local.tee $4 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + (i32.const 2147483647) + ) + ) + (if + (i32.ne + (local.get $1) + (i32.load offset=52 + (local.tee $3 + (global.get $__pthread_ptr) + ) + ) + ) + (return) + ) + (if + (i32.eq + (i32.and + (local.get $2) + (i32.const 3) + ) + (i32.const 1) + ) + (if + (local.tee $1 + (i32.load offset=20 + (local.get $0) + ) + ) + (block + (i32.store offset=20 + (local.get $0) + (i32.add + (local.get $1) + (i32.const -1) + ) + ) + (return) + ) + ) + ) + (local.set $1 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (if + (i32.eqz + (local.get $5) + ) + (block + (i32.atomic.store offset=176 + (local.get $3) + (local.get $1) + ) + (drop + (i32.atomic.rmw.add + (i32.const 28244) + (i32.const 1) + ) + ) + ) + ) + (i32.atomic.store + (local.tee $1 + (i32.load offset=12 + (local.get $0) + ) + ) + (local.tee $0 + (i32.load offset=16 + (local.get $0) + ) + ) + ) + (if + (i32.ne + (i32.add + (local.get $3) + (i32.const 168) + ) + (local.get $0) + ) + (i32.atomic.store + (i32.add + (local.get $0) + (i32.const -4) + ) + (local.get $1) + ) + ) + (local.get $3) + ) + ) + ) + (local.set $2 + (select + (i32.const 2147483647) + (i32.const 0) + (i32.and + (local.get $2) + (i32.const 8) + ) + ) + ) + (loop $while-in + (br_if $while-in + (i32.ne + (local.tee $0 + (i32.atomic.load + (local.get $4) + ) + ) + (i32.atomic.rmw.cmpxchg + (local.get $4) + (local.get $0) + (local.get $2) + ) + ) + ) + ) + (if + (i32.eqz + (i32.or + (local.get $7) + (i32.ne + (local.get $5) + (i32.const 0) + ) + ) + ) + (block + (i32.atomic.store offset=176 + (local.get $3) + (i32.const 0) + ) + (call $___vm_unlock) + ) + ) + (if + (i32.eqz + (i32.or + (i32.ne + (local.get $6) + (i32.const 0) + ) + (i32.lt_s + (local.get $0) + (i32.const 0) + ) + ) + ) + (return) + ) + (drop + (call $_emscripten_futex_wake + (local.get $4) + (i32.const 1) + ) + ) + ) + (func $___vm_unlock (; 655 ;) (; has Stack IR ;) + (if + (i32.ne + (i32.atomic.rmw.add + (i32.const 28244) + (i32.const -1) + ) + (i32.const 1) + ) + (return) + ) + (if + (i32.eqz + (i32.atomic.load + (i32.const 28248) + ) + ) + (return) + ) + (drop + (call $_emscripten_futex_wake + (i32.const 28244) + (i32.const 2147483647) + ) + ) + ) + (func $___pthread_mutex_lock (; 656 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if + (i32.eqz + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 15) + ) + ) + (if + (i32.eqz + (i32.atomic.rmw.cmpxchg + (i32.add + (local.get $0) + (i32.const 4) + ) + (i32.const 0) + (i32.const 16) + ) + ) + (return + (i32.const 0) + ) + ) + ) + (call $___pthread_mutex_timedlock + (local.get $0) + ) + ) + (func $___pthread_mutex_timedlock (; 657 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (if + (i32.eqz + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 15) + ) + ) + (if + (i32.atomic.rmw.cmpxchg + (i32.add + (local.get $0) + (i32.const 4) + ) + (i32.const 0) + (i32.const 16) + ) + (drop + (i32.load + (local.get $0) + ) + ) + (return + (i32.const 0) + ) + ) + ) + (if + (i32.ne + (local.tee $1 + (call $___pthread_mutex_trylock + (local.get $0) + ) + ) + (i32.const 16) + ) + (return + (local.get $1) + ) + ) + (local.set $3 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (local.set $4 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $2 + (i32.const 99) + ) + (loop $while-in + (block $while-out + (br_if $while-out + (i32.eqz + (i32.atomic.load + (local.get $3) + ) + ) + ) + (br_if $while-out + (i32.atomic.load + (local.get $4) + ) + ) + (local.set $1 + (i32.add + (local.get $2) + (i32.const -1) + ) + ) + (if + (local.get $2) + (block + (local.set $2 + (local.get $1) + ) + (br $while-in) + ) + ) + ) + ) + (if + (i32.ne + (local.tee $1 + (call $___pthread_mutex_trylock + (local.get $0) + ) + ) + (i32.const 16) + ) + (return + (local.get $1) + ) + ) + (loop $while-in1 (result i32) + (block $__rjti$0 (result i32) + (if + (local.tee $2 + (i32.atomic.load + (local.get $3) + ) + ) + (if + (i32.or + (i32.eqz + (i32.and + (local.get $2) + (i32.const 1073741824) + ) + ) + (i32.eqz + (i32.and + (local.tee $1 + (i32.load + (local.get $0) + ) + ) + (i32.const 4) + ) + ) + ) + (block + (if + (i32.eq + (i32.and + (local.get $1) + (i32.const 3) + ) + (i32.const 2) + ) + (drop + (br_if $__rjti$0 + (i32.const 35) + (i32.eq + (i32.load offset=52 + (global.get $__pthread_ptr) + ) + (i32.and + (local.get $2) + (i32.const 2147483647) + ) + ) + ) + ) + ) + (drop + (i32.atomic.rmw.add + (local.get $4) + (i32.const 1) + ) + ) + (drop + (i32.atomic.rmw.cmpxchg + (local.get $3) + (local.get $2) + (local.tee $1 + (i32.or + (local.get $2) + (i32.const -2147483648) + ) + ) + ) + ) + (local.set $1 + (call $___timedwait + (local.get $3) + (local.get $1) + ) + ) + (drop + (i32.atomic.rmw.sub + (local.get $4) + (i32.const 1) + ) + ) + (drop + (br_if $__rjti$0 + (local.get $1) + (i32.ne + (i32.or + (local.get $1) + (i32.const 4) + ) + (i32.const 4) + ) + ) + ) + ) + ) + ) + (br_if $while-in1 + (i32.eq + (local.tee $1 + (call $___pthread_mutex_trylock + (local.get $0) + ) + ) + (i32.const 16) + ) + ) + (local.get $1) + ) + ) + ) + (func $___timedwait (; 658 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (call $___pthread_setcancelstate + (i32.const 1) + (local.get $2) + ) + (local.set $0 + (call $___timedwait_cp + (local.get $0) + (local.get $1) + ) + ) + (call $___pthread_setcancelstate + (i32.load + (local.get $2) + ) + (i32.const 0) + ) + (global.set $STACKTOP + (local.get $3) + ) + (local.get $0) + ) + (func $___pthread_setcancelstate (; 659 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (if + (i32.gt_u + (local.get $0) + (i32.const 2) + ) + (return) + ) + (local.set $2 + (global.get $__pthread_ptr) + ) + (if + (local.get $1) + (i32.store + (local.get $1) + (i32.atomic.load offset=72 + (local.get $2) + ) + ) + ) + (i32.atomic.store offset=72 + (local.get $2) + (local.get $0) + ) + ) + (func $___timedwait_cp (; 660 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $2 + (global.get $inf$asm2wasm$import) + ) + (block $label$break$L16 + (if + (global.get $__pthread_is_main_browser_thread) + (block + (local.set $4 + (f64.add + (local.get $2) + (call $_emscripten_get_now) + ) + ) + (loop $while-in2 + (block $while-out1 + (if + (call $__pthread_isduecanceled + (global.get $__pthread_ptr) + ) + (block + (local.set $0 + (i32.const 125) + ) + (br $while-out1) + ) + ) + (call $_emscripten_main_thread_process_queued_calls) + (if + (f64.le + (local.tee $2 + (f64.sub + (local.get $4) + (call $_emscripten_get_now) + ) + ) + (f64.const 0) + ) + (block + (local.set $0 + (i32.const 110) + ) + (br $while-out1) + ) + ) + (br_if $while-in2 + (i32.eq + (local.tee $5 + (i32.sub + (i32.const 0) + (call $_emscripten_futex_wait + (local.get $0) + (local.get $1) + (select + (f64.const 1) + (local.tee $2 + (select + (f64.const 100) + (local.get $2) + (f64.gt + (local.get $2) + (f64.const 100) + ) + ) + ) + (f64.gt + (local.get $2) + (f64.const 1) + ) + ) + ) + ) + ) + (i32.const 110) + ) + ) + (local.set $0 + (local.get $5) + ) + (br $label$break$L16) + ) + ) + ) + (block + (if + (i32.ne + (i32.atomic.load offset=76 + (global.get $__pthread_ptr) + ) + (i32.const 1) + ) + (block + (local.set $0 + (i32.sub + (i32.const 0) + (call $_emscripten_futex_wait + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + ) + (br $label$break$L16) + ) + ) + (local.set $4 + (f64.add + (local.get $2) + (call $_emscripten_get_now) + ) + ) + (loop $while-in + (block $while-out + (if + (call $__pthread_isduecanceled + (global.get $__pthread_ptr) + ) + (block + (local.set $0 + (i32.const 125) + ) + (br $while-out) + ) + ) + (if + (f64.le + (local.tee $2 + (f64.sub + (local.get $4) + (call $_emscripten_get_now) + ) + ) + (f64.const 0) + ) + (block + (local.set $0 + (i32.const 110) + ) + (br $while-out) + ) + ) + (br_if $while-in + (i32.eq + (local.tee $5 + (i32.sub + (i32.const 0) + (call $_emscripten_futex_wait + (local.get $0) + (local.get $1) + (select + (f64.const 100) + (local.get $2) + (f64.gt + (local.get $2) + (f64.const 100) + ) + ) + ) + ) + ) + (i32.const 110) + ) + ) + (local.set $0 + (local.get $5) + ) + (br $label$break$L16) + ) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $0) + ) + ) + (block $switch + (block $switch-case4 + (br_table $switch-case4 $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch-case4 $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch $switch-case4 $switch + (i32.sub + (local.get $0) + (i32.const 4) + ) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (return + (local.get $0) + ) + ) + (global.set $STACKTOP + (local.get $3) + ) + (i32.const 0) + ) + (func $__pthread_isduecanceled (; 661 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.eq + (i32.load + (local.get $0) + ) + (i32.const 2) + ) + ) + (func $___pthread_mutex_trylock (; 662 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (if (result i32) + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 15) + ) + (call $___pthread_mutex_trylock_owner + (local.get $0) + ) + (i32.and + (i32.atomic.rmw.cmpxchg + (i32.add + (local.get $0) + (i32.const 4) + ) + (i32.const 0) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) + (func $___pthread_mutex_trylock_owner (; 663 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $4 + (i32.load + (local.get $0) + ) + ) + (if + (i32.and + (i32.eq + (local.tee $2 + (i32.load offset=52 + (local.tee $1 + (global.get $__pthread_ptr) + ) + ) + ) + (local.tee $5 + (i32.and + (local.tee $3 + (i32.atomic.load + (local.tee $6 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + ) + ) + (i32.const 2147483647) + ) + ) + ) + (i32.eq + (i32.and + (local.get $4) + (i32.const 3) + ) + (i32.const 1) + ) + ) + (block + (if + (i32.gt_u + (local.tee $1 + (i32.load offset=20 + (local.get $0) + ) + ) + (i32.const 2147483646) + ) + (return + (i32.const 11) + ) + ) + (i32.store offset=20 + (local.get $0) + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (return + (i32.const 0) + ) + ) + ) + (if + (i32.eq + (local.get $5) + (i32.const 2147483647) + ) + (return + (i32.const 131) + ) + ) + (if + (i32.and + (i32.load + (local.get $0) + ) + (i32.const 128) + ) + (block + (if + (i32.eqz + (i32.load offset=172 + (local.get $1) + ) + ) + (i32.store offset=172 + (local.get $1) + (i32.const -12) + ) + ) + (local.set $2 + (select + (i32.or + (local.get $2) + (i32.const -2147483648) + ) + (local.get $2) + (i32.atomic.load offset=8 + (local.get $0) + ) + ) + ) + (i32.atomic.store offset=176 + (local.get $1) + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + (if + (i32.or + (i32.eqz + (local.tee $5 + (i32.ne + (local.get $5) + (i32.const 0) + ) + ) + ) + (i32.eqz + (i32.or + (i32.eqz + (i32.and + (local.get $3) + (i32.const 1073741824) + ) + ) + (i32.eqz + (i32.and + (local.get $4) + (i32.const 4) + ) + ) + ) + ) + ) + (if + (i32.eq + (local.get $3) + (i32.atomic.rmw.cmpxchg + (local.get $6) + (local.get $3) + (local.get $2) + ) + ) + (block + (i32.store + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (local.tee $4 + (i32.atomic.load + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 168) + ) + ) + ) + ) + ) + (i32.store offset=12 + (local.get $0) + (local.get $2) + ) + (if + (i32.ne + (local.get $2) + (local.get $4) + ) + (i32.atomic.store + (i32.add + (local.get $4) + (i32.const -4) + ) + (local.get $3) + ) + ) + (i32.atomic.store + (local.get $2) + (local.get $3) + ) + (i32.atomic.store offset=176 + (local.get $1) + (i32.const 0) + ) + (if + (i32.eqz + (local.get $5) + ) + (return + (i32.const 0) + ) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 0) + ) + (i32.store + (local.get $0) + (i32.or + (i32.load + (local.get $0) + ) + (i32.const 8) + ) + ) + (return + (i32.const 130) + ) + ) + ) + ) + (i32.atomic.store offset=176 + (local.get $1) + (i32.const 0) + ) + (i32.const 16) + ) + (func $_pthread_mutexattr_init (; 664 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (i32.store + (local.get $0) + (i32.const 0) + ) + (i32.const 0) + ) + (func $_pthread_mutex_init (; 665 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $2 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $1 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 32) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 32) + ) + ) + (i64.store align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=8 align=4 + (local.get $1) + (i64.const 0) + ) + (i64.store offset=16 align=4 + (local.get $1) + (i64.const 0) + ) + (i32.store offset=24 + (local.get $1) + (i32.const 0) + ) + (i64.store align=4 + (i32.const 28756) + (i64.load align=4 + (local.get $1) + ) + ) + (i64.store align=4 + (i32.const 28764) + (i64.load offset=8 align=4 + (local.get $1) + ) + ) + (i64.store align=4 + (i32.const 28772) + (i64.load offset=16 align=4 + (local.get $1) + ) + ) + (i32.store + (i32.const 28780) + (i32.load offset=24 + (local.get $1) + ) + ) + (if + (i32.eqz + (local.get $0) + ) + (block + (global.set $STACKTOP + (local.get $2) + ) + (return) + ) + ) + (i32.store + (i32.const 28756) + (i32.load + (local.get $0) + ) + ) + (global.set $STACKTOP + (local.get $2) + ) + ) + (func $_emscripten_thread_sleep (; 666 ;) (; has Stack IR ;) (param $0 f64) + (local $1 i32) + (local $2 f64) + (local $3 f64) + (local.set $0 + (f64.add + (call $_emscripten_get_now) + (local.get $0) + ) + ) + (if + (i32.eqz + (i32.atomic.load offset=72 + (local.tee $1 + (global.get $__pthread_ptr) + ) + ) + ) + (if + (i32.eq + (i32.load + (local.get $1) + ) + (i32.const 2) + ) + (drop + (call $_emscripten_asm_const_i + (i32.const 4) + ) + ) + ) + ) + (call $_emscripten_current_thread_process_queued_calls) + (local.set $3 + (select + (f64.const 1) + (f64.const 100) + (global.get $__pthread_is_main_browser_thread) + ) + ) + (if + (i32.eqz + (f64.lt + (call $_emscripten_get_now) + (local.get $0) + ) + ) + (return) + ) + (loop $while-in + (if + (i32.eqz + (i32.atomic.load offset=72 + (local.tee $1 + (global.get $__pthread_ptr) + ) + ) + ) + (if + (i32.eq + (i32.load + (local.get $1) + ) + (i32.const 2) + ) + (drop + (call $_emscripten_asm_const_i + (i32.const 4) + ) + ) + ) + ) + (call $_emscripten_current_thread_process_queued_calls) + (if + (f64.ge + (local.tee $2 + (select + (local.get $3) + (local.tee $2 + (f64.sub + (local.get $0) + (call $_emscripten_get_now) + ) + ) + (f64.gt + (local.get $2) + (local.get $3) + ) + ) + ) + (f64.const 0.1) + ) + (drop + (call $_emscripten_futex_wait + (i32.const 28252) + (i32.const 0) + (local.get $2) + ) + ) + ) + (br_if $while-in + (f64.lt + (call $_emscripten_get_now) + (local.get $0) + ) + ) + ) + ) + (func $_nanosleep (; 667 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (if + (local.get $0) + (if + (i32.le_u + (local.tee $1 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 999999999) + ) + (if + (i32.ge_s + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + (i32.const 0) + ) + (block + (call $_emscripten_thread_sleep + (f64.add + (f64.div + (f64.convert_i32_s + (local.get $1) + ) + (f64.const 1e6) + ) + (f64.mul + (f64.convert_i32_s + (local.get $0) + ) + (f64.const 1e3) + ) + ) + ) + (return + (i32.const 0) + ) + ) + ) + ) + ) + (i32.store + (call $___errno_location) + (i32.const 22) + ) + (i32.const -1) + ) + (func $_malloc (; 668 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local.set $19 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.and + (i32.add + (global.get $STACKTOP) + (i32.const 63) + ) + (i32.const -64) + ) + ) + (local.set $3 + (global.get $STACKTOP) + ) + (global.set $STACKTOP + (i32.add + (global.get $STACKTOP) + (i32.const 16) + ) + ) + (if + (i32.ge_s + (global.get $STACKTOP) + (global.get $STACK_MAX) + ) + (call $abortStackOverflow + (i32.const 16) + ) + ) + (local.set $17 + (i32.add + (local.get $3) + (i32.const 4) + ) + ) + (local.set $20 + (local.get $3) + ) + (if + (i32.eqz + (i32.load + (i32.const 28256) + ) + ) + (block + (drop + (call $___pthread_mutex_lock + (i32.const 28280) + ) + ) + (if + (i32.eqz + (i32.load + (i32.const 28256) + ) + ) + (block + (i32.store + (i32.const 28264) + (i32.const 4096) + ) + (i32.store + (i32.const 28260) + (i32.const 4096) + ) + (i32.store + (i32.const 28268) + (i32.const -1) + ) + (i32.store + (i32.const 28272) + (i32.const -1) + ) + (i32.store + (i32.const 28276) + (i32.const 2) + ) + (i32.store + (i32.const 28752) + (i32.const 2) + ) + (if + (i32.eqz + (call $_pthread_mutexattr_init + (local.get $17) + ) + ) + (call $_pthread_mutex_init + (local.get $17) + ) + ) + (i32.atomic.store + (i32.const 28256) + (i32.xor + (i32.and + (local.get $20) + (i32.const -16) + ) + (i32.const 1431655768) + ) + ) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28280) + ) + ) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + (if + (call $___pthread_mutex_lock + (i32.const 28756) + ) + (block + (global.set $STACKTOP + (local.get $19) + ) + (return + (i32.const 0) + ) + ) + ) + ) + (block $label$break$L243 + (block $__rjti$8 + (if + (i32.lt_u + (local.get $0) + (i32.const 245) + ) + (block $do-once + (if + (i32.and + (local.tee $1 + (i32.shr_u + (local.tee $9 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $0 + (i32.shr_u + (local.tee $3 + (select + (i32.const 16) + (i32.and + (i32.add + (local.get $0) + (i32.const 11) + ) + (i32.const -8) + ) + (i32.lt_u + (local.get $0) + (i32.const 11) + ) + ) + ) + (i32.const 3) + ) + ) + ) + ) + (i32.const 3) + ) + (block + (if + (i32.eq + (local.tee $1 + (i32.load + (local.tee $0 + (i32.add + (local.tee $3 + (i32.load offset=8 + (local.tee $2 + (i32.add + (i32.shl + (local.tee $4 + (i32.add + (i32.xor + (i32.and + (local.get $1) + (i32.const 1) + ) + (i32.const 1) + ) + (local.get $0) + ) + ) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + ) + (i32.const 8) + ) + ) + ) + ) + (local.get $2) + ) + (i32.store + (i32.const 28308) + (i32.and + (local.get $9) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $4) + ) + (i32.const -1) + ) + ) + ) + (block + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $1) + ) + (call $_abort) + ) + (if + (i32.eq + (local.get $3) + (i32.load offset=12 + (local.get $1) + ) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $1) + ) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=4 + (local.get $3) + (i32.or + (local.tee $1 + (i32.shl + (local.get $4) + (i32.const 3) + ) + ) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $1) + (local.get $3) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $1) + ) + (i32.const 1) + ) + ) + (br $do-once) + ) + ) + (local.set $0 + (if (result i32) + (i32.gt_u + (local.get $3) + (local.tee $14 + (i32.load + (i32.const 28316) + ) + ) + ) + (block (result i32) + (if + (local.get $1) + (block + (if + (i32.eq + (local.tee $2 + (i32.load + (local.tee $1 + (i32.add + (local.tee $0 + (i32.load offset=8 + (local.tee $8 + (i32.add + (i32.shl + (local.tee $6 + (i32.add + (i32.or + (i32.or + (i32.or + (i32.or + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.add + (i32.and + (local.tee $0 + (i32.and + (i32.or + (local.tee $2 + (i32.shl + (i32.const 2) + (local.get $0) + ) + ) + (i32.sub + (i32.const 0) + (local.get $2) + ) + ) + (i32.shl + (local.get $1) + (local.get $0) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $0) + ) + ) + (i32.const -1) + ) + ) + (i32.const 12) + ) + (i32.const 16) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 5) + ) + (i32.const 8) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 2) + ) + (i32.const 4) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + ) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + ) + (i32.const 8) + ) + ) + ) + ) + (local.get $8) + ) + (i32.store + (i32.const 28308) + (local.tee $4 + (i32.and + (local.get $9) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $6) + ) + (i32.const -1) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $2) + ) + (call $_abort) + ) + (if + (i32.eq + (local.get $0) + (i32.load offset=12 + (local.get $2) + ) + ) + (block + (i32.store offset=12 + (local.get $2) + (local.get $8) + ) + (i32.store offset=8 + (local.get $8) + (local.get $2) + ) + (local.set $4 + (local.get $9) + ) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (local.get $3) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $7 + (i32.add + (local.get $0) + (local.get $3) + ) + ) + (i32.or + (local.tee $8 + (i32.sub + (local.tee $2 + (i32.shl + (local.get $6) + (i32.const 3) + ) + ) + (local.get $3) + ) + ) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $2) + ) + (local.get $8) + ) + (if + (local.get $14) + (block + (local.set $9 + (i32.load + (i32.const 28328) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $2 + (i32.shr_u + (local.get $14) + (i32.const 3) + ) + ) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.get $4) + (local.tee $2 + (i32.shl + (i32.const 1) + (local.get $2) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.tee $3 + (i32.load + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (call $_abort) + (block + (local.set $12 + (local.get $2) + ) + (local.set $5 + (local.get $3) + ) + ) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $2) + (local.get $4) + ) + ) + (local.set $12 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $5 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $12) + (local.get $9) + ) + (i32.store offset=12 + (local.get $5) + (local.get $9) + ) + (i32.store offset=8 + (local.get $9) + (local.get $5) + ) + (i32.store offset=12 + (local.get $9) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28316) + (local.get $8) + ) + (i32.store + (i32.const 28328) + (local.get $7) + ) + (local.set $0 + (local.get $1) + ) + (br $do-once) + ) + ) + (if (result i32) + (local.tee $12 + (i32.load + (i32.const 28312) + ) + ) + (block (result i32) + (local.set $6 + (i32.sub + (i32.and + (i32.load offset=4 + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (i32.add + (i32.or + (i32.or + (i32.or + (i32.or + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.add + (i32.and + (local.get $12) + (i32.sub + (i32.const 0) + (local.get $12) + ) + ) + (i32.const -1) + ) + ) + (i32.const 12) + ) + (i32.const 16) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 5) + ) + (i32.const 8) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 2) + ) + (i32.const 4) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (local.tee $1 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (i32.shr_u + (local.get $0) + (local.get $1) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + ) + (i32.const -8) + ) + (local.get $3) + ) + ) + (local.set $8 + (local.get $0) + ) + (loop $while-in + (block $while-out + (if + (local.tee $1 + (i32.load offset=16 + (local.get $0) + ) + ) + (local.set $0 + (local.get $1) + ) + (br_if $while-out + (i32.eqz + (local.tee $0 + (i32.load offset=20 + (local.get $0) + ) + ) + ) + ) + ) + (local.set $1 + (i32.lt_u + (local.tee $4 + (i32.sub + (i32.and + (i32.load offset=4 + (local.get $0) + ) + (i32.const -8) + ) + (local.get $3) + ) + ) + (local.get $6) + ) + ) + (local.set $6 + (select + (local.get $4) + (local.get $6) + (local.get $1) + ) + ) + (local.set $8 + (select + (local.get $0) + (local.get $8) + (local.get $1) + ) + ) + (br $while-in) + ) + ) + (if + (i32.gt_u + (local.tee $13 + (i32.load + (i32.const 28324) + ) + ) + (local.get $8) + ) + (call $_abort) + ) + (if + (i32.le_u + (local.tee $10 + (i32.add + (local.get $3) + (local.get $8) + ) + ) + (local.get $8) + ) + (call $_abort) + ) + (local.set $11 + (i32.load offset=24 + (local.get $8) + ) + ) + (if + (i32.eq + (local.tee $0 + (i32.load offset=12 + (local.get $8) + ) + ) + (local.get $8) + ) + (block $do-once4 + (if + (i32.eqz + (local.tee $0 + (i32.load + (local.tee $1 + (i32.add + (local.get $8) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $do-once4 + (i32.eqz + (local.tee $0 + (i32.load + (local.tee $1 + (i32.add + (local.get $8) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (loop $while-in7 + (block $while-out6 + (if + (i32.eqz + (local.tee $5 + (i32.load + (local.tee $4 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out6 + (i32.eqz + (local.tee $5 + (i32.load + (local.tee $4 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $1 + (local.get $4) + ) + (local.set $0 + (local.get $5) + ) + (br $while-in7) + ) + ) + (if + (i32.gt_u + (local.get $13) + (local.get $1) + ) + (call $_abort) + (block + (i32.store + (local.get $1) + (i32.const 0) + ) + (local.set $2 + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $13) + (local.tee $1 + (i32.load offset=8 + (local.get $8) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $8) + (i32.load offset=12 + (local.get $1) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $0) + ) + (local.get $8) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $1) + ) + (local.set $2 + (local.get $0) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $11) + (block $label$break$L90 + (if + (i32.eq + (i32.load + (local.tee $1 + (i32.add + (i32.shl + (local.tee $0 + (i32.load offset=28 + (local.get $8) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $8) + ) + (block + (i32.store + (local.get $1) + (local.get $2) + ) + (if + (i32.eqz + (local.get $2) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (local.get $12) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L90) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $11) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $0 + (i32.add + (local.get $11) + (i32.const 16) + ) + ) + (i32.add + (local.get $11) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $0) + ) + (local.get $8) + ) + ) + (local.get $2) + ) + (br_if $label$break$L90 + (i32.eqz + (local.get $2) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.load + (i32.const 28324) + ) + ) + (local.get $2) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $2) + (local.get $11) + ) + (if + (local.tee $0 + (i32.load offset=16 + (local.get $8) + ) + ) + (if + (i32.gt_u + (local.get $1) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $2) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $2) + ) + ) + ) + ) + (if + (local.tee $0 + (i32.load offset=20 + (local.get $8) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $2) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $2) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $6) + (i32.const 16) + ) + (block + (i32.store offset=4 + (local.get $8) + (i32.or + (local.tee $0 + (i32.add + (local.get $3) + (local.get $6) + ) + ) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $0 + (i32.add + (local.get $0) + (local.get $8) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (block + (i32.store offset=4 + (local.get $8) + (i32.or + (local.get $3) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.get $10) + (i32.or + (local.get $6) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $6) + (local.get $10) + ) + (local.get $6) + ) + (if + (local.get $14) + (block + (local.set $3 + (i32.load + (i32.const 28328) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $1 + (i32.shr_u + (local.get $14) + (i32.const 3) + ) + ) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.get $9) + (local.tee $1 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.tee $2 + (i32.load + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (call $_abort) + (block + (local.set $15 + (local.get $1) + ) + (local.set $7 + (local.get $2) + ) + ) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $1) + (local.get $9) + ) + ) + (local.set $15 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $7 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $15) + (local.get $3) + ) + (i32.store offset=12 + (local.get $7) + (local.get $3) + ) + (i32.store offset=8 + (local.get $3) + (local.get $7) + ) + (i32.store offset=12 + (local.get $3) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28316) + (local.get $6) + ) + (i32.store + (i32.const 28328) + (local.get $10) + ) + ) + ) + (i32.add + (local.get $8) + (i32.const 8) + ) + ) + (block + (local.set $0 + (local.get $3) + ) + (br $__rjti$8) + ) + ) + ) + (block + (local.set $0 + (local.get $3) + ) + (br $__rjti$8) + ) + ) + ) + ) + (local.set $0 + (if (result i32) + (i32.gt_u + (local.get $0) + (i32.const -65) + ) + (block + (local.set $0 + (i32.const -1) + ) + (br $__rjti$8) + ) + (block (result i32) + (local.set $4 + (i32.and + (local.tee $0 + (i32.add + (local.get $0) + (i32.const 11) + ) + ) + (i32.const -8) + ) + ) + (if (result i32) + (local.tee $5 + (i32.load + (i32.const 28312) + ) + ) + (block (result i32) + (local.set $18 + (if (result i32) + (local.tee $0 + (i32.shr_u + (local.get $0) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $4) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $0 + (i32.and + (i32.shr_u + (i32.add + (local.tee $2 + (i32.shl + (local.get $0) + (local.tee $3 + (i32.and + (i32.shr_u + (i32.add + (local.get $0) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $2 + (i32.and + (i32.shr_u + (i32.add + (local.tee $7 + (i32.shl + (local.get $2) + (local.get $0) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $4) + (i32.add + (local.tee $0 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $0) + (local.get $3) + ) + (local.get $2) + ) + ) + (i32.shr_u + (i32.shl + (local.get $7) + (local.get $2) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (local.set $2 + (i32.sub + (i32.const 0) + (local.get $4) + ) + ) + (block $__rjto$1 + (block $__rjti$1 + (if + (local.tee $0 + (i32.load + (i32.add + (i32.shl + (local.get $18) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (block + (local.set $7 + (i32.shl + (local.get $4) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $18) + (i32.const 1) + ) + ) + (i32.eq + (local.get $18) + (i32.const 31) + ) + ) + ) + ) + (local.set $3 + (i32.const 0) + ) + (loop $while-in15 + (if + (i32.lt_u + (local.tee $15 + (i32.sub + (i32.and + (i32.load offset=4 + (local.get $0) + ) + (i32.const -8) + ) + (local.get $4) + ) + ) + (local.get $2) + ) + (local.set $2 + (if (result i32) + (local.get $15) + (block (result i32) + (local.set $3 + (local.get $0) + ) + (local.get $15) + ) + (block + (local.set $3 + (i32.const 0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$1) + ) + ) + ) + ) + (local.set $0 + (select + (local.get $12) + (local.tee $12 + (i32.load offset=20 + (local.get $0) + ) + ) + (i32.or + (i32.eqz + (local.get $12) + ) + (i32.eq + (local.get $12) + (local.tee $15 + (i32.load + (i32.add + (i32.add + (local.get $0) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $7) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + ) + ) + ) + (local.set $7 + (i32.shl + (local.get $7) + (i32.const 1) + ) + ) + (if + (local.get $15) + (block + (local.set $12 + (local.get $0) + ) + (local.set $0 + (local.get $15) + ) + (br $while-in15) + ) + ) + ) + ) + (block + (local.set $0 + (i32.const 0) + ) + (local.set $3 + (i32.const 0) + ) + ) + ) + (local.set $0 + (if (result i32) + (i32.or + (local.get $0) + (local.get $3) + ) + (block (result i32) + (local.set $7 + (local.get $0) + ) + (local.get $3) + ) + (block (result i32) + (if + (i32.eqz + (local.tee $0 + (i32.and + (local.get $5) + (i32.or + (local.tee $0 + (i32.shl + (i32.const 2) + (local.get $18) + ) + ) + (i32.sub + (i32.const 0) + (local.get $0) + ) + ) + ) + ) + ) + (block + (local.set $0 + (local.get $4) + ) + (br $__rjti$8) + ) + ) + (local.set $7 + (i32.load + (i32.add + (i32.shl + (i32.add + (i32.or + (i32.or + (i32.or + (i32.or + (local.tee $3 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.add + (i32.and + (local.get $0) + (i32.sub + (i32.const 0) + (local.get $0) + ) + ) + (i32.const -1) + ) + ) + (i32.const 12) + ) + (i32.const 16) + ) + ) + (local.tee $3 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $3) + ) + ) + (i32.const 5) + ) + (i32.const 8) + ) + ) + ) + (local.tee $3 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $3) + ) + ) + (i32.const 2) + ) + (i32.const 4) + ) + ) + ) + (local.tee $3 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $3) + ) + ) + (i32.const 1) + ) + (i32.const 2) + ) + ) + ) + (local.tee $3 + (i32.and + (i32.shr_u + (local.tee $0 + (i32.shr_u + (local.get $0) + (local.get $3) + ) + ) + (i32.const 1) + ) + (i32.const 1) + ) + ) + ) + (i32.shr_u + (local.get $0) + (local.get $3) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (i32.const 0) + ) + ) + ) + (local.set $3 + (if (result i32) + (local.get $7) + (block + (local.set $3 + (local.get $2) + ) + (local.set $2 + (local.get $7) + ) + (br $__rjti$1) + ) + (block (result i32) + (local.set $7 + (local.get $0) + ) + (local.get $2) + ) + ) + ) + (br $__rjto$1) + ) + (local.set $7 + (local.get $0) + ) + (loop $while-in17 + (local.set $12 + (i32.load offset=4 + (local.get $2) + ) + ) + (if + (i32.eqz + (local.tee $0 + (i32.load offset=16 + (local.get $2) + ) + ) + ) + (local.set $0 + (i32.load offset=20 + (local.get $2) + ) + ) + ) + (local.set $12 + (i32.lt_u + (local.tee $15 + (i32.sub + (i32.and + (local.get $12) + (i32.const -8) + ) + (local.get $4) + ) + ) + (local.get $3) + ) + ) + (local.set $3 + (select + (local.get $15) + (local.get $3) + (local.get $12) + ) + ) + (local.set $7 + (select + (local.get $2) + (local.get $7) + (local.get $12) + ) + ) + (if + (local.get $0) + (block + (local.set $2 + (local.get $0) + ) + (br $while-in17) + ) + ) + ) + ) + (if (result i32) + (local.get $7) + (if (result i32) + (i32.lt_u + (local.get $3) + (i32.sub + (i32.load + (i32.const 28316) + ) + (local.get $4) + ) + ) + (block (result i32) + (if + (i32.gt_u + (local.tee $16 + (i32.load + (i32.const 28324) + ) + ) + (local.get $7) + ) + (call $_abort) + ) + (if + (i32.le_u + (local.tee $10 + (i32.add + (local.get $4) + (local.get $7) + ) + ) + (local.get $7) + ) + (call $_abort) + ) + (local.set $13 + (i32.load offset=24 + (local.get $7) + ) + ) + (if + (i32.eq + (local.tee $0 + (i32.load offset=12 + (local.get $7) + ) + ) + (local.get $7) + ) + (block $do-once18 + (if + (i32.eqz + (local.tee $0 + (i32.load + (local.tee $2 + (i32.add + (local.get $7) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $do-once18 + (i32.eqz + (local.tee $0 + (i32.load + (local.tee $2 + (i32.add + (local.get $7) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (loop $while-in21 + (block $while-out20 + (if + (i32.eqz + (local.tee $6 + (i32.load + (local.tee $8 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out20 + (i32.eqz + (local.tee $6 + (i32.load + (local.tee $8 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (local.get $8) + ) + (local.set $0 + (local.get $6) + ) + (br $while-in21) + ) + ) + (if + (i32.gt_u + (local.get $16) + (local.get $2) + ) + (call $_abort) + (block + (i32.store + (local.get $2) + (i32.const 0) + ) + (local.set $11 + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $16) + (local.tee $2 + (i32.load offset=8 + (local.get $7) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $7) + (i32.load offset=12 + (local.get $2) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $0) + ) + (local.get $7) + ) + (block + (i32.store offset=12 + (local.get $2) + (local.get $0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $2) + ) + (local.set $11 + (local.get $0) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $13) + (block $label$break$L187 + (if + (i32.eq + (i32.load + (local.tee $2 + (i32.add + (i32.shl + (local.tee $0 + (i32.load offset=28 + (local.get $7) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $7) + ) + (block + (i32.store + (local.get $2) + (local.get $11) + ) + (if + (i32.eqz + (local.get $11) + ) + (block + (i32.store + (i32.const 28312) + (local.tee $1 + (i32.and + (local.get $5) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + ) + (br $label$break$L187) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $13) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $0 + (i32.add + (local.get $13) + (i32.const 16) + ) + ) + (i32.add + (local.get $13) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $0) + ) + (local.get $7) + ) + ) + (local.get $11) + ) + (if + (i32.eqz + (local.get $11) + ) + (block + (local.set $1 + (local.get $5) + ) + (br $label$break$L187) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $2 + (i32.load + (i32.const 28324) + ) + ) + (local.get $11) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $11) + (local.get $13) + ) + (if + (local.tee $0 + (i32.load offset=16 + (local.get $7) + ) + ) + (if + (i32.gt_u + (local.get $2) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $11) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $11) + ) + ) + ) + ) + (if + (local.tee $0 + (i32.load offset=20 + (local.get $7) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $11) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $11) + ) + (local.set $1 + (local.get $5) + ) + ) + ) + (local.set $1 + (local.get $5) + ) + ) + ) + (local.set $1 + (local.get $5) + ) + ) + (if + (i32.lt_u + (local.get $3) + (i32.const 16) + ) + (block + (i32.store offset=4 + (local.get $7) + (i32.or + (local.tee $0 + (i32.add + (local.get $3) + (local.get $4) + ) + ) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $0 + (i32.add + (local.get $0) + (local.get $7) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + (block $label$break$L211 + (i32.store offset=4 + (local.get $7) + (i32.or + (local.get $4) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.get $10) + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $3) + (local.get $10) + ) + (local.get $3) + ) + (local.set $2 + (i32.shr_u + (local.get $3) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $3) + (i32.const 256) + ) + (block + (local.set $0 + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.tee $1 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $2 + (i32.shl + (i32.const 1) + (local.get $2) + ) + ) + ) + (block $do-once28 + (if + (i32.le_u + (i32.load + (i32.const 28324) + ) + (local.tee $2 + (i32.load + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (block + (local.set $21 + (local.get $1) + ) + (local.set $14 + (local.get $2) + ) + (br $do-once28) + ) + ) + (call $_abort) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $1) + (local.get $2) + ) + ) + (local.set $21 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $14 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $21) + (local.get $10) + ) + (i32.store offset=12 + (local.get $14) + (local.get $10) + ) + (i32.store offset=8 + (local.get $10) + (local.get $14) + ) + (i32.store offset=12 + (local.get $10) + (local.get $0) + ) + (br $label$break$L211) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $2 + (if (result i32) + (local.tee $0 + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $3) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $0 + (i32.and + (i32.shr_u + (i32.add + (local.tee $2 + (i32.shl + (local.get $0) + (local.tee $4 + (i32.and + (i32.shr_u + (i32.add + (local.get $0) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $2 + (i32.and + (i32.shr_u + (i32.add + (local.tee $5 + (i32.shl + (local.get $2) + (local.get $0) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $3) + (i32.add + (local.tee $0 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $0) + (local.get $4) + ) + (local.get $2) + ) + ) + (i32.shr_u + (i32.shl + (local.get $5) + (local.get $2) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + (i32.store offset=28 + (local.get $10) + (local.get $2) + ) + (i32.store offset=20 + (local.get $10) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $10) + (i32.const 0) + ) + (if + (i32.eqz + (i32.and + (local.get $1) + (local.tee $4 + (i32.shl + (i32.const 1) + (local.get $2) + ) + ) + ) + ) + (block + (i32.store + (i32.const 28312) + (i32.or + (local.get $1) + (local.get $4) + ) + ) + (i32.store + (local.get $0) + (local.get $10) + ) + (i32.store offset=24 + (local.get $10) + (local.get $0) + ) + (i32.store offset=12 + (local.get $10) + (local.get $10) + ) + (i32.store offset=8 + (local.get $10) + (local.get $10) + ) + (br $label$break$L211) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + ) + (i32.const -8) + ) + (local.get $3) + ) + (local.set $9 + (local.get $0) + ) + (block $label$break$L229 + (local.set $2 + (i32.shl + (local.get $3) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $2) + (i32.const 1) + ) + ) + (i32.eq + (local.get $2) + (i32.const 31) + ) + ) + ) + ) + (loop $while-in32 + (if + (local.tee $1 + (i32.load + (local.tee $4 + (i32.add + (i32.add + (local.get $0) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $2) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + (block + (local.set $2 + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.get $1) + ) + (i32.const -8) + ) + (local.get $3) + ) + (block + (local.set $9 + (local.get $1) + ) + (br $label$break$L229) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in32) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $4) + ) + (call $_abort) + (block + (i32.store + (local.get $4) + (local.get $10) + ) + (i32.store offset=24 + (local.get $10) + (local.get $0) + ) + (i32.store offset=12 + (local.get $10) + (local.get $10) + ) + (i32.store offset=8 + (local.get $10) + (local.get $10) + ) + (br $label$break$L211) + ) + ) + ) + ) + (if + (i32.and + (i32.le_u + (local.tee $0 + (i32.load + (i32.const 28324) + ) + ) + (local.get $9) + ) + (i32.le_u + (local.get $0) + (local.tee $1 + (i32.load offset=8 + (local.tee $0 + (local.get $9) + ) + ) + ) + ) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $10) + ) + (i32.store offset=8 + (local.get $0) + (local.get $10) + ) + (i32.store offset=8 + (local.get $10) + (local.get $1) + ) + (i32.store offset=12 + (local.get $10) + (local.get $9) + ) + (i32.store offset=24 + (local.get $10) + (i32.const 0) + ) + ) + (call $_abort) + ) + ) + ) + (i32.add + (local.get $7) + (i32.const 8) + ) + ) + (block + (local.set $0 + (local.get $4) + ) + (br $__rjti$8) + ) + ) + (block + (local.set $0 + (local.get $4) + ) + (br $__rjti$8) + ) + ) + ) + (block + (local.set $0 + (local.get $4) + ) + (br $__rjti$8) + ) + ) + ) + ) + ) + ) + (br $label$break$L243) + ) + (if + (i32.ge_u + (local.tee $2 + (i32.load + (i32.const 28316) + ) + ) + (local.get $0) + ) + (block + (local.set $1 + (i32.load + (i32.const 28328) + ) + ) + (if + (i32.gt_u + (local.tee $3 + (i32.sub + (local.get $2) + (local.get $0) + ) + ) + (i32.const 15) + ) + (block + (i32.store + (i32.const 28328) + (local.tee $4 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + ) + (i32.store + (i32.const 28316) + (local.get $3) + ) + (i32.store offset=4 + (local.get $4) + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $1) + (local.get $2) + ) + (local.get $3) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $0) + (i32.const 3) + ) + ) + ) + (block + (i32.store + (i32.const 28316) + (i32.const 0) + ) + (i32.store + (i32.const 28328) + (i32.const 0) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $2) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $0 + (i32.add + (local.get $1) + (local.get $2) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (br $label$break$L243) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.load + (i32.const 28320) + ) + ) + (local.get $0) + ) + (block + (i32.store + (i32.const 28320) + (local.tee $2 + (i32.sub + (local.get $1) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28332) + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (i32.const 28332) + ) + ) + (local.get $0) + ) + ) + ) + (i32.store offset=4 + (local.get $3) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $0) + (i32.const 3) + ) + ) + (local.set $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (br $label$break$L243) + ) + ) + (if + (i32.eqz + (i32.load + (i32.const 28256) + ) + ) + (block + (drop + (call $___pthread_mutex_lock + (i32.const 28280) + ) + ) + (if + (i32.eqz + (i32.load + (i32.const 28256) + ) + ) + (block + (i32.store + (i32.const 28264) + (i32.const 4096) + ) + (i32.store + (i32.const 28260) + (i32.const 4096) + ) + (i32.store + (i32.const 28268) + (i32.const -1) + ) + (i32.store + (i32.const 28272) + (i32.const -1) + ) + (i32.store + (i32.const 28276) + (i32.const 2) + ) + (i32.store + (i32.const 28752) + (i32.const 2) + ) + (if + (i32.eqz + (call $_pthread_mutexattr_init + (local.get $17) + ) + ) + (call $_pthread_mutex_init + (local.get $17) + ) + ) + (i32.atomic.store + (i32.const 28256) + (i32.xor + (i32.and + (local.get $20) + (i32.const -16) + ) + (i32.const 1431655768) + ) + ) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28280) + ) + ) + ) + (local.set $9 + (i32.add + (local.get $0) + (i32.const 48) + ) + ) + (if + (i32.gt_u + (local.tee $4 + (i32.and + (i32.add + (local.tee $1 + (i32.load + (i32.const 28264) + ) + ) + (local.tee $5 + (i32.add + (local.get $0) + (i32.const 47) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + ) + ) + (local.get $0) + ) + (block + (if + (local.tee $1 + (i32.load + (i32.const 28748) + ) + ) + (if + (i32.or + (i32.le_u + (local.tee $3 + (i32.add + (local.tee $2 + (i32.load + (i32.const 28740) + ) + ) + (local.get $4) + ) + ) + (local.get $2) + ) + (i32.gt_u + (local.get $3) + (local.get $1) + ) + ) + (block + (local.set $0 + (i32.const 0) + ) + (br $label$break$L243) + ) + ) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 4) + ) + (block + (local.set $1 + (i32.const -1) + ) + (local.set $2 + (i32.const 0) + ) + ) + (block + (block $__rjto$4 + (block $__rjti$4 + (block $__rjti$3 + (block $__rjti$2 + (br_if $__rjti$2 + (i32.eqz + (local.tee $1 + (i32.load + (i32.const 28332) + ) + ) + ) + ) + (local.set $3 + (i32.const 28784) + ) + (loop $while-in36 + (block $while-out35 + (if + (i32.le_u + (local.tee $2 + (i32.load + (local.get $3) + ) + ) + (local.get $1) + ) + (br_if $while-out35 + (i32.gt_u + (i32.add + (local.get $2) + (i32.load offset=4 + (local.get $3) + ) + ) + (local.get $1) + ) + ) + ) + (br_if $while-in36 + (local.tee $3 + (i32.load offset=8 + (local.get $3) + ) + ) + ) + (br $__rjti$2) + ) + ) + (drop + (call $___pthread_mutex_lock + (i32.const 28280) + ) + ) + (if + (i32.lt_u + (local.tee $2 + (i32.and + (i32.add + (local.tee $1 + (i32.load + (i32.const 28264) + ) + ) + (i32.sub + (local.get $5) + (i32.load + (i32.const 28320) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $1) + ) + ) + ) + (i32.const 2147483647) + ) + (block + (local.set $1 + (call $_sbrk + (local.get $2) + ) + ) + (br_if $__rjti$3 + (i32.ne + (local.get $1) + (i32.add + (i32.load + (local.get $3) + ) + (i32.load offset=4 + (local.get $3) + ) + ) + ) + ) + (br_if $__rjti$4 + (i32.eq + (local.get $1) + (i32.const -1) + ) + ) + ) + (block + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + ) + (br $__rjto$4) + ) + (drop + (call $___pthread_mutex_lock + (i32.const 28280) + ) + ) + (if + (i32.eq + (local.tee $1 + (call $_sbrk + (i32.const 0) + ) + ) + (i32.const -1) + ) + (block + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + (block + (local.set $3 + (i32.add + (local.tee $7 + (i32.load + (i32.const 28740) + ) + ) + (local.tee $2 + (i32.add + (select + (i32.sub + (i32.and + (i32.add + (local.get $1) + (local.tee $3 + (i32.add + (local.tee $2 + (i32.load + (i32.const 28260) + ) + ) + (i32.const -1) + ) + ) + ) + (i32.sub + (i32.const 0) + (local.get $2) + ) + ) + (local.get $1) + ) + (i32.const 0) + (i32.and + (local.get $1) + (local.get $3) + ) + ) + (local.get $4) + ) + ) + ) + ) + (if + (i32.and + (i32.lt_u + (local.get $2) + (i32.const 2147483647) + ) + (i32.gt_u + (local.get $2) + (local.get $0) + ) + ) + (block + (if + (local.tee $11 + (i32.load + (i32.const 28748) + ) + ) + (if + (i32.or + (i32.le_u + (local.get $3) + (local.get $7) + ) + (i32.gt_u + (local.get $3) + (local.get $11) + ) + ) + (block + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + ) + ) + (if + (i32.ne + (local.tee $3 + (call $_sbrk + (local.get $2) + ) + ) + (local.get $1) + ) + (block + (local.set $1 + (local.get $3) + ) + (br $__rjti$3) + ) + ) + ) + (block + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + ) + ) + ) + (br $__rjto$4) + ) + (if + (i32.eqz + (i32.and + (i32.and + (i32.ne + (local.get $1) + (i32.const -1) + ) + (i32.lt_u + (local.get $2) + (i32.const 2147483647) + ) + ) + (i32.gt_u + (local.get $9) + (local.get $2) + ) + ) + ) + (if + (i32.eq + (local.get $1) + (i32.const -1) + ) + (block + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + (br $__rjto$4) + ) + ) + (local.set $9 + (i32.sub + (i32.const 0) + (local.get $2) + ) + ) + (if + (i32.lt_u + (local.tee $3 + (i32.and + (i32.add + (local.tee $3 + (i32.load + (i32.const 28264) + ) + ) + (i32.sub + (local.get $5) + (local.get $2) + ) + ) + (i32.sub + (i32.const 0) + (local.get $3) + ) + ) + ) + (i32.const 2147483647) + ) + (local.set $2 + (if (result i32) + (i32.eq + (call $_sbrk + (local.get $3) + ) + (i32.const -1) + ) + (block + (drop + (call $_sbrk + (local.get $9) + ) + ) + (local.set $2 + (i32.const 0) + ) + (br $__rjti$4) + ) + (i32.add + (local.get $2) + (local.get $3) + ) + ) + ) + ) + (br $__rjto$4) + ) + (i32.store + (i32.const 28752) + (i32.or + (i32.load + (i32.const 28752) + ) + (i32.const 4) + ) + ) + (local.set $1 + (i32.const -1) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28280) + ) + ) + ) + (block $__rjto$7 + (block $__rjti$7 + (if + (i32.and + (i32.eq + (local.get $1) + (i32.const -1) + ) + (i32.lt_u + (local.get $4) + (i32.const 2147483647) + ) + ) + (block + (drop + (call $___pthread_mutex_lock + (i32.const 28280) + ) + ) + (local.set $4 + (call $_sbrk + (local.get $4) + ) + ) + (local.set $5 + (call $_sbrk + (i32.const 0) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28280) + ) + (local.set $1 + (i32.gt_u + (local.tee $3 + (i32.sub + (local.get $5) + (local.get $4) + ) + ) + (i32.add + (local.get $0) + (i32.const 40) + ) + ) + ) + (local.set $3 + (select + (local.get $3) + (local.get $2) + (local.get $1) + ) + ) + (local.set $1 + (select + (local.get $4) + (i32.const -1) + (local.get $1) + ) + ) + (br_if $__rjti$7 + (i32.and + (i32.and + (i32.ne + (local.get $4) + (i32.const -1) + ) + (i32.ne + (local.get $5) + (i32.const -1) + ) + ) + (i32.lt_u + (local.get $4) + (local.get $5) + ) + ) + ) + ) + (block + (local.set $3 + (local.get $2) + ) + (br $__rjti$7) + ) + ) + (br $__rjto$7) + ) + (if + (i32.ne + (local.get $1) + (i32.const -1) + ) + (block + (i32.store + (i32.const 28740) + (local.tee $2 + (i32.add + (i32.load + (i32.const 28740) + ) + (local.get $3) + ) + ) + ) + (if + (i32.gt_u + (local.get $2) + (i32.load + (i32.const 28744) + ) + ) + (i32.store + (i32.const 28744) + (local.get $2) + ) + ) + (if + (local.tee $5 + (i32.load + (i32.const 28332) + ) + ) + (block $label$break$L309 + (local.set $2 + (i32.const 28784) + ) + (block $__rjto$5 + (block $__rjti$5 + (loop $while-in43 + (br_if $__rjti$5 + (i32.eq + (i32.add + (local.tee $9 + (i32.load + (local.get $2) + ) + ) + (local.tee $7 + (i32.load offset=4 + (local.get $2) + ) + ) + ) + (local.get $1) + ) + ) + (br_if $while-in43 + (local.tee $2 + (i32.load offset=8 + (local.get $2) + ) + ) + ) + ) + (br $__rjto$5) + ) + (local.set $4 + (local.get $2) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=12 + (local.get $2) + ) + (i32.const 8) + ) + ) + (if + (i32.and + (i32.le_u + (local.get $9) + (local.get $5) + ) + (i32.gt_u + (local.get $1) + (local.get $5) + ) + ) + (block + (i32.store offset=4 + (local.get $4) + (i32.add + (local.get $3) + (local.get $7) + ) + ) + (local.set $1 + (i32.add + (local.get $5) + (local.tee $2 + (select + (i32.and + (i32.sub + (i32.const 0) + (local.tee $1 + (i32.add + (local.get $5) + (i32.const 8) + ) + ) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $1) + (i32.const 7) + ) + ) + ) + ) + ) + (local.set $2 + (i32.sub + (local.tee $3 + (i32.add + (i32.load + (i32.const 28320) + ) + (local.get $3) + ) + ) + (local.get $2) + ) + ) + (i32.store + (i32.const 28332) + (local.get $1) + ) + (i32.store + (i32.const 28320) + (local.get $2) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.store offset=4 + (i32.add + (local.get $3) + (local.get $5) + ) + (i32.const 40) + ) + (i32.store + (i32.const 28336) + (i32.load + (i32.const 28272) + ) + ) + (br $label$break$L309) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $1) + (local.tee $2 + (i32.load + (i32.const 28324) + ) + ) + ) + (block + (i32.store + (i32.const 28324) + (local.get $1) + ) + (local.set $2 + (local.get $1) + ) + ) + ) + (local.set $9 + (i32.add + (local.get $1) + (local.get $3) + ) + ) + (local.set $4 + (i32.const 28784) + ) + (block $__rjto$6 + (block $__rjti$6 + (loop $while-in45 + (br_if $__rjti$6 + (i32.eq + (i32.load + (local.get $4) + ) + (local.get $9) + ) + ) + (br_if $while-in45 + (local.tee $4 + (i32.load offset=8 + (local.get $4) + ) + ) + ) + ) + (br $__rjto$6) + ) + (if + (i32.eqz + (i32.and + (i32.load offset=12 + (local.get $4) + ) + (i32.const 8) + ) + ) + (block + (i32.store + (local.get $4) + (local.get $1) + ) + (i32.store offset=4 + (local.get $4) + (i32.add + (i32.load offset=4 + (local.get $4) + ) + (local.get $3) + ) + ) + (local.set $6 + (i32.add + (local.tee $11 + (i32.add + (select + (i32.and + (i32.sub + (i32.const 0) + (local.tee $3 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $3) + (i32.const 7) + ) + ) + (local.get $1) + ) + ) + (local.get $0) + ) + ) + (local.set $4 + (i32.sub + (i32.sub + (local.tee $3 + (i32.add + (local.get $9) + (select + (i32.and + (i32.sub + (i32.const 0) + (local.tee $1 + (i32.add + (local.get $9) + (i32.const 8) + ) + ) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $1) + (i32.const 7) + ) + ) + ) + ) + (local.get $11) + ) + (local.get $0) + ) + ) + (i32.store offset=4 + (local.get $11) + (i32.or + (local.get $0) + (i32.const 3) + ) + ) + (if + (i32.eq + (local.get $3) + (local.get $5) + ) + (block + (i32.store + (i32.const 28320) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28320) + ) + (local.get $4) + ) + ) + ) + (i32.store + (i32.const 28332) + (local.get $6) + ) + (i32.store offset=4 + (local.get $6) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + ) + (block $label$break$L332 + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $3) + ) + (block + (i32.store + (i32.const 28316) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28316) + ) + (local.get $4) + ) + ) + ) + (i32.store + (i32.const 28328) + (local.get $6) + ) + (i32.store offset=4 + (local.get $6) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $6) + ) + (local.get $0) + ) + (br $label$break$L332) + ) + ) + (local.set $3 + (if (result i32) + (i32.eq + (i32.and + (local.tee $0 + (i32.load offset=4 + (local.get $3) + ) + ) + (i32.const 3) + ) + (i32.const 1) + ) + (block (result i32) + (local.set $14 + (i32.and + (local.get $0) + (i32.const -8) + ) + ) + (local.set $9 + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + ) + (block $label$break$L340 + (if + (i32.lt_u + (local.get $0) + (i32.const 256) + ) + (block + (local.set $1 + (i32.load offset=12 + (local.get $3) + ) + ) + (if + (i32.ne + (local.tee $5 + (i32.load offset=8 + (local.get $3) + ) + ) + (local.tee $0 + (i32.add + (i32.shl + (local.get $9) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block $do-once48 + (if + (i32.gt_u + (local.get $2) + (local.get $5) + ) + (call $_abort) + ) + (br_if $do-once48 + (i32.eq + (i32.load offset=12 + (local.get $5) + ) + (local.get $3) + ) + ) + (call $_abort) + ) + ) + (if + (i32.eq + (local.get $1) + (local.get $5) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $9) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L340) + ) + ) + (if + (i32.eq + (local.get $0) + (local.get $1) + ) + (local.set $22 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (block $do-once50 + (if + (i32.gt_u + (local.get $2) + (local.get $1) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + (local.get $3) + ) + (block + (local.set $22 + (local.get $0) + ) + (br $do-once50) + ) + ) + (call $_abort) + ) + ) + (i32.store offset=12 + (local.get $5) + (local.get $1) + ) + (i32.store + (local.get $22) + (local.get $5) + ) + ) + (block + (local.set $7 + (i32.load offset=24 + (local.get $3) + ) + ) + (if + (i32.eq + (local.tee $0 + (i32.load offset=12 + (local.get $3) + ) + ) + (local.get $3) + ) + (block $do-once52 + (if + (local.tee $0 + (i32.load + (local.tee $5 + (i32.add + (local.tee $1 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $1 + (local.get $5) + ) + (br_if $do-once52 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $1) + ) + ) + ) + ) + ) + (loop $while-in55 + (block $while-out54 + (if + (i32.eqz + (local.tee $9 + (i32.load + (local.tee $5 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out54 + (i32.eqz + (local.tee $9 + (i32.load + (local.tee $5 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $1 + (local.get $5) + ) + (local.set $0 + (local.get $9) + ) + (br $while-in55) + ) + ) + (if + (i32.gt_u + (local.get $2) + (local.get $1) + ) + (call $_abort) + (block + (i32.store + (local.get $1) + (i32.const 0) + ) + (local.set $10 + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $2) + (local.tee $1 + (i32.load offset=8 + (local.get $3) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $3) + (i32.load offset=12 + (local.get $1) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $0) + ) + (local.get $3) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $1) + ) + (local.set $10 + (local.get $0) + ) + ) + (call $_abort) + ) + ) + ) + (br_if $label$break$L340 + (i32.eqz + (local.get $7) + ) + ) + (if + (i32.eq + (i32.load + (local.tee $1 + (i32.add + (i32.shl + (local.tee $0 + (i32.load offset=28 + (local.get $3) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $3) + ) + (block $do-once56 + (i32.store + (local.get $1) + (local.get $10) + ) + (br_if $do-once56 + (local.get $10) + ) + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L340) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $7) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $0 + (i32.add + (local.get $7) + (i32.const 16) + ) + ) + (i32.add + (local.get $7) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $0) + ) + (local.get $3) + ) + ) + (local.get $10) + ) + (br_if $label$break$L340 + (i32.eqz + (local.get $10) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.load + (i32.const 28324) + ) + ) + (local.get $10) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $10) + (local.get $7) + ) + (if + (local.tee $0 + (i32.load offset=16 + (local.get $3) + ) + ) + (if + (i32.gt_u + (local.get $1) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $10) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $10) + ) + ) + ) + ) + (br_if $label$break$L340 + (i32.eqz + (local.tee $0 + (i32.load offset=20 + (local.get $3) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $10) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $10) + ) + ) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $3) + (local.get $14) + ) + ) + (i32.add + (local.get $4) + (local.get $14) + ) + ) + (block (result i32) + (local.set $0 + (local.get $3) + ) + (local.get $4) + ) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.and + (i32.load offset=4 + (local.get $0) + ) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $6) + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $3) + (local.get $6) + ) + (local.get $3) + ) + (local.set $1 + (i32.shr_u + (local.get $3) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $3) + (i32.const 256) + ) + (block + (local.set $0 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.tee $2 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $1 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + (block $do-once60 + (if + (i32.le_u + (i32.load + (i32.const 28324) + ) + (local.tee $2 + (i32.load + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (block + (local.set $23 + (local.get $1) + ) + (local.set $13 + (local.get $2) + ) + (br $do-once60) + ) + ) + (call $_abort) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $1) + (local.get $2) + ) + ) + (local.set $23 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $13 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $23) + (local.get $6) + ) + (i32.store offset=12 + (local.get $13) + (local.get $6) + ) + (i32.store offset=8 + (local.get $6) + (local.get $13) + ) + (i32.store offset=12 + (local.get $6) + (local.get $0) + ) + (br $label$break$L332) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $1 + (if (result i32) + (local.tee $0 + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $3) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $0 + (i32.and + (i32.shr_u + (i32.add + (local.tee $1 + (i32.shl + (local.get $0) + (local.tee $2 + (i32.and + (i32.shr_u + (i32.add + (local.get $0) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $1 + (i32.and + (i32.shr_u + (i32.add + (local.tee $4 + (i32.shl + (local.get $1) + (local.get $0) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $3) + (i32.add + (local.tee $0 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $0) + (local.get $2) + ) + (local.get $1) + ) + ) + (i32.shr_u + (i32.shl + (local.get $4) + (local.get $1) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + (i32.store offset=28 + (local.get $6) + (local.get $1) + ) + (i32.store offset=20 + (local.get $6) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $6) + (i32.const 0) + ) + (if + (i32.eqz + (i32.and + (local.tee $2 + (i32.load + (i32.const 28312) + ) + ) + (local.tee $4 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + ) + (block + (i32.store + (i32.const 28312) + (i32.or + (local.get $2) + (local.get $4) + ) + ) + (i32.store + (local.get $0) + (local.get $6) + ) + (i32.store offset=24 + (local.get $6) + (local.get $0) + ) + (i32.store offset=12 + (local.get $6) + (local.get $6) + ) + (i32.store offset=8 + (local.get $6) + (local.get $6) + ) + (br $label$break$L332) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + ) + (i32.const -8) + ) + (local.get $3) + ) + (local.set $8 + (local.get $0) + ) + (block $label$break$L425 + (local.set $2 + (i32.shl + (local.get $3) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $1) + (i32.const 1) + ) + ) + (i32.eq + (local.get $1) + (i32.const 31) + ) + ) + ) + ) + (loop $while-in66 + (if + (local.tee $1 + (i32.load + (local.tee $4 + (i32.add + (i32.add + (local.get $0) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $2) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + (block + (local.set $2 + (i32.shl + (local.get $2) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.get $1) + ) + (i32.const -8) + ) + (local.get $3) + ) + (block + (local.set $8 + (local.get $1) + ) + (br $label$break$L425) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in66) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $4) + ) + (call $_abort) + (block + (i32.store + (local.get $4) + (local.get $6) + ) + (i32.store offset=24 + (local.get $6) + (local.get $0) + ) + (i32.store offset=12 + (local.get $6) + (local.get $6) + ) + (i32.store offset=8 + (local.get $6) + (local.get $6) + ) + (br $label$break$L332) + ) + ) + ) + ) + (if + (i32.and + (i32.le_u + (local.tee $0 + (i32.load + (i32.const 28324) + ) + ) + (local.get $8) + ) + (i32.le_u + (local.get $0) + (local.tee $1 + (i32.load offset=8 + (local.tee $0 + (local.get $8) + ) + ) + ) + ) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $6) + ) + (i32.store offset=8 + (local.get $0) + (local.get $6) + ) + (i32.store offset=8 + (local.get $6) + (local.get $1) + ) + (i32.store offset=12 + (local.get $6) + (local.get $8) + ) + (i32.store offset=24 + (local.get $6) + (i32.const 0) + ) + ) + (call $_abort) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $11) + (i32.const 8) + ) + ) + (br $label$break$L243) + ) + ) + ) + (local.set $2 + (i32.const 28784) + ) + (loop $while-in68 + (block $while-out67 + (if + (i32.le_u + (local.tee $4 + (i32.load + (local.get $2) + ) + ) + (local.get $5) + ) + (br_if $while-out67 + (i32.gt_u + (local.tee $9 + (i32.add + (local.get $4) + (i32.load offset=4 + (local.get $2) + ) + ) + ) + (local.get $5) + ) + ) + ) + (local.set $2 + (i32.load offset=8 + (local.get $2) + ) + ) + (br $while-in68) + ) + ) + (local.set $2 + (i32.add + (local.tee $4 + (i32.add + (local.get $9) + (i32.const -47) + ) + ) + (i32.const 8) + ) + ) + (i32.store + (i32.const 28332) + (local.tee $7 + (i32.add + (local.tee $8 + (select + (i32.and + (i32.sub + (i32.const 0) + (local.tee $8 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $8) + (i32.const 7) + ) + ) + ) + (local.get $1) + ) + ) + ) + (i32.store + (i32.const 28320) + (local.tee $8 + (i32.sub + (local.tee $11 + (i32.add + (local.get $3) + (i32.const -40) + ) + ) + (local.get $8) + ) + ) + ) + (i32.store offset=4 + (local.get $7) + (i32.or + (local.get $8) + (i32.const 1) + ) + ) + (i32.store offset=4 + (i32.add + (local.get $1) + (local.get $11) + ) + (i32.const 40) + ) + (i32.store + (i32.const 28336) + (i32.load + (i32.const 28272) + ) + ) + (i32.store offset=4 + (local.tee $4 + (select + (local.get $5) + (local.tee $2 + (i32.add + (local.get $4) + (select + (i32.and + (i32.sub + (i32.const 0) + (local.get $2) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $2) + (i32.const 7) + ) + ) + ) + ) + (i32.lt_u + (local.get $2) + (local.tee $8 + (i32.add + (local.get $5) + (i32.const 16) + ) + ) + ) + ) + ) + (i32.const 27) + ) + (i64.store offset=8 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 28784) + ) + ) + (i64.store offset=16 align=4 + (local.get $4) + (i64.load align=4 + (i32.const 28792) + ) + ) + (i32.store + (i32.const 28784) + (local.get $1) + ) + (i32.store + (i32.const 28788) + (local.get $3) + ) + (i32.store + (i32.const 28796) + (i32.const 0) + ) + (i32.store + (i32.const 28792) + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + (local.set $1 + (i32.add + (local.get $4) + (i32.const 24) + ) + ) + (loop $while-in70 + (i32.store + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (i32.const 7) + ) + (if + (i32.lt_u + (i32.add + (local.get $1) + (i32.const 8) + ) + (local.get $9) + ) + (block + (local.set $1 + (local.get $2) + ) + (br $while-in70) + ) + ) + ) + (if + (i32.ne + (local.get $4) + (local.get $5) + ) + (block + (i32.store offset=4 + (local.get $4) + (i32.and + (i32.load offset=4 + (local.get $4) + ) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $5) + (i32.or + (local.tee $9 + (i32.sub + (local.get $4) + (local.get $5) + ) + ) + (i32.const 1) + ) + ) + (i32.store + (local.get $4) + (local.get $9) + ) + (local.set $2 + (i32.shr_u + (local.get $9) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $9) + (i32.const 256) + ) + (block + (local.set $1 + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.tee $3 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $2 + (i32.shl + (i32.const 1) + (local.get $2) + ) + ) + ) + (block $do-once71 + (if + (i32.le_u + (i32.load + (i32.const 28324) + ) + (local.tee $3 + (i32.load + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + ) + ) + (block + (local.set $24 + (local.get $2) + ) + (local.set $16 + (local.get $3) + ) + (br $do-once71) + ) + ) + (call $_abort) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $2) + (local.get $3) + ) + ) + (local.set $24 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (local.set $16 + (local.get $1) + ) + ) + ) + (i32.store + (local.get $24) + (local.get $5) + ) + (i32.store offset=12 + (local.get $16) + (local.get $5) + ) + (i32.store offset=8 + (local.get $5) + (local.get $16) + ) + (i32.store offset=12 + (local.get $5) + (local.get $1) + ) + (br $label$break$L309) + ) + ) + (local.set $1 + (i32.add + (i32.shl + (local.tee $2 + (if (result i32) + (local.tee $1 + (i32.shr_u + (local.get $9) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $9) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $1 + (i32.and + (i32.shr_u + (i32.add + (local.tee $2 + (i32.shl + (local.get $1) + (local.tee $3 + (i32.and + (i32.shr_u + (i32.add + (local.get $1) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $2 + (i32.and + (i32.shr_u + (i32.add + (local.tee $4 + (i32.shl + (local.get $2) + (local.get $1) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $9) + (i32.add + (local.tee $1 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $1) + (local.get $3) + ) + (local.get $2) + ) + ) + (i32.shr_u + (i32.shl + (local.get $4) + (local.get $2) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + (i32.store offset=28 + (local.get $5) + (local.get $2) + ) + (i32.store offset=20 + (local.get $5) + (i32.const 0) + ) + (i32.store + (local.get $8) + (i32.const 0) + ) + (if + (i32.eqz + (i32.and + (local.tee $3 + (i32.load + (i32.const 28312) + ) + ) + (local.tee $4 + (i32.shl + (i32.const 1) + (local.get $2) + ) + ) + ) + ) + (block + (i32.store + (i32.const 28312) + (i32.or + (local.get $3) + (local.get $4) + ) + ) + (i32.store + (local.get $1) + (local.get $5) + ) + (i32.store offset=24 + (local.get $5) + (local.get $1) + ) + (i32.store offset=12 + (local.get $5) + (local.get $5) + ) + (i32.store offset=8 + (local.get $5) + (local.get $5) + ) + (br $label$break$L309) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.tee $1 + (i32.load + (local.get $1) + ) + ) + ) + (i32.const -8) + ) + (local.get $9) + ) + (local.set $6 + (local.get $1) + ) + (block $label$break$L465 + (local.set $3 + (i32.shl + (local.get $9) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $2) + (i32.const 1) + ) + ) + (i32.eq + (local.get $2) + (i32.const 31) + ) + ) + ) + ) + (loop $while-in77 + (if + (local.tee $2 + (i32.load + (local.tee $4 + (i32.add + (i32.add + (local.get $1) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $3) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + (block + (local.set $3 + (i32.shl + (local.get $3) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.get $2) + ) + (i32.const -8) + ) + (local.get $9) + ) + (block + (local.set $6 + (local.get $2) + ) + (br $label$break$L465) + ) + (block + (local.set $1 + (local.get $2) + ) + (br $while-in77) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $4) + ) + (call $_abort) + (block + (i32.store + (local.get $4) + (local.get $5) + ) + (i32.store offset=24 + (local.get $5) + (local.get $1) + ) + (i32.store offset=12 + (local.get $5) + (local.get $5) + ) + (i32.store offset=8 + (local.get $5) + (local.get $5) + ) + (br $label$break$L309) + ) + ) + ) + ) + (if + (i32.and + (i32.le_u + (local.tee $1 + (i32.load + (i32.const 28324) + ) + ) + (local.get $6) + ) + (i32.le_u + (local.get $1) + (local.tee $2 + (i32.load offset=8 + (local.tee $1 + (local.get $6) + ) + ) + ) + ) + ) + (block + (i32.store offset=12 + (local.get $2) + (local.get $5) + ) + (i32.store offset=8 + (local.get $1) + (local.get $5) + ) + (i32.store offset=8 + (local.get $5) + (local.get $2) + ) + (i32.store offset=12 + (local.get $5) + (local.get $6) + ) + (i32.store offset=24 + (local.get $5) + (i32.const 0) + ) + ) + (call $_abort) + ) + ) + ) + ) + (block + (if + (i32.or + (i32.eqz + (local.tee $2 + (i32.load + (i32.const 28324) + ) + ) + ) + (i32.lt_u + (local.get $1) + (local.get $2) + ) + ) + (i32.store + (i32.const 28324) + (local.get $1) + ) + ) + (i32.store + (i32.const 28784) + (local.get $1) + ) + (i32.store + (i32.const 28788) + (local.get $3) + ) + (i32.store + (i32.const 28796) + (i32.const 0) + ) + (i32.store + (i32.const 28344) + (i32.load + (i32.const 28256) + ) + ) + (i32.store + (i32.const 28340) + (i32.const -1) + ) + (i32.store + (i32.const 28360) + (i32.const 28348) + ) + (i32.store + (i32.const 28356) + (i32.const 28348) + ) + (i32.store + (i32.const 28368) + (i32.const 28356) + ) + (i32.store + (i32.const 28364) + (i32.const 28356) + ) + (i32.store + (i32.const 28376) + (i32.const 28364) + ) + (i32.store + (i32.const 28372) + (i32.const 28364) + ) + (i32.store + (i32.const 28384) + (i32.const 28372) + ) + (i32.store + (i32.const 28380) + (i32.const 28372) + ) + (i32.store + (i32.const 28392) + (i32.const 28380) + ) + (i32.store + (i32.const 28388) + (i32.const 28380) + ) + (i32.store + (i32.const 28400) + (i32.const 28388) + ) + (i32.store + (i32.const 28396) + (i32.const 28388) + ) + (i32.store + (i32.const 28408) + (i32.const 28396) + ) + (i32.store + (i32.const 28404) + (i32.const 28396) + ) + (i32.store + (i32.const 28416) + (i32.const 28404) + ) + (i32.store + (i32.const 28412) + (i32.const 28404) + ) + (i32.store + (i32.const 28424) + (i32.const 28412) + ) + (i32.store + (i32.const 28420) + (i32.const 28412) + ) + (i32.store + (i32.const 28432) + (i32.const 28420) + ) + (i32.store + (i32.const 28428) + (i32.const 28420) + ) + (i32.store + (i32.const 28440) + (i32.const 28428) + ) + (i32.store + (i32.const 28436) + (i32.const 28428) + ) + (i32.store + (i32.const 28448) + (i32.const 28436) + ) + (i32.store + (i32.const 28444) + (i32.const 28436) + ) + (i32.store + (i32.const 28456) + (i32.const 28444) + ) + (i32.store + (i32.const 28452) + (i32.const 28444) + ) + (i32.store + (i32.const 28464) + (i32.const 28452) + ) + (i32.store + (i32.const 28460) + (i32.const 28452) + ) + (i32.store + (i32.const 28472) + (i32.const 28460) + ) + (i32.store + (i32.const 28468) + (i32.const 28460) + ) + (i32.store + (i32.const 28480) + (i32.const 28468) + ) + (i32.store + (i32.const 28476) + (i32.const 28468) + ) + (i32.store + (i32.const 28488) + (i32.const 28476) + ) + (i32.store + (i32.const 28484) + (i32.const 28476) + ) + (i32.store + (i32.const 28496) + (i32.const 28484) + ) + (i32.store + (i32.const 28492) + (i32.const 28484) + ) + (i32.store + (i32.const 28504) + (i32.const 28492) + ) + (i32.store + (i32.const 28500) + (i32.const 28492) + ) + (i32.store + (i32.const 28512) + (i32.const 28500) + ) + (i32.store + (i32.const 28508) + (i32.const 28500) + ) + (i32.store + (i32.const 28520) + (i32.const 28508) + ) + (i32.store + (i32.const 28516) + (i32.const 28508) + ) + (i32.store + (i32.const 28528) + (i32.const 28516) + ) + (i32.store + (i32.const 28524) + (i32.const 28516) + ) + (i32.store + (i32.const 28536) + (i32.const 28524) + ) + (i32.store + (i32.const 28532) + (i32.const 28524) + ) + (i32.store + (i32.const 28544) + (i32.const 28532) + ) + (i32.store + (i32.const 28540) + (i32.const 28532) + ) + (i32.store + (i32.const 28552) + (i32.const 28540) + ) + (i32.store + (i32.const 28548) + (i32.const 28540) + ) + (i32.store + (i32.const 28560) + (i32.const 28548) + ) + (i32.store + (i32.const 28556) + (i32.const 28548) + ) + (i32.store + (i32.const 28568) + (i32.const 28556) + ) + (i32.store + (i32.const 28564) + (i32.const 28556) + ) + (i32.store + (i32.const 28576) + (i32.const 28564) + ) + (i32.store + (i32.const 28572) + (i32.const 28564) + ) + (i32.store + (i32.const 28584) + (i32.const 28572) + ) + (i32.store + (i32.const 28580) + (i32.const 28572) + ) + (i32.store + (i32.const 28592) + (i32.const 28580) + ) + (i32.store + (i32.const 28588) + (i32.const 28580) + ) + (i32.store + (i32.const 28600) + (i32.const 28588) + ) + (i32.store + (i32.const 28596) + (i32.const 28588) + ) + (i32.store + (i32.const 28608) + (i32.const 28596) + ) + (i32.store + (i32.const 28604) + (i32.const 28596) + ) + (i32.store + (i32.const 28332) + (local.tee $4 + (i32.add + (local.tee $2 + (select + (i32.and + (i32.sub + (i32.const 0) + (local.tee $2 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + (i32.const 7) + ) + (i32.const 0) + (i32.and + (local.get $2) + (i32.const 7) + ) + ) + ) + (local.get $1) + ) + ) + ) + (i32.store + (i32.const 28320) + (local.tee $2 + (i32.sub + (local.tee $3 + (i32.add + (local.get $3) + (i32.const -40) + ) + ) + (local.get $2) + ) + ) + ) + (i32.store offset=4 + (local.get $4) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.store offset=4 + (i32.add + (local.get $1) + (local.get $3) + ) + (i32.const 40) + ) + (i32.store + (i32.const 28336) + (i32.load + (i32.const 28272) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.load + (i32.const 28320) + ) + ) + (local.get $0) + ) + (block + (i32.store + (i32.const 28320) + (local.tee $2 + (i32.sub + (local.get $1) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28332) + (local.tee $3 + (i32.add + (local.tee $1 + (i32.load + (i32.const 28332) + ) + ) + (local.get $0) + ) + ) + ) + (i32.store offset=4 + (local.get $3) + (i32.or + (local.get $2) + (i32.const 1) + ) + ) + (i32.store offset=4 + (local.get $1) + (i32.or + (local.get $0) + (i32.const 3) + ) + ) + (local.set $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (br $label$break$L243) + ) + ) + ) + ) + ) + (i32.store + (call $___errno_location) + (i32.const 12) + ) + ) + ) + (local.set $0 + (i32.const 0) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + ) + (block + (global.set $STACKTOP + (local.get $19) + ) + (return + (local.get $0) + ) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28756) + ) + (global.set $STACKTOP + (local.get $19) + ) + (local.get $0) + ) + (func $_free (; 669 ;) (; has Stack IR ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (if + (i32.eqz + (local.get $0) + ) + (return) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + (if + (call $___pthread_mutex_lock + (i32.const 28756) + ) + (return) + ) + ) + (if + (i32.lt_u + (local.tee $1 + (i32.add + (local.get $0) + (i32.const -8) + ) + ) + (local.tee $10 + (i32.load + (i32.const 28324) + ) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (local.tee $8 + (i32.and + (local.tee $0 + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + ) + (i32.const 3) + ) + ) + (i32.const 1) + ) + (call $_abort) + ) + (local.set $6 + (i32.add + (local.get $1) + (local.tee $3 + (i32.and + (local.get $0) + (i32.const -8) + ) + ) + ) + ) + (block $do-once5 + (block $__rjti$0 + (if + (i32.and + (local.get $0) + (i32.const 1) + ) + (block + (local.set $2 + (local.get $1) + ) + (br $__rjti$0) + ) + (block $label$break$L14 + (local.set $7 + (i32.load + (local.get $1) + ) + ) + (if + (local.get $8) + (block + (if + (i32.lt_u + (local.tee $0 + (i32.sub + (local.get $1) + (local.get $7) + ) + ) + (local.get $10) + ) + (call $_abort) + ) + (local.set $3 + (i32.add + (local.get $3) + (local.get $7) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $0) + ) + (block + (if + (i32.ne + (i32.and + (local.tee $1 + (i32.load offset=4 + (local.get $6) + ) + ) + (i32.const 3) + ) + (i32.const 3) + ) + (block + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + (i32.store + (i32.const 28316) + (local.get $3) + ) + (i32.store offset=4 + (local.get $6) + (i32.and + (local.get $1) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $3) + ) + (local.get $3) + ) + (br $label$break$L14) + ) + ) + (local.set $1 + (i32.shr_u + (local.get $7) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $7) + (i32.const 256) + ) + (block + (local.set $4 + (i32.load offset=12 + (local.get $0) + ) + ) + (if + (i32.ne + (local.tee $7 + (i32.load offset=8 + (local.get $0) + ) + ) + (local.tee $8 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.get $7) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $0) + (i32.load offset=12 + (local.get $7) + ) + ) + (call $_abort) + ) + ) + ) + (if + (i32.eq + (local.get $4) + (local.get $7) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $1) + ) + (i32.const -1) + ) + ) + ) + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + (if + (i32.eq + (local.get $4) + (local.get $8) + ) + (local.set $2 + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.get $4) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $1 + (i32.add + (local.get $4) + (i32.const 8) + ) + ) + ) + (local.get $0) + ) + (local.set $2 + (local.get $1) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=12 + (local.get $7) + (local.get $4) + ) + (i32.store + (local.get $2) + (local.get $7) + ) + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + (local.set $11 + (i32.load offset=24 + (local.get $0) + ) + ) + (if + (i32.eq + (local.tee $1 + (i32.load offset=12 + (local.get $0) + ) + ) + (local.get $0) + ) + (block $do-once + (if + (local.tee $1 + (i32.load + (local.tee $7 + (i32.add + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $2 + (local.get $7) + ) + (br_if $do-once + (i32.eqz + (local.tee $1 + (i32.load + (local.get $2) + ) + ) + ) + ) + ) + (loop $while-in + (block $while-out + (if + (i32.eqz + (local.tee $8 + (i32.load + (local.tee $7 + (i32.add + (local.get $1) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out + (i32.eqz + (local.tee $8 + (i32.load + (local.tee $7 + (i32.add + (local.get $1) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (local.get $7) + ) + (local.set $1 + (local.get $8) + ) + (br $while-in) + ) + ) + (if + (i32.gt_u + (local.get $10) + (local.get $2) + ) + (call $_abort) + (block + (i32.store + (local.get $2) + (i32.const 0) + ) + (local.set $4 + (local.get $1) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.tee $2 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $0) + (i32.load offset=12 + (local.get $2) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $1) + ) + (local.get $0) + ) + (block + (i32.store offset=12 + (local.get $2) + (local.get $1) + ) + (i32.store offset=8 + (local.get $1) + (local.get $2) + ) + (local.set $4 + (local.get $1) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $11) + (block + (if + (i32.eq + (i32.load + (local.tee $2 + (i32.add + (i32.shl + (local.tee $1 + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $0) + ) + (block + (i32.store + (local.get $2) + (local.get $4) + ) + (if + (i32.eqz + (local.get $4) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $1) + ) + (i32.const -1) + ) + ) + ) + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $11) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $1 + (i32.add + (local.get $11) + (i32.const 16) + ) + ) + (i32.add + (local.get $11) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $1) + ) + (local.get $0) + ) + ) + (local.get $4) + ) + (if + (i32.eqz + (local.get $4) + ) + (block + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $2 + (i32.load + (i32.const 28324) + ) + ) + (local.get $4) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $4) + (local.get $11) + ) + (if + (local.tee $1 + (i32.load offset=16 + (local.get $0) + ) + ) + (if + (i32.gt_u + (local.get $2) + (local.get $1) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $4) + (local.get $1) + ) + (i32.store offset=24 + (local.get $1) + (local.get $4) + ) + ) + ) + ) + (if + (local.tee $1 + (i32.load offset=20 + (local.get $0) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $1) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $4) + (local.get $1) + ) + (i32.store offset=24 + (local.get $1) + (local.get $4) + ) + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + (block + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + ) + (block + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + (br $__rjti$0) + ) + ) + ) + ) + ) + ) + (br $do-once5) + ) + (local.set $0 + (local.get $3) + ) + (if + (i32.ge_u + (local.get $1) + (local.get $6) + ) + (call $_abort) + ) + (if + (i32.eqz + (i32.and + (local.tee $3 + (i32.load offset=4 + (local.get $6) + ) + ) + (i32.const 1) + ) + ) + (call $_abort) + ) + (local.set $1 + (i32.shr_u + (local.tee $3 + (if (result i32) + (i32.and + (local.get $3) + (i32.const 2) + ) + (block (result i32) + (i32.store offset=4 + (local.get $6) + (i32.and + (local.get $3) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $1) + ) + (local.get $0) + ) + (local.get $0) + ) + (block (result i32) + (if + (i32.eq + (i32.load + (i32.const 28332) + ) + (local.get $6) + ) + (block + (i32.store + (i32.const 28320) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28320) + ) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28332) + (local.get $2) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (br_if $do-once5 + (i32.ne + (local.get $2) + (i32.load + (i32.const 28328) + ) + ) + ) + (i32.store + (i32.const 28328) + (i32.const 0) + ) + (i32.store + (i32.const 28316) + (i32.const 0) + ) + (br $do-once5) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $6) + ) + (block + (i32.store + (i32.const 28316) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28316) + ) + (local.get $0) + ) + ) + ) + (i32.store + (i32.const 28328) + (local.get $1) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $1) + ) + (local.get $0) + ) + (br $do-once5) + ) + ) + (local.set $4 + (i32.add + (i32.and + (local.get $3) + (i32.const -8) + ) + (local.get $0) + ) + ) + (local.set $0 + (i32.shr_u + (local.get $3) + (i32.const 3) + ) + ) + (block $label$break$L109 + (if + (i32.lt_u + (local.get $3) + (i32.const 256) + ) + (block + (local.set $3 + (i32.load offset=12 + (local.get $6) + ) + ) + (if + (i32.ne + (local.tee $5 + (i32.load offset=8 + (local.get $6) + ) + ) + (local.tee $7 + (i32.add + (i32.shl + (local.get $0) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $5) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $6) + (i32.load offset=12 + (local.get $5) + ) + ) + (call $_abort) + ) + ) + ) + (if + (i32.eq + (local.get $3) + (local.get $5) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L109) + ) + ) + (if + (i32.eq + (local.get $3) + (local.get $7) + ) + (local.set $9 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + (block + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $3) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $0 + (i32.add + (local.get $3) + (i32.const 8) + ) + ) + ) + (local.get $6) + ) + (local.set $9 + (local.get $0) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=12 + (local.get $5) + (local.get $3) + ) + (i32.store + (local.get $9) + (local.get $5) + ) + ) + (block + (local.set $8 + (i32.load offset=24 + (local.get $6) + ) + ) + (if + (i32.eq + (local.tee $0 + (i32.load offset=12 + (local.get $6) + ) + ) + (local.get $6) + ) + (block $do-once8 + (if + (local.tee $0 + (i32.load + (local.tee $9 + (i32.add + (local.tee $3 + (i32.add + (local.get $6) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $3 + (local.get $9) + ) + (br_if $do-once8 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $3) + ) + ) + ) + ) + ) + (loop $while-in11 + (block $while-out10 + (if + (i32.eqz + (local.tee $7 + (i32.load + (local.tee $9 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out10 + (i32.eqz + (local.tee $7 + (i32.load + (local.tee $9 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $3 + (local.get $9) + ) + (local.set $0 + (local.get $7) + ) + (br $while-in11) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $3) + ) + (call $_abort) + (block + (i32.store + (local.get $3) + (i32.const 0) + ) + (local.set $5 + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.tee $3 + (i32.load offset=8 + (local.get $6) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $6) + (i32.load offset=12 + (local.get $3) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $0) + ) + (local.get $6) + ) + (block + (i32.store offset=12 + (local.get $3) + (local.get $0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $3) + ) + (local.set $5 + (local.get $0) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $8) + (block + (if + (i32.eq + (i32.load + (local.tee $3 + (i32.add + (i32.shl + (local.tee $0 + (i32.load offset=28 + (local.get $6) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $6) + ) + (block + (i32.store + (local.get $3) + (local.get $5) + ) + (if + (i32.eqz + (local.get $5) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L109) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $8) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $0 + (i32.add + (local.get $8) + (i32.const 16) + ) + ) + (i32.add + (local.get $8) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $0) + ) + (local.get $6) + ) + ) + (local.get $5) + ) + (br_if $label$break$L109 + (i32.eqz + (local.get $5) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $3 + (i32.load + (i32.const 28324) + ) + ) + (local.get $5) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $5) + (local.get $8) + ) + (if + (local.tee $0 + (i32.load offset=16 + (local.get $6) + ) + ) + (if + (i32.gt_u + (local.get $3) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $5) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $5) + ) + ) + ) + ) + (if + (local.tee $0 + (i32.load offset=20 + (local.get $6) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $5) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $5) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $4) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $1) + (local.get $4) + ) + (local.get $4) + ) + (if (result i32) + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $2) + ) + (block + (i32.store + (i32.const 28316) + (local.get $4) + ) + (br $do-once5) + ) + (local.get $4) + ) + ) + ) + ) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $3) + (i32.const 256) + ) + (block + (local.set $0 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.tee $3 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $1 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.tee $3 + (i32.load + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (call $_abort) + (block + (local.set $14 + (local.get $1) + ) + (local.set $13 + (local.get $3) + ) + ) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $1) + (local.get $3) + ) + ) + (local.set $14 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $13 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $14) + (local.get $2) + ) + (i32.store offset=12 + (local.get $13) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $13) + ) + (i32.store offset=12 + (local.get $2) + (local.get $0) + ) + (br $do-once5) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $1 + (if (result i32) + (local.tee $0 + (i32.shr_u + (local.get $3) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $3) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $0 + (i32.and + (i32.shr_u + (i32.add + (local.tee $1 + (i32.shl + (local.get $0) + (local.tee $4 + (i32.and + (i32.shr_u + (i32.add + (local.get $0) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $1 + (i32.and + (i32.shr_u + (i32.add + (local.tee $5 + (i32.shl + (local.get $1) + (local.get $0) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $3) + (i32.add + (local.tee $0 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $0) + (local.get $4) + ) + (local.get $1) + ) + ) + (i32.shr_u + (i32.shl + (local.get $5) + (local.get $1) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + (i32.store offset=28 + (local.get $2) + (local.get $1) + ) + (i32.store offset=20 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $2) + (i32.const 0) + ) + (if + (i32.and + (local.tee $4 + (i32.load + (i32.const 28312) + ) + ) + (local.tee $5 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + (block $label$break$L193 + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + ) + (i32.const -8) + ) + (local.get $3) + ) + (local.set $12 + (local.get $0) + ) + (block $label$break$L196 + (local.set $4 + (i32.shl + (local.get $3) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $1) + (i32.const 1) + ) + ) + (i32.eq + (local.get $1) + (i32.const 31) + ) + ) + ) + ) + (loop $while-in19 + (if + (local.tee $1 + (i32.load + (local.tee $5 + (i32.add + (i32.add + (local.get $0) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $4) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + (block + (local.set $4 + (i32.shl + (local.get $4) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.get $1) + ) + (i32.const -8) + ) + (local.get $3) + ) + (block + (local.set $12 + (local.get $1) + ) + (br $label$break$L196) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in19) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $5) + ) + (call $_abort) + (block + (i32.store + (local.get $5) + (local.get $2) + ) + (i32.store offset=24 + (local.get $2) + (local.get $0) + ) + (i32.store offset=12 + (local.get $2) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $2) + ) + (br $label$break$L193) + ) + ) + ) + ) + (if + (i32.and + (i32.le_u + (local.tee $0 + (i32.load + (i32.const 28324) + ) + ) + (local.get $12) + ) + (i32.le_u + (local.get $0) + (local.tee $1 + (i32.load offset=8 + (local.tee $0 + (local.get $12) + ) + ) + ) + ) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $2) + ) + (i32.store offset=8 + (local.get $0) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $1) + ) + (i32.store offset=12 + (local.get $2) + (local.get $12) + ) + (i32.store offset=24 + (local.get $2) + (i32.const 0) + ) + ) + (call $_abort) + ) + ) + (block + (i32.store + (i32.const 28312) + (i32.or + (local.get $4) + (local.get $5) + ) + ) + (i32.store + (local.get $0) + (local.get $2) + ) + (i32.store offset=24 + (local.get $2) + (local.get $0) + ) + (i32.store offset=12 + (local.get $2) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $2) + ) + ) + ) + (i32.store + (i32.const 28340) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28340) + ) + (i32.const -1) + ) + ) + ) + (if + (i32.eqz + (local.get $0) + ) + (block + (local.set $0 + (i32.const 28792) + ) + (loop $while-in21 + (local.set $0 + (i32.add + (local.tee $1 + (i32.load + (local.get $0) + ) + ) + (i32.const 8) + ) + ) + (br_if $while-in21 + (local.get $1) + ) + ) + (i32.store + (i32.const 28340) + (i32.const -1) + ) + ) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + ) + (return) + ) + (call $___pthread_mutex_unlock + (i32.const 28756) + ) + ) + (func $_calloc (; 670 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (if + (local.get $0) + (block + (local.set $2 + (i32.mul + (local.get $0) + (local.get $1) + ) + ) + (if + (i32.gt_u + (i32.or + (local.get $0) + (local.get $1) + ) + (i32.const 65535) + ) + (local.set $2 + (select + (local.get $2) + (i32.const -1) + (i32.eq + (local.get $1) + (i32.div_u + (local.get $2) + (local.get $0) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.eqz + (local.tee $0 + (call $_malloc + (local.get $2) + ) + ) + ) + (return + (local.get $0) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + (i32.const 3) + ) + ) + (return + (local.get $0) + ) + ) + (drop + (call $_memset + (local.get $0) + (i32.const 0) + (local.get $2) + ) + ) + (local.get $0) + ) + (func $_realloc (; 671 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (if + (i32.eqz + (local.get $0) + ) + (return + (call $_malloc + (local.get $1) + ) + ) + ) + (if + (i32.gt_u + (local.get $1) + (i32.const -65) + ) + (block + (i32.store + (call $___errno_location) + (i32.const 12) + ) + (return + (i32.const 0) + ) + ) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + (if + (call $___pthread_mutex_lock + (i32.const 28756) + ) + (return + (i32.const 0) + ) + ) + ) + (local.set $2 + (call $_try_realloc_chunk + (i32.add + (local.get $0) + (i32.const -8) + ) + (select + (i32.const 16) + (i32.and + (i32.add + (local.get $1) + (i32.const 11) + ) + (i32.const -8) + ) + (i32.lt_u + (local.get $1) + (i32.const 11) + ) + ) + ) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + (call $___pthread_mutex_unlock + (i32.const 28756) + ) + ) + (if + (local.get $2) + (return + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + ) + (if + (i32.eqz + (local.tee $2 + (call $_malloc + (local.get $1) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (drop + (call $_memcpy + (local.get $2) + (local.get $0) + (select + (local.tee $3 + (i32.sub + (i32.and + (local.tee $3 + (i32.load + (i32.add + (local.get $0) + (i32.const -4) + ) + ) + ) + (i32.const -8) + ) + (select + (i32.const 4) + (i32.const 8) + (i32.and + (local.get $3) + (i32.const 3) + ) + ) + ) + ) + (local.get $1) + (i32.lt_u + (local.get $3) + (local.get $1) + ) + ) + ) + ) + (call $_free + (local.get $0) + ) + (local.get $2) + ) + (func $_try_realloc_chunk (; 672 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (if + (i32.eqz + (i32.and + (i32.gt_u + (local.tee $4 + (i32.add + (local.get $0) + (local.tee $2 + (i32.and + (local.tee $7 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const -8) + ) + ) + ) + ) + (local.get $0) + ) + (i32.and + (i32.ne + (local.tee $8 + (i32.and + (local.get $7) + (i32.const 3) + ) + ) + (i32.const 1) + ) + (i32.le_u + (local.tee $10 + (i32.load + (i32.const 28324) + ) + ) + (local.get $0) + ) + ) + ) + ) + (call $_abort) + ) + (if + (i32.eqz + (i32.and + (local.tee $6 + (i32.load offset=4 + (local.get $4) + ) + ) + (i32.const 1) + ) + ) + (call $_abort) + ) + (block $folding-inner0 + (if + (i32.eqz + (local.get $8) + ) + (block + (br_if $folding-inner0 + (i32.lt_u + (local.get $1) + (i32.const 256) + ) + ) + (if + (i32.ge_u + (local.get $2) + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (if + (i32.le_u + (i32.sub + (local.get $2) + (local.get $1) + ) + (i32.shl + (i32.load + (i32.const 28264) + ) + (i32.const 1) + ) + ) + (return + (local.get $0) + ) + ) + ) + (br $folding-inner0) + ) + ) + (if + (i32.ge_u + (local.get $2) + (local.get $1) + ) + (block + (if + (i32.le_u + (local.tee $3 + (i32.sub + (local.get $2) + (local.get $1) + ) + ) + (i32.const 15) + ) + (return + (local.get $0) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $1) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (i32.or + (local.get $3) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.get $4) + (i32.or + (i32.load offset=4 + (local.get $4) + ) + (i32.const 1) + ) + ) + (call $_dispose_chunk + (local.get $1) + (local.get $3) + ) + (return + (local.get $0) + ) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28332) + ) + (local.get $4) + ) + (block + (br_if $folding-inner0 + (i32.le_u + (local.tee $3 + (i32.add + (i32.load + (i32.const 28320) + ) + (local.get $2) + ) + ) + (local.get $1) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $1) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $2 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (i32.or + (local.tee $1 + (i32.sub + (local.get $3) + (local.get $1) + ) + ) + (i32.const 1) + ) + ) + (i32.store + (i32.const 28332) + (local.get $2) + ) + (i32.store + (i32.const 28320) + (local.get $1) + ) + (return + (local.get $0) + ) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $4) + ) + (block + (br_if $folding-inner0 + (i32.lt_u + (local.tee $2 + (i32.add + (i32.load + (i32.const 28316) + ) + (local.get $2) + ) + ) + (local.get $1) + ) + ) + (if + (i32.gt_u + (local.tee $3 + (i32.sub + (local.get $2) + (local.get $1) + ) + ) + (i32.const 15) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $1) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (i32.or + (local.get $3) + (i32.const 1) + ) + ) + (i32.store + (local.tee $2 + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (local.get $3) + ) + (i32.store offset=4 + (local.get $2) + (i32.and + (i32.load offset=4 + (local.get $2) + ) + (i32.const -2) + ) + ) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $2) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $1) + ) + (i32.const 1) + ) + ) + (local.set $1 + (i32.const 0) + ) + (local.set $3 + (i32.const 0) + ) + ) + ) + (i32.store + (i32.const 28316) + (local.get $3) + ) + (i32.store + (i32.const 28328) + (local.get $1) + ) + (return + (local.get $0) + ) + ) + ) + (br_if $folding-inner0 + (i32.and + (local.get $6) + (i32.const 2) + ) + ) + (br_if $folding-inner0 + (i32.lt_u + (local.tee $11 + (i32.add + (local.get $2) + (i32.and + (local.get $6) + (i32.const -8) + ) + ) + ) + (local.get $1) + ) + ) + (local.set $12 + (i32.sub + (local.get $11) + (local.get $1) + ) + ) + (local.set $2 + (i32.shr_u + (local.get $6) + (i32.const 3) + ) + ) + (block $label$break$L49 + (if + (i32.lt_u + (local.get $6) + (i32.const 256) + ) + (block + (local.set $5 + (i32.load offset=12 + (local.get $4) + ) + ) + (if + (i32.ne + (local.tee $6 + (i32.load offset=8 + (local.get $4) + ) + ) + (local.tee $8 + (i32.add + (i32.shl + (local.get $2) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.get $6) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $4) + (i32.load offset=12 + (local.get $6) + ) + ) + (call $_abort) + ) + ) + ) + (if + (i32.eq + (local.get $5) + (local.get $6) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $2) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L49) + ) + ) + (if + (i32.eq + (local.get $5) + (local.get $8) + ) + (local.set $3 + (i32.add + (local.get $5) + (i32.const 8) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.get $5) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $2 + (i32.add + (local.get $5) + (i32.const 8) + ) + ) + ) + (local.get $4) + ) + (local.set $3 + (local.get $2) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=12 + (local.get $6) + (local.get $5) + ) + (i32.store + (local.get $3) + (local.get $6) + ) + ) + (block + (local.set $9 + (i32.load offset=24 + (local.get $4) + ) + ) + (if + (i32.eq + (local.tee $3 + (i32.load offset=12 + (local.get $4) + ) + ) + (local.get $4) + ) + (block $do-once + (if + (local.tee $3 + (i32.load + (local.tee $6 + (i32.add + (local.tee $2 + (i32.add + (local.get $4) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $2 + (local.get $6) + ) + (br_if $do-once + (i32.eqz + (local.tee $3 + (i32.load + (local.get $2) + ) + ) + ) + ) + ) + (loop $while-in + (block $while-out + (if + (i32.eqz + (local.tee $8 + (i32.load + (local.tee $6 + (i32.add + (local.get $3) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out + (i32.eqz + (local.tee $8 + (i32.load + (local.tee $6 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $2 + (local.get $6) + ) + (local.set $3 + (local.get $8) + ) + (br $while-in) + ) + ) + (if + (i32.gt_u + (local.get $10) + (local.get $2) + ) + (call $_abort) + (block + (i32.store + (local.get $2) + (i32.const 0) + ) + (local.set $5 + (local.get $3) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $10) + (local.tee $2 + (i32.load offset=8 + (local.get $4) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $4) + (i32.load offset=12 + (local.get $2) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $3) + ) + (local.get $4) + ) + (block + (i32.store offset=12 + (local.get $2) + (local.get $3) + ) + (i32.store offset=8 + (local.get $3) + (local.get $2) + ) + (local.set $5 + (local.get $3) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $9) + (block + (if + (i32.eq + (i32.load + (local.tee $2 + (i32.add + (i32.shl + (local.tee $3 + (i32.load offset=28 + (local.get $4) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $4) + ) + (block + (i32.store + (local.get $2) + (local.get $5) + ) + (if + (i32.eqz + (local.get $5) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $3) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L49) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $9) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $3 + (i32.add + (local.get $9) + (i32.const 16) + ) + ) + (i32.add + (local.get $9) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $3) + ) + (local.get $4) + ) + ) + (local.get $5) + ) + (br_if $label$break$L49 + (i32.eqz + (local.get $5) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $2 + (i32.load + (i32.const 28324) + ) + ) + (local.get $5) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $5) + (local.get $9) + ) + (if + (local.tee $3 + (i32.load offset=16 + (local.get $4) + ) + ) + (if + (i32.gt_u + (local.get $2) + (local.get $3) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $5) + (local.get $3) + ) + (i32.store offset=24 + (local.get $3) + (local.get $5) + ) + ) + ) + ) + (if + (local.tee $3 + (i32.load offset=20 + (local.get $4) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $3) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $5) + (local.get $3) + ) + (i32.store offset=24 + (local.get $3) + (local.get $5) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $12) + (i32.const 16) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $11) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $0) + (local.get $11) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $1) + ) + (i32.const 1) + ) + ) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (local.get $1) + (i32.and + (local.get $7) + (i32.const 1) + ) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $1 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (i32.or + (local.get $12) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $3 + (i32.add + (local.get $0) + (local.get $11) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $3) + ) + (i32.const 1) + ) + ) + (call $_dispose_chunk + (local.get $1) + (local.get $12) + ) + ) + ) + (return + (local.get $0) + ) + ) + (i32.const 0) + ) + (func $_dispose_chunk (; 673 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local.set $6 + (i32.add + (local.get $0) + (local.get $1) + ) + ) + (if + (i32.and + (local.tee $8 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 1) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + ) + (block $label$break$L1 + (local.set $5 + (i32.load + (local.get $0) + ) + ) + (if + (i32.eqz + (i32.and + (local.get $8) + (i32.const 3) + ) + ) + (return) + ) + (if + (i32.lt_u + (local.tee $0 + (i32.sub + (local.get $0) + (local.get $5) + ) + ) + (local.tee $11 + (i32.load + (i32.const 28324) + ) + ) + ) + (call $_abort) + ) + (local.set $1 + (i32.add + (local.get $1) + (local.get $5) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $0) + ) + (block + (if + (i32.ne + (i32.and + (local.tee $4 + (i32.load offset=4 + (local.get $6) + ) + ) + (i32.const 3) + ) + (i32.const 3) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + (i32.store + (i32.const 28316) + (local.get $1) + ) + (i32.store offset=4 + (local.get $6) + (i32.and + (local.get $4) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (local.get $1) + (i32.const 1) + ) + ) + (i32.store + (local.get $6) + (local.get $1) + ) + (return) + ) + ) + (local.set $8 + (i32.shr_u + (local.get $5) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $5) + (i32.const 256) + ) + (block + (local.set $2 + (i32.load offset=12 + (local.get $0) + ) + ) + (if + (i32.ne + (local.tee $5 + (i32.load offset=8 + (local.get $0) + ) + ) + (local.tee $4 + (i32.add + (i32.shl + (local.get $8) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $11) + (local.get $5) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $0) + (i32.load offset=12 + (local.get $5) + ) + ) + (call $_abort) + ) + ) + ) + (if + (i32.eq + (local.get $2) + (local.get $5) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $8) + ) + (i32.const -1) + ) + ) + ) + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + (if + (i32.eq + (local.get $2) + (local.get $4) + ) + (local.set $3 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + (block + (if + (i32.gt_u + (local.get $11) + (local.get $2) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $4 + (i32.add + (local.get $2) + (i32.const 8) + ) + ) + ) + (local.get $0) + ) + (local.set $3 + (local.get $4) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=12 + (local.get $5) + (local.get $2) + ) + (i32.store + (local.get $3) + (local.get $5) + ) + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + (local.set $10 + (i32.load offset=24 + (local.get $0) + ) + ) + (if + (i32.eq + (local.tee $3 + (i32.load offset=12 + (local.get $0) + ) + ) + (local.get $0) + ) + (block $do-once + (if + (local.tee $3 + (i32.load + (local.tee $8 + (i32.add + (local.tee $5 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $5 + (local.get $8) + ) + (br_if $do-once + (i32.eqz + (local.tee $3 + (i32.load + (local.get $5) + ) + ) + ) + ) + ) + (loop $while-in + (block $while-out + (if + (i32.eqz + (local.tee $12 + (i32.load + (local.tee $8 + (i32.add + (local.get $3) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out + (i32.eqz + (local.tee $12 + (i32.load + (local.tee $8 + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $5 + (local.get $8) + ) + (local.set $3 + (local.get $12) + ) + (br $while-in) + ) + ) + (if + (i32.gt_u + (local.get $11) + (local.get $5) + ) + (call $_abort) + (block + (i32.store + (local.get $5) + (i32.const 0) + ) + (local.set $7 + (local.get $3) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $11) + (local.tee $5 + (i32.load offset=8 + (local.get $0) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $0) + (i32.load offset=12 + (local.get $5) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $3) + ) + (local.get $0) + ) + (block + (i32.store offset=12 + (local.get $5) + (local.get $3) + ) + (i32.store offset=8 + (local.get $3) + (local.get $5) + ) + (local.set $7 + (local.get $3) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $10) + (block + (if + (i32.eq + (i32.load + (local.tee $5 + (i32.add + (i32.shl + (local.tee $3 + (i32.load offset=28 + (local.get $0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $0) + ) + (block + (i32.store + (local.get $5) + (local.get $7) + ) + (if + (i32.eqz + (local.get $7) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $3) + ) + (i32.const -1) + ) + ) + ) + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $10) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $3 + (i32.add + (local.get $10) + (i32.const 16) + ) + ) + (i32.add + (local.get $10) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $3) + ) + (local.get $0) + ) + ) + (local.get $7) + ) + (if + (i32.eqz + (local.get $7) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + (br $label$break$L1) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $5 + (i32.load + (i32.const 28324) + ) + ) + (local.get $7) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $7) + (local.get $10) + ) + (if + (local.tee $3 + (i32.load offset=16 + (local.get $0) + ) + ) + (if + (i32.gt_u + (local.get $5) + (local.get $3) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $7) + (local.get $3) + ) + (i32.store offset=24 + (local.get $3) + (local.get $7) + ) + ) + ) + ) + (if + (local.tee $3 + (i32.load offset=20 + (local.get $0) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $3) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $7) + (local.get $3) + ) + (i32.store offset=24 + (local.get $3) + (local.get $7) + ) + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + ) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + ) + ) + ) + (block + (local.set $2 + (local.get $0) + ) + (local.set $4 + (local.get $1) + ) + ) + ) + ) + ) + (if + (i32.lt_u + (local.get $6) + (local.tee $8 + (i32.load + (i32.const 28324) + ) + ) + ) + (call $_abort) + ) + (if + (i32.and + (local.tee $0 + (i32.load offset=4 + (local.get $6) + ) + ) + (i32.const 2) + ) + (block + (i32.store offset=4 + (local.get $6) + (i32.and + (local.get $0) + (i32.const -2) + ) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $4) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $2) + (local.get $4) + ) + (local.get $4) + ) + ) + (block + (if + (i32.eq + (i32.load + (i32.const 28332) + ) + (local.get $6) + ) + (block + (i32.store + (i32.const 28320) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28320) + ) + (local.get $4) + ) + ) + ) + (i32.store + (i32.const 28332) + (local.get $2) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.ne + (local.get $2) + (i32.load + (i32.const 28328) + ) + ) + (return) + ) + (i32.store + (i32.const 28328) + (i32.const 0) + ) + (i32.store + (i32.const 28316) + (i32.const 0) + ) + (return) + ) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $6) + ) + (block + (i32.store + (i32.const 28316) + (local.tee $0 + (i32.add + (i32.load + (i32.const 28316) + ) + (local.get $4) + ) + ) + ) + (i32.store + (i32.const 28328) + (local.get $2) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $0) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $0) + (local.get $2) + ) + (local.get $0) + ) + (return) + ) + ) + (local.set $4 + (i32.add + (i32.and + (local.get $0) + (i32.const -8) + ) + (local.get $4) + ) + ) + (local.set $5 + (i32.shr_u + (local.get $0) + (i32.const 3) + ) + ) + (block $label$break$L99 + (if + (i32.lt_u + (local.get $0) + (i32.const 256) + ) + (block + (local.set $1 + (i32.load offset=12 + (local.get $6) + ) + ) + (if + (i32.ne + (local.tee $3 + (i32.load offset=8 + (local.get $6) + ) + ) + (local.tee $0 + (i32.add + (i32.shl + (local.get $5) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $8) + (local.get $3) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $6) + (i32.load offset=12 + (local.get $3) + ) + ) + (call $_abort) + ) + ) + ) + (if + (i32.eq + (local.get $1) + (local.get $3) + ) + (block + (i32.store + (i32.const 28308) + (i32.and + (i32.load + (i32.const 28308) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $5) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L99) + ) + ) + (if + (i32.eq + (local.get $0) + (local.get $1) + ) + (local.set $14 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (block + (if + (i32.gt_u + (local.get $8) + (local.get $1) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load + (local.tee $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + ) + (local.get $6) + ) + (local.set $14 + (local.get $0) + ) + (call $_abort) + ) + ) + ) + (i32.store offset=12 + (local.get $3) + (local.get $1) + ) + (i32.store + (local.get $14) + (local.get $3) + ) + ) + (block + (local.set $7 + (i32.load offset=24 + (local.get $6) + ) + ) + (if + (i32.eq + (local.tee $0 + (i32.load offset=12 + (local.get $6) + ) + ) + (local.get $6) + ) + (block $do-once6 + (if + (local.tee $0 + (i32.load + (local.tee $3 + (i32.add + (local.tee $1 + (i32.add + (local.get $6) + (i32.const 16) + ) + ) + (i32.const 4) + ) + ) + ) + ) + (local.set $1 + (local.get $3) + ) + (br_if $do-once6 + (i32.eqz + (local.tee $0 + (i32.load + (local.get $1) + ) + ) + ) + ) + ) + (loop $while-in9 + (block $while-out8 + (if + (i32.eqz + (local.tee $5 + (i32.load + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 20) + ) + ) + ) + ) + ) + (br_if $while-out8 + (i32.eqz + (local.tee $5 + (i32.load + (local.tee $3 + (i32.add + (local.get $0) + (i32.const 16) + ) + ) + ) + ) + ) + ) + ) + (local.set $1 + (local.get $3) + ) + (local.set $0 + (local.get $5) + ) + (br $while-in9) + ) + ) + (if + (i32.gt_u + (local.get $8) + (local.get $1) + ) + (call $_abort) + (block + (i32.store + (local.get $1) + (i32.const 0) + ) + (local.set $9 + (local.get $0) + ) + ) + ) + ) + (block + (if + (i32.gt_u + (local.get $8) + (local.tee $1 + (i32.load offset=8 + (local.get $6) + ) + ) + ) + (call $_abort) + ) + (if + (i32.ne + (local.get $6) + (i32.load offset=12 + (local.get $1) + ) + ) + (call $_abort) + ) + (if + (i32.eq + (i32.load offset=8 + (local.get $0) + ) + (local.get $6) + ) + (block + (i32.store offset=12 + (local.get $1) + (local.get $0) + ) + (i32.store offset=8 + (local.get $0) + (local.get $1) + ) + (local.set $9 + (local.get $0) + ) + ) + (call $_abort) + ) + ) + ) + (if + (local.get $7) + (block + (if + (i32.eq + (i32.load + (local.tee $1 + (i32.add + (i32.shl + (local.tee $0 + (i32.load offset=28 + (local.get $6) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + ) + (local.get $6) + ) + (block + (i32.store + (local.get $1) + (local.get $9) + ) + (if + (i32.eqz + (local.get $9) + ) + (block + (i32.store + (i32.const 28312) + (i32.and + (i32.load + (i32.const 28312) + ) + (i32.xor + (i32.shl + (i32.const 1) + (local.get $0) + ) + (i32.const -1) + ) + ) + ) + (br $label$break$L99) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $7) + ) + (call $_abort) + (block + (i32.store + (select + (local.tee $0 + (i32.add + (local.get $7) + (i32.const 16) + ) + ) + (i32.add + (local.get $7) + (i32.const 20) + ) + (i32.eq + (i32.load + (local.get $0) + ) + (local.get $6) + ) + ) + (local.get $9) + ) + (br_if $label$break$L99 + (i32.eqz + (local.get $9) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (local.tee $1 + (i32.load + (i32.const 28324) + ) + ) + (local.get $9) + ) + (call $_abort) + ) + (i32.store offset=24 + (local.get $9) + (local.get $7) + ) + (if + (local.tee $0 + (i32.load offset=16 + (local.get $6) + ) + ) + (if + (i32.gt_u + (local.get $1) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=16 + (local.get $9) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $9) + ) + ) + ) + ) + (if + (local.tee $0 + (i32.load offset=20 + (local.get $6) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $0) + ) + (call $_abort) + (block + (i32.store offset=20 + (local.get $9) + (local.get $0) + ) + (i32.store offset=24 + (local.get $0) + (local.get $9) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (i32.store offset=4 + (local.get $2) + (i32.or + (local.get $4) + (i32.const 1) + ) + ) + (i32.store + (i32.add + (local.get $2) + (local.get $4) + ) + (local.get $4) + ) + (if + (i32.eq + (i32.load + (i32.const 28328) + ) + (local.get $2) + ) + (block + (i32.store + (i32.const 28316) + (local.get $4) + ) + (return) + ) + ) + ) + ) + (local.set $1 + (i32.shr_u + (local.get $4) + (i32.const 3) + ) + ) + (if + (i32.lt_u + (local.get $4) + (i32.const 256) + ) + (block + (local.set $0 + (i32.add + (i32.shl + (local.get $1) + (i32.const 3) + ) + (i32.const 28348) + ) + ) + (if + (i32.and + (local.tee $4 + (i32.load + (i32.const 28308) + ) + ) + (local.tee $1 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.tee $4 + (i32.load + (local.tee $1 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + ) + ) + ) + (call $_abort) + (block + (local.set $15 + (local.get $1) + ) + (local.set $13 + (local.get $4) + ) + ) + ) + (block + (i32.store + (i32.const 28308) + (i32.or + (local.get $1) + (local.get $4) + ) + ) + (local.set $15 + (i32.add + (local.get $0) + (i32.const 8) + ) + ) + (local.set $13 + (local.get $0) + ) + ) + ) + (i32.store + (local.get $15) + (local.get $2) + ) + (i32.store offset=12 + (local.get $13) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $13) + ) + (i32.store offset=12 + (local.get $2) + (local.get $0) + ) + (return) + ) + ) + (local.set $0 + (i32.add + (i32.shl + (local.tee $1 + (if (result i32) + (local.tee $0 + (i32.shr_u + (local.get $4) + (i32.const 8) + ) + ) + (if (result i32) + (i32.gt_u + (local.get $4) + (i32.const 16777215) + ) + (i32.const 31) + (block (result i32) + (local.set $0 + (i32.and + (i32.shr_u + (i32.add + (local.tee $1 + (i32.shl + (local.get $0) + (local.tee $3 + (i32.and + (i32.shr_u + (i32.add + (local.get $0) + (i32.const 1048320) + ) + (i32.const 16) + ) + (i32.const 8) + ) + ) + ) + ) + (i32.const 520192) + ) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (local.set $1 + (i32.and + (i32.shr_u + (i32.add + (local.tee $5 + (i32.shl + (local.get $1) + (local.get $0) + ) + ) + (i32.const 245760) + ) + (i32.const 16) + ) + (i32.const 2) + ) + ) + (i32.or + (i32.and + (i32.shr_u + (local.get $4) + (i32.add + (local.tee $0 + (i32.add + (i32.sub + (i32.const 14) + (i32.or + (i32.or + (local.get $0) + (local.get $3) + ) + (local.get $1) + ) + ) + (i32.shr_u + (i32.shl + (local.get $5) + (local.get $1) + ) + (i32.const 15) + ) + ) + ) + (i32.const 7) + ) + ) + (i32.const 1) + ) + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + (i32.const 0) + ) + ) + (i32.const 2) + ) + (i32.const 28612) + ) + ) + (i32.store offset=28 + (local.get $2) + (local.get $1) + ) + (i32.store offset=20 + (local.get $2) + (i32.const 0) + ) + (i32.store offset=16 + (local.get $2) + (i32.const 0) + ) + (block $folding-inner0 + (if + (i32.eqz + (i32.and + (local.tee $3 + (i32.load + (i32.const 28312) + ) + ) + (local.tee $5 + (i32.shl + (i32.const 1) + (local.get $1) + ) + ) + ) + ) + (block + (i32.store + (i32.const 28312) + (i32.or + (local.get $3) + (local.get $5) + ) + ) + (i32.store + (local.get $0) + (local.get $2) + ) + (br $folding-inner0) + ) + ) + (if + (i32.ne + (local.get $4) + (i32.and + (i32.load offset=4 + (local.tee $0 + (i32.load + (local.get $0) + ) + ) + ) + (i32.const -8) + ) + ) + (block $label$break$L189 + (local.set $3 + (i32.shl + (local.get $4) + (select + (i32.const 0) + (i32.sub + (i32.const 25) + (i32.shr_u + (local.get $1) + (i32.const 1) + ) + ) + (i32.eq + (local.get $1) + (i32.const 31) + ) + ) + ) + ) + (loop $while-in16 + (if + (local.tee $1 + (i32.load + (local.tee $5 + (i32.add + (i32.add + (local.get $0) + (i32.const 16) + ) + (i32.shl + (i32.shr_u + (local.get $3) + (i32.const 31) + ) + (i32.const 2) + ) + ) + ) + ) + ) + (block + (local.set $3 + (i32.shl + (local.get $3) + (i32.const 1) + ) + ) + (if + (i32.eq + (i32.and + (i32.load offset=4 + (local.get $1) + ) + (i32.const -8) + ) + (local.get $4) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $label$break$L189) + ) + (block + (local.set $0 + (local.get $1) + ) + (br $while-in16) + ) + ) + ) + ) + ) + (if + (i32.gt_u + (i32.load + (i32.const 28324) + ) + (local.get $5) + ) + (call $_abort) + ) + (i32.store + (local.get $5) + (local.get $2) + ) + (br $folding-inner0) + ) + ) + (if + (i32.eqz + (i32.and + (i32.le_u + (local.tee $1 + (i32.load + (i32.const 28324) + ) + ) + (local.get $0) + ) + (i32.le_u + (local.get $1) + (local.tee $4 + (i32.load offset=8 + (local.tee $1 + (local.get $0) + ) + ) + ) + ) + ) + ) + (call $_abort) + ) + (i32.store offset=12 + (local.get $4) + (local.get $2) + ) + (i32.store offset=8 + (local.get $1) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $4) + ) + (i32.store offset=12 + (local.get $2) + (local.get $0) + ) + (i32.store offset=24 + (local.get $2) + (i32.const 0) + ) + (return) + ) + (i32.store offset=24 + (local.get $2) + (local.get $0) + ) + (i32.store offset=12 + (local.get $2) + (local.get $2) + ) + (i32.store offset=8 + (local.get $2) + (local.get $2) + ) + ) + (func $_memalign (; 674 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (if (result i32) + (i32.lt_u + (local.get $0) + (i32.const 9) + ) + (call $_malloc + (local.get $1) + ) + (call $_internal_memalign + (local.get $0) + (local.get $1) + ) + ) + ) + (func $_internal_memalign (; 675 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (if + (i32.and + (local.tee $3 + (select + (local.get $0) + (i32.const 16) + (i32.gt_u + (local.get $0) + (i32.const 16) + ) + ) + ) + (i32.add + (local.get $3) + (i32.const -1) + ) + ) + (block + (local.set $0 + (i32.const 16) + ) + (loop $while-in + (local.set $2 + (i32.shl + (local.get $0) + (i32.const 1) + ) + ) + (if + (i32.lt_u + (local.get $0) + (local.get $3) + ) + (block + (local.set $0 + (local.get $2) + ) + (br $while-in) + ) + ) + ) + ) + (local.set $0 + (local.get $3) + ) + ) + (if + (i32.le_u + (i32.sub + (i32.const -64) + (local.get $0) + ) + (local.get $1) + ) + (block + (i32.store + (call $___errno_location) + (i32.const 12) + ) + (return + (i32.const 0) + ) + ) + ) + (if + (i32.eqz + (local.tee $1 + (call $_malloc + (i32.add + (i32.add + (local.tee $3 + (select + (i32.const 16) + (i32.and + (i32.add + (local.get $1) + (i32.const 11) + ) + (i32.const -8) + ) + (i32.lt_u + (local.get $1) + (i32.const 11) + ) + ) + ) + (i32.const 12) + ) + (local.get $0) + ) + ) + ) + ) + (return + (i32.const 0) + ) + ) + (if + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + (if + (call $___pthread_mutex_lock + (i32.const 28756) + ) + (return + (i32.const 0) + ) + ) + ) + (local.set $2 + (i32.add + (local.get $1) + (i32.const -8) + ) + ) + (local.set $1 + (if (result i32) + (i32.and + (local.get $1) + (i32.add + (local.get $0) + (i32.const -1) + ) + ) + (block (result i32) + (local.set $4 + (i32.sub + (i32.and + (local.tee $6 + (i32.load + (local.tee $5 + (i32.add + (local.get $1) + (i32.const -4) + ) + ) + ) + ) + (i32.const -8) + ) + (local.tee $1 + (i32.sub + (local.tee $0 + (select + (local.tee $1 + (i32.add + (i32.and + (i32.add + (i32.add + (local.get $0) + (local.get $1) + ) + (i32.const -1) + ) + (i32.sub + (i32.const 0) + (local.get $0) + ) + ) + (i32.const -8) + ) + ) + (i32.add + (local.get $0) + (local.get $1) + ) + (i32.gt_u + (i32.sub + (local.get $1) + (local.get $2) + ) + (i32.const 15) + ) + ) + ) + (local.get $2) + ) + ) + ) + ) + (if + (i32.and + (local.get $6) + (i32.const 3) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (i32.and + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + (local.get $4) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $4 + (i32.add + (local.get $0) + (local.get $4) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $4) + ) + (i32.const 1) + ) + ) + (i32.store + (local.get $5) + (i32.or + (i32.or + (i32.and + (i32.load + (local.get $5) + ) + (i32.const 1) + ) + (local.get $1) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.load offset=4 + (local.get $0) + ) + (i32.const 1) + ) + ) + (call $_dispose_chunk + (local.get $2) + (local.get $1) + ) + ) + (block + (i32.store + (local.get $0) + (i32.add + (i32.load + (local.get $2) + ) + (local.get $1) + ) + ) + (i32.store offset=4 + (local.get $0) + (local.get $4) + ) + ) + ) + (local.get $0) + ) + (local.tee $0 + (local.get $2) + ) + ) + ) + (if + (i32.and + (local.tee $2 + (i32.load offset=4 + (local.get $0) + ) + ) + (i32.const 3) + ) + (if + (i32.gt_u + (local.tee $4 + (i32.and + (local.get $2) + (i32.const -8) + ) + ) + (i32.add + (local.get $3) + (i32.const 16) + ) + ) + (block + (i32.store offset=4 + (local.get $0) + (i32.or + (i32.or + (i32.and + (local.get $2) + (i32.const 1) + ) + (local.get $3) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.tee $0 + (i32.add + (local.get $1) + (local.get $3) + ) + ) + (i32.or + (local.tee $2 + (i32.sub + (local.get $4) + (local.get $3) + ) + ) + (i32.const 3) + ) + ) + (i32.store offset=4 + (local.tee $3 + (i32.add + (local.get $1) + (local.get $4) + ) + ) + (i32.or + (i32.load offset=4 + (local.get $3) + ) + (i32.const 1) + ) + ) + (call $_dispose_chunk + (local.get $0) + (local.get $2) + ) + ) + ) + ) + (local.set $0 + (i32.add + (local.get $1) + (i32.const 8) + ) + ) + (if + (i32.eqz + (i32.and + (i32.load + (i32.const 28752) + ) + (i32.const 2) + ) + ) + (return + (local.get $0) + ) + ) + (call $___pthread_mutex_unlock + (i32.const 28756) + ) + (local.get $0) + ) + (func $_emscripten_glBlendColor$legalf32 (; 676 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $_emscripten_glBlendColor + (f64.promote_f32 + (local.get $0) + ) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + ) + ) + (func $_emscripten_glClearColor$legalf32 (; 677 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $_emscripten_glClearColor + (f64.promote_f32 + (local.get $0) + ) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + ) + ) + (func $_emscripten_glClearDepthf$legalf32 (; 678 ;) (; has Stack IR ;) (param $0 f32) + (call $_emscripten_glClearDepthf + (f64.promote_f32 + (local.get $0) + ) + ) + ) + (func $_emscripten_glDepthRangef$legalf32 (; 679 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (call $_emscripten_glDepthRangef + (f64.promote_f32 + (local.get $0) + ) + (f64.promote_f32 + (local.get $1) + ) + ) + ) + (func $_emscripten_glLineWidth$legalf32 (; 680 ;) (; has Stack IR ;) (param $0 f32) + (call $_emscripten_glLineWidth + (f64.promote_f32 + (local.get $0) + ) + ) + ) + (func $_emscripten_glPolygonOffset$legalf32 (; 681 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (call $_emscripten_glPolygonOffset + (f64.promote_f32 + (local.get $0) + ) + (f64.promote_f32 + (local.get $1) + ) + ) + ) + (func $_emscripten_glSampleCoverage$legalf32 (; 682 ;) (; has Stack IR ;) (param $0 f32) (param $1 i32) + (call $_emscripten_glSampleCoverage + (f64.promote_f32 + (local.get $0) + ) + (local.get $1) + ) + ) + (func $_emscripten_glTexParameterf$legalf32 (; 683 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) + (call $_emscripten_glTexParameterf + (local.get $0) + (local.get $1) + (f64.promote_f32 + (local.get $2) + ) + ) + ) + (func $_emscripten_glUniform1f$legalf32 (; 684 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) + (call $_emscripten_glUniform1f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + ) + ) + (func $_emscripten_glUniform2f$legalf32 (; 685 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) + (call $_emscripten_glUniform2f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + ) + ) + (func $_emscripten_glUniform3f$legalf32 (; 686 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $_emscripten_glUniform3f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + ) + ) + (func $_emscripten_glUniform4f$legalf32 (; 687 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 f32) + (call $_emscripten_glUniform4f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + (f64.promote_f32 + (local.get $4) + ) + ) + ) + (func $_emscripten_glVertexAttrib1f$legalf32 (; 688 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) + (call $_emscripten_glVertexAttrib1f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + ) + ) + (func $_emscripten_glVertexAttrib2f$legalf32 (; 689 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) + (call $_emscripten_glVertexAttrib2f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + ) + ) + (func $_emscripten_glVertexAttrib3f$legalf32 (; 690 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $_emscripten_glVertexAttrib3f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + ) + ) + (func $_emscripten_glVertexAttrib4f$legalf32 (; 691 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 f32) + (call $_emscripten_glVertexAttrib4f + (local.get $0) + (f64.promote_f32 + (local.get $1) + ) + (f64.promote_f32 + (local.get $2) + ) + (f64.promote_f32 + (local.get $3) + ) + (f64.promote_f32 + (local.get $4) + ) + ) + ) + (func $__register_pthread_ptr (; 692 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (global.set $__pthread_ptr + (local.get $0) + ) + (global.set $__pthread_is_main_browser_thread + (local.get $1) + ) + (global.set $__pthread_is_main_runtime_thread + (local.get $2) + ) + ) + (func $_emscripten_is_main_browser_thread (; 693 ;) (; has Stack IR ;) (result i32) + (global.get $__pthread_is_main_browser_thread) + ) + (func $_emscripten_set_current_thread_status (; 694 ;) (; has Stack IR ;) (param $0 i32) + (nop) + ) + (func $_llvm_round_f32 (; 695 ;) (; has Stack IR ;) (param $0 f64) (result f64) + (select + (f64.floor + (f64.add + (local.get $0) + (f64.const 0.5) + ) + ) + (f64.ceil + (f64.sub + (local.get $0) + (f64.const 0.5) + ) + ) + (f64.ge + (local.get $0) + (f64.const 0) + ) + ) + ) + (func $_memcpy (; 696 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (if + (i32.ge_s + (local.get $2) + (i32.const 8192) + ) + (block + (drop + (call $_emscripten_memcpy_big + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + (return + (local.get $0) + ) + ) + ) + (local.set $4 + (local.get $0) + ) + (local.set $3 + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (if + (i32.eq + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.and + (local.get $1) + (i32.const 3) + ) + ) + (block + (loop $while-in + (if + (i32.and + (local.get $0) + (i32.const 3) + ) + (block + (if + (i32.eqz + (local.get $2) + ) + (return + (local.get $4) + ) + ) + (i32.store8 + (local.get $0) + (i32.load8_s + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $2 + (i32.sub + (local.get $2) + (i32.const 1) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $5 + (i32.add + (local.tee $2 + (i32.and + (local.get $3) + (i32.const -4) + ) + ) + (i32.const -64) + ) + ) + (loop $while-in1 + (if + (i32.le_s + (local.get $0) + (local.get $5) + ) + (block + (i32.store + (local.get $0) + (i32.load + (local.get $1) + ) + ) + (i32.store offset=4 + (local.get $0) + (i32.load offset=4 + (local.get $1) + ) + ) + (i32.store offset=8 + (local.get $0) + (i32.load offset=8 + (local.get $1) + ) + ) + (i32.store offset=12 + (local.get $0) + (i32.load offset=12 + (local.get $1) + ) + ) + (i32.store offset=16 + (local.get $0) + (i32.load offset=16 + (local.get $1) + ) + ) + (i32.store offset=20 + (local.get $0) + (i32.load offset=20 + (local.get $1) + ) + ) + (i32.store offset=24 + (local.get $0) + (i32.load offset=24 + (local.get $1) + ) + ) + (i32.store offset=28 + (local.get $0) + (i32.load offset=28 + (local.get $1) + ) + ) + (i32.store offset=32 + (local.get $0) + (i32.load offset=32 + (local.get $1) + ) + ) + (i32.store offset=36 + (local.get $0) + (i32.load offset=36 + (local.get $1) + ) + ) + (i32.store offset=40 + (local.get $0) + (i32.load offset=40 + (local.get $1) + ) + ) + (i32.store offset=44 + (local.get $0) + (i32.load offset=44 + (local.get $1) + ) + ) + (i32.store offset=48 + (local.get $0) + (i32.load offset=48 + (local.get $1) + ) + ) + (i32.store offset=52 + (local.get $0) + (i32.load offset=52 + (local.get $1) + ) + ) + (i32.store offset=56 + (local.get $0) + (i32.load offset=56 + (local.get $1) + ) + ) + (i32.store offset=60 + (local.get $0) + (i32.load offset=60 + (local.get $1) + ) + ) + (local.set $0 + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (local.set $1 + (i32.sub + (local.get $1) + (i32.const -64) + ) + ) + (br $while-in1) + ) + ) + ) + (loop $while-in3 + (if + (i32.lt_s + (local.get $0) + (local.get $2) + ) + (block + (i32.store + (local.get $0) + (i32.load + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (br $while-in3) + ) + ) + ) + ) + (block + (local.set $2 + (i32.sub + (local.get $3) + (i32.const 4) + ) + ) + (loop $while-in5 + (if + (i32.lt_s + (local.get $0) + (local.get $2) + ) + (block + (i32.store8 + (local.get $0) + (i32.load8_s + (local.get $1) + ) + ) + (i32.store8 offset=1 + (local.get $0) + (i32.load8_s offset=1 + (local.get $1) + ) + ) + (i32.store8 offset=2 + (local.get $0) + (i32.load8_s offset=2 + (local.get $1) + ) + ) + (i32.store8 offset=3 + (local.get $0) + (i32.load8_s offset=3 + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (br $while-in5) + ) + ) + ) + ) + ) + (loop $while-in7 + (if + (i32.lt_s + (local.get $0) + (local.get $3) + ) + (block + (i32.store8 + (local.get $0) + (i32.load8_s + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (br $while-in7) + ) + ) + ) + (local.get $4) + ) + (func $_memmove (; 697 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (if + (i32.and + (i32.lt_s + (local.get $1) + (local.get $0) + ) + (i32.lt_s + (local.get $0) + (i32.add + (local.get $1) + (local.get $2) + ) + ) + ) + (block + (local.set $3 + (local.get $0) + ) + (local.set $1 + (i32.add + (local.get $1) + (local.get $2) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (loop $while-in + (if + (i32.gt_s + (local.get $2) + (i32.const 0) + ) + (block + (local.set $2 + (i32.sub + (local.get $2) + (i32.const 1) + ) + ) + (i32.store8 + (local.tee $0 + (i32.sub + (local.get $0) + (i32.const 1) + ) + ) + (i32.load8_s + (local.tee $1 + (i32.sub + (local.get $1) + (i32.const 1) + ) + ) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $0 + (local.get $3) + ) + ) + (drop + (call $_memcpy + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + ) + (local.get $0) + ) + (func $_memset (; 698 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local.set $4 + (i32.add + (local.get $0) + (local.get $2) + ) + ) + (local.set $3 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (if + (i32.ge_s + (local.get $2) + (i32.const 67) + ) + (block + (loop $while-in + (if + (i32.and + (local.get $0) + (i32.const 3) + ) + (block + (i32.store8 + (local.get $0) + (local.get $3) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br $while-in) + ) + ) + ) + (local.set $1 + (i32.or + (i32.or + (i32.or + (i32.shl + (local.get $3) + (i32.const 8) + ) + (local.get $3) + ) + (i32.shl + (local.get $3) + (i32.const 16) + ) + ) + (i32.shl + (local.get $3) + (i32.const 24) + ) + ) + ) + (local.set $6 + (i32.add + (local.tee $5 + (i32.and + (local.get $4) + (i32.const -4) + ) + ) + (i32.const -64) + ) + ) + (loop $while-in1 + (if + (i32.le_s + (local.get $0) + (local.get $6) + ) + (block + (i32.store + (local.get $0) + (local.get $1) + ) + (i32.store offset=4 + (local.get $0) + (local.get $1) + ) + (i32.store offset=8 + (local.get $0) + (local.get $1) + ) + (i32.store offset=12 + (local.get $0) + (local.get $1) + ) + (i32.store offset=16 + (local.get $0) + (local.get $1) + ) + (i32.store offset=20 + (local.get $0) + (local.get $1) + ) + (i32.store offset=24 + (local.get $0) + (local.get $1) + ) + (i32.store offset=28 + (local.get $0) + (local.get $1) + ) + (i32.store offset=32 + (local.get $0) + (local.get $1) + ) + (i32.store offset=36 + (local.get $0) + (local.get $1) + ) + (i32.store offset=40 + (local.get $0) + (local.get $1) + ) + (i32.store offset=44 + (local.get $0) + (local.get $1) + ) + (i32.store offset=48 + (local.get $0) + (local.get $1) + ) + (i32.store offset=52 + (local.get $0) + (local.get $1) + ) + (i32.store offset=56 + (local.get $0) + (local.get $1) + ) + (i32.store offset=60 + (local.get $0) + (local.get $1) + ) + (local.set $0 + (i32.sub + (local.get $0) + (i32.const -64) + ) + ) + (br $while-in1) + ) + ) + ) + (loop $while-in3 + (if + (i32.lt_s + (local.get $0) + (local.get $5) + ) + (block + (i32.store + (local.get $0) + (local.get $1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (br $while-in3) + ) + ) + ) + ) + ) + (loop $while-in5 + (if + (i32.lt_s + (local.get $0) + (local.get $4) + ) + (block + (i32.store8 + (local.get $0) + (local.get $3) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br $while-in5) + ) + ) + ) + (i32.sub + (local.get $4) + (local.get $2) + ) + ) + (func $_pthread_self (; 699 ;) (; has Stack IR ;) (result i32) + (global.get $__pthread_ptr) + ) + (func $_sbrk (; 700 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $2 + (call $_emscripten_get_heap_size) + ) + (loop $do-in + (if + (i32.or + (i32.and + (i32.lt_s + (local.tee $1 + (i32.add + (local.get $0) + (local.tee $3 + (i32.atomic.load + (global.get $DYNAMICTOP_PTR$asm2wasm$import) + ) + ) + ) + ) + (local.get $3) + ) + (i32.gt_s + (local.get $0) + (i32.const 0) + ) + ) + (i32.lt_s + (local.get $1) + (i32.const 0) + ) + ) + (block + (drop + (call $abortOnCannotGrowMemory + (local.get $1) + ) + ) + (call $___setErrNo + (i32.const 12) + ) + (return + (i32.const -1) + ) + ) + ) + (if + (i32.gt_s + (local.get $1) + (local.get $2) + ) + (if + (call $_emscripten_resize_heap + (local.get $1) + ) + (block + (local.set $2 + (call $_emscripten_get_heap_size) + ) + (br $do-in) + ) + (block + (if + (i32.gt_s + (call $_emscripten_get_heap_size) + (local.get $2) + ) + (block + (local.set $2 + (call $_emscripten_get_heap_size) + ) + (br $do-in) + ) + ) + (call $___setErrNo + (i32.const 12) + ) + (return + (i32.const -1) + ) + ) + ) + ) + (br_if $do-in + (i32.ne + (local.get $3) + (i32.atomic.rmw.cmpxchg + (global.get $DYNAMICTOP_PTR$asm2wasm$import) + (local.get $3) + (local.get $1) + ) + ) + ) + ) + (local.get $3) + ) + (func $dynCall_ff (; 701 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (result f32) + (call_indirect (type $FUNCSIG$ff) + (local.get $1) + (i32.and + (local.get $0) + (i32.const 7) + ) + ) + ) + (func $dynCall_fff (; 702 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) + (call_indirect (type $FUNCSIG$fff) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 7) + ) + (i32.const 8) + ) + ) + ) + (func $dynCall_i (; 703 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (call_indirect (type $FUNCSIG$i) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 16) + ) + ) + ) + (func $dynCall_ii (; 704 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (call_indirect (type $FUNCSIG$ii) + (local.get $1) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 20) + ) + ) + ) + (func $dynCall_iidiiii (; 705 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (call_indirect (type $FUNCSIG$iidiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (i32.add + (i32.and + (local.get $0) + (i32.const 1) + ) + (i32.const 52) + ) + ) + ) + (func $dynCall_iii (; 706 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (call_indirect (type $FUNCSIG$iii) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 54) + ) + ) + ) + (func $dynCall_iiii (; 707 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (call_indirect (type $FUNCSIG$iiii) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.and + (local.get $0) + (i32.const 15) + ) + (i32.const 58) + ) + ) + ) + (func $dynCall_iiiii (; 708 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (i32.const 74) + ) + ) + (func $dynCall_iiiiii (; 709 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (i32.const 75) + ) + ) + (func $dynCall_iiiiiii (; 710 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (i32.const 76) + ) + ) + (func $dynCall_iiiiiiii (; 711 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (i32.const 77) + ) + ) + (func $dynCall_iiiiiiiii (; 712 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (i32.const 78) + ) + ) + (func $dynCall_iiiiiiiiii (; 713 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (result i32) + (call_indirect (type $FUNCSIG$iiiiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (local.get $9) + (i32.const 79) + ) + ) + (func $dynCall_v (; 714 ;) (; has Stack IR ;) (param $0 i32) + (call_indirect (type $FUNCSIG$v) + (i32.add + (i32.and + (local.get $0) + (i32.const 7) + ) + (i32.const 84) + ) + ) + ) + (func $dynCall_vf (; 715 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) + (call_indirect (type $FUNCSIG$vf) + (local.get $1) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 92) + ) + ) + ) + (func $dynCall_vff (; 716 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) + (call_indirect (type $FUNCSIG$vff) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 96) + ) + ) + ) + (func $dynCall_vfff (; 717 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) + (call_indirect (type $FUNCSIG$vfff) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.const 100) + ) + ) + (func $dynCall_vffff (; 718 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 f32) + (call_indirect (type $FUNCSIG$vffff) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 101) + ) + ) + ) + (func $dynCall_vfi (; 719 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 i32) + (call_indirect (type $FUNCSIG$vfi) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 1) + ) + (i32.const 105) + ) + ) + ) + (func $dynCall_vi (; 720 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (call_indirect (type $FUNCSIG$vi) + (local.get $1) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 107) + ) + ) + ) + (func $dynCall_vidd (; 721 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) + (call_indirect (type $FUNCSIG$vidd) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 139) + ) + ) + ) + (func $dynCall_vif (; 722 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) + (call_indirect (type $FUNCSIG$vif) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 143) + ) + ) + ) + (func $dynCall_viff (; 723 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 f32) + (call_indirect (type $FUNCSIG$viff) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 147) + ) + ) + ) + (func $dynCall_vifff (; 724 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 f32) (param $4 f32) + (call_indirect (type $FUNCSIG$vifff) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 151) + ) + ) + ) + (func $dynCall_viffff (; 725 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 f32) (param $4 f32) (param $5 f32) + (call_indirect (type $FUNCSIG$viffff) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 155) + ) + ) + ) + (func $dynCall_vii (; 726 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (call_indirect (type $FUNCSIG$vii) + (local.get $1) + (local.get $2) + (i32.add + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.const 159) + ) + ) + ) + (func $dynCall_viif (; 727 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) + (call_indirect (type $FUNCSIG$viif) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.and + (local.get $0) + (i32.const 1) + ) + (i32.const 223) + ) + ) + ) + (func $dynCall_viifi (; 728 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 i32) + (call_indirect (type $FUNCSIG$viifi) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (i32.const 225) + ) + ) + (func $dynCall_viii (; 729 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (call_indirect (type $FUNCSIG$viii) + (local.get $1) + (local.get $2) + (local.get $3) + (i32.add + (i32.and + (local.get $0) + (i32.const 63) + ) + (i32.const 226) + ) + ) + ) + (func $dynCall_viiii (; 730 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (call_indirect (type $FUNCSIG$viiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (i32.add + (i32.and + (local.get $0) + (i32.const 31) + ) + (i32.const 290) + ) + ) + ) + (func $dynCall_viiiii (; 731 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (call_indirect (type $FUNCSIG$viiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (i32.add + (i32.and + (local.get $0) + (i32.const 7) + ) + (i32.const 322) + ) + ) + ) + (func $dynCall_viiiiii (; 732 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) + (call_indirect (type $FUNCSIG$viiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (i32.add + (i32.and + (local.get $0) + (i32.const 1) + ) + (i32.const 330) + ) + ) + ) + (func $dynCall_viiiiiii (; 733 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) + (call_indirect (type $FUNCSIG$viiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 332) + ) + ) + ) + (func $dynCall_viiiiiiii (; 734 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) + (call_indirect (type $FUNCSIG$viiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 336) + ) + ) + ) + (func $dynCall_viiiiiiiii (; 735 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) + (call_indirect (type $FUNCSIG$viiiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (local.get $9) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 340) + ) + ) + ) + (func $dynCall_viiiiiiiiii (; 736 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) + (call_indirect (type $FUNCSIG$viiiiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (local.get $9) + (local.get $10) + (i32.const 344) + ) + ) + (func $dynCall_viiiiiiiiiii (; 737 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) + (call_indirect (type $FUNCSIG$viiiiiiiiiii) + (local.get $1) + (local.get $2) + (local.get $3) + (local.get $4) + (local.get $5) + (local.get $6) + (local.get $7) + (local.get $8) + (local.get $9) + (local.get $10) + (local.get $11) + (i32.const 345) + ) + ) + (func $b0 (; 738 ;) (; has Stack IR ;) (param $0 f32) (result f32) + (call $nullFunc_ff + (i32.const 0) + ) + (f32.const 0) + ) + (func $b1 (; 739 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (result f32) + (call $nullFunc_fff + (i32.const 1) + ) + (f32.const 0) + ) + (func $b2 (; 740 ;) (; has Stack IR ;) (result i32) + (call $nullFunc_i + (i32.const 2) + ) + (i32.const 0) + ) + (func $b3 (; 741 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (call $nullFunc_ii + (i32.const 3) + ) + (i32.const 0) + ) + (func $b4 (; 742 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (call $nullFunc_iidiiii + (i32.const 4) + ) + (i32.const 0) + ) + (func $b5 (; 743 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) + (call $nullFunc_iii + (i32.const 5) + ) + (i32.const 0) + ) + (func $b6 (; 744 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (call $nullFunc_iiii + (i32.const 6) + ) + (i32.const 0) + ) + (func $b7 (; 745 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (call $nullFunc_iiiii + (i32.const 7) + ) + (i32.const 0) + ) + (func $b8 (; 746 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (call $nullFunc_iiiiii + (i32.const 8) + ) + (i32.const 0) + ) + (func $b9 (; 747 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32) + (call $nullFunc_iiiiiii + (i32.const 9) + ) + (i32.const 0) + ) + (func $b10 (; 748 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (call $nullFunc_iiiiiiii + (i32.const 10) + ) + (i32.const 0) + ) + (func $b11 (; 749 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (result i32) + (call $nullFunc_iiiiiiiii + (i32.const 11) + ) + (i32.const 0) + ) + (func $b12 (; 750 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (result i32) + (call $nullFunc_iiiiiiiiii + (i32.const 12) + ) + (i32.const 0) + ) + (func $b13 (; 751 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i64) + (call $nullFunc_jiji + (i32.const 13) + ) + (i64.const 0) + ) + (func $b14 (; 752 ;) (; has Stack IR ;) + (call $nullFunc_v + (i32.const 14) + ) + ) + (func $b15 (; 753 ;) (; has Stack IR ;) (param $0 f32) + (call $nullFunc_vf + (i32.const 15) + ) + ) + (func $b16 (; 754 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) + (call $nullFunc_vff + (i32.const 16) + ) + ) + (func $b17 (; 755 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (param $2 f32) + (call $nullFunc_vfff + (i32.const 17) + ) + ) + (func $b18 (; 756 ;) (; has Stack IR ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $nullFunc_vffff + (i32.const 18) + ) + ) + (func $b19 (; 757 ;) (; has Stack IR ;) (param $0 f32) (param $1 i32) + (call $nullFunc_vfi + (i32.const 19) + ) + ) + (func $b20 (; 758 ;) (; has Stack IR ;) (param $0 i32) + (call $nullFunc_vi + (i32.const 20) + ) + ) + (func $b21 (; 759 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) + (call $nullFunc_vidd + (i32.const 21) + ) + ) + (func $b22 (; 760 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) + (call $nullFunc_vif + (i32.const 22) + ) + ) + (func $b23 (; 761 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) + (call $nullFunc_viff + (i32.const 23) + ) + ) + (func $b24 (; 762 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) + (call $nullFunc_vifff + (i32.const 24) + ) + ) + (func $b25 (; 763 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 f32) + (call $nullFunc_viffff + (i32.const 25) + ) + ) + (func $b26 (; 764 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) + (call $nullFunc_vii + (i32.const 26) + ) + ) + (func $b27 (; 765 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) + (call $nullFunc_viif + (i32.const 27) + ) + ) + (func $b28 (; 766 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (call $nullFunc_viifi + (i32.const 28) + ) + ) + (func $b29 (; 767 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) + (call $nullFunc_viii + (i32.const 29) + ) + ) + (func $b30 (; 768 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (call $nullFunc_viiii + (i32.const 30) + ) + ) + (func $b31 (; 769 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (call $nullFunc_viiiii + (i32.const 31) + ) + ) + (func $b32 (; 770 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (call $nullFunc_viiiiii + (i32.const 32) + ) + ) + (func $b33 (; 771 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) + (call $nullFunc_viiiiiii + (i32.const 33) + ) + ) + (func $b34 (; 772 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) + (call $nullFunc_viiiiiiii + (i32.const 34) + ) + ) + (func $b35 (; 773 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) + (call $nullFunc_viiiiiiiii + (i32.const 35) + ) + ) + (func $b36 (; 774 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) + (call $nullFunc_viiiiiiiiii + (i32.const 36) + ) + ) + (func $b37 (; 775 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) + (call $nullFunc_viiiiiiiiiii + (i32.const 37) + ) + ) + (func $b38 (; 776 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (call $nullFunc_viiji + (i32.const 38) + ) + ) + (func $legalstub$__emscripten_atomic_fetch_and_add_u64 (; 777 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $__emscripten_atomic_fetch_and_add_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$__emscripten_atomic_fetch_and_and_u64 (; 778 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $__emscripten_atomic_fetch_and_and_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$__emscripten_atomic_fetch_and_or_u64 (; 779 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $__emscripten_atomic_fetch_and_or_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$__emscripten_atomic_fetch_and_sub_u64 (; 780 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $__emscripten_atomic_fetch_and_sub_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$__emscripten_atomic_fetch_and_xor_u64 (; 781 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $__emscripten_atomic_fetch_and_xor_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$_emscripten_atomic_cas_u64 (; 782 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i64) + (local.set $5 + (call $_emscripten_atomic_cas_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + (i64.or + (i64.extend_i32_u + (local.get $3) + ) + (i64.shl + (i64.extend_i32_u + (local.get $4) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $5) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $5) + ) + ) + (func $legalstub$_emscripten_atomic_exchange_u64 (; 783 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $_emscripten_atomic_exchange_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$_emscripten_atomic_load_u64 (; 784 ;) (; has Stack IR ;) (param $0 i32) (result i32) + (local $1 i64) + (local.set $1 + (call $_emscripten_atomic_load_u64 + (local.get $0) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $1) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $1) + ) + ) + (func $legalstub$_emscripten_atomic_store_u64 (; 785 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local.set $3 + (call $_emscripten_atomic_store_u64 + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + ) + ) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.get $3) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $3) + ) + ) + (func $legalstub$dynCall_jiji (; 786 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i64) + (call $setTempRet0 + (i32.wrap_i64 + (i64.shr_u + (local.tee $5 + (call_indirect (type $FUNCSIG$jiji) + (local.get $1) + (i64.or + (i64.extend_i32_u + (local.get $2) + ) + (i64.shl + (i64.extend_i32_u + (local.get $3) + ) + (i64.const 32) + ) + ) + (local.get $4) + (i32.add + (i32.and + (local.get $0) + (i32.const 3) + ) + (i32.const 80) + ) + ) + ) + (i64.const 32) + ) + ) + ) + (i32.wrap_i64 + (local.get $5) + ) + ) + (func $legalstub$dynCall_viiji (; 787 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (call_indirect (type $FUNCSIG$viiji) + (local.get $1) + (local.get $2) + (i64.or + (i64.extend_i32_u + (local.get $3) + ) + (i64.shl + (i64.extend_i32_u + (local.get $4) + ) + (i64.const 32) + ) + ) + (local.get $5) + (i32.const 346) + ) + ) +) diff --git a/examples/web/core/core_loading_thread.worker.js b/examples/web/core/core_loading_thread.worker.js index f4a9714..d72f663 100644 --- a/examples/web/core/core_loading_thread.worker.js +++ b/examples/web/core/core_loading_thread.worker.js @@ -23,7 +23,8 @@ var buffer; // All pthreads share the same Emscripten HEAP as SharedArrayBuffer var DYNAMICTOP_PTR = 0; var DYNAMIC_BASE = 0; -var ENVIRONMENT_IS_PTHREAD = true; +var noExitRuntime; + var PthreadWorkerInit = {}; // performance.now() is specced to return a wallclock time in msecs since that Web Worker/main thread launched. However for pthreads this can cause @@ -36,6 +37,8 @@ var __performance_now_clock_drift = 0; // Therefore implement custom logging facility for threads running in a worker, which queue the messages to main thread to print. var Module = {}; +// These modes need to assign to these variables because of how scoping works in them. + function assert(condition, text) { if (!condition) abort('Assertion failed: ' + text); } @@ -50,10 +53,6 @@ this.addEventListener('error', function(e) { console.error(e.error); }); -function threadPrint() { - var text = Array.prototype.slice.call(arguments).join(' '); - console.log(text); -} function threadPrintErr() { var text = Array.prototype.slice.call(arguments).join(' '); console.error(text); @@ -63,19 +62,31 @@ function threadAlert() { var text = Array.prototype.slice.call(arguments).join(' '); postMessage({cmd: 'alert', text: text, threadId: selfThreadId}); } -out = threadPrint; -err = threadPrintErr; +var err = threadPrintErr; this.alert = threadAlert; +// When using postMessage to send an object, it is processed by the structured clone algorithm. +// The prototype, and hence methods, on that object is then lost. This function adds back the lost prototype. +// This does not work with nested objects that has prototypes, but it suffices for WasmSourceMap and WasmOffsetConverter. +function resetPrototype(constructor, attrs) { + var object = Object.create(constructor.prototype); + for (var key in attrs) { + if (attrs.hasOwnProperty(key)) { + object[key] = attrs[key]; + } + } + return object; +} + Module['instantiateWasm'] = function(info, receiveInstance) { // Instantiate from the module posted from the main thread. // We can just use sync instantiation in the worker. - instance = new WebAssembly.Instance(wasmModule, info); + var instance = new WebAssembly.Instance(wasmModule, info); // We don't need the module anymore; new threads will be spawned from the main thread. wasmModule = null; receiveInstance(instance); // The second 'module' parameter is intentionally null here, we don't need to keep a ref to the Module object from here. return instance.exports; -} +}; var wasmModule; var wasmMemory; @@ -107,6 +118,7 @@ this.onmessage = function(e) { buffer = wasmMemory.buffer; PthreadWorkerInit = e.data.PthreadWorkerInit; + Module['ENVIRONMENT_IS_PTHREAD'] = true; if (typeof e.data.urlOrBlob === 'string') { importScripts(e.data.urlOrBlob); @@ -116,7 +128,6 @@ this.onmessage = function(e) { URL.revokeObjectURL(objectUrl); } - if (typeof FS !== 'undefined' && typeof FS.createStandardStreams === 'function') FS.createStandardStreams(); postMessage({ cmd: 'loaded' }); } else if (e.data.cmd === 'objectTransfer') { @@ -128,13 +139,18 @@ this.onmessage = function(e) { selfThreadId = e.data.selfThreadId; parentThreadId = e.data.parentThreadId; // Establish the stack frame for this thread in global scope - STACK_BASE = STACKTOP = e.data.stackBase; - STACK_MAX = STACK_BASE + e.data.stackSize; + var max = e.data.stackBase + e.data.stackSize; + var top = e.data.stackBase; + STACK_BASE = top; + STACKTOP = top; + STACK_MAX = max; assert(threadInfoStruct); assert(selfThreadId); assert(parentThreadId); assert(STACK_BASE != 0); - assert(STACK_MAX > STACK_BASE); + assert(max > e.data.stackBase); + assert(max > top); + assert(e.data.stackBase === top); // Call inside asm.js/wasm module to set up the stack frame for this pthread in asm.js/wasm module scope Module['establishStackSpace'](e.data.stackBase, e.data.stackBase + e.data.stackSize); writeStackCookie(); @@ -163,13 +179,17 @@ this.onmessage = function(e) { } else { Atomics.store(HEAPU32, (threadInfoStruct + 4 /*C_STRUCTS.pthread.threadExitCode*/ ) >> 2, (e instanceof ExitStatus) ? e.status : -2 /*A custom entry specific to Emscripten denoting that the thread crashed.*/); Atomics.store(HEAPU32, (threadInfoStruct + 0 /*C_STRUCTS.pthread.threadStatus*/ ) >> 2, 1); // Mark the thread as no longer running. + if (typeof(_emscripten_futex_wake) !== "function") { + err("Thread Initialisation failed."); + throw e; + } _emscripten_futex_wake(threadInfoStruct + 0 /*C_STRUCTS.pthread.threadStatus*/, 0x7FFFFFFF/*INT_MAX*/); // Wake all threads waiting on this thread to finish. if (!(e instanceof ExitStatus)) throw e; } } // The thread might have finished without calling pthread_exit(). If so, then perform the exit operation ourselves. // (This is a no-op if explicit pthread_exit() had been called prior.) - if (!Module['noExitRuntime']) PThread.threadExit(result); + if (!noExitRuntime) PThread.threadExit(result); } else if (e.data.cmd === 'cancel') { // Main thread is asking for a pthread_cancel() on this thread. if (threadInfoStruct && PThread.thisThreadCancelState == 0/*PTHREAD_CANCEL_ENABLE*/) { PThread.threadCancel(); @@ -189,6 +209,6 @@ this.onmessage = function(e) { console.error(e.stack); throw e; } -} +}; diff --git a/examples/web/textures/textures_image_text.html b/examples/web/textures/textures_image_text.html index 778be27..1fde585 100644 --- a/examples/web/textures/textures_image_text.html +++ b/examples/web/textures/textures_image_text.html @@ -1 +1,329 @@ -raylib HTML5 GAME
Downloading...
\ No newline at end of file + + + + + + + raylib HTML5 GAME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/examples/web/textures/textures_image_text.js b/examples/web/textures/textures_image_text.js index 9d1da7f..9a65c58 100644 --- a/examples/web/textures/textures_image_text.js +++ b/examples/web/textures/textures_image_text.js @@ -1 +1,10642 @@ -var Module=typeof Module!=="undefined"?Module:{};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="textures/textures_image_text.data";var REMOTE_PACKAGE_BASE="textures_image_text.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata.remote_package_size;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","resources",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createDataFile"](this.name,null,byteArray,true,true,true);Module["removeRunDependency"]("fp "+that.name);this.requests[this.name]=null}};var files=metadata.files;for(var i=0;i1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{return 0}return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);if(typeof WebAssembly!=="object"){err("no native wasm support detected")}var wasmMemory;var wasmTable;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_NORMAL=0;var ALLOC_NONE=3;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,stackAlloc,dynamicAlloc][allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var WASM_PAGE_SIZE=65536;var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var DYNAMIC_BASE=5275296,DYNAMICTOP_PTR=32384;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||67108864;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="textures_image_text.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":324,"maximum":324,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);return exports};function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ___lock(){}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)},resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(1)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=function(e){done(this.error);e.preventDefault()};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var NODEFS={isWindows:false,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process["binding"]("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"]}},bufferFrom:function(arrayBuffer){return Buffer.alloc?Buffer.from(arrayBuffer):new Buffer(arrayBuffer)},mount:function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(22)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return stat.mode},realPath:function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:function(flags){flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(!flags){return newFlags}else{throw new FS.ErrnoError(22)}},node_ops:{getattr:function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},lookup:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return node},rename:function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},unlink:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},rmdir:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readdir:function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},symlink:function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readlink:function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}}},stream_ops:{open:function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},close:function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},read:function(stream,buffer,offset,length,position){if(length===0)return 0;try{return fs.readSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},write:function(stream,buffer,offset,length,position){try{return fs.writeSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(-e.errno)}}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(5)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(40)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(40)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 13}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 13}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 13}return 0},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return 13;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 17}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return 20}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 16}}else{if(FS.isDir(node.mode)){return 21}}return 0},mayOpen:function(node,flags){if(!node){return 2}if(FS.isLink(node.mode)){return 40}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 21}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(24)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(29)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(16)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(16)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(20)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(22)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(22)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(1)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},getStreamFromFD:function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream},getSocketFromFD:function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket},getSocketAddress:function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();if(!(offset_high==-1&&offset_low<0)&&!(offset_high==0&&offset_low>=0)){return-ERRNO_CODES.EOVERFLOW}var offset=offset_low;FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[result>>2]=tempI64[0],HEAP32[result+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-ERRNO_CODES.EINVAL}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:{return-ERRNO_CODES.EINVAL}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21509:case 21505:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21519:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return-ERRNO_CODES.EINVAL}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21524:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___unlock(){}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";Module["readAsync"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){return _emscripten_GetProcAddress(name_)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i0||window.pageYOffset>0){return[window.pageXOffset,window.pageYOffset]}if(typeof document.documentElement.scrollLeft!=="undefined"||typeof document.documentElement.scrollTop!=="undefined"){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}return[document.body.scrollLeft|0,document.body.scrollTop|0]},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},tick:function(){if(window["performance"]&&window["performance"]["now"])return window["performance"]["now"]();else return Date.now()},fullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}};function __requestPointerLock(target){if(target.requestPointerLock){target.requestPointerLock()}else if(target.mozRequestPointerLock){target.mozRequestPointerLock()}else if(target.webkitRequestPointerLock){target.webkitRequestPointerLock()}else if(target.msRequestPointerLock){target.msRequestPointerLock()}else{if(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock){return-3}else{return-1}}return 0}function _emscripten_exit_pointerlock(){JSEvents.removeDeferredCalls(__requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else if(document.msExitPointerLock){document.msExitPointerLock()}else if(document.mozExitPointerLock){document.mozExitPointerLock()}else if(document.webkitExitPointerLock){document.webkitExitPointerLock()}else{return-1}return 0}function __fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;__fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_num_gamepads(){return JSEvents.lastGamepadState.length}function __fillPointerlockChangeEventData(eventStruct,e){var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP32[eventStruct>>2]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement&&pointerLockElement.id?pointerLockElement.id:"";stringToUTF8(nodeName,eventStruct+4,128);stringToUTF8(id,eventStruct+132,128)}function _emscripten_get_pointerlock_status(pointerlockStatus){if(pointerlockStatus)__fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");if(instancedArraysExt){GLctx["vertexAttribDivisor"]=function(index,divisor){instancedArraysExt["vertexAttribDivisorANGLE"](index,divisor)};GLctx["drawArraysInstanced"]=function(mode,first,count,primcount){instancedArraysExt["drawArraysInstancedANGLE"](mode,first,count,primcount)};GLctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){instancedArraysExt["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension("OES_vertex_array_object");if(vaoExt){GLctx["createVertexArray"]=function(){return vaoExt["createVertexArrayOES"]()};GLctx["deleteVertexArray"]=function(vao){vaoExt["deleteVertexArrayOES"](vao)};GLctx["bindVertexArray"]=function(vao){vaoExt["bindVertexArrayOES"](vao)};GLctx["isVertexArray"]=function(vao){return vaoExt["isVertexArrayOES"](vao)}}var drawBuffersExt=GLctx.getExtension("WEBGL_draw_buffers");if(drawBuffersExt){GLctx["drawBuffers"]=function(n,bufs){drawBuffersExt["drawBuffersWEBGL"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=="Integer"&&type!=="Integer64"){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case"Float":HEAPF32[p+i*4>>2]=result[i];break;case"Boolean":HEAP8[p+i>>0]=result[i]?1:0;break;default:throw"internal glGet error, bad type: "+type}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);return}}switch(type){case"Integer64":tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[p>>2]=tempI64[0],HEAP32[p+4>>2]=tempI64[1];break;case"Integer":HEAP32[p>>2]=ret;break;case"Float":HEAPF32[p>>2]=ret;break;case"Boolean":HEAP8[p>>0]=ret?1:0;break;default:throw"internal glGet error, bad type: "+type}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,"Boolean")}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){if(GL.lastError){var error=GL.lastError;GL.lastError=0;return error}else{return GLctx.getError()}}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,"Integer")}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;if(bufSize>0&&source){var numBytesWrittenExclNull=stringToUTF8(result,source,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Float")}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Integer")}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case"Integer":HEAP32[params>>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;case"FloatToInteger":HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;case"FloatToInteger":HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"Float")}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"FloatToInteger")}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4};var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var sizePerPixel=__colorChannelsInGlTextureFormat[format]*__sizeOfGlTextureElementType[type];if(!sizePerPixel){GL.recordError(1280);return}var bytes=__computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);var end=pixels+bytes;switch(type){case 5121:return HEAPU8.subarray(pixels,end);case 5126:return HEAPF32.subarray(pixels>>2,end>>2);case 5125:case 34042:return HEAPU32.subarray(pixels>>2,end>>2);case 5123:case 33635:case 32819:case 32820:case 36193:return HEAPU16.subarray(pixels>>1,end>>1);default:GL.recordError(1280)}}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){GLctx.uniform3iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*12>>2))}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){GLctx.uniform4iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*16>>2))}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var __specialEventTargets=[0,typeof document!=="undefined"?document:0,typeof window!=="undefined"?window:0];function __findEventTarget(target){try{if(!target)return window;if(typeof target==="number")target=__specialEventTargets[target]||UTF8ToString(target);if(target==="#window")return window;else if(target==="#document")return document;else if(target==="#screen")return screen;else if(target==="#canvas")return Module["canvas"];return typeof target==="string"?document.getElementById(target):target}catch(e){return null}}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.mozRequestPointerLock&&!target.webkitRequestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(__requestPointerLock,2,[target]);return 1}else{return-2}}return __requestPointerLock(target)}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){abortOnCannotGrowMemory(requestedSize)}function _emscripten_run_script(ptr){eval(UTF8ToString(ptr))}function _emscripten_sample_gamepad_data(){return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function __fillMouseEventData(eventStruct,e,target){HEAPF64[eventStruct>>3]=JSEvents.tick();HEAP32[eventStruct+8>>2]=e.screenX;HEAP32[eventStruct+12>>2]=e.screenY;HEAP32[eventStruct+16>>2]=e.clientX;HEAP32[eventStruct+20>>2]=e.clientY;HEAP32[eventStruct+24>>2]=e.ctrlKey;HEAP32[eventStruct+28>>2]=e.shiftKey;HEAP32[eventStruct+32>>2]=e.altKey;HEAP32[eventStruct+36>>2]=e.metaKey;HEAP16[eventStruct+40>>1]=e.button;HEAP16[eventStruct+42>>1]=e.buttons;HEAP32[eventStruct+44>>2]=e["movementX"]||e["mozMovementX"]||e["webkitMovementX"]||e.screenX-JSEvents.previousScreenX;HEAP32[eventStruct+48>>2]=e["movementY"]||e["mozMovementY"]||e["webkitMovementY"]||e.screenY-JSEvents.previousScreenY;if(Module["canvas"]){var rect=Module["canvas"].getBoundingClientRect();HEAP32[eventStruct+60>>2]=e.clientX-rect.left;HEAP32[eventStruct+64>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+60>>2]=0;HEAP32[eventStruct+64>>2]=0}if(target){var rect=JSEvents.getBoundingClientRectOrZeros(target);HEAP32[eventStruct+52>>2]=e.clientX-rect.left;HEAP32[eventStruct+56>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+52>>2]=0;HEAP32[eventStruct+56>>2]=0}if(e.type!=="wheel"&&e.type!=="mousewheel"){JSEvents.previousScreenX=e.screenX;JSEvents.previousScreenY=e.screenY}}function __registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(72);target=__findEventTarget(target);var mouseEventHandlerFunc=function(event){var e=event||window.event;__fillMouseEventData(JSEvents.mouseEvent,e,target);if(dynCall_iiii(callbackfunc,eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};if(JSEvents.isInternetExplorer()&&eventTypeString=="mousedown")eventHandler.allowsDeferredCalls=false;JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread);return 0}function __fillFullscreenChangeEventData(eventStruct,e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function __registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.fullscreenChangeEvent)JSEvents.fullscreenChangeEvent=_malloc(280);var fullscreenChangeEventhandlerFunc=function(event){var e=event||window.event;var fullscreenChangeEvent=JSEvents.fullscreenChangeEvent;__fillFullscreenChangeEventData(fullscreenChangeEvent,e);if(dynCall_iiii(callbackfunc,eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:false,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(typeof JSEvents.fullscreenEnabled()==="undefined")return-1;target=target?__findEventTarget(target):__specialEventTargets[1];if(!target)return-4;__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"mozfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"msfullscreenchange",targetThread);return 0}function __registerGamepadEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.gamepadEvent)JSEvents.gamepadEvent=_malloc(1432);var gamepadEventHandlerFunc=function(event){var e=event||window.event;var gamepadEvent=JSEvents.gamepadEvent;__fillGamepadEventData(gamepadEvent,e.gamepad);if(dynCall_iiii(callbackfunc,eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread);return 0}function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread);return 0}function __registerKeyEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.keyEvent)JSEvents.keyEvent=_malloc(164);var keyEventHandlerFunc=function(event){var e=event||window.event;var keyEventData=JSEvents.keyEvent;stringToUTF8(e.key?e.key:"",keyEventData+0,32);stringToUTF8(e.code?e.code:"",keyEventData+32,32);HEAP32[keyEventData+64>>2]=e.location;HEAP32[keyEventData+68>>2]=e.ctrlKey;HEAP32[keyEventData+72>>2]=e.shiftKey;HEAP32[keyEventData+76>>2]=e.altKey;HEAP32[keyEventData+80>>2]=e.metaKey;HEAP32[keyEventData+84>>2]=e.repeat;stringToUTF8(e.locale?e.locale:"",keyEventData+88,32);stringToUTF8(e.char?e.char:"",keyEventData+120,32);HEAP32[keyEventData+152>>2]=e.charCode;HEAP32[keyEventData+156>>2]=e.keyCode;HEAP32[keyEventData+160>>2]=e.which;if(dynCall_iiii(callbackfunc,eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:JSEvents.isInternetExplorer()?false:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function __registerTouchEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.touchEvent)JSEvents.touchEvent=_malloc(1684);target=__findEventTarget(target);var touchEventHandlerFunc=function(event){var e=event||window.event;var touches={};for(var i=0;i>2]=e.ctrlKey;HEAP32[ptr+8>>2]=e.shiftKey;HEAP32[ptr+12>>2]=e.altKey;HEAP32[ptr+16>>2]=e.metaKey;ptr+=20;var canvasRect=Module["canvas"]?Module["canvas"].getBoundingClientRect():undefined;var targetRect=JSEvents.getBoundingClientRectOrZeros(target);var numTouches=0;for(var i in touches){var t=touches[i];HEAP32[ptr>>2]=t.identifier;HEAP32[ptr+4>>2]=t.screenX;HEAP32[ptr+8>>2]=t.screenY;HEAP32[ptr+12>>2]=t.clientX;HEAP32[ptr+16>>2]=t.clientY;HEAP32[ptr+20>>2]=t.pageX;HEAP32[ptr+24>>2]=t.pageY;HEAP32[ptr+28>>2]=t.changed;HEAP32[ptr+32>>2]=t.onTarget;if(canvasRect){HEAP32[ptr+44>>2]=t.clientX-canvasRect.left;HEAP32[ptr+48>>2]=t.clientY-canvasRect.top}else{HEAP32[ptr+44>>2]=0;HEAP32[ptr+48>>2]=0}HEAP32[ptr+36>>2]=t.clientX-targetRect.left;HEAP32[ptr+40>>2]=t.clientY-targetRect.top;ptr+=52;if(++numTouches>=32){break}}HEAP32[touchEvent>>2]=numTouches;if(dynCall_iiii(callbackfunc,eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread);return 0}function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread);return 0}function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread);return 0}function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread);return 0}function _exit(status){exit(status)}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i=0&&arrayIndex>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GLFW={Window:function(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.framebufferSizeFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.dropFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null},WindowFromId:function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 94;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:function(win){var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:function(event){if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;dynCall_vii(GLFW.active.charFunc,GLFW.active.id,charCode)},onKeyChanged:function(keyCode,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(!GLFW.active.keyFunc)return;if(repeat)status=2;dynCall_viiiii(GLFW.active.keyFunc,GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))},onGamepadConnected:function(event){GLFW.refreshJoysticks()},onGamepadDisconnected:function(event){GLFW.refreshJoysticks()},onKeydown:function(event){GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:function(event){GLFW.onKeyChanged(event.keyCode,0)},onBlur:function(event){if(!GLFW.active)return;for(var i=0;i0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,1)},onMouseleave:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,0)},onMouseButtonChanged:function(event,status){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=0;if(event.type=="mousewheel"){sx=event.wheelDeltaX;sy=event.wheelDeltaY}else{sx=event.deltaX;sy=event.deltaY}dynCall_vidd(GLFW.active.scrollFunc,GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:function(width,height){if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.windowSizeFunc)return;dynCall_viii(GLFW.active.windowSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},onFramebufferSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.framebufferSizeFunc)return;dynCall_viii(GLFW.active.framebufferSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},requestFullscreen:function(){var RFS=Module["canvas"]["requestFullscreen"]||Module["canvas"]["mozRequestFullScreen"]||Module["canvas"]["webkitRequestFullScreen"]||function(){};RFS.apply(Module["canvas"],[])},requestFullScreen:function(){err("GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.");GLFW.requestFullScreen=function(){return GLFW.requestFullscreen()};return GLFW.requestFullscreen()},exitFullscreen:function(){Browser.exitFullscreen()},cancelFullScreen:function(){err("GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.");GLFW.cancelFullScreen=function(){return GLFW.exitFullscreen()};return GLFW.exitFullscreen()},getTime:function(){return _emscripten_get_now()/1e3},setWindowTitle:function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=UTF8ToString(title);if(GLFW.active.id==win.id){document.title=win.title}},setJoystickCallback:function(cbfun){GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks()},joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function(){if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:null;GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joy0},getCursorPos:function(winid,x,y){setValue(x,Browser.mouseX,"double");setValue(y,Browser.mouseY,"double")},getMousePos:function(winid,x,y){setValue(x,Browser.mouseX,"i32");setValue(y,Browser.mouseY,"i32")},setCursorPos:function(winid,x,y){},getWindowPos:function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}setValue(x,wx,"i32");setValue(y,wy,"i32")},setWindowPos:function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}setValue(width,ww,"i32");setValue(height,wh,"i32")},setWindowSize:function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){GLFW.requestFullscreen()}else{GLFW.exitFullscreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(!win.windowSizeFunc)return;dynCall_viii(win.windowSizeFunc,win.id,width,height)},createWindow:function(width,height,title,monitor,share){var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){GLFW.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}if(!Module.ctx)return 0;var win=new GLFW.Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc)dynCall_vi(win.windowCloseFunc,win.id);GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i>2];var nanoseconds=HEAP32[rqtp+4>>2];if(rmtp!==0){HEAP32[rmtp>>2]=0;HEAP32[rmtp+4>>2]=0}return _usleep(seconds*1e6+nanoseconds/1e3)}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}FS.staticInit();Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function _emscripten_get_now_actual(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmGlobalArg={};var asmLibraryArg={"c":abort,"b":___assert_fail,"wc":___lock,"C":___setErrNo,"db":___syscall140,"Ua":___syscall145,"B":___syscall146,"m":___syscall221,"pa":___syscall5,"A":___syscall54,"W":___syscall6,"z":___unlock,"y":_eglGetProcAddress,"V":_emscripten_exit_pointerlock,"Cd":_emscripten_get_gamepad_status,"rd":_emscripten_get_heap_size,"gd":_emscripten_get_num_gamepads,"U":_emscripten_get_pointerlock_status,"Nc":_emscripten_glActiveTexture,"Dc":_emscripten_glAttachShader,"vc":_emscripten_glBeginQueryEXT,"qc":_emscripten_glBindAttribLocation,"jc":_emscripten_glBindBuffer,"dc":_emscripten_glBindFramebuffer,"Yb":_emscripten_glBindRenderbuffer,"Tb":_emscripten_glBindTexture,"Kb":_emscripten_glBindVertexArrayOES,"Ab":_emscripten_glBlendColor,"sb":_emscripten_glBlendEquation,"ob":_emscripten_glBlendEquationSeparate,"nb":_emscripten_glBlendFunc,"mb":_emscripten_glBlendFuncSeparate,"lb":_emscripten_glBufferData,"kb":_emscripten_glBufferSubData,"jb":_emscripten_glCheckFramebufferStatus,"ib":_emscripten_glClear,"hb":_emscripten_glClearColor,"gb":_emscripten_glClearDepthf,"fb":_emscripten_glClearStencil,"eb":_emscripten_glColorMask,"cb":_emscripten_glCompileShader,"bb":_emscripten_glCompressedTexImage2D,"ab":_emscripten_glCompressedTexSubImage2D,"$a":_emscripten_glCopyTexImage2D,"_a":_emscripten_glCopyTexSubImage2D,"Za":_emscripten_glCreateProgram,"Ya":_emscripten_glCreateShader,"Xa":_emscripten_glCullFace,"Wa":_emscripten_glDeleteBuffers,"Va":_emscripten_glDeleteFramebuffers,"Ta":_emscripten_glDeleteProgram,"Sa":_emscripten_glDeleteQueriesEXT,"Ra":_emscripten_glDeleteRenderbuffers,"Qa":_emscripten_glDeleteShader,"Pa":_emscripten_glDeleteTextures,"Oa":_emscripten_glDeleteVertexArraysOES,"Na":_emscripten_glDepthFunc,"Ma":_emscripten_glDepthMask,"La":_emscripten_glDepthRangef,"Ka":_emscripten_glDetachShader,"Ja":_emscripten_glDisable,"Ia":_emscripten_glDisableVertexAttribArray,"Ha":_emscripten_glDrawArrays,"Ga":_emscripten_glDrawArraysInstancedANGLE,"Fa":_emscripten_glDrawBuffersWEBGL,"Ea":_emscripten_glDrawElements,"Da":_emscripten_glDrawElementsInstancedANGLE,"Ca":_emscripten_glEnable,"Ba":_emscripten_glEnableVertexAttribArray,"Aa":_emscripten_glEndQueryEXT,"za":_emscripten_glFinish,"ya":_emscripten_glFlush,"xa":_emscripten_glFramebufferRenderbuffer,"wa":_emscripten_glFramebufferTexture2D,"va":_emscripten_glFrontFace,"ua":_emscripten_glGenBuffers,"ta":_emscripten_glGenFramebuffers,"sa":_emscripten_glGenQueriesEXT,"ra":_emscripten_glGenRenderbuffers,"qa":_emscripten_glGenTextures,"oa":_emscripten_glGenVertexArraysOES,"na":_emscripten_glGenerateMipmap,"ma":_emscripten_glGetActiveAttrib,"la":_emscripten_glGetActiveUniform,"ka":_emscripten_glGetAttachedShaders,"ja":_emscripten_glGetAttribLocation,"ia":_emscripten_glGetBooleanv,"ha":_emscripten_glGetBufferParameteriv,"ga":_emscripten_glGetError,"fa":_emscripten_glGetFloatv,"ea":_emscripten_glGetFramebufferAttachmentParameteriv,"da":_emscripten_glGetIntegerv,"ca":_emscripten_glGetProgramInfoLog,"ba":_emscripten_glGetProgramiv,"aa":_emscripten_glGetQueryObjecti64vEXT,"$":_emscripten_glGetQueryObjectivEXT,"_":_emscripten_glGetQueryObjectui64vEXT,"Z":_emscripten_glGetQueryObjectuivEXT,"Y":_emscripten_glGetQueryivEXT,"X":_emscripten_glGetRenderbufferParameteriv,"oe":_emscripten_glGetShaderInfoLog,"ne":_emscripten_glGetShaderPrecisionFormat,"me":_emscripten_glGetShaderSource,"le":_emscripten_glGetShaderiv,"ke":_emscripten_glGetString,"je":_emscripten_glGetTexParameterfv,"ie":_emscripten_glGetTexParameteriv,"he":_emscripten_glGetUniformLocation,"ge":_emscripten_glGetUniformfv,"fe":_emscripten_glGetUniformiv,"ee":_emscripten_glGetVertexAttribPointerv,"de":_emscripten_glGetVertexAttribfv,"ce":_emscripten_glGetVertexAttribiv,"be":_emscripten_glHint,"ae":_emscripten_glIsBuffer,"$d":_emscripten_glIsEnabled,"_d":_emscripten_glIsFramebuffer,"Zd":_emscripten_glIsProgram,"Yd":_emscripten_glIsQueryEXT,"Xd":_emscripten_glIsRenderbuffer,"Wd":_emscripten_glIsShader,"Vd":_emscripten_glIsTexture,"Ud":_emscripten_glIsVertexArrayOES,"Td":_emscripten_glLineWidth,"Sd":_emscripten_glLinkProgram,"Rd":_emscripten_glPixelStorei,"Qd":_emscripten_glPolygonOffset,"Pd":_emscripten_glQueryCounterEXT,"Od":_emscripten_glReadPixels,"Nd":_emscripten_glReleaseShaderCompiler,"Md":_emscripten_glRenderbufferStorage,"Ld":_emscripten_glSampleCoverage,"Kd":_emscripten_glScissor,"Jd":_emscripten_glShaderBinary,"Id":_emscripten_glShaderSource,"Hd":_emscripten_glStencilFunc,"Gd":_emscripten_glStencilFuncSeparate,"Fd":_emscripten_glStencilMask,"Ed":_emscripten_glStencilMaskSeparate,"Dd":_emscripten_glStencilOp,"Bd":_emscripten_glStencilOpSeparate,"Ad":_emscripten_glTexImage2D,"zd":_emscripten_glTexParameterf,"yd":_emscripten_glTexParameterfv,"xd":_emscripten_glTexParameteri,"wd":_emscripten_glTexParameteriv,"vd":_emscripten_glTexSubImage2D,"ud":_emscripten_glUniform1f,"td":_emscripten_glUniform1fv,"sd":_emscripten_glUniform1i,"qd":_emscripten_glUniform1iv,"pd":_emscripten_glUniform2f,"od":_emscripten_glUniform2fv,"nd":_emscripten_glUniform2i,"md":_emscripten_glUniform2iv,"ld":_emscripten_glUniform3f,"kd":_emscripten_glUniform3fv,"jd":_emscripten_glUniform3i,"id":_emscripten_glUniform3iv,"hd":_emscripten_glUniform4f,"fd":_emscripten_glUniform4fv,"ed":_emscripten_glUniform4i,"dd":_emscripten_glUniform4iv,"cd":_emscripten_glUniformMatrix2fv,"bd":_emscripten_glUniformMatrix3fv,"ad":_emscripten_glUniformMatrix4fv,"$c":_emscripten_glUseProgram,"_c":_emscripten_glValidateProgram,"Zc":_emscripten_glVertexAttrib1f,"Yc":_emscripten_glVertexAttrib1fv,"Xc":_emscripten_glVertexAttrib2f,"Wc":_emscripten_glVertexAttrib2fv,"Vc":_emscripten_glVertexAttrib3f,"Uc":_emscripten_glVertexAttrib3fv,"Tc":_emscripten_glVertexAttrib4f,"Sc":_emscripten_glVertexAttrib4fv,"Rc":_emscripten_glVertexAttribDivisorANGLE,"Qc":_emscripten_glVertexAttribPointer,"Pc":_emscripten_glViewport,"Oc":_emscripten_memcpy_big,"Mc":_emscripten_request_pointerlock,"Lc":_emscripten_resize_heap,"T":_emscripten_run_script,"Kc":_emscripten_sample_gamepad_data,"Jc":_emscripten_set_click_callback_on_thread,"Ic":_emscripten_set_fullscreenchange_callback_on_thread,"Hc":_emscripten_set_gamepadconnected_callback_on_thread,"Gc":_emscripten_set_gamepaddisconnected_callback_on_thread,"Fc":_emscripten_set_keypress_callback_on_thread,"Ec":_emscripten_set_main_loop,"Cc":_emscripten_set_touchcancel_callback_on_thread,"Bc":_emscripten_set_touchend_callback_on_thread,"Ac":_emscripten_set_touchmove_callback_on_thread,"zc":_emscripten_set_touchstart_callback_on_thread,"yc":_exit,"xc":_glActiveTexture,"S":_glAttachShader,"k":_glBindAttribLocation,"d":_glBindBuffer,"f":_glBindFramebuffer,"R":_glBindRenderbuffer,"h":_glBindTexture,"uc":_glBlendFunc,"t":_glBufferData,"x":_glBufferSubData,"tc":_glCheckFramebufferStatus,"Q":_glClear,"P":_glClearColor,"sc":_glClearDepthf,"rc":_glCompileShader,"pc":_glCompressedTexImage2D,"oc":_glCreateProgram,"nc":_glCreateShader,"mc":_glCullFace,"s":_glDeleteBuffers,"lc":_glDeleteFramebuffers,"O":_glDeleteProgram,"kc":_glDeleteRenderbuffers,"N":_glDeleteShader,"r":_glDeleteTextures,"ic":_glDepthFunc,"M":_glDetachShader,"hc":_glDisable,"q":_glDisableVertexAttribArray,"gc":_glDrawArrays,"fc":_glDrawElements,"L":_glEnable,"j":_glEnableVertexAttribArray,"ec":_glFramebufferRenderbuffer,"p":_glFramebufferTexture2D,"cc":_glFrontFace,"o":_glGenBuffers,"bc":_glGenFramebuffers,"ac":_glGenRenderbuffers,"K":_glGenTextures,"w":_glGetAttribLocation,"$b":_glGetFloatv,"_b":_glGetProgramInfoLog,"J":_glGetProgramiv,"Zb":_glGetShaderInfoLog,"I":_glGetShaderiv,"l":_glGetString,"v":_glGetUniformLocation,"Xb":_glLinkProgram,"Wb":_glPixelStorei,"H":_glReadPixels,"Vb":_glRenderbufferStorage,"Ub":_glShaderSource,"G":_glTexImage2D,"e":_glTexParameteri,"Sb":_glUniform1i,"Rb":_glUniform4f,"Qb":_glUniformMatrix4fv,"u":_glUseProgram,"i":_glVertexAttribPointer,"Pb":_glViewport,"Ob":_glfwCreateWindow,"Nb":_glfwDefaultWindowHints,"Mb":_glfwDestroyWindow,"Lb":_glfwGetCursorPos,"Jb":_glfwGetKey,"n":_glfwGetTime,"Ib":_glfwInit,"Hb":_glfwMakeContextCurrent,"Gb":_glfwSetCharCallback,"Fb":_glfwSetCursorEnterCallback,"Eb":_glfwSetCursorPosCallback,"Db":_glfwSetDropCallback,"Cb":_glfwSetErrorCallback,"Bb":_glfwSetKeyCallback,"zb":_glfwSetMouseButtonCallback,"yb":_glfwSetScrollCallback,"xb":_glfwSetWindowIconifyCallback,"wb":_glfwSetWindowShouldClose,"vb":_glfwSetWindowSizeCallback,"ub":_glfwSwapBuffers,"F":_glfwTerminate,"g":_glfwWindowHint,"tb":_llvm_exp2_f32,"E":_llvm_stackrestore,"D":_llvm_stacksave,"rb":_nanosleep,"qb":_time,"pb":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);Module["asm"]=asm;var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["pe"].apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){return Module["asm"]["qe"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["re"].apply(null,arguments)};var _ma_device_process_pcm_frames_capture__webaudio=Module["_ma_device_process_pcm_frames_capture__webaudio"]=function(){return Module["asm"]["se"].apply(null,arguments)};var _ma_device_process_pcm_frames_playback__webaudio=Module["_ma_device_process_pcm_frames_playback__webaudio"]=function(){return Module["asm"]["te"].apply(null,arguments)};var _main=Module["_main"]=function(){return Module["asm"]["ue"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["ve"].apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return Module["asm"]["Ee"].apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return Module["asm"]["Fe"].apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return Module["asm"]["Ge"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["we"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["xe"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["ye"].apply(null,arguments)};var dynCall_vidd=Module["dynCall_vidd"]=function(){return Module["asm"]["ze"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["Ae"].apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){return Module["asm"]["Be"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["Ce"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return Module["asm"]["De"].apply(null,arguments)};Module["asm"]=asm;Module["getMemory"]=getMemory;Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(Module["thisProgram"]);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);Module["quit"](1,e)}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status)}Module["quit"](status,new ExitStatus(status))}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}Module["noExitRuntime"]=true;run(); +// Copyright 2010 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) + +if (!Module.expectedDataFileDownloads) { + Module.expectedDataFileDownloads = 0; + Module.finishedDataFileDownloads = 0; +} +Module.expectedDataFileDownloads++; +(function() { + var loadPackage = function(metadata) { + + var PACKAGE_PATH; + if (typeof window === 'object') { + PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'); + } else if (typeof location !== 'undefined') { + // worker + PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/'); + } else { + throw 'using preloaded data can only be done on a web page or in a web worker'; + } + var PACKAGE_NAME = 'textures/textures_image_text.data'; + var REMOTE_PACKAGE_BASE = 'textures_image_text.data'; + if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) { + Module['locateFile'] = Module['locateFilePackage']; + err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)'); + } + var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE; + + var REMOTE_PACKAGE_SIZE = metadata.remote_package_size; + var PACKAGE_UUID = metadata.package_uuid; + + function fetchRemotePackage(packageName, packageSize, callback, errback) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', packageName, true); + xhr.responseType = 'arraybuffer'; + xhr.onprogress = function(event) { + var url = packageName; + var size = packageSize; + if (event.total) size = event.total; + if (event.loaded) { + if (!xhr.addedTotal) { + xhr.addedTotal = true; + if (!Module.dataFileDownloads) Module.dataFileDownloads = {}; + Module.dataFileDownloads[url] = { + loaded: event.loaded, + total: size + }; + } else { + Module.dataFileDownloads[url].loaded = event.loaded; + } + var total = 0; + var loaded = 0; + var num = 0; + for (var download in Module.dataFileDownloads) { + var data = Module.dataFileDownloads[download]; + total += data.total; + loaded += data.loaded; + num++; + } + total = Math.ceil(total * Module.expectedDataFileDownloads/num); + if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')'); + } else if (!Module.dataFileDownloads) { + if (Module['setStatus']) Module['setStatus']('Downloading data...'); + } + }; + xhr.onerror = function(event) { + throw new Error("NetworkError for: " + packageName); + } + xhr.onload = function(event) { + if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + var packageData = xhr.response; + callback(packageData); + } else { + throw new Error(xhr.statusText + " : " + xhr.responseURL); + } + }; + xhr.send(null); + }; + + function handleError(error) { + console.error('package error:', error); + }; + + var fetchedCallback = null; + var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null; + + if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) { + if (fetchedCallback) { + fetchedCallback(data); + fetchedCallback = null; + } else { + fetched = data; + } + }, handleError); + + function runWithFS() { + + function assert(check, msg) { + if (!check) throw msg + new Error().stack; + } +Module['FS_createPath']('/', 'resources', true, true); + + function DataRequest(start, end, audio) { + this.start = start; + this.end = end; + this.audio = audio; + } + DataRequest.prototype = { + requests: {}, + open: function(mode, name) { + this.name = name; + this.requests[name] = this; + Module['addRunDependency']('fp ' + this.name); + }, + send: function() {}, + onload: function() { + var byteArray = this.byteArray.subarray(this.start, this.end); + this.finish(byteArray); + }, + finish: function(byteArray) { + var that = this; + + Module['FS_createDataFile'](this.name, null, byteArray, true, true, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change + Module['removeRunDependency']('fp ' + that.name); + + this.requests[this.name] = null; + } + }; + + var files = metadata.files; + for (var i = 0; i < files.length; ++i) { + new DataRequest(files[i].start, files[i].end, files[i].audio).open('GET', files[i].filename); + } + + + function processPackageData(arrayBuffer) { + Module.finishedDataFileDownloads++; + assert(arrayBuffer, 'Loading data file failed.'); + assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData'); + var byteArray = new Uint8Array(arrayBuffer); + var curr; + + // copy the entire loaded file into a spot in the heap. Files will refer to slices in that. They cannot be freed though + // (we may be allocating before malloc is ready, during startup). + var ptr = Module['getMemory'](byteArray.length); + Module['HEAPU8'].set(byteArray, ptr); + DataRequest.prototype.byteArray = Module['HEAPU8'].subarray(ptr, ptr+byteArray.length); + + var files = metadata.files; + for (var i = 0; i < files.length; ++i) { + DataRequest.prototype.requests[files[i].filename].onload(); + } + Module['removeRunDependency']('datafile_textures/textures_image_text.data'); + + }; + Module['addRunDependency']('datafile_textures/textures_image_text.data'); + + if (!Module.preloadResults) Module.preloadResults = {}; + + Module.preloadResults[PACKAGE_NAME] = {fromCache: false}; + if (fetched) { + processPackageData(fetched); + fetched = null; + } else { + fetchedCallback = processPackageData; + } + + } + if (Module['calledRun']) { + runWithFS(); + } else { + if (!Module['preRun']) Module['preRun'] = []; + Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it + } + + } + loadPackage({"files": [{"start": 0, "audio": 0, "end": 295054, "filename": "/resources/parrots.png"}, {"start": 295054, "audio": 0, "end": 374966, "filename": "/resources/KAISG.ttf"}], "remote_package_size": 374966, "package_uuid": "a41782c4-ba6a-4923-a611-f7b0293cc800"}); + +})(); + + + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_HAS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// A web environment like Electron.js can have Node enabled, so we must +// distinguish between Node-enabled environments and Node environments per se. +// This will allow the former to do things like mount NODEFS. +// Extended check using process.versions fixes issue #8816. +// (Also makes redundant the original check that 'require' is a function.) +ENVIRONMENT_HAS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); +} + + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + + + + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +if (ENVIRONMENT_IS_NODE) { + scriptDirectory = __dirname + '/'; + + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + read_ = function shell_read(filename, binary) { + var ret; + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + return binary ? ret : ret.toString(); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + process['on']('unhandledRejection', abort); + + quit_ = function(status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} else +if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function(status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = {}; + console.log = print; + console.warn = console.error = typeof printErr !== 'undefined' ? printErr : print; + } +} else +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + + read_ = function shell_read(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + setWindowTitle = function(title) { document.title = title }; +} else +{ + throw new Error('environment detection error'); +} + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { get: function() { abort('Module.arguments has been replaced with plain arguments_') } }); +if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { get: function() { abort('Module.thisProgram has been replaced with plain thisProgram') } }); +if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { get: function() { abort('Module.quit has been replaced with plain quit_') } }); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { get: function() { abort('Module.read has been replaced with plain read_') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { get: function() { abort('Module.readAsync has been replaced with plain readAsync') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { get: function() { abort('Module.readBinary has been replaced with plain readBinary') } }); +// TODO: add when SDL2 is fixed if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } }); + + +// TODO remove when SDL2 is fixed (also see above) + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)'); +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + if (end > _emscripten_get_heap_size()) { + abort('failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly'); + } + HEAP32[DYNAMICTOP_PTR>>2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + "debugger": function() { + debugger; + } +}; + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// Wraps a JS function as a wasm function with a given signature. +// In the future, we may get a WebAssembly.Function constructor. Until then, +// we create a wasm module that takes the JS function as an import with a given +// signature, and re-exports that as a wasm function. +function convertJsFunctionToWasm(func, sig) { + + // The module is static, with the exception of the type section, which is + // generated based on the signature passed in. + var typeSection = [ + 0x01, // id: section, + 0x00, // length: 0 (placeholder) + 0x01, // count: 1 + 0x60, // form: func + ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + 'i': 0x7f, // i32 + 'j': 0x7e, // i64 + 'f': 0x7d, // f32 + 'd': 0x7c, // f64 + }; + + // Parameters, length + signatures + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + + // Return values, length + signatures + // With no multi-return in MVP, either 0 (void) or 1 (anything else) + if (sigRet == 'v') { + typeSection.push(0x00); + } else { + typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); + } + + // Write the overall length of the type section back into the section header + // (excepting the 2 bytes for the section id and length) + typeSection[1] = typeSection.length - 2; + + // Rest of the module is static + var bytes = new Uint8Array([ + 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") + 0x01, 0x00, 0x00, 0x00, // version: 1 + ].concat(typeSection, [ + 0x02, 0x07, // import section + // (import "e" "f" (func 0 (type 0))) + 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, + 0x07, 0x05, // export section + // (export "f" (func 0 (type 0))) + 0x01, 0x01, 0x66, 0x00, 0x00, + ])); + + // We can compile this wasm module synchronously because it is very small. + // This accepts an import (at "e.f"), that it reroutes to an export (at "f") + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + e: { + f: func + } + }); + var wrappedFunc = instance.exports.f; + return wrappedFunc; +} + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + var ret = table.length; + + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!err instanceof RangeError) { + throw err; + } + throw 'Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.'; + } + + // Insert new element + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!err instanceof TypeError) { + throw err; + } + assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + return ret; +} + +function removeFunctionWasm(index) { + // TODO(sbc): Look into implementing this to allow re-using of table slots +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + assert(typeof func !== 'undefined'); + + + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; + +} + +function removeFunction(index) { + + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary') } }); +var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } }); + + +if (typeof WebAssembly !== 'object') { + abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.'); +} + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + +// Wasm globals + +var wasmMemory; + +// Potentially used for direct table calls. +var wasmTable; + + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) + while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var str = ''; + // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = u8Array[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + + +var STATIC_BASE = 1024, + STACK_BASE = 35456, + STACKTOP = STACK_BASE, + STACK_MAX = 5278336, + DYNAMIC_BASE = 5278336, + DYNAMICTOP_PTR = 35424; + +assert(STACK_BASE % 16 === 0, 'stack must start aligned'); +assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned'); + + + +var TOTAL_STACK = 5242880; +if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') + +var INITIAL_TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 67108864;if (!Object.getOwnPropertyDescriptor(Module, 'TOTAL_MEMORY')) Object.defineProperty(Module, 'TOTAL_MEMORY', { get: function() { abort('Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY') } }); + +assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, 'TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + + + + + + if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; + } else + { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + }); + } + + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['TOTAL_MEMORY']. +INITIAL_TOTAL_MEMORY = buffer.byteLength; +assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0); +updateGlobalBufferAndViews(buffer); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + var cookie1 = HEAPU32[(STACK_MAX >> 2)-1]; + var cookie2 = HEAPU32[(STACK_MAX >> 2)-2]; + if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); + } + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + + + HEAP32[0] = 0x63736d65; /* 'emsc' */ + + + +// Endianness check (note: assumes compiler arch was little-endian) +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function abortFnPtrError(ptr, sig) { + abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); +} + + + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + checkStackCookie(); + assert(!runtimeInitialized); + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); +TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + +var memoryInitializer = null; + + + + + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + +var wasmBinaryFile = 'textures_image_text.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // if we don't have the binary yet, and have the Fetch api, use that + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function(resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm(env) { + // prepare imports + var info = { + 'env': env, + 'wasi_unstable': env + , + 'global': { + 'NaN': NaN, + 'Infinity': Infinity + }, + 'global.Math': Math, + 'asm2wasm': asm2wasmImports + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(output['instance']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate +// the wasm module at that time, and it receives imports and provides exports and so forth, the app +// doesn't need to care that it is wasm or asm.js. + +Module['asm'] = function(global, env, providedBuffer) { + // memory was already allocated (so js could use the buffer) + env['memory'] = wasmMemory + ; + // import table + env['table'] = wasmTable = new WebAssembly.Table({ + 'initial': 5306, + 'maximum': 5306, + 'element': 'anyfunc' + }); + // With the wasm backend __memory_base and __table_base and only needed for + // relocatable output. + env['__memory_base'] = 1024; // tell the memory segments where to place themselves + // table starts at 0 by default (even in dynamic linking, for the main module) + env['__table_base'] = 0; + + var exports = createWasm(env); + assert(exports, 'binaryen setup failed (no wasm support?)'); + return exports; +}; + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = []; + + + + + +// STATICTOP = STATIC_BASE + 34432; +/* global initializers */ /*__ATINIT__.push();*/ + + + + + + + + +/* no memory initializer */ +var tempDoublePtr = 35440 +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; +} + +function copyTempDouble(ptr) { + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; +} + +// {{PRE_LIBRARY}} + + + function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; + } + + function demangleAll(text) { + var regex = + /\b__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); + } + + function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); + } + + function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); + } + + function ___assert_fail(condition, filename, line, func) { + abort('Assertion failed: ' + UTF8ToString(condition) + ', at: ' + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']); + } + + function ___lock() {} + + + + var PATH={splitPath:function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + },normalize:function(path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function(path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function(path) { + return PATH.splitPath(path)[3]; + },join:function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function(l, r) { + return PATH.normalize(l + '/' + r); + }}; + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else err('failed to set errno from JS'); + return value; + } + + var PATH_FS={resolve:function() { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; + + var TTY={ttys:[],init:function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + },shutdown:function() { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + },register:function(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + },stream_ops:{open:function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(19); + } + stream.tty = tty; + stream.seekable = false; + },close:function(stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + },flush:function(stream) { + stream.tty.ops.flush(stream.tty); + },read:function(stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(6); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + },write:function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(6); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset+i]); + } + } catch (e) { + throw new FS.ErrnoError(5); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }},default_tty_ops:{get_char:function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + var isPosixPlatform = (process.platform != 'win32'); // Node doesn't offer a direct check, so test by exclusion + + var fd = process.stdin.fd; + if (isPosixPlatform) { + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + } + + try { + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + } catch(e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + },put_char:function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }},default_tty1_ops:{put_char:function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }}}; + + var MEMFS={ops_table:null,mount:function(mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + },createNode:function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(1); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + },getFileDataAsRegularArray:function(node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + },getFileDataAsTypedArray:function(node) { + if (!node.contents) return new Uint8Array; + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + },expandFileStorage:function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + },resizeFileStorage:function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + },node_ops:{getattr:function(node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + },lookup:function(parent, name) { + throw FS.genericErrors[2]; + },mknod:function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + },rename:function(old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(39); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + },unlink:function(parent, name) { + delete parent.contents[name]; + },rmdir:function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(39); + } + delete parent.contents[name]; + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + },readlink:function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(22); + } + return node.link; + }},stream_ops:{read:function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + assert(size >= 0); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + },write:function(stream, buffer, offset, length, position, canOwn) { + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + assert(position === 0, 'canOwn must imply no weird position inside the file'); + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position+length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position+length); + return length; + },llseek:function(stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + },allocate:function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if ( !(flags & 2) && + (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < stream.node.usedBytes) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + // malloc() can lead to growing the heap. If targeting the heap, we need to + // re-acquire the heap buffer object in case growth had occurred. + var fromHeap = (buffer.buffer == HEAP8.buffer); + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(12); + } + (fromHeap ? HEAP8 : buffer).set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + }}}; + + var IDBFS={dbs:{},indexedDB:function() { + if (typeof indexedDB !== 'undefined') return indexedDB; + var ret = null; + if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + assert(ret, 'IDBFS used, but indexedDB not supported'); + return ret; + },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount) { + // reuse all of the core MEMFS functionality + return MEMFS.mount.apply(null, arguments); + },syncfs:function(mount, populate, callback) { + IDBFS.getLocalSet(mount, function(err, local) { + if (err) return callback(err); + + IDBFS.getRemoteSet(mount, function(err, remote) { + if (err) return callback(err); + + var src = populate ? remote : local; + var dst = populate ? local : remote; + + IDBFS.reconcile(src, dst, callback); + }); + }); + },getDB:function(name, callback) { + // check the cache first + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); + } + + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); + } + if (!req) { + return callback("Unable to connect to IndexedDB"); + } + req.onupgradeneeded = function(e) { + var db = e.target.result; + var transaction = e.target.transaction; + + var fileStore; + + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); + } + + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } + }; + req.onsuccess = function() { + db = req.result; + + // add to the cache + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },getLocalSet:function(mount, callback) { + var entries = {}; + + function isRealDir(p) { + return p !== '.' && p !== '..'; + }; + function toAbsolute(root) { + return function(p) { + return PATH.join2(root, p); + } + }; + + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + + while (check.length) { + var path = check.pop(); + var stat; + + try { + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); + } + + entries[path] = { timestamp: stat.mtime }; + } + + return callback(null, { type: 'local', entries: entries }); + },getRemoteSet:function(mount, callback) { + var entries = {}; + + IDBFS.getDB(mount.mountpoint, function(err, db) { + if (err) return callback(err); + + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index('timestamp'); + + index.openKeyCursor().onsuccess = function(event) { + var cursor = event.target.result; + + if (!cursor) { + return callback(null, { type: 'remote', db: db, entries: entries }); + } + + entries[cursor.primaryKey] = { timestamp: cursor.key }; + + cursor.continue(); + }; + } catch (e) { + return callback(e); + } + }); + },loadLocalEntry:function(path, callback) { + var stat, node; + + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode }); + } else if (FS.isFile(stat.mode)) { + // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. + // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); + } else { + return callback(new Error('node type not supported')); + } + },storeLocalEntry:function(path, entry, callback) { + try { + if (FS.isDir(entry.mode)) { + FS.mkdir(path, entry.mode); + } else if (FS.isFile(entry.mode)) { + FS.writeFile(path, entry.contents, { canOwn: true }); + } else { + return callback(new Error('node type not supported')); + } + + FS.chmod(path, entry.mode); + FS.utime(path, entry.timestamp, entry.timestamp); + } catch (e) { + return callback(e); + } + + callback(null); + },removeLocalEntry:function(path, callback) { + try { + var lookup = FS.lookupPath(path); + var stat = FS.stat(path); + + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + + callback(null); + },loadRemoteEntry:function(store, path, callback) { + var req = store.get(path); + req.onsuccess = function(event) { callback(null, event.target.result); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },storeRemoteEntry:function(store, path, entry, callback) { + var req = store.put(entry, path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },removeRemoteEntry:function(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },reconcile:function(src, dst, callback) { + var total = 0; + + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e.timestamp > e2.timestamp) { + create.push(key); + total++; + } + }); + + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + var e = dst.entries[key]; + var e2 = src.entries[key]; + if (!e2) { + remove.push(key); + total++; + } + }); + + if (!total) { + return callback(null); + } + + var errored = false; + var db = src.type === 'remote' ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + + function done(err) { + if (err && !errored) { + errored = true; + return callback(err); + } + }; + + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; + + transaction.oncomplete = function(e) { + if (!errored) { + callback(null); + } + }; + + // sort paths in ascending order so directory entries are created + // before the files inside them + create.sort().forEach(function (path) { + if (dst.type === 'local') { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + + // sort paths in descending order so files are deleted before their + // parent directories + remove.sort().reverse().forEach(function(path) { + if (dst.type === 'local') { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); + }}; + + var NODEFS={isWindows:false,staticInit:function() { + NODEFS.isWindows = !!process.platform.match(/^win/); + var flags = process["binding"]("constants"); + // Node.js 4 compatibility: it has no namespaces for constants + if (flags["fs"]) { + flags = flags["fs"]; + } + NODEFS.flagsForNodeMap = { + "1024": flags["O_APPEND"], + "64": flags["O_CREAT"], + "128": flags["O_EXCL"], + "0": flags["O_RDONLY"], + "2": flags["O_RDWR"], + "4096": flags["O_SYNC"], + "512": flags["O_TRUNC"], + "1": flags["O_WRONLY"] + }; + },bufferFrom:function (arrayBuffer) { + // Node.js < 4.5 compatibility: Buffer.from does not support ArrayBuffer + // Buffer.from before 4.5 was just a method inherited from Uint8Array + // Buffer.alloc has been added with Buffer.from together, so check it instead + return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); + },mount:function (mount) { + assert(ENVIRONMENT_HAS_NODE); + return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); + },createNode:function (parent, name, mode, dev) { + if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { + throw new FS.ErrnoError(22); + } + var node = FS.createNode(parent, name, mode); + node.node_ops = NODEFS.node_ops; + node.stream_ops = NODEFS.stream_ops; + return node; + },getMode:function (path) { + var stat; + try { + stat = fs.lstatSync(path); + if (NODEFS.isWindows) { + // Node.js on Windows never represents permission bit 'x', so + // propagate read bits to execute bits + stat.mode = stat.mode | ((stat.mode & 292) >> 2); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); // syscall errnos are negated, node's are not + } + return stat.mode; + },realPath:function (node) { + var parts = []; + while (node.parent !== node) { + parts.push(node.name); + node = node.parent; + } + parts.push(node.mount.opts.root); + parts.reverse(); + return PATH.join.apply(null, parts); + },flagsForNode:function(flags) { + flags &= ~0x200000 /*O_PATH*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x800 /*O_NONBLOCK*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x8000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x80000 /*O_CLOEXEC*/; // Some applications may pass it; it makes no sense for a single process. + var newFlags = 0; + for (var k in NODEFS.flagsForNodeMap) { + if (flags & k) { + newFlags |= NODEFS.flagsForNodeMap[k]; + flags ^= k; + } + } + + if (!flags) { + return newFlags; + } else { + throw new FS.ErrnoError(22); + } + },node_ops:{getattr:function(node) { + var path = NODEFS.realPath(node); + var stat; + try { + stat = fs.lstatSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. + // See http://support.microsoft.com/kb/140365 + if (NODEFS.isWindows && !stat.blksize) { + stat.blksize = 4096; + } + if (NODEFS.isWindows && !stat.blocks) { + stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; + } + return { + dev: stat.dev, + ino: stat.ino, + mode: stat.mode, + nlink: stat.nlink, + uid: stat.uid, + gid: stat.gid, + rdev: stat.rdev, + size: stat.size, + atime: stat.atime, + mtime: stat.mtime, + ctime: stat.ctime, + blksize: stat.blksize, + blocks: stat.blocks + }; + },setattr:function(node, attr) { + var path = NODEFS.realPath(node); + try { + if (attr.mode !== undefined) { + fs.chmodSync(path, attr.mode); + // update the common node structure mode as well + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + var date = new Date(attr.timestamp); + fs.utimesSync(path, date, date); + } + if (attr.size !== undefined) { + fs.truncateSync(path, attr.size); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },lookup:function (parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + var mode = NODEFS.getMode(path); + return NODEFS.createNode(parent, name, mode); + },mknod:function (parent, name, mode, dev) { + var node = NODEFS.createNode(parent, name, mode, dev); + // create the backing node for this in the fs root as well + var path = NODEFS.realPath(node); + try { + if (FS.isDir(node.mode)) { + fs.mkdirSync(path, node.mode); + } else { + fs.writeFileSync(path, '', { mode: node.mode }); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + return node; + },rename:function (oldNode, newDir, newName) { + var oldPath = NODEFS.realPath(oldNode); + var newPath = PATH.join2(NODEFS.realPath(newDir), newName); + try { + fs.renameSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },unlink:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.unlinkSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },rmdir:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.rmdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readdir:function(node) { + var path = NODEFS.realPath(node); + try { + return fs.readdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },symlink:function(parent, newName, oldPath) { + var newPath = PATH.join2(NODEFS.realPath(parent), newName); + try { + fs.symlinkSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readlink:function(node) { + var path = NODEFS.realPath(node); + try { + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + }},stream_ops:{open:function (stream) { + var path = NODEFS.realPath(stream.node); + try { + if (FS.isFile(stream.node.mode)) { + stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags)); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },close:function (stream) { + try { + if (FS.isFile(stream.node.mode) && stream.nfd) { + fs.closeSync(stream.nfd); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },read:function (stream, buffer, offset, length, position) { + // Node.js < 6 compatibility: node errors on 0 length reads + if (length === 0) return 0; + try { + return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },write:function (stream, buffer, offset, length, position) { + try { + return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + try { + var stat = fs.fstatSync(stream.nfd); + position += stat.size; + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + } + } + + if (position < 0) { + throw new FS.ErrnoError(22); + } + + return position; + }}}; + + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + // Issue 4254: Using curr as a node name will prevent the node + // from being found in FS.nameTable when FS.open is called on + // a path which holds a child of this node, + // given that all FS functions assume node names + // are just their corresponding parts within their given path, + // rather than incremental aggregates which include their parent's + // directories. + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; + } + return parent; + } + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; + } + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function(node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function(parent, name) { + throw new FS.ErrnoError(2); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(1); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(1); + },unlink:function(parent, name) { + throw new FS.ErrnoError(1); + },rmdir:function(parent, name) { + throw new FS.ErrnoError(1); + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newName, oldPath) { + throw new FS.ErrnoError(1); + },readlink:function(node) { + throw new FS.ErrnoError(1); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(5); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + }}}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(40); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(40); + } + } + } + } + + return { path: current_path, node: current }; + },getPath:function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + },hashName:function(parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + },hashAddNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + },hashRemoveNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + },lookupNode:function(parent, name) { + var err = FS.mayLookup(parent); + if (err) { + throw new FS.ErrnoError(err, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + },createNode:function(parent, name, mode, rdev) { + if (!FS.FSNode) { + FS.FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + + FS.FSNode.prototype = {}; + + // compatibility + var readMode = 292 | 73; + var writeMode = 146; + + // NOTE we must use Object.defineProperties instead of individual calls to + // Object.defineProperty in order to make closure compiler happy + Object.defineProperties(FS.FSNode.prototype, { + read: { + get: function() { return (this.mode & readMode) === readMode; }, + set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } + }, + write: { + get: function() { return (this.mode & writeMode) === writeMode; }, + set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } + }, + isFolder: { + get: function() { return FS.isDir(this.mode); } + }, + isDevice: { + get: function() { return FS.isChrdev(this.mode); } + } + }); + } + + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + },destroyNode:function(node) { + FS.hashRemoveNode(node); + },isRoot:function(node) { + return node === node.parent; + },isMountpoint:function(node) { + return !!node.mounted; + },isFile:function(mode) { + return (mode & 61440) === 32768; + },isDir:function(mode) { + return (mode & 61440) === 16384; + },isLink:function(mode) { + return (mode & 61440) === 40960; + },isChrdev:function(mode) { + return (mode & 61440) === 8192; + },isBlkdev:function(mode) { + return (mode & 61440) === 24576; + },isFIFO:function(mode) { + return (mode & 61440) === 4096; + },isSocket:function(mode) { + return (mode & 49152) === 49152; + },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + },flagsToPermissionString:function(flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + },nodePermissions:function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 13; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 13; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 13; + } + return 0; + },mayLookup:function(dir) { + var err = FS.nodePermissions(dir, 'x'); + if (err) return err; + if (!dir.node_ops.lookup) return 13; + return 0; + },mayCreate:function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 17; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + },mayDelete:function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var err = FS.nodePermissions(dir, 'wx'); + if (err) { + return err; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 20; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 16; + } + } else { + if (FS.isDir(node.mode)) { + return 21; + } + } + return 0; + },mayOpen:function(node, flags) { + if (!node) { + return 2; + } + if (FS.isLink(node.mode)) { + return 40; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 21; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(24); + },getStream:function(fd) { + return FS.streams[fd]; + },createStream:function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function(){}; + FS.FSStream.prototype = {}; + // compatibility + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function() { return this.node; }, + set: function(val) { this.node = val; } + }, + isRead: { + get: function() { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function() { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function() { return (this.flags & 1024); } + } + }); + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + },closeStream:function(fd) { + FS.streams[fd] = null; + },chrdev_stream_ops:{open:function(stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + },llseek:function() { + throw new FS.ErrnoError(29); + }},major:function(dev) { + return ((dev) >> 8); + },minor:function(dev) { + return ((dev) & 0xff); + },makedev:function(ma, mi) { + return ((ma) << 8 | (mi)); + },registerDevice:function(dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + },getDevice:function(dev) { + return FS.devices[dev]; + },getMounts:function(mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + },syncfs:function(populate, callback) { + if (typeof(populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(err) { + assert(FS.syncFSRequests > 0); + FS.syncFSRequests--; + return callback(err); + } + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return doCallback(err); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + },mount:function(type, opts, mountpoint) { + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(16); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + },unmount:function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(22); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + assert(idx !== -1); + node.mount.mounts.splice(idx, 1); + },lookup:function(parent, name) { + return parent.node_ops.lookup(parent, name); + },mknod:function(path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(22); + } + var err = FS.mayCreate(parent, name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.mknod(parent, name, mode, dev); + },create:function(path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + },mkdir:function(path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + },mkdirTree:function(path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch(e) { + if (e.errno != 17) throw e; + } + } + },mkdev:function(path, mode, dev) { + if (typeof(dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + },symlink:function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(2); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(2); + } + var newname = PATH.basename(newpath); + var err = FS.mayCreate(parent, newname); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.symlink(parent, newname, oldpath); + },rename:function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(16); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(2); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(18); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(22); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(39); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var err = FS.mayDelete(old_dir, old_name, isdir); + if (err) { + throw new FS.ErrnoError(err); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + err = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(16); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + err = FS.nodePermissions(old_dir, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch(e) { + console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch(e) { + console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + },rmdir:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, true); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(20); + } + return node.node_ops.readdir(node); + },unlink:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, false); + if (err) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readlink:function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(2); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(22); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + },stat:function(path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(2); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(1); + } + return node.node_ops.getattr(node); + },lstat:function(path) { + return FS.stat(path, true); + },chmod:function(path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + },lchmod:function(path, mode) { + FS.chmod(path, mode, true); + },fchmod:function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chmod(stream.node, mode); + },chown:function(path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + },lchown:function(path, uid, gid) { + FS.chown(path, uid, gid, true); + },fchown:function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chown(stream.node, uid, gid); + },truncate:function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(22); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(21); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(22); + } + var err = FS.nodePermissions(node, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + },ftruncate:function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(22); + } + FS.truncate(stream.node, len); + },utime:function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + },open:function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(2); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(17); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(2); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var err = FS.mayOpen(node, flags); + if (err) { + throw new FS.ErrnoError(err); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + console.log("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch(e) { + console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); + } + return stream; + },close:function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + },isClosed:function(stream) { + return stream.fd === null; + },llseek:function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(29); + } + if (whence != 0 /* SEEK_SET */ && whence != 1 /* SEEK_CUR */ && whence != 2 /* SEEK_END */) { + throw new FS.ErrnoError(22); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + },read:function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(22); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + },write:function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(22); + } + if (stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch(e) { + console.log("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); + } + return bytesWritten; + },allocate:function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(22); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(95); + } + stream.stream_ops.allocate(stream, offset, length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(13); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(13); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(19); + } + return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function(stream) { + return 0; + },ioctl:function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(25); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + },readFile:function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + },writeFile:function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + },cwd:function() { + return FS.currentPath; + },chdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(2); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(20); + } + var err = FS.nodePermissions(lookup.node, 'x'); + if (err) { + throw new FS.ErrnoError(err); + } + FS.currentPath = lookup.path; + },createDefaultDirectories:function() { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + },createDefaultDevices:function() { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function() { return 0; }, + write: function(stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function() { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else + {} + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function() { abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function() { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(9); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + },createStandardStreams:function() { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); + assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); + assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); + },ensureErrnoError:function() { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function(errno) { + this.errno = errno; + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } + }; + this.setErrno(errno); + this.message = ERRNO_MESSAGES[errno]; + + // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack + // now ensures it shows what we want. + if (this.stack) { + // Define the stack property for Node.js 4, which otherwise errors on the next line. + Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); + this.stack = demangleAll(this.stack); + } + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [2].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + },staticInit:function() { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; + },init:function(input, output, error) { + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + },quit:function() { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + },getMode:function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + },joinPath:function(parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + },absolutePath:function(relative, base) { + return PATH_FS.resolve(base, relative); + },standardizePath:function(path) { + return PATH.normalize(path); + },findObject:function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + },analyzePath:function(path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + },createFolder:function(parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + },createPath:function(parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + },createFile:function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + },createDevice:function(parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset+i]); + } catch (e) { + throw new FS.ErrnoError(5); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + },createLink:function(parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + },forceLoadFile:function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(5); + return success; + },createLazyFile:function(parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length-1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize)|0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024*1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum+1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: function() { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + assert(size >= 0); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function(plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + },indexedDB:function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + },DB_NAME:function() { + return 'EM_FS_' + window.location.pathname; + },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + console.log('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + },loadFilesFromDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch(e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(9); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + },doStat:function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -20; + } + throw e; + } + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); + HEAP32[(((buf)+(48))>>2)]=4096; + HEAP32[(((buf)+(52))>>2)]=stat.blocks; + HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(76))>>2)]=0; + (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); + return 0; + },doMsync:function(addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function(path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function(path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -22; + } + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function(path, buf, bufsize) { + if (bufsize <= 0) return -22; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf+len]; + stringToUTF8(ret, buf, bufsize+1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf+len] = endChar; + + return len; + },doAccess:function(path, amode) { + if (amode & ~7) { + // need a valid mode + return -22; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -2; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -13; + } + return 0; + },doDup:function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + },doWritev:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + },varargs:0,get:function(varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function() { + var ret = UTF8ToString(SYSCALLS.get()); + return ret; + },getStreamFromFD:function() { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(9); + return stream; + },get64:function() { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function() { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -75; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((result)>>2)]=tempI64[0],HEAP32[(((result)+(4))>>2)]=tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall145(which, varargs) {SYSCALLS.varargs = varargs; + try { + // readv + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doReadv(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall221(which, varargs) {SYSCALLS.varargs = varargs; + try { + // fcntl64 + var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get(); + switch (cmd) { + case 0: { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -22; + } + var newStream; + newStream = FS.open(stream.path, stream.flags, 0, arg); + return newStream.fd; + } + case 1: + case 2: + return 0; // FD_CLOEXEC makes no sense for a single process. + case 3: + return stream.flags; + case 4: { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0; + } + case 12: + /* case 12: Currently in musl F_GETLK64 has same value as F_GETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ { + + var arg = SYSCALLS.get(); + var offset = 0; + // We're always unlocked. + HEAP16[(((arg)+(offset))>>1)]=2; + return 0; + } + case 13: + case 14: + /* case 13: Currently in musl F_SETLK64 has same value as F_SETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + /* case 14: Currently in musl F_SETLKW64 has same value as F_SETLKW, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + + + return 0; // Pretend that the locking is successful. + case 16: + case 8: + return -22; // These are for sockets. We don't have them fully implemented yet. + case 9: + // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves. + ___setErrNo(22); + return -1; + default: { + return -22; + } + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall5(which, varargs) {SYSCALLS.varargs = varargs; + try { + // open + var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get(); // optional TODO + var stream = FS.open(pathname, flags, mode); + return stream.fd; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21509: + case 21505: { + if (!stream.tty) return -25; + return 0; + } + case 21510: + case 21511: + case 21512: + case 21506: + case 21507: + case 21508: { + if (!stream.tty) return -25; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -25; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -25; + return -22; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + case 21523: { + // TODO: in theory we should write to the winsize struct that gets + // passed in, but for now musl doesn't read anything on it + if (!stream.tty) return -25; + return 0; + } + case 21524: { + // TODO: technically, this ioctl call should change the window size. + // but, since emscripten doesn't have any concept of a terminal window + // yet, we'll just silently throw it away as we do TIOCGWINSZ + if (!stream.tty) return -25; + return 0; + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___unlock() {} + + + function _fd_write(stream, iov, iovcnt, pnum) {try { + + stream = FS.getStream(stream); + if (!stream) throw new FS.ErrnoError(9); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + }function ___wasi_fd_write( + ) { + return _fd_write.apply(null, arguments) + } + + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.'); + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (typeof setImmediate === 'undefined') { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = 'setimmediate'; + var Browser_setImmediate_messageHandler = function(event) { + // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, + // so check for both cases. + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + addEventListener("message", Browser_setImmediate_messageHandler, true); + setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module['setImmediates'] === undefined) Module['setImmediates'] = []; + Module['setImmediates'].push(func); + postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js + } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + setImmediate(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + } + + function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + noExitRuntime = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + + Browser.mainLoop.func = func; + Browser.mainLoop.arg = arg; + + var browserIterationFunc; + if (typeof arg !== 'undefined') { + browserIterationFunc = function() { + Module['dynCall_vi'](func, arg); + }; + } else { + browserIterationFunc = function() { + Module['dynCall_v'](func); + }; + } + + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + // not counted, but move the progress along a tiny bit + next = next + 0.5; // do not steal all the next one's progress + Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; + } + } + console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); + Browser.mainLoop.updateStatus(); + + // catches pause/resume main loop from blocker execution + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + setTimeout(Browser.mainLoop.runner, 0); + return; + } + + // catch pauses from non-main loop sources + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Implement very basic swap interval control + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + // Not the scheduled time to render this frame - skip. + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + + // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize + // VBO double-buffering and reduce GPU stalls. + + + + if (Browser.mainLoop.method === 'timeout' && Module.ctx) { + err('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); + Browser.mainLoop.method = ''; // just warn once per call to set main loop + } + + Browser.mainLoop.runIter(browserIterationFunc); + + checkStackCookie(); + + // catch pauses from the main loop itself + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able + // to queue the newest produced audio samples. + // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() + // do not need to be hardcoded into this function, but can be more generic. + if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); + + Browser.mainLoop.scheduler(); + } + + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + + Browser.mainLoop.scheduler(); + } + + if (simulateInfiniteLoop) { + throw 'SimulateInfiniteLoop'; + } + }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. + },resume:function() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + },updateStatus:function() { + if (Module['setStatus']) { + var message = Module['statusMessage'] || 'Please wait...'; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); + } else { + Module['setStatus'](message); + } + } else { + Module['setStatus'](''); + } + } + },runIter:function(func) { + if (ABORT) return; + if (Module['preMainLoop']) { + var preRet = Module['preMainLoop'](); + if (preRet === false) { + return; // |return false| skips a frame + } + } + try { + func(); + } catch (e) { + if (e instanceof ExitStatus) { + return; + } else { + if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); + throw e; + } + } + if (Module['postMainLoop']) Module['postMainLoop'](); + }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function() { + if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers + + if (Browser.initted) return; + Browser.initted = true; + + try { + new Blob(); + Browser.hasBlobConstructor = true; + } catch(e) { + Browser.hasBlobConstructor = false; + console.log("warning: no blob constructor, cannot create blobs with mimetypes"); + } + Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); + Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; + if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { + console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); + Module.noImageDecoding = true; + } + + // Support for plugins that can process preloaded files. You can add more of these to + // your app by creating and appending to Module.preloadPlugins. + // + // Each plugin is asked if it can handle a file based on the file's name. If it can, + // it is given the file's raw data. When it is done, it calls a callback with the file's + // (possibly modified) data. For example, a plugin might decompress a file, or it + // might create some side data structure for use later (like an Image element, etc.). + + var imagePlugin = {}; + imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = null; + if (Browser.hasBlobConstructor) { + try { + b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + if (b.size !== byteArray.length) { // Safari bug #118630 + // Safari's Blob can only take an ArrayBuffer + b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); + } + } catch(e) { + warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); + } + } + if (!b) { + var bb = new Browser.BlobBuilder(); + bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range + b = bb.getBlob(); + } + var url = Browser.URLObject.createObjectURL(b); + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var img = new Image(); + img.onload = function img_onload() { + assert(img.complete, 'Image ' + name + ' could not be decoded'); + var canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + Module["preloadedImages"][name] = canvas; + Browser.URLObject.revokeObjectURL(url); + if (onload) onload(byteArray); + }; + img.onerror = function img_onerror(event) { + console.log('Image ' + url + ' could not be decoded'); + if (onerror) onerror(); + }; + img.src = url; + }; + Module['preloadPlugins'].push(imagePlugin); + + var audioPlugin = {}; + audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; + }; + audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + Module["preloadedAudios"][name] = audio; + if (onload) onload(byteArray); + } + function fail() { + if (done) return; + done = true; + Module["preloadedAudios"][name] = new Audio(); // empty shim + if (onerror) onerror(); + } + if (Browser.hasBlobConstructor) { + try { + var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + } catch(e) { + return fail(); + } + var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var audio = new Audio(); + audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 + audio.onerror = function audio_onerror(event) { + if (done) return; + console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); + function encode64(data) { + var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var PAD = '='; + var ret = ''; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = (leftchar << 8) | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = (leftchar >> (leftbits-6)) & 0x3f; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar&3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar&0xf) << 2]; + ret += PAD; + } + return ret; + } + audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); + finish(audio); // we don't wait for confirmation this worked - but it's worth trying + }; + audio.src = url; + // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror + Browser.safeSetTimeout(function() { + finish(audio); // try to use it even though it is not necessarily ready to play + }, 10000); + } else { + return fail(); + } + }; + Module['preloadPlugins'].push(audioPlugin); + + + // Canvas event setup + + function pointerLockChange() { + Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || + document['mozPointerLockElement'] === Module['canvas'] || + document['webkitPointerLockElement'] === Module['canvas'] || + document['msPointerLockElement'] === Module['canvas']; + } + var canvas = Module['canvas']; + if (canvas) { + // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module + // Module['forcedAspectRatio'] = 4 / 3; + + canvas.requestPointerLock = canvas['requestPointerLock'] || + canvas['mozRequestPointerLock'] || + canvas['webkitRequestPointerLock'] || + canvas['msRequestPointerLock'] || + function(){}; + canvas.exitPointerLock = document['exitPointerLock'] || + document['mozExitPointerLock'] || + document['webkitExitPointerLock'] || + document['msExitPointerLock'] || + function(){}; // no-op if function does not exist + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + + document.addEventListener('pointerlockchange', pointerLockChange, false); + document.addEventListener('mozpointerlockchange', pointerLockChange, false); + document.addEventListener('webkitpointerlockchange', pointerLockChange, false); + document.addEventListener('mspointerlockchange', pointerLockChange, false); + + if (Module['elementPointerLock']) { + canvas.addEventListener("click", function(ev) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + },createContext:function(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. + + var ctx; + var contextHandle; + if (useWebGL) { + // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: 1, + }; + + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + + // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not + // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function + // Browser.createContext() should not even be emitted. + if (typeof GL !== 'undefined') { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } + } else { + ctx = canvas.getContext('2d'); + } + + if (!ctx) return null; + + if (setInModule) { + if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); + + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); + Browser.init(); + } + return ctx; + },destroyContext:function(canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer, resizeCanvas, vrDevice) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; + + var canvas = Module['canvas']; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } else { + // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } + if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); + if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); + } + + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener('fullscreenchange', fullscreenChange, false); + document.addEventListener('mozfullscreenchange', fullscreenChange, false); + document.addEventListener('webkitfullscreenchange', fullscreenChange, false); + document.addEventListener('MSFullscreenChange', fullscreenChange, false); + } + + // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) + canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || + canvasContainer['mozRequestFullScreen'] || + canvasContainer['msRequestFullscreen'] || + (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || + (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); + + if (vrDevice) { + canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullscreen(); + } + },requestFullScreen:function(lockPointer, resizeCanvas, vrDevice) { + err('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); + Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + } + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + },exitFullscreen:function() { + // This is workaround for chrome. Trying to exit from fullscreen + // not in fullscreen state will cause "TypeError: Document not active" + // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 + if (!Browser.isFullscreen) { + return false; + } + + var CFS = document['exitFullscreen'] || + document['cancelFullScreen'] || + document['mozCancelFullScreen'] || + document['msExitFullscreen'] || + document['webkitCancelFullScreen'] || + (function() {}); + CFS.apply(document, []); + return true; + },nextRAF:0,fakeRequestAnimationFrame:function(func) { + // try to keep 60fps between calls to here + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1000/60; + } else { + while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 + Browser.nextRAF += 1000/60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + },requestAnimationFrame:function(func) { + if (typeof requestAnimationFrame === 'function') { + requestAnimationFrame(func); + return; + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func); + },safeCallback:function(func) { + return function() { + if (!ABORT) return func.apply(null, arguments); + }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function() { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } + },safeRequestAnimationFrame:function(func) { + return Browser.requestAnimationFrame(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }); + },safeSetTimeout:function(func, timeout) { + noExitRuntime = true; + return setTimeout(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }, timeout); + },safeSetInterval:function(func, timeout) { + noExitRuntime = true; + return setInterval(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in + }, timeout); + },getMimetype:function(name) { + return { + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'png': 'image/png', + 'bmp': 'image/bmp', + 'ogg': 'audio/ogg', + 'wav': 'audio/wav', + 'mp3': 'audio/mpeg' + }[name.substr(name.lastIndexOf('.')+1)]; + },getUserMedia:function(func) { + if(!window.getUserMedia) { + window.getUserMedia = navigator['getUserMedia'] || + navigator['mozGetUserMedia']; + } + window.getUserMedia(func); + },getMovementX:function(event) { + return event['movementX'] || + event['mozMovementX'] || + event['webkitMovementX'] || + 0; + },getMovementY:function(event) { + return event['movementY'] || + event['mozMovementY'] || + event['webkitMovementY'] || + 0; + },getMouseWheelDelta:function(event) { + var delta = 0; + switch (event.type) { + case 'DOMMouseScroll': + // 3 lines make up a step + delta = event.detail / 3; + break; + case 'mousewheel': + // 120 units make up a step + delta = event.wheelDelta / 120; + break; + case 'wheel': + delta = event.deltaY + switch(event.deltaMode) { + case 0: + // DOM_DELTA_PIXEL: 100 pixels make up a step + delta /= 100; + break; + case 1: + // DOM_DELTA_LINE: 3 lines make up a step + delta /= 3; + break; + case 2: + // DOM_DELTA_PAGE: A page makes up 80 steps + delta *= 80; + break; + default: + throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; + } + break; + default: + throw 'unrecognized mouse wheel event: ' + event.type; + } + return delta; + },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event) { // event should be mousemove, mousedown or mouseup + if (Browser.pointerLock) { + // When the pointer is locked, calculate the coordinates + // based on the movement of the mouse. + // Workaround for Firefox bug 764498 + if (event.type != 'mousemove' && + ('mozMovementX' in event)) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + + // check if SDL is available + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + // just add the mouse delta to the current absolut mouse position + // FIXME: ideally this should be clamped against the canvas size and zero + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + // Otherwise, calculate the movement based on the changes + // in the coordinates. + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + + // Neither .scrollX or .pageXOffset are defined in a spec, but + // we prefer .scrollX because it is currently in a spec draft. + // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) + var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); + var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); + // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset + // and we have no viable fallback. + assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.'); + + if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { + var touch = event.touch; + if (touch === undefined) { + return; // the "touch" property is only defined in SDL + + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + + var coords = { x: adjustedX, y: adjustedY }; + + if (event.type === 'touchstart') { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === 'touchend' || event.type === 'touchmove') { + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + + // the canvas might be CSS-scaled compared to its backbuffer; + // SDL-using content will want mouse coordinates in terms + // of backbuffer units. + x = x * (cw / rect.width); + y = y * (ch / rect.height); + + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + } + },asyncLoad:function(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; + readAsync(url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); + },resizeListeners:[],updateResizeListeners:function() { + var canvas = Module['canvas']; + Browser.resizeListeners.forEach(function(listener) { + listener(canvas.width, canvas.height); + }); + },setCanvasSize:function(width, height, noUpdates) { + var canvas = Module['canvas']; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags | 0x00800000; // set SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },setWindowedCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },updateCanvasDimensions:function(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { + if (w/h < Module['forcedAspectRatio']) { + w = Math.round(h * Module['forcedAspectRatio']); + } else { + h = Math.round(w / Module['forcedAspectRatio']); + } + } + if (((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != 'undefined') { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != 'undefined') { + if (w != wNative || h != hNative) { + canvas.style.setProperty( "width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } + } + },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function() { + var handle = Browser.nextWgetRequestHandle; + Browser.nextWgetRequestHandle++; + return handle; + }};var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code) { + EGL.errorCode = code; + },chooseConfig:function(display, attribList, config, config_size, numConfigs) { + if (display != 62000 /* Magic ID for Emscripten 'default display' */) { + EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); + return 0; + } + + if (attribList) { + // read attribList if it is non-null + for(;;) { + var param = HEAP32[((attribList)>>2)]; + if (param == 0x3021 /*EGL_ALPHA_SIZE*/) { + var alphaSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.alpha = (alphaSize > 0); + } else if (param == 0x3025 /*EGL_DEPTH_SIZE*/) { + var depthSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.depth = (depthSize > 0); + } else if (param == 0x3026 /*EGL_STENCIL_SIZE*/) { + var stencilSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.stencil = (stencilSize > 0); + } else if (param == 0x3031 /*EGL_SAMPLES*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples > 0); + } else if (param == 0x3032 /*EGL_SAMPLE_BUFFERS*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples == 1); + } else if (param == 0x3100 /*EGL_CONTEXT_PRIORITY_LEVEL_IMG*/) { + var requestedPriority = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.lowLatency = (requestedPriority != 0x3103 /*EGL_CONTEXT_PRIORITY_LOW_IMG*/); + } else if (param == 0x3038 /*EGL_NONE*/) { + break; + } + attribList += 8; + } + } + + if ((!config || !config_size) && !numConfigs) { + EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); + return 0; + } + if (numConfigs) { + HEAP32[((numConfigs)>>2)]=1; // Total number of supported configs: 1. + } + if (config && config_size > 0) { + HEAP32[((config)>>2)]=62002; + } + + EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); + return 1; + }};function _eglGetProcAddress(name_) { + return _emscripten_GetProcAddress(name_); + } + + + var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function() { + for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { + JSEvents._removeHandler(i); + } + JSEvents.eventHandlers = []; + JSEvents.deferredCalls = []; + },registerRemoveEventListeners:function() { + if (!JSEvents.removeEventListenersRegistered) { + __ATEXIT__.push(JSEvents.removeAllEventListeners); + JSEvents.removeEventListenersRegistered = true; + } + },deferredCalls:[],deferCall:function(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) return false; + + for(var i in arrA) { + if (arrA[i] != arrB[i]) return false; + } + return true; + } + // Test if the given call was already queued, and if so, don't add it again. + for(var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return; + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + + JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); + },removeDeferredCalls:function(targetFunction) { + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i; + } + } + },canPerformEventHandlerRequests:function() { + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; + },runDeferredCalls:function() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return; + } + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + call.targetFunction.apply(this, call.argsList); + } + },inEventHandler:0,currentEventHandler:null,eventHandlers:[],isInternetExplorer:function() { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },removeAllHandlersOnTarget:function(target, eventTypeString) { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && + (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--); + } + } + },_removeHandler:function(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1); + },registerOrRemoveHandler:function(eventHandler) { + var jsEventHandler = function jsEventHandler(event) { + // Increment nesting count for the event handler. + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + // Process any old deferred calls the user has placed. + JSEvents.runDeferredCalls(); + // Process the actual event, calls back to user C code handler. + eventHandler.handlerFunc(event); + // Process any new deferred calls that were placed right now from this event handler. + JSEvents.runDeferredCalls(); + // Out of event handler - restore nesting count. + --JSEvents.inEventHandler; + }; + + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = jsEventHandler; + eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + JSEvents.registerRemoveEventListeners(); + } else { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target + && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--); + } + } + } + },getBoundingClientRectOrZeros:function(target) { + return target.getBoundingClientRect ? target.getBoundingClientRect() : { left: 0, top: 0 }; + },pageScrollPos:function() { + if (pageXOffset > 0 || pageYOffset > 0) { + return [pageXOffset, pageYOffset]; + } + if (typeof document.documentElement.scrollLeft !== 'undefined' || typeof document.documentElement.scrollTop !== 'undefined') { + return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; + } + return [document.body.scrollLeft|0, document.body.scrollTop|0]; + },getNodeNameForTarget:function(target) { + if (!target) return ''; + if (target == window) return '#window'; + if (target == screen) return '#screen'; + return (target && target.nodeName) ? target.nodeName : ''; + },tick:function() { + if (window['performance'] && window['performance']['now']) return window['performance']['now'](); + else return Date.now(); + },fullscreenEnabled:function() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled; + }}; + + function __requestPointerLock(target) { + if (target.requestPointerLock) { + target.requestPointerLock(); + } else if (target.mozRequestPointerLock) { + target.mozRequestPointerLock(); + } else if (target.webkitRequestPointerLock) { + target.webkitRequestPointerLock(); + } else if (target.msRequestPointerLock) { + target.msRequestPointerLock(); + } else { + // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, + // or if the whole browser just doesn't support the feature. + if (document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock || document.body.msRequestPointerLock) { + return -3; + } else { + return -1; + } + } + return 0; + }function _emscripten_exit_pointerlock() { + // Make sure no queued up calls will fire after this. + JSEvents.removeDeferredCalls(__requestPointerLock); + + if (document.exitPointerLock) { + document.exitPointerLock(); + } else if (document.msExitPointerLock) { + document.msExitPointerLock(); + } else if (document.mozExitPointerLock) { + document.mozExitPointerLock(); + } else if (document.webkitExitPointerLock) { + document.webkitExitPointerLock(); + } else { + return -1; + } + return 0; + } + + + function __fillGamepadEventData(eventStruct, e) { + HEAPF64[((eventStruct)>>3)]=e.timestamp; + for(var i = 0; i < e.axes.length; ++i) { + HEAPF64[(((eventStruct+i*8)+(16))>>3)]=e.axes[i]; + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i].value; + } else { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i]; + } + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i].pressed; + } else { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i] == 1.0; + } + } + HEAP32[(((eventStruct)+(1296))>>2)]=e.connected; + HEAP32[(((eventStruct)+(1300))>>2)]=e.index; + HEAP32[(((eventStruct)+(8))>>2)]=e.axes.length; + HEAP32[(((eventStruct)+(12))>>2)]=e.buttons.length; + stringToUTF8(e.id, eventStruct + 1304, 64); + stringToUTF8(e.mapping, eventStruct + 1368, 64); + }function _emscripten_get_gamepad_status(index, gamepadState) { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + + // INVALID_PARAM is returned on a Gamepad index that never was there. + if (index < 0 || index >= JSEvents.lastGamepadState.length) return -5; + + // NO_DATA is returned on a Gamepad index that was removed. + // For previously disconnected gamepads there should be an empty slot (null/undefined/false) at the index. + // This is because gamepads must keep their original position in the array. + // For example, removing the first of two gamepads produces [null/undefined/false, gamepad]. + if (!JSEvents.lastGamepadState[index]) return -7; + + __fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); + return 0; + } + + function _emscripten_get_heap_size() { + return HEAP8.length; + } + + function _emscripten_get_num_gamepads() { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + // N.B. Do not call emscripten_get_num_gamepads() unless having first called emscripten_sample_gamepad_data(), and that has returned EMSCRIPTEN_RESULT_SUCCESS. + // Otherwise the following line will throw an exception. + return JSEvents.lastGamepadState.length; + } + + + function __fillPointerlockChangeEventData(eventStruct, e) { + var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; + var isPointerlocked = !!pointerLockElement; + HEAP32[((eventStruct)>>2)]=isPointerlocked; + var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); + var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; + stringToUTF8(nodeName, eventStruct + 4, 128); + stringToUTF8(id, eventStruct + 132, 128); + }function _emscripten_get_pointerlock_status(pointerlockStatus) { + if (pointerlockStatus) __fillPointerlockChangeEventData(pointerlockStatus); + if (!document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { + return -1; + } + return 0; + } + + + var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function() { + GL.miniTempBuffer = new Float32Array(GL.MINI_TEMP_BUFFER_SIZE); + for (var i = 0; i < GL.MINI_TEMP_BUFFER_SIZE; i++) { + GL.miniTempBufferViews[i] = GL.miniTempBuffer.subarray(0, i+1); + } + },recordError:function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode; + } + },getNewId:function(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null; + } + return ret; + },MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader, count, string, length) { + var source = ''; + for (var i = 0; i < count; ++i) { + var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; + source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); + } + return source; + },createContext:function(canvas, webGLContextAttributes) { + + + + + var ctx = + (canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes)); + + + if (!ctx) return 0; + + var handle = GL.registerContext(ctx, webGLContextAttributes); + + + + return handle; + },registerContext:function(ctx, webGLContextAttributes) { + var handle = _malloc(8); // Make space on the heap to store GL context attributes that need to be accessible as shared between threads. + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + + + + // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. + if (ctx.canvas) ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { + GL.initExtensions(context); + } + + + + + return handle; + },makeContextCurrent:function(contextHandle) { + + GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. + Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. + return !(contextHandle && !GLctx); + },getContext:function(contextHandle) { + return GL.contexts[contextHandle]; + },deleteContext:function(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; + if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. + _free(GL.contexts[contextHandle]); + GL.contexts[contextHandle] = null; + },acquireInstancedArraysExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 26 and Google Chrome 30 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('ANGLE_instanced_arrays'); + if (ext) { + ctx['vertexAttribDivisor'] = function(index, divisor) { ext['vertexAttribDivisorANGLE'](index, divisor); }; + ctx['drawArraysInstanced'] = function(mode, first, count, primcount) { ext['drawArraysInstancedANGLE'](mode, first, count, primcount); }; + ctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { ext['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; + } + },acquireVertexArrayObjectExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 25 and WebKit 536.28/desktop Safari 6.0.3 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('OES_vertex_array_object'); + if (ext) { + ctx['createVertexArray'] = function() { return ext['createVertexArrayOES'](); }; + ctx['deleteVertexArray'] = function(vao) { ext['deleteVertexArrayOES'](vao); }; + ctx['bindVertexArray'] = function(vao) { ext['bindVertexArrayOES'](vao); }; + ctx['isVertexArray'] = function(vao) { return ext['isVertexArrayOES'](vao); }; + } + },acquireDrawBuffersExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 28 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('WEBGL_draw_buffers'); + if (ext) { + ctx['drawBuffers'] = function(n, bufs) { ext['drawBuffersWEBGL'](n, bufs); }; + } + },initExtensions:function(context) { + // If this function is called without a specific context object, init the extensions of the currently active context. + if (!context) context = GL.currentContext; + + if (context.initExtensionsDone) return; + context.initExtensionsDone = true; + + var GLctx = context.GLctx; + + // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. + + if (context.version < 2) { + GL.acquireInstancedArraysExtension(GLctx); + GL.acquireVertexArrayObjectExtension(GLctx); + GL.acquireDrawBuffersExtension(GLctx); + } + + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); + + // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and + // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. + // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions + // here, as long as they don't produce a performance impact for users that might not be using those extensions. + // E.g. debugging-related extensions should probably be off by default. + var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): + "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", + "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", + "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", + "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", + "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", + // Community approved WebGL extensions ordered by number: + "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", + "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", + "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", + "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2"]; + + function shouldEnableAutomatically(extension) { + var ret = false; + automaticallyEnabledExtensions.forEach(function(include) { + if (extension.indexOf(include) != -1) { + ret = true; + } + }); + return ret; + } + + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts.forEach(function(ext) { + if (automaticallyEnabledExtensions.indexOf(ext) != -1) { + GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. + } + }); + },populateUniformTable:function(program) { + var p = GL.programs[program]; + var ptable = GL.programInfos[program] = { + uniforms: {}, + maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. + maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. + maxUniformBlockNameLength: -1 // Lazily computed as well + }; + + var utable = ptable.uniforms; + // A program's uniform table maps the string name of an uniform to an integer location of that uniform. + // The global GL.uniforms map maps integer locations to WebGLUniformLocations. + var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); + for (var i = 0; i < numUniforms; ++i) { + var u = GLctx.getActiveUniform(p, i); + + var name = u.name; + ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); + + // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", + // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. + if (name.slice(-1) == ']') { + name = name.slice(0, name.lastIndexOf('[')); + } + + // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then + // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. + // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. + var loc = GLctx.getUniformLocation(p, name); + if (loc) { + var id = GL.getNewId(GL.uniforms); + utable[name] = [u.size, id]; + GL.uniforms[id] = loc; + + for (var j = 1; j < u.size; ++j) { + var n = name + '['+j+']'; + loc = GLctx.getUniformLocation(p, n); + id = GL.getNewId(GL.uniforms); + + GL.uniforms[id] = loc; + } + } + } + }};function _emscripten_glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _emscripten_glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glBeginQueryEXT(target, id) { + GLctx.disjointTimerQueryExt['beginQueryEXT'](target, GL.timerQueriesEXT[id]); + } + + function _emscripten_glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _emscripten_glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _emscripten_glBindFramebuffer(target, framebuffer) { + + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); + + } + + function _emscripten_glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _emscripten_glBindVertexArrayOES(vao) { + GLctx['bindVertexArray'](GL.vaos[vao]); + } + + function _emscripten_glBlendColor(x0, x1, x2, x3) { GLctx['blendColor'](x0, x1, x2, x3) } + + function _emscripten_glBlendEquation(x0) { GLctx['blendEquation'](x0) } + + function _emscripten_glBlendEquationSeparate(x0, x1) { GLctx['blendEquationSeparate'](x0, x1) } + + function _emscripten_glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _emscripten_glBlendFuncSeparate(x0, x1, x2, x3) { GLctx['blendFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _emscripten_glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _emscripten_glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } + + function _emscripten_glClear(x0) { GLctx['clear'](x0) } + + function _emscripten_glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _emscripten_glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _emscripten_glClearStencil(x0) { GLctx['clearStencil'](x0) } + + function _emscripten_glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha); + } + + function _emscripten_glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _emscripten_glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexSubImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _emscripten_glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _emscripten_glCullFace(x0) { GLctx['cullFace'](x0) } + + function _emscripten_glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _emscripten_glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[(((framebuffers)+(i*4))>>2)]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } + } + + function _emscripten_glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _emscripten_glDeleteQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((ids)+(i*4))>>2)]; + var query = GL.timerQueriesEXT[id]; + if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." + GLctx.disjointTimerQueryExt['deleteQueryEXT'](query); + GL.timerQueriesEXT[id] = null; + } + } + + function _emscripten_glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } + } + + function _emscripten_glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _emscripten_glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _emscripten_glDeleteVertexArraysOES(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((vaos)+(i*4))>>2)]; + GLctx['deleteVertexArray'](GL.vaos[id]); + GL.vaos[id] = null; + } + } + + function _emscripten_glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _emscripten_glDepthMask(flag) { + GLctx.depthMask(!!flag); + } + + function _emscripten_glDepthRangef(x0, x1) { GLctx['depthRange'](x0, x1) } + + function _emscripten_glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glDisable(x0) { GLctx['disable'](x0) } + + function _emscripten_glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _emscripten_glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _emscripten_glDrawArraysInstancedANGLE(mode, first, count, primcount) { + GLctx['drawArraysInstanced'](mode, first, count, primcount); + } + + + var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n, bufs) { + + var bufArray = __tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; + } + + GLctx['drawBuffers'](bufArray); + } + + function _emscripten_glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _emscripten_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount) { + GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); + } + + function _emscripten_glEnable(x0) { GLctx['enable'](x0) } + + function _emscripten_glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _emscripten_glEndQueryEXT(target) { + GLctx.disjointTimerQueryExt['endQueryEXT'](target); + } + + function _emscripten_glFinish() { GLctx['finish']() } + + function _emscripten_glFlush() { GLctx['flush']() } + + function _emscripten_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, + GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, + GL.textures[texture], level); + } + + function _emscripten_glFrontFace(x0) { GLctx['frontFace'](x0) } + + + function __glGenObject(n, buffers, createFunction, objectTable + ) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer; + } else { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + } + HEAP32[(((buffers)+(i*4))>>2)]=id; + } + }function _emscripten_glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _emscripten_glGenFramebuffers(n, ids) { + __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers + ); + } + + function _emscripten_glGenQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var query = GLctx.disjointTimerQueryExt['createQueryEXT'](); + if (!query) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + while(i < n) HEAP32[(((ids)+(i++*4))>>2)]=0; + return; + } + var id = GL.getNewId(GL.timerQueriesEXT); + query.name = id; + GL.timerQueriesEXT[id] = query; + HEAP32[(((ids)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers + ); + } + + function _emscripten_glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _emscripten_glGenVertexArraysOES(n, arrays) { + __glGenObject(n, arrays, 'createVertexArray', GL.vaos + ); + } + + function _emscripten_glGenerateMipmap(x0) { GLctx['generateMipmap'](x0) } + + function _emscripten_glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveAttrib(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size and type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetActiveUniform(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveUniform(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size, type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetAttachedShaders(program, maxCount, count, shaders) { + var result = GLctx.getAttachedShaders(GL.programs[program]); + var len = result.length; + if (len > maxCount) { + len = maxCount; + } + HEAP32[((count)>>2)]=len; + for (var i = 0; i < len; ++i) { + var id = GL.shaders.indexOf(result[i]); + HEAP32[(((shaders)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + + function emscriptenWebGLGet(name_, p, type) { + // Guard against user passing a null pointer. + // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. + // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but + // better to report an error instead of doing anything random. + if (!p) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var ret = undefined; + switch(name_) { // Handle a few trivial GLES values + case 0x8DFA: // GL_SHADER_COMPILER + ret = 1; + break; + case 0x8DF8: // GL_SHADER_BINARY_FORMATS + if (type != 0 && type != 1) { + GL.recordError(0x0500); // GL_INVALID_ENUM + } + return; // Do not write anything to the out pointer, since no binary formats are supported. + case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS + ret = 0; + break; + case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS + // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), + // so implement it ourselves to allow C++ GLES2 code get the length. + var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); + ret = formats ? formats.length : 0; + break; + } + + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (typeof(result)) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + case "object": + if (result === null) { + // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise + // can mean an invalid name_, which we need to report as an error + switch(name_) { + case 0x8894: // ARRAY_BUFFER_BINDING + case 0x8B8D: // CURRENT_PROGRAM + case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING + case 0x8CA6: // FRAMEBUFFER_BINDING + case 0x8CA7: // RENDERBUFFER_BINDING + case 0x8069: // TEXTURE_BINDING_2D + case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES + case 0x8514: { // TEXTURE_BINDING_CUBE_MAP + ret = 0; + break; + } + default: { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + } + } else if (result instanceof Float32Array || + result instanceof Uint32Array || + result instanceof Int32Array || + result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: HEAP32[(((p)+(i*4))>>2)]=result[i]; break; + case 2: HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; + case 4: HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; + } + } + return; + } else { + try { + ret = result.name | 0; + } catch(e) { + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); + return; + } + } + break; + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Native code calling glGet' + type + 'v(' + name_ + ') and it returns ' + result + ' of type ' + typeof(result) + '!'); + return; + } + } + + switch (type) { + case 1: (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((p)>>2)]=tempI64[0],HEAP32[(((p)+(4))>>2)]=tempI64[1]); break; + case 0: HEAP32[((p)>>2)]=ret; break; + case 2: HEAPF32[((p)>>2)]=ret; break; + case 4: HEAP8[((p)>>0)]=ret ? 1 : 0; break; + } + }function _emscripten_glGetBooleanv(name_, p) { + emscriptenWebGLGet(name_, p, 4); + } + + function _emscripten_glGetBufferParameteriv(target, value, data) { + if (!data) { + // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense + // if data == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((data)>>2)]=GLctx.getBufferParameter(target, value); + } + + function _emscripten_glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0/*GL_NO_ERROR*/; + return error; + } + + function _emscripten_glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _emscripten_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || + result instanceof WebGLTexture) { + result = result.name | 0; + } + HEAP32[((params)>>2)]=result; + } + + function _emscripten_glGetIntegerv(name_, p) { + emscriptenWebGLGet(name_, p, 0); + } + + function _emscripten_glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _emscripten_glGetQueryObjecti64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryObjectui64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectuivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryivEXT(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.disjointTimerQueryExt['getQueryEXT'](target, pname); + } + + function _emscripten_glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getRenderbufferParameter(target, pname); + } + + function _emscripten_glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[((range)>>2)]=result.rangeMin; + HEAP32[(((range)+(4))>>2)]=result.rangeMax; + HEAP32[((precision)>>2)]=result.precision; + } + + function _emscripten_glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) return; // If an error occurs, nothing will be written to length or source. + var numBytesWrittenExclNull = (bufSize > 0 && source) ? stringToUTF8(result, source, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + + function stringToNewUTF8(jsString) { + var length = lengthBytesUTF8(jsString)+1; + var cString = _malloc(length); + stringToUTF8(jsString, cString, length); + return cString; + }function _emscripten_glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _emscripten_glGetTexParameterfv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAPF32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetTexParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + + function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getUniform(GL.programs[program], GL.uniforms[location]); + if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetUniformfv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 2); + } + + function _emscripten_glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0); + } + + function _emscripten_glGetVertexAttribPointerv(index, pname, pointer) { + if (!pointer) { + // GLES2 specification does not specify how to behave if pointer is a null pointer. Since calling this function does not make sense + // if pointer == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((pointer)>>2)]=GLctx.getVertexAttribOffset(index, pname); + } + + + function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 0x889F/*VERTEX_ATTRIB_ARRAY_BUFFER_BINDING*/) { + HEAP32[((params)>>2)]=data["name"]; + } else if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + case 5: HEAP32[((params)>>2)]=Math.fround(data); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + case 5: HEAP32[(((params)+(i*4))>>2)]=Math.fround(data[i]); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetVertexAttribfv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 2); + } + + function _emscripten_glGetVertexAttribiv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 5); + } + + function _emscripten_glHint(x0, x1) { GLctx['hint'](x0, x1) } + + function _emscripten_glIsBuffer(buffer) { + var b = GL.buffers[buffer]; + if (!b) return 0; + return GLctx.isBuffer(b); + } + + function _emscripten_glIsEnabled(x0) { return GLctx['isEnabled'](x0) } + + function _emscripten_glIsFramebuffer(framebuffer) { + var fb = GL.framebuffers[framebuffer]; + if (!fb) return 0; + return GLctx.isFramebuffer(fb); + } + + function _emscripten_glIsProgram(program) { + program = GL.programs[program]; + if (!program) return 0; + return GLctx.isProgram(program); + } + + function _emscripten_glIsQueryEXT(id) { + var query = GL.timerQueriesEXT[id]; + if (!query) return 0; + return GLctx.disjointTimerQueryExt['isQueryEXT'](query); + } + + function _emscripten_glIsRenderbuffer(renderbuffer) { + var rb = GL.renderbuffers[renderbuffer]; + if (!rb) return 0; + return GLctx.isRenderbuffer(rb); + } + + function _emscripten_glIsShader(shader) { + var s = GL.shaders[shader]; + if (!s) return 0; + return GLctx.isShader(s); + } + + function _emscripten_glIsTexture(id) { + var texture = GL.textures[id]; + if (!texture) return 0; + return GLctx.isTexture(texture); + } + + function _emscripten_glIsVertexArrayOES(array) { + + var vao = GL.vaos[array]; + if (!vao) return 0; + return GLctx['isVertexArray'](vao); + } + + function _emscripten_glLineWidth(x0) { GLctx['lineWidth'](x0) } + + function _emscripten_glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _emscripten_glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _emscripten_glPolygonOffset(x0, x1) { GLctx['polygonOffset'](x0, x1) } + + function _emscripten_glQueryCounterEXT(id, target) { + GLctx.disjointTimerQueryExt['queryCounterEXT'](GL.timerQueriesEXT[id], target); + } + + + + function __computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return (x + y - 1) & -y; + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize; + } + + var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4}; + + var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var sizePerPixel = __colorChannelsInGlTextureFormat[format] * __sizeOfGlTextureElementType[type]; + if (!sizePerPixel) { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + var bytes = __computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + var end = pixels + bytes; + switch(type) { + case 0x1401 /* GL_UNSIGNED_BYTE */: + return HEAPU8.subarray(pixels, end); + case 0x1406 /* GL_FLOAT */: + return HEAPF32.subarray(pixels>>2, end>>2); + case 0x1405 /* GL_UNSIGNED_INT */: + case 0x84FA /* GL_UNSIGNED_INT_24_8_WEBGL/GL_UNSIGNED_INT_24_8 */: + return HEAPU32.subarray(pixels>>2, end>>2); + case 0x1403 /* GL_UNSIGNED_SHORT */: + case 0x8363 /* GL_UNSIGNED_SHORT_5_6_5 */: + case 0x8033 /* GL_UNSIGNED_SHORT_4_4_4_4 */: + case 0x8034 /* GL_UNSIGNED_SHORT_5_5_5_1 */: + case 0x8D61 /* GL_HALF_FLOAT_OES */: + return HEAPU16.subarray(pixels>>1, end>>1); + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + } + }function _emscripten_glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _emscripten_glReleaseShaderCompiler() { + // NOP (as allowed by GLES 2.0 spec) + } + + function _emscripten_glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } + + function _emscripten_glSampleCoverage(value, invert) { + GLctx.sampleCoverage(value, !!invert); + } + + function _emscripten_glScissor(x0, x1, x2, x3) { GLctx['scissor'](x0, x1, x2, x3) } + + function _emscripten_glShaderBinary() { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + + function _emscripten_glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _emscripten_glStencilFunc(x0, x1, x2) { GLctx['stencilFunc'](x0, x1, x2) } + + function _emscripten_glStencilFuncSeparate(x0, x1, x2, x3) { GLctx['stencilFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glStencilMask(x0) { GLctx['stencilMask'](x0) } + + function _emscripten_glStencilMaskSeparate(x0, x1) { GLctx['stencilMaskSeparate'](x0, x1) } + + function _emscripten_glStencilOp(x0, x1, x2) { GLctx['stencilOp'](x0, x1, x2) } + + function _emscripten_glStencilOpSeparate(x0, x1, x2, x3) { GLctx['stencilOpSeparate'](x0, x1, x2, x3) } + + function _emscripten_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _emscripten_glTexParameterf(x0, x1, x2) { GLctx['texParameterf'](x0, x1, x2) } + + function _emscripten_glTexParameterfv(target, pname, params) { + var param = HEAPF32[((params)>>2)]; + GLctx.texParameterf(target, pname, param); + } + + function _emscripten_glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _emscripten_glTexParameteriv(target, pname, params) { + var param = HEAP32[((params)>>2)]; + GLctx.texParameteri(target, pname, param); + } + + function _emscripten_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + var pixelData = null; + if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); + } + + function _emscripten_glUniform1f(location, v0) { + GLctx.uniform1f(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1fv(location, count, value) { + + + if (count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[count-1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*4)>>2); + } + GLctx.uniform1fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1iv(location, count, value) { + + + GLctx.uniform1iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*4)>>2)); + } + + function _emscripten_glUniform2f(location, v0, v1) { + GLctx.uniform2f(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2fv(location, count, value) { + + + if (2*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[2*count-1]; + for (var i = 0; i < 2*count; i += 2) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*8)>>2); + } + GLctx.uniform2fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform2i(location, v0, v1) { + GLctx.uniform2i(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2iv(location, count, value) { + + + GLctx.uniform2iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*8)>>2)); + } + + function _emscripten_glUniform3f(location, v0, v1, v2) { + GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3fv(location, count, value) { + + + if (3*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[3*count-1]; + for (var i = 0; i < 3*count; i += 3) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*12)>>2); + } + GLctx.uniform3fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform3i(location, v0, v1, v2) { + GLctx.uniform3i(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3iv(location, count, value) { + + + GLctx.uniform3iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*12)>>2)); + } + + function _emscripten_glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4fv(location, count, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniform4fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform4i(location, v0, v1, v2, v3) { + GLctx.uniform4i(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4iv(location, count, value) { + + + GLctx.uniform4iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*16)>>2)); + } + + function _emscripten_glUniformMatrix2fv(location, count, transpose, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix3fv(location, count, transpose, value) { + + + if (9*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[9*count-1]; + for (var i = 0; i < 9*count; i += 9) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*36)>>2); + } + GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _emscripten_glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]); + } + + function _emscripten_glVertexAttrib1f(x0, x1) { GLctx['vertexAttrib1f'](x0, x1) } + + function _emscripten_glVertexAttrib1fv(index, v) { + + GLctx.vertexAttrib1f(index, HEAPF32[v>>2]); + } + + function _emscripten_glVertexAttrib2f(x0, x1, x2) { GLctx['vertexAttrib2f'](x0, x1, x2) } + + function _emscripten_glVertexAttrib2fv(index, v) { + + GLctx.vertexAttrib2f(index, HEAPF32[v>>2], HEAPF32[v+4>>2]); + } + + function _emscripten_glVertexAttrib3f(x0, x1, x2, x3) { GLctx['vertexAttrib3f'](x0, x1, x2, x3) } + + function _emscripten_glVertexAttrib3fv(index, v) { + + GLctx.vertexAttrib3f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2]); + } + + function _emscripten_glVertexAttrib4f(x0, x1, x2, x3, x4) { GLctx['vertexAttrib4f'](x0, x1, x2, x3, x4) } + + function _emscripten_glVertexAttrib4fv(index, v) { + + GLctx.vertexAttrib4f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2], HEAPF32[v+12>>2]); + } + + function _emscripten_glVertexAttribDivisorANGLE(index, divisor) { + GLctx['vertexAttribDivisor'](index, divisor); + } + + function _emscripten_glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _emscripten_glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + + var __specialEventTargets=[0, typeof document !== 'undefined' ? document : 0, typeof window !== 'undefined' ? window : 0];function __findEventTarget(target) { + warnOnce('Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.'); + try { + // The sensible "default" target varies between events, but use window as the default + // since DOM events mostly can default to that. Specific callback registrations + // override their own defaults. + if (!target) return window; + if (typeof target === "number") target = __specialEventTargets[target] || UTF8ToString(target); + if (target === '#window') return window; + else if (target === '#document') return document; + else if (target === '#screen') return screen; + else if (target === '#canvas') return Module['canvas']; + return (typeof target === 'string') ? document.getElementById(target) : target; + } catch(e) { + // In Web Workers, some objects above, such as '#document' do not exist. Gracefully + // return null for them. + return null; + } + }function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { + if (!target) target = '#canvas'; + target = __findEventTarget(target); + if (!target) return -4; + if (!target.requestPointerLock && !target.mozRequestPointerLock && !target.webkitRequestPointerLock && !target.msRequestPointerLock) { + return -1; + } + + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + + // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. + if (!canPerformRequests) { + if (deferUntilInEventHandler) { + JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); + return 1; + } else { + return -2; + } + } + + return __requestPointerLock(target); + } + + function _emscripten_run_script(ptr) { + eval(UTF8ToString(ptr)); + } + + function _emscripten_sample_gamepad_data() { + return (JSEvents.lastGamepadState = (navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null))) + ? 0 : -1; + } + + + + function __fillMouseEventData(eventStruct, e, target) { + HEAPF64[((eventStruct)>>3)]=JSEvents.tick(); + HEAP32[(((eventStruct)+(8))>>2)]=e.screenX; + HEAP32[(((eventStruct)+(12))>>2)]=e.screenY; + HEAP32[(((eventStruct)+(16))>>2)]=e.clientX; + HEAP32[(((eventStruct)+(20))>>2)]=e.clientY; + HEAP32[(((eventStruct)+(24))>>2)]=e.ctrlKey; + HEAP32[(((eventStruct)+(28))>>2)]=e.shiftKey; + HEAP32[(((eventStruct)+(32))>>2)]=e.altKey; + HEAP32[(((eventStruct)+(36))>>2)]=e.metaKey; + HEAP16[(((eventStruct)+(40))>>1)]=e.button; + HEAP16[(((eventStruct)+(42))>>1)]=e.buttons; + HEAP32[(((eventStruct)+(44))>>2)]=e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX); + HEAP32[(((eventStruct)+(48))>>2)]=e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY); + + if (Module['canvas']) { + var rect = Module['canvas'].getBoundingClientRect(); + HEAP32[(((eventStruct)+(60))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(64))>>2)]=e.clientY - rect.top; + } else { // Canvas is not initialized, return 0. + HEAP32[(((eventStruct)+(60))>>2)]=0; + HEAP32[(((eventStruct)+(64))>>2)]=0; + } + if (target) { + var rect = JSEvents.getBoundingClientRectOrZeros(target); + HEAP32[(((eventStruct)+(52))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(56))>>2)]=e.clientY - rect.top; + } else { // No specific target passed, return 0. + HEAP32[(((eventStruct)+(52))>>2)]=0; + HEAP32[(((eventStruct)+(56))>>2)]=0; + } + // wheel and mousewheel events contain wrong screenX/screenY on chrome/opera + // https://github.com/emscripten-core/emscripten/pull/4997 + // https://bugs.chromium.org/p/chromium/issues/detail?id=699956 + if (e.type !== 'wheel' && e.type !== 'mousewheel') { + JSEvents.previousScreenX = e.screenX; + JSEvents.previousScreenY = e.screenY; + } + }function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 72 ); + target = __findEventTarget(target); + + var mouseEventHandlerFunc = function(ev) { + var e = ev || event; + + // TODO: Make this access thread safe, or this could update live while app is reading it. + __fillMouseEventData(JSEvents.mouseEvent, e, target); + + if (dynCall_iiii(callbackfunc, eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: mouseEventHandlerFunc, + useCapture: useCapture + }; + // In IE, mousedown events don't either allow deferred calls to be run! + if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_click_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 4, "click", targetThread); + return 0; + } + + + + function __fillFullscreenChangeEventData(eventStruct, e) { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + var isFullscreen = !!fullscreenElement; + HEAP32[((eventStruct)>>2)]=isFullscreen; + HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); + // If transitioning to fullscreen, report info about the element that is now fullscreen. + // If transitioning to windowed mode, report info about the element that just was fullscreen. + var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; + var nodeName = JSEvents.getNodeNameForTarget(reportedElement); + var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; + stringToUTF8(nodeName, eventStruct + 8, 128); + stringToUTF8(id, eventStruct + 136, 128); + HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; + HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; + HEAP32[(((eventStruct)+(272))>>2)]=screen.width; + HEAP32[(((eventStruct)+(276))>>2)]=screen.height; + if (isFullscreen) { + JSEvents.previousFullscreenElement = fullscreenElement; + } + }function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); + + var fullscreenChangeEventhandlerFunc = function(ev) { + var e = ev || event; + + var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; + + __fillFullscreenChangeEventData(fullscreenChangeEvent, e); + + if (dynCall_iiii(callbackfunc, eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: false, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: fullscreenChangeEventhandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (!JSEvents.fullscreenEnabled()) return -1; + target = target ? __findEventTarget(target) : __specialEventTargets[1]; + if (!target) return -4; + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "msfullscreenchange", targetThread); + return 0; + } + + + function __registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.gamepadEvent) JSEvents.gamepadEvent = _malloc( 1432 ); + + var gamepadEventHandlerFunc = function(ev) { + var e = ev || event; + + var gamepadEvent = JSEvents.gamepadEvent; + __fillGamepadEventData(gamepadEvent, e["gamepad"]); + + if (dynCall_iiii(callbackfunc, eventTypeId, gamepadEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: gamepadEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread); + return 0; + } + + function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread); + return 0; + } + + + function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); + + var keyEventHandlerFunc = function(ev) { + var e = ev || event; + + var keyEventData = JSEvents.keyEvent; + stringToUTF8(e.key ? e.key : "", keyEventData + 0, 32); + stringToUTF8(e.code ? e.code : "", keyEventData + 32, 32); + HEAP32[(((keyEventData)+(64))>>2)]=e.location; + HEAP32[(((keyEventData)+(68))>>2)]=e.ctrlKey; + HEAP32[(((keyEventData)+(72))>>2)]=e.shiftKey; + HEAP32[(((keyEventData)+(76))>>2)]=e.altKey; + HEAP32[(((keyEventData)+(80))>>2)]=e.metaKey; + HEAP32[(((keyEventData)+(84))>>2)]=e.repeat; + stringToUTF8(e.locale ? e.locale : "", keyEventData + 88, 32); + stringToUTF8(e.char ? e.char : "", keyEventData + 120, 32); + HEAP32[(((keyEventData)+(152))>>2)]=e.charCode; + HEAP32[(((keyEventData)+(156))>>2)]=e.keyCode; + HEAP32[(((keyEventData)+(160))>>2)]=e.which; + + if (dynCall_iiii(callbackfunc, eventTypeId, keyEventData, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do. + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: keyEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); + return 0; + } + + + + function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); + + target = __findEventTarget(target); + + var touchEventHandlerFunc = function(ev) { + var e = ev || event; + + var touches = {}; + for(var i = 0; i < e.touches.length; ++i) { + var touch = e.touches[i]; + touch.changed = false; + touches[touch.identifier] = touch; + } + for(var i = 0; i < e.changedTouches.length; ++i) { + var touch = e.changedTouches[i]; + touches[touch.identifier] = touch; + touch.changed = true; + } + for(var i = 0; i < e.targetTouches.length; ++i) { + var touch = e.targetTouches[i]; + touches[touch.identifier].onTarget = true; + } + + var touchEvent = JSEvents.touchEvent; + var ptr = touchEvent; + HEAP32[(((ptr)+(4))>>2)]=e.ctrlKey; + HEAP32[(((ptr)+(8))>>2)]=e.shiftKey; + HEAP32[(((ptr)+(12))>>2)]=e.altKey; + HEAP32[(((ptr)+(16))>>2)]=e.metaKey; + ptr += 20; // Advance to the start of the touch array. + var canvasRect = Module['canvas'] ? Module['canvas'].getBoundingClientRect() : undefined; + var targetRect = JSEvents.getBoundingClientRectOrZeros(target); + var numTouches = 0; + for(var i in touches) { + var t = touches[i]; + HEAP32[((ptr)>>2)]=t.identifier; + HEAP32[(((ptr)+(4))>>2)]=t.screenX; + HEAP32[(((ptr)+(8))>>2)]=t.screenY; + HEAP32[(((ptr)+(12))>>2)]=t.clientX; + HEAP32[(((ptr)+(16))>>2)]=t.clientY; + HEAP32[(((ptr)+(20))>>2)]=t.pageX; + HEAP32[(((ptr)+(24))>>2)]=t.pageY; + HEAP32[(((ptr)+(28))>>2)]=t.changed; + HEAP32[(((ptr)+(32))>>2)]=t.onTarget; + if (canvasRect) { + HEAP32[(((ptr)+(44))>>2)]=t.clientX - canvasRect.left; + HEAP32[(((ptr)+(48))>>2)]=t.clientY - canvasRect.top; + } else { + HEAP32[(((ptr)+(44))>>2)]=0; + HEAP32[(((ptr)+(48))>>2)]=0; + } + HEAP32[(((ptr)+(36))>>2)]=t.clientX - targetRect.left; + HEAP32[(((ptr)+(40))>>2)]=t.clientY - targetRect.top; + + ptr += 52; + + if (++numTouches >= 32) { + break; + } + } + HEAP32[((touchEvent)>>2)]=numTouches; + + if (dynCall_iiii(callbackfunc, eventTypeId, touchEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: touchEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); + return 0; + } + + function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); + return 0; + } + + function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); + return 0; + } + + function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); + return 0; + } + + function _exit(status) { + // void _exit(int status); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html + exit(status); + } + + function _glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _glClear(x0) { GLctx['clear'](x0) } + + function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _glCullFace(x0) { GLctx['cullFace'](x0) } + + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glDisable(x0) { GLctx['disable'](x0) } + + function _glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _glEnable(x0) { GLctx['enable'](x0) } + + function _glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _glFrontFace(x0) { GLctx['frontFace'](x0) } + + function _glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + function _glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + function _glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + function _glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + var GLFW={Window:function(id, width, height, title, monitor, share) { + this.id = id; + this.x = 0; + this.y = 0; + this.fullscreen = false; // Used to determine if app in fullscreen mode + this.storedX = 0; // Used to store X before fullscreen + this.storedY = 0; // Used to store Y before fullscreen + this.width = width; + this.height = height; + this.storedWidth = width; // Used to store width before fullscreen + this.storedHeight = height; // Used to store height before fullscreen + this.title = title; + this.monitor = monitor; + this.share = share; + this.attributes = GLFW.hints; + this.inputModes = { + 0x00033001:0x00034001, // GLFW_CURSOR (GLFW_CURSOR_NORMAL) + 0x00033002:0, // GLFW_STICKY_KEYS + 0x00033003:0, // GLFW_STICKY_MOUSE_BUTTONS + }; + this.buttons = 0; + this.keys = new Array(); + this.domKeys = new Array(); + this.shouldClose = 0; + this.title = null; + this.windowPosFunc = null; // GLFWwindowposfun + this.windowSizeFunc = null; // GLFWwindowsizefun + this.windowCloseFunc = null; // GLFWwindowclosefun + this.windowRefreshFunc = null; // GLFWwindowrefreshfun + this.windowFocusFunc = null; // GLFWwindowfocusfun + this.windowIconifyFunc = null; // GLFWwindowiconifyfun + this.framebufferSizeFunc = null; // GLFWframebuffersizefun + this.mouseButtonFunc = null; // GLFWmousebuttonfun + this.cursorPosFunc = null; // GLFWcursorposfun + this.cursorEnterFunc = null; // GLFWcursorenterfun + this.scrollFunc = null; // GLFWscrollfun + this.dropFunc = null; // GLFWdropfun + this.keyFunc = null; // GLFWkeyfun + this.charFunc = null; // GLFWcharfun + this.userptr = null; + },WindowFromId:function(id) { + if (id <= 0 || !GLFW.windows) return null; + return GLFW.windows[id - 1]; + },joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode) { + switch (keycode) { + // these keycodes are only defined for GLFW3, assume they are the same for GLFW2 + case 0x20:return 32; // DOM_VK_SPACE -> GLFW_KEY_SPACE + case 0xDE:return 39; // DOM_VK_QUOTE -> GLFW_KEY_APOSTROPHE + case 0xBC:return 44; // DOM_VK_COMMA -> GLFW_KEY_COMMA + case 0xAD:return 45; // DOM_VK_HYPHEN_MINUS -> GLFW_KEY_MINUS + case 0xBD:return 45; // DOM_VK_MINUS -> GLFW_KEY_MINUS + case 0xBE:return 46; // DOM_VK_PERIOD -> GLFW_KEY_PERIOD + case 0xBF:return 47; // DOM_VK_SLASH -> GLFW_KEY_SLASH + case 0x30:return 48; // DOM_VK_0 -> GLFW_KEY_0 + case 0x31:return 49; // DOM_VK_1 -> GLFW_KEY_1 + case 0x32:return 50; // DOM_VK_2 -> GLFW_KEY_2 + case 0x33:return 51; // DOM_VK_3 -> GLFW_KEY_3 + case 0x34:return 52; // DOM_VK_4 -> GLFW_KEY_4 + case 0x35:return 53; // DOM_VK_5 -> GLFW_KEY_5 + case 0x36:return 54; // DOM_VK_6 -> GLFW_KEY_6 + case 0x37:return 55; // DOM_VK_7 -> GLFW_KEY_7 + case 0x38:return 56; // DOM_VK_8 -> GLFW_KEY_8 + case 0x39:return 57; // DOM_VK_9 -> GLFW_KEY_9 + case 0x3B:return 59; // DOM_VK_SEMICOLON -> GLFW_KEY_SEMICOLON + case 0x3D:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0xBB:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0x41:return 65; // DOM_VK_A -> GLFW_KEY_A + case 0x42:return 66; // DOM_VK_B -> GLFW_KEY_B + case 0x43:return 67; // DOM_VK_C -> GLFW_KEY_C + case 0x44:return 68; // DOM_VK_D -> GLFW_KEY_D + case 0x45:return 69; // DOM_VK_E -> GLFW_KEY_E + case 0x46:return 70; // DOM_VK_F -> GLFW_KEY_F + case 0x47:return 71; // DOM_VK_G -> GLFW_KEY_G + case 0x48:return 72; // DOM_VK_H -> GLFW_KEY_H + case 0x49:return 73; // DOM_VK_I -> GLFW_KEY_I + case 0x4A:return 74; // DOM_VK_J -> GLFW_KEY_J + case 0x4B:return 75; // DOM_VK_K -> GLFW_KEY_K + case 0x4C:return 76; // DOM_VK_L -> GLFW_KEY_L + case 0x4D:return 77; // DOM_VK_M -> GLFW_KEY_M + case 0x4E:return 78; // DOM_VK_N -> GLFW_KEY_N + case 0x4F:return 79; // DOM_VK_O -> GLFW_KEY_O + case 0x50:return 80; // DOM_VK_P -> GLFW_KEY_P + case 0x51:return 81; // DOM_VK_Q -> GLFW_KEY_Q + case 0x52:return 82; // DOM_VK_R -> GLFW_KEY_R + case 0x53:return 83; // DOM_VK_S -> GLFW_KEY_S + case 0x54:return 84; // DOM_VK_T -> GLFW_KEY_T + case 0x55:return 85; // DOM_VK_U -> GLFW_KEY_U + case 0x56:return 86; // DOM_VK_V -> GLFW_KEY_V + case 0x57:return 87; // DOM_VK_W -> GLFW_KEY_W + case 0x58:return 88; // DOM_VK_X -> GLFW_KEY_X + case 0x59:return 89; // DOM_VK_Y -> GLFW_KEY_Y + case 0x5a:return 90; // DOM_VK_Z -> GLFW_KEY_Z + case 0xDB:return 91; // DOM_VK_OPEN_BRACKET -> GLFW_KEY_LEFT_BRACKET + case 0xDC:return 92; // DOM_VK_BACKSLASH -> GLFW_KEY_BACKSLASH + case 0xDD:return 93; // DOM_VK_CLOSE_BRACKET -> GLFW_KEY_RIGHT_BRACKET + case 0xC0:return 94; // DOM_VK_BACK_QUOTE -> GLFW_KEY_GRAVE_ACCENT + + + case 0x1B:return 256; // DOM_VK_ESCAPE -> GLFW_KEY_ESCAPE + case 0x0D:return 257; // DOM_VK_RETURN -> GLFW_KEY_ENTER + case 0x09:return 258; // DOM_VK_TAB -> GLFW_KEY_TAB + case 0x08:return 259; // DOM_VK_BACK -> GLFW_KEY_BACKSPACE + case 0x2D:return 260; // DOM_VK_INSERT -> GLFW_KEY_INSERT + case 0x2E:return 261; // DOM_VK_DELETE -> GLFW_KEY_DELETE + case 0x27:return 262; // DOM_VK_RIGHT -> GLFW_KEY_RIGHT + case 0x25:return 263; // DOM_VK_LEFT -> GLFW_KEY_LEFT + case 0x28:return 264; // DOM_VK_DOWN -> GLFW_KEY_DOWN + case 0x26:return 265; // DOM_VK_UP -> GLFW_KEY_UP + case 0x21:return 266; // DOM_VK_PAGE_UP -> GLFW_KEY_PAGE_UP + case 0x22:return 267; // DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGE_DOWN + case 0x24:return 268; // DOM_VK_HOME -> GLFW_KEY_HOME + case 0x23:return 269; // DOM_VK_END -> GLFW_KEY_END + case 0x14:return 280; // DOM_VK_CAPS_LOCK -> GLFW_KEY_CAPS_LOCK + case 0x91:return 281; // DOM_VK_SCROLL_LOCK -> GLFW_KEY_SCROLL_LOCK + case 0x90:return 282; // DOM_VK_NUM_LOCK -> GLFW_KEY_NUM_LOCK + case 0x2C:return 283; // DOM_VK_SNAPSHOT -> GLFW_KEY_PRINT_SCREEN + case 0x13:return 284; // DOM_VK_PAUSE -> GLFW_KEY_PAUSE + case 0x70:return 290; // DOM_VK_F1 -> GLFW_KEY_F1 + case 0x71:return 291; // DOM_VK_F2 -> GLFW_KEY_F2 + case 0x72:return 292; // DOM_VK_F3 -> GLFW_KEY_F3 + case 0x73:return 293; // DOM_VK_F4 -> GLFW_KEY_F4 + case 0x74:return 294; // DOM_VK_F5 -> GLFW_KEY_F5 + case 0x75:return 295; // DOM_VK_F6 -> GLFW_KEY_F6 + case 0x76:return 296; // DOM_VK_F7 -> GLFW_KEY_F7 + case 0x77:return 297; // DOM_VK_F8 -> GLFW_KEY_F8 + case 0x78:return 298; // DOM_VK_F9 -> GLFW_KEY_F9 + case 0x79:return 299; // DOM_VK_F10 -> GLFW_KEY_F10 + case 0x7A:return 300; // DOM_VK_F11 -> GLFW_KEY_F11 + case 0x7B:return 301; // DOM_VK_F12 -> GLFW_KEY_F12 + case 0x7C:return 302; // DOM_VK_F13 -> GLFW_KEY_F13 + case 0x7D:return 303; // DOM_VK_F14 -> GLFW_KEY_F14 + case 0x7E:return 304; // DOM_VK_F15 -> GLFW_KEY_F15 + case 0x7F:return 305; // DOM_VK_F16 -> GLFW_KEY_F16 + case 0x80:return 306; // DOM_VK_F17 -> GLFW_KEY_F17 + case 0x81:return 307; // DOM_VK_F18 -> GLFW_KEY_F18 + case 0x82:return 308; // DOM_VK_F19 -> GLFW_KEY_F19 + case 0x83:return 309; // DOM_VK_F20 -> GLFW_KEY_F20 + case 0x84:return 310; // DOM_VK_F21 -> GLFW_KEY_F21 + case 0x85:return 311; // DOM_VK_F22 -> GLFW_KEY_F22 + case 0x86:return 312; // DOM_VK_F23 -> GLFW_KEY_F23 + case 0x87:return 313; // DOM_VK_F24 -> GLFW_KEY_F24 + case 0x88:return 314; // 0x88 (not used?) -> GLFW_KEY_F25 + case 0x60:return 320; // DOM_VK_NUMPAD0 -> GLFW_KEY_KP_0 + case 0x61:return 321; // DOM_VK_NUMPAD1 -> GLFW_KEY_KP_1 + case 0x62:return 322; // DOM_VK_NUMPAD2 -> GLFW_KEY_KP_2 + case 0x63:return 323; // DOM_VK_NUMPAD3 -> GLFW_KEY_KP_3 + case 0x64:return 324; // DOM_VK_NUMPAD4 -> GLFW_KEY_KP_4 + case 0x65:return 325; // DOM_VK_NUMPAD5 -> GLFW_KEY_KP_5 + case 0x66:return 326; // DOM_VK_NUMPAD6 -> GLFW_KEY_KP_6 + case 0x67:return 327; // DOM_VK_NUMPAD7 -> GLFW_KEY_KP_7 + case 0x68:return 328; // DOM_VK_NUMPAD8 -> GLFW_KEY_KP_8 + case 0x69:return 329; // DOM_VK_NUMPAD9 -> GLFW_KEY_KP_9 + case 0x6E:return 330; // DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL + case 0x6F:return 331; // DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE + case 0x6A:return 332; // DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY + case 0x6D:return 333; // DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT + case 0x6B:return 334; // DOM_VK_ADD -> GLFW_KEY_KP_ADD + // case 0x0D:return 335; // DOM_VK_RETURN -> GLFW_KEY_KP_ENTER (DOM_KEY_LOCATION_RIGHT) + // case 0x61:return 336; // DOM_VK_EQUALS -> GLFW_KEY_KP_EQUAL (DOM_KEY_LOCATION_RIGHT) + case 0x10:return 340; // DOM_VK_SHIFT -> GLFW_KEY_LEFT_SHIFT + case 0x11:return 341; // DOM_VK_CONTROL -> GLFW_KEY_LEFT_CONTROL + case 0x12:return 342; // DOM_VK_ALT -> GLFW_KEY_LEFT_ALT + case 0x5B:return 343; // DOM_VK_WIN -> GLFW_KEY_LEFT_SUPER + // case 0x10:return 344; // DOM_VK_SHIFT -> GLFW_KEY_RIGHT_SHIFT (DOM_KEY_LOCATION_RIGHT) + // case 0x11:return 345; // DOM_VK_CONTROL -> GLFW_KEY_RIGHT_CONTROL (DOM_KEY_LOCATION_RIGHT) + // case 0x12:return 346; // DOM_VK_ALT -> GLFW_KEY_RIGHT_ALT (DOM_KEY_LOCATION_RIGHT) + // case 0x5B:return 347; // DOM_VK_WIN -> GLFW_KEY_RIGHT_SUPER (DOM_KEY_LOCATION_RIGHT) + case 0x5D:return 348; // DOM_VK_CONTEXT_MENU -> GLFW_KEY_MENU + // XXX: GLFW_KEY_WORLD_1, GLFW_KEY_WORLD_2 what are these? + default:return -1; // GLFW_KEY_UNKNOWN + }; + },getModBits:function(win) { + var mod = 0; + if (win.keys[340]) mod |= 0x0001; // GLFW_MOD_SHIFT + if (win.keys[341]) mod |= 0x0002; // GLFW_MOD_CONTROL + if (win.keys[342]) mod |= 0x0004; // GLFW_MOD_ALT + if (win.keys[343]) mod |= 0x0008; // GLFW_MOD_SUPER + return mod; + },onKeyPress:function(event) { + if (!GLFW.active || !GLFW.active.charFunc) return; + if (event.ctrlKey || event.metaKey) return; + + // correct unicode charCode is only available with onKeyPress event + var charCode = event.charCode; + if (charCode == 0 || (charCode >= 0x00 && charCode <= 0x1F)) return; + + + dynCall_vii(GLFW.active.charFunc, GLFW.active.id, charCode); + },onKeyChanged:function(keyCode, status) { + if (!GLFW.active) return; + + var key = GLFW.DOMToGLFWKeyCode(keyCode); + if (key == -1) return; + + var repeat = status && GLFW.active.keys[key]; + GLFW.active.keys[key] = status; + GLFW.active.domKeys[keyCode] = status; + if (!GLFW.active.keyFunc) return; + + + if (repeat) status = 2; // GLFW_REPEAT + dynCall_viiiii(GLFW.active.keyFunc, GLFW.active.id, key, keyCode, status, GLFW.getModBits(GLFW.active)); + },onGamepadConnected:function(event) { + GLFW.refreshJoysticks(); + },onGamepadDisconnected:function(event) { + GLFW.refreshJoysticks(); + },onKeydown:function(event) { + GLFW.onKeyChanged(event.keyCode, 1); // GLFW_PRESS or GLFW_REPEAT + + // This logic comes directly from the sdl implementation. We cannot + // call preventDefault on all keydown events otherwise onKeyPress will + // not get called + if (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */) { + event.preventDefault(); + } + },onKeyup:function(event) { + GLFW.onKeyChanged(event.keyCode, 0); // GLFW_RELEASE + },onBlur:function(event) { + if (!GLFW.active) return; + + for (var i = 0; i < GLFW.active.domKeys.length; ++i) { + if (GLFW.active.domKeys[i]) { + GLFW.onKeyChanged(i, 0); // GLFW_RELEASE + } + } + },onMousemove:function(event) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"] || !GLFW.active.cursorPosFunc) return; + + + dynCall_vidd(GLFW.active.cursorPosFunc, GLFW.active.id, Browser.mouseX, Browser.mouseY); + },DOMToGLFWMouseButton:function(event) { + // DOM and glfw have different button codes. + // See http://www.w3schools.com/jsref/event_button.asp. + var eventButton = event['button']; + if (eventButton > 0) { + if (eventButton == 1) { + eventButton = 2; + } else { + eventButton = 1; + } + } + return eventButton; + },onMouseenter:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 1); + },onMouseleave:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 0); + },onMouseButtonChanged:function(event, status) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"]) return; + + var eventButton = GLFW.DOMToGLFWMouseButton(event); + + if (status == 1) { // GLFW_PRESS + GLFW.active.buttons |= (1 << eventButton); + try { + event.target.setCapture(); + } catch (e) {} + } else { // GLFW_RELEASE + GLFW.active.buttons &= ~(1 << eventButton); + } + + if (!GLFW.active.mouseButtonFunc) return; + + + dynCall_viiii(GLFW.active.mouseButtonFunc, GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active)); + },onMouseButtonDown:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 1); // GLFW_PRESS + },onMouseButtonUp:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 0); // GLFW_RELEASE + },onMouseWheel:function(event) { + // Note the minus sign that flips browser wheel direction (positive direction scrolls page down) to native wheel direction (positive direction is mouse wheel up) + var delta = -Browser.getMouseWheelDelta(event); + delta = (delta == 0) ? 0 : (delta > 0 ? Math.max(delta, 1) : Math.min(delta, -1)); // Quantize to integer so that minimum scroll is at least +/- 1. + GLFW.wheelPos += delta; + + if (!GLFW.active || !GLFW.active.scrollFunc || event.target != Module['canvas']) return; + + + var sx = 0; + var sy = 0; + if (event.type == 'mousewheel') { + sx = event.wheelDeltaX; + sy = event.wheelDeltaY; + } else { + sx = event.deltaX; + sy = event.deltaY; + } + + dynCall_vidd(GLFW.active.scrollFunc, GLFW.active.id, sx, sy); + + event.preventDefault(); + },onCanvasResize:function(width, height) { + if (!GLFW.active) return; + + var resizeNeeded = true; + + // If the client is requesting fullscreen mode + if (document["fullscreen"] || document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) { + GLFW.active.storedX = GLFW.active.x; + GLFW.active.storedY = GLFW.active.y; + GLFW.active.storedWidth = GLFW.active.width; + GLFW.active.storedHeight = GLFW.active.height; + GLFW.active.x = GLFW.active.y = 0; + GLFW.active.width = screen.width; + GLFW.active.height = screen.height; + GLFW.active.fullscreen = true; + + // If the client is reverting from fullscreen mode + } else if (GLFW.active.fullscreen == true) { + GLFW.active.x = GLFW.active.storedX; + GLFW.active.y = GLFW.active.storedY; + GLFW.active.width = GLFW.active.storedWidth; + GLFW.active.height = GLFW.active.storedHeight; + GLFW.active.fullscreen = false; + + // If the width/height values do not match current active window sizes + } else if (GLFW.active.width != width || GLFW.active.height != height) { + GLFW.active.width = width; + GLFW.active.height = height; + } else { + resizeNeeded = false; + } + + // If any of the above conditions were true, we need to resize the canvas + if (resizeNeeded) { + // resets the canvas size to counter the aspect preservation of Browser.updateCanvasDimensions + Browser.setCanvasSize(GLFW.active.width, GLFW.active.height, true); + // TODO: Client dimensions (clientWidth/clientHeight) vs pixel dimensions (width/height) of + // the canvas should drive window and framebuffer size respectfully. + GLFW.onWindowSizeChanged(); + GLFW.onFramebufferSizeChanged(); + } + },onWindowSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.windowSizeFunc) return; + + + dynCall_viii(GLFW.active.windowSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },onFramebufferSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.framebufferSizeFunc) return; + + dynCall_viii(GLFW.active.framebufferSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },requestFullscreen:function() { + var RFS = Module["canvas"]['requestFullscreen'] || + Module["canvas"]['mozRequestFullScreen'] || + Module["canvas"]['webkitRequestFullScreen'] || + (function() {}); + RFS.apply(Module["canvas"], []); + },requestFullScreen:function() { + err('GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.'); + GLFW.requestFullScreen = function() { + return GLFW.requestFullscreen(); + } + return GLFW.requestFullscreen(); + },exitFullscreen:function() { + Browser.exitFullscreen(); + },cancelFullScreen:function() { + err('GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.'); + GLFW.cancelFullScreen = function() { + return GLFW.exitFullscreen(); + } + return GLFW.exitFullscreen(); + },getTime:function() { + return _emscripten_get_now() / 1000; + },setWindowTitle:function(winid, title) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + win.title = UTF8ToString(title); + if (GLFW.active.id == win.id) { + document.title = win.title; + } + },setJoystickCallback:function(cbfun) { + GLFW.joystickFunc = cbfun; + GLFW.refreshJoysticks(); + },joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function() { + // Produce a new Gamepad API sample if we are ticking a new game frame, or if not using emscripten_set_main_loop() at all to drive animation. + if (Browser.mainLoop.currentFrameNumber !== GLFW.lastGamepadStateFrame || !Browser.mainLoop.currentFrameNumber) { + GLFW.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null); + GLFW.lastGamepadStateFrame = Browser.mainLoop.currentFrameNumber; + + for (var joy = 0; joy < GLFW.lastGamepadState.length; ++joy) { + var gamepad = GLFW.lastGamepadState[joy]; + + if (gamepad) { + if (!GLFW.joys[joy]) { + console.log('glfw joystick connected:',joy); + GLFW.joys[joy] = { + id: allocate(intArrayFromString(gamepad.id), 'i8', ALLOC_NORMAL), + buttonsCount: gamepad.buttons.length, + axesCount: gamepad.axes.length, + buttons: allocate(new Array(gamepad.buttons.length), 'i8', ALLOC_NORMAL), + axes: allocate(new Array(gamepad.axes.length*4), 'float', ALLOC_NORMAL) + }; + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040001); // GLFW_CONNECTED + } + } + + var data = GLFW.joys[joy]; + + for (var i = 0; i < gamepad.buttons.length; ++i) { + setValue(data.buttons + i, gamepad.buttons[i].pressed, 'i8'); + } + + for (var i = 0; i < gamepad.axes.length; ++i) { + setValue(data.axes + i*4, gamepad.axes[i], 'float'); + } + } else { + if (GLFW.joys[joy]) { + console.log('glfw joystick disconnected',joy); + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040002); // GLFW_DISCONNECTED + } + + _free(GLFW.joys[joy].id); + _free(GLFW.joys[joy].buttons); + _free(GLFW.joys[joy].axes); + + delete GLFW.joys[joy]; + } + } + } + } + },setKeyCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.keyFunc = cbfun; + },setCharCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.charFunc = cbfun; + },setMouseButtonCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.mouseButtonFunc = cbfun; + },setCursorPosCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorPosFunc = cbfun; + },setScrollCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.scrollFunc = cbfun; + },setDropCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.dropFunc = cbfun; + console.log("--->LOG: setDropCallback assigned!"); + },onDrop:function(event) { + + console.log("--->LOG: OnDrop: GO!"); + + if (!GLFW.active || !GLFW.active.dropFunc) return; + if (!event.dataTransfer || !event.dataTransfer.files || event.dataTransfer.files.length == 0) return; + + console.log("--->LOG: OnDrop: STEP1"); + + event.preventDefault(); + + //#if '$FS' in addedLibraryItems + + console.log("--->LOG: OnDrop: STEP2"); + + var filenames = allocate(new Array(event.dataTransfer.files.length*4), 'i8*', ALLOC_NORMAL); + var filenamesArray = []; + var count = event.dataTransfer.files.length; + + // Read and save the files to emscripten's FS + var written = 0; + var drop_dir = '.glfw_dropped_files'; + FS.createPath('/', drop_dir); + + console.log("--->LOG: OnDrop: STEP3"); + + function save(file) { + var path = '/' + drop_dir + '/' + file.name.replace(/\//g, '_'); + var reader = new FileReader(); + reader.onloadend = function(e) { + if (reader.readyState != 2) { // not DONE + ++written; + console.log('failed to read dropped file: '+file.name+': '+reader.error); + return; + } + + var data = e.target.result; + FS.writeFile(path, new Uint8Array(data)); + if (++written === count) { + dynCall_viii(GLFW.active.dropFunc, GLFW.active.id, count, filenames); + + for (var i = 0; i < filenamesArray.length; ++i) { + _free(filenamesArray[i]); + } + _free(filenames); + } + }; + reader.readAsArrayBuffer(file); + + var filename = allocate(intArrayFromString(path), 'i8', ALLOC_NORMAL); + filenamesArray.push(filename); + setValue(filenames + i*4, filename, 'i8*'); + } + + for (var i = 0; i < count; ++i) { + save(event.dataTransfer.files[i]); + } + + //#endif // '$FS' in addedLibraryItems + + return false; + },onDragover:function(event) { + if (!GLFW.active || !GLFW.active.dropFunc) return; + + event.preventDefault(); + return false; + },setWindowSizeCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowSizeFunc = cbfun; + + },setWindowCloseCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowCloseFunc = cbfun; + },setWindowRefreshCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowRefreshFunc = cbfun; + },onClickRequestPointerLock:function(e) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + e.preventDefault(); + } + },setInputMode:function(winid, mode, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + switch(mode) { + case 0x00033001: { // GLFW_CURSOR + switch(value) { + case 0x00034001: { // GLFW_CURSOR_NORMAL + win.inputModes[mode] = value; + Module['canvas'].removeEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].exitPointerLock(); + break; + } + case 0x00034002: { // GLFW_CURSOR_HIDDEN + console.log("glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented."); + break; + } + case 0x00034003: { // GLFW_CURSOR_DISABLED + win.inputModes[mode] = value; + Module['canvas'].addEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].requestPointerLock(); + break; + } + default: { + console.log("glfwSetInputMode called with unknown value parameter value: " + value + "."); + break; + } + } + break; + } + case 0x00033002: { // GLFW_STICKY_KEYS + console.log("glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented."); + break; + } + case 0x00033003: { // GLFW_STICKY_MOUSE_BUTTONS + console.log("glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented."); + break; + } + default: { + console.log("glfwSetInputMode called with unknown mode parameter value: " + mode + "."); + break; + } + } + },getKey:function(winid, key) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return win.keys[key]; + },getMouseButton:function(winid, button) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return (win.buttons & (1 << button)) > 0; + },getCursorPos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'double'); + setValue(y, Browser.mouseY, 'double'); + },getMousePos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'i32'); + setValue(y, Browser.mouseY, 'i32'); + },setCursorPos:function(winid, x, y) { + },getWindowPos:function(winid, x, y) { + var wx = 0; + var wy = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + wx = win.x; + wy = win.y; + } + + setValue(x, wx, 'i32'); + setValue(y, wy, 'i32'); + },setWindowPos:function(winid, x, y) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.x = x; + win.y = y; + },getWindowSize:function(winid, width, height) { + var ww = 0; + var wh = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + ww = win.width; + wh = win.height; + } + + setValue(width, ww, 'i32'); + setValue(height, wh, 'i32'); + },setWindowSize:function(winid, width, height) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (GLFW.active.id == win.id) { + if (width == screen.width && height == screen.height) { + GLFW.requestFullscreen(); + } else { + GLFW.exitFullscreen(); + Browser.setCanvasSize(width, height); + win.width = width; + win.height = height; + } + } + + if (!win.windowSizeFunc) return; + + + dynCall_viii(win.windowSizeFunc, win.id, width, height); + },createWindow:function(width, height, title, monitor, share) { + var i, id; + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] !== null; i++); + if (i > 0) throw "glfwCreateWindow only supports one window at time currently"; + + // id for window + id = i + 1; + + // not valid + if (width <= 0 || height <= 0) return 0; + + if (monitor) { + GLFW.requestFullscreen(); + } else { + Browser.setCanvasSize(width, height); + } + + // Create context when there are no existing alive windows + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] == null; i++); + if (i == GLFW.windows.length) { + var contextAttributes = { + antialias: (GLFW.hints[0x0002100D] > 1), // GLFW_SAMPLES + depth: (GLFW.hints[0x00021005] > 0), // GLFW_DEPTH_BITS + stencil: (GLFW.hints[0x00021006] > 0), // GLFW_STENCIL_BITS + alpha: (GLFW.hints[0x00021004] > 0) // GLFW_ALPHA_BITS + } + Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes); + } + + // If context creation failed, do not return a valid window + if (!Module.ctx) return 0; + + // Get non alive id + var win = new GLFW.Window(id, width, height, title, monitor, share); + + // Set window to array + if (id - 1 == GLFW.windows.length) { + GLFW.windows.push(win); + } else { + GLFW.windows[id - 1] = win; + } + + GLFW.active = win; + return win.id; + },destroyWindow:function(winid) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (win.windowCloseFunc) + dynCall_vi(win.windowCloseFunc, win.id); + + GLFW.windows[win.id - 1] = null; + if (GLFW.active.id == win.id) + GLFW.active = null; + + // Destroy context when no alive windows + for (var i = 0; i < GLFW.windows.length; i++) + if (GLFW.windows[i] !== null) return; + + Module.ctx = Browser.destroyContext(Module['canvas'], true, true); + },swapBuffers:function(winid) { + },GLFW2ParamToGLFW3Param:function(param) { + var table = { + 0x00030001:0, // GLFW_MOUSE_CURSOR + 0x00030002:0, // GLFW_STICKY_KEYS + 0x00030003:0, // GLFW_STICKY_MOUSE_BUTTONS + 0x00030004:0, // GLFW_SYSTEM_KEYS + 0x00030005:0, // GLFW_KEY_REPEAT + 0x00030006:0, // GLFW_AUTO_POLL_EVENTS + 0x00020001:0, // GLFW_OPENED + 0x00020002:0, // GLFW_ACTIVE + 0x00020003:0, // GLFW_ICONIFIED + 0x00020004:0, // GLFW_ACCELERATED + 0x00020005:0x00021001, // GLFW_RED_BITS + 0x00020006:0x00021002, // GLFW_GREEN_BITS + 0x00020007:0x00021003, // GLFW_BLUE_BITS + 0x00020008:0x00021004, // GLFW_ALPHA_BITS + 0x00020009:0x00021005, // GLFW_DEPTH_BITS + 0x0002000A:0x00021006, // GLFW_STENCIL_BITS + 0x0002000B:0x0002100F, // GLFW_REFRESH_RATE + 0x0002000C:0x00021007, // GLFW_ACCUM_RED_BITS + 0x0002000D:0x00021008, // GLFW_ACCUM_GREEN_BITS + 0x0002000E:0x00021009, // GLFW_ACCUM_BLUE_BITS + 0x0002000F:0x0002100A, // GLFW_ACCUM_ALPHA_BITS + 0x00020010:0x0002100B, // GLFW_AUX_BUFFERS + 0x00020011:0x0002100C, // GLFW_STEREO + 0x00020012:0, // GLFW_WINDOW_NO_RESIZE + 0x00020013:0x0002100D, // GLFW_FSAA_SAMPLES + 0x00020014:0x00022002, // GLFW_OPENGL_VERSION_MAJOR + 0x00020015:0x00022003, // GLFW_OPENGL_VERSION_MINOR + 0x00020016:0x00022006, // GLFW_OPENGL_FORWARD_COMPAT + 0x00020017:0x00022007, // GLFW_OPENGL_DEBUG_CONTEXT + 0x00020018:0x00022008, // GLFW_OPENGL_PROFILE + }; + return table[param]; + }};function _glfwCreateWindow(width, height, title, monitor, share) { + return GLFW.createWindow(width, height, title, monitor, share); + } + + function _glfwDefaultWindowHints() { + GLFW.hints = GLFW.defaultHints; + } + + function _glfwDestroyWindow(winid) { + return GLFW.destroyWindow(winid); + } + + function _glfwGetCursorPos(winid, x, y) { + GLFW.getCursorPos(winid, x, y); + } + + function _glfwGetKey(winid, key) { + return GLFW.getKey(winid, key); + } + + function _glfwGetPrimaryMonitor() { + return 1; + } + + function _glfwGetTime() { + return GLFW.getTime() - GLFW.initialTime; + } + + function _glfwGetVideoModes(monitor, count) { + setValue(count, 0, 'i32'); + return 0; + } + + function _glfwInit() { + if (GLFW.windows) return 1; // GL_TRUE + + GLFW.initialTime = GLFW.getTime(); + GLFW.hints = GLFW.defaultHints; + GLFW.windows = new Array() + GLFW.active = null; + + window.addEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.addEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.addEventListener("keydown", GLFW.onKeydown, true); + window.addEventListener("keypress", GLFW.onKeyPress, true); + window.addEventListener("keyup", GLFW.onKeyup, true); + window.addEventListener("blur", GLFW.onBlur, true); + Module["canvas"].addEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].addEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].addEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].addEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].addEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].addEventListener('drop', GLFW.onDrop, true); + Module["canvas"].addEventListener('dragover', GLFW.onDragover, true); + + Browser.resizeListeners.push(function(width, height) { + GLFW.onCanvasResize(width, height); + }); + return 1; // GL_TRUE + } + + function _glfwMakeContextCurrent(winid) {} + + function _glfwSetCharCallback(winid, cbfun) { + GLFW.setCharCallback(winid, cbfun); + } + + function _glfwSetCursorEnterCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorEnterFunc = cbfun; + } + + function _glfwSetCursorPosCallback(winid, cbfun) { + GLFW.setCursorPosCallback(winid, cbfun); + } + + function _glfwSetDropCallback(winid, cbfun) { + GLFW.setDropCallback(winid, cbfun); + console.log("--->LOG: glfwSetDropCallback set!"); + } + + function _glfwSetErrorCallback(cbfun) { + GLFW.errorFunc = cbfun; + } + + function _glfwSetKeyCallback(winid, cbfun) { + GLFW.setKeyCallback(winid, cbfun); + } + + function _glfwSetMouseButtonCallback(winid, cbfun) { + GLFW.setMouseButtonCallback(winid, cbfun); + } + + function _glfwSetScrollCallback(winid, cbfun) { + GLFW.setScrollCallback(winid, cbfun); + } + + function _glfwSetWindowIconifyCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowIconifyFunc = cbfun; + } + + function _glfwSetWindowShouldClose(winid, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.shouldClose = value; + } + + function _glfwSetWindowSizeCallback(winid, cbfun) { + GLFW.setWindowSizeCallback(winid, cbfun); + } + + function _glfwSwapBuffers(winid) { + GLFW.swapBuffers(winid); + } + + function _glfwSwapInterval(interval) { + interval = Math.abs(interval); // GLFW uses negative values to enable GLX_EXT_swap_control_tear, which we don't have, so just treat negative and positive the same. + if (interval == 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 0); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, interval); + } + + function _glfwTerminate() { + window.removeEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.removeEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.removeEventListener("keydown", GLFW.onKeydown, true); + window.removeEventListener("keypress", GLFW.onKeyPress, true); + window.removeEventListener("keyup", GLFW.onKeyup, true); + window.removeEventListener("blur", GLFW.onBlur, true); + Module["canvas"].removeEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].removeEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].removeEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].removeEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].removeEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].removeEventListener('drop', GLFW.onDrop, true); + Module["canvas"].removeEventListener('dragover', GLFW.onDragover, true); + + + Module["canvas"].width = Module["canvas"].height = 1; + GLFW.windows = null; + GLFW.active = null; + } + + function _glfwWindowHint(target, hint) { + GLFW.hints[target] = hint; + } + + function _llvm_exp2_f32(x) { + return Math.pow(2, x); + } + + + + + function _llvm_stackrestore(p) { + var self = _llvm_stacksave; + var ret = self.LLVM_SAVEDSTACKS[p]; + self.LLVM_SAVEDSTACKS.splice(p, 1); + stackRestore(ret); + } + + function _llvm_stacksave() { + var self = _llvm_stacksave; + if (!self.LLVM_SAVEDSTACKS) { + self.LLVM_SAVEDSTACKS = []; + } + self.LLVM_SAVEDSTACKS.push(stackSave()); + return self.LLVM_SAVEDSTACKS.length-1; + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + } + + + + + + + + + function _usleep(useconds) { + // int usleep(useconds_t useconds); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/usleep.html + // We're single-threaded, so use a busy loop. Super-ugly. + var msec = useconds / 1000; + if ((ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && self['performance'] && self['performance']['now']) { + var start = self['performance']['now'](); + while (self['performance']['now']() - start < msec) { + // Do nothing. + } + } else { + var start = Date.now(); + while (Date.now() - start < msec) { + // Do nothing. + } + } + return 0; + }function _nanosleep(rqtp, rmtp) { + // int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); + if (rqtp === 0) { + ___setErrNo(22); + return -1; + } + var seconds = HEAP32[((rqtp)>>2)]; + var nanoseconds = HEAP32[(((rqtp)+(4))>>2)]; + if (nanoseconds < 0 || nanoseconds > 999999999 || seconds < 0) { + ___setErrNo(22); + return -1; + } + if (rmtp !== 0) { + HEAP32[((rmtp)>>2)]=0; + HEAP32[(((rmtp)+(4))>>2)]=0; + } + return _usleep((seconds * 1e6) + (nanoseconds / 1000)); + } + + + + function abortOnCannotGrowMemory(requestedSize) { + abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); + }function _emscripten_resize_heap(requestedSize) { + abortOnCannotGrowMemory(requestedSize); + } + + function _time(ptr) { + var ret = (Date.now()/1000)|0; + if (ptr) { + HEAP32[((ptr)>>2)]=ret; + } + return ret; + } + +FS.staticInit();Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink;; +if (ENVIRONMENT_HAS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); }; +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."); Module["requestFullScreen"] = Module["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; + Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; +if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = function _emscripten_get_now_actual() { + var t = process['hrtime'](); + return t[0] * 1e3 + t[1] / 1e6; + }; + } else if (typeof dateNow !== 'undefined') { + _emscripten_get_now = dateNow; + } else if (typeof performance === 'object' && performance && typeof performance['now'] === 'function') { + _emscripten_get_now = function() { return performance['now'](); }; + } else { + _emscripten_get_now = Date.now; + }; +var GLctx; GL.init(); +for (var i = 0; i < 32; i++) __tempFixedLengthArray.push(new Array(i));; +var ASSERTIONS = true; + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil,Int8Array,Int32Array + +function nullFunc_ff(x) { abortFnPtrError(x, 'ff'); } +function nullFunc_fff(x) { abortFnPtrError(x, 'fff'); } +function nullFunc_i(x) { abortFnPtrError(x, 'i'); } +function nullFunc_ii(x) { abortFnPtrError(x, 'ii'); } +function nullFunc_iidiiii(x) { abortFnPtrError(x, 'iidiiii'); } +function nullFunc_iii(x) { abortFnPtrError(x, 'iii'); } +function nullFunc_iiii(x) { abortFnPtrError(x, 'iiii'); } +function nullFunc_iiiii(x) { abortFnPtrError(x, 'iiiii'); } +function nullFunc_jiji(x) { abortFnPtrError(x, 'jiji'); } +function nullFunc_v(x) { abortFnPtrError(x, 'v'); } +function nullFunc_vf(x) { abortFnPtrError(x, 'vf'); } +function nullFunc_vff(x) { abortFnPtrError(x, 'vff'); } +function nullFunc_vffff(x) { abortFnPtrError(x, 'vffff'); } +function nullFunc_vfi(x) { abortFnPtrError(x, 'vfi'); } +function nullFunc_vi(x) { abortFnPtrError(x, 'vi'); } +function nullFunc_vidd(x) { abortFnPtrError(x, 'vidd'); } +function nullFunc_vif(x) { abortFnPtrError(x, 'vif'); } +function nullFunc_viff(x) { abortFnPtrError(x, 'viff'); } +function nullFunc_vifff(x) { abortFnPtrError(x, 'vifff'); } +function nullFunc_viffff(x) { abortFnPtrError(x, 'viffff'); } +function nullFunc_vii(x) { abortFnPtrError(x, 'vii'); } +function nullFunc_viif(x) { abortFnPtrError(x, 'viif'); } +function nullFunc_viii(x) { abortFnPtrError(x, 'viii'); } +function nullFunc_viiii(x) { abortFnPtrError(x, 'viiii'); } +function nullFunc_viiiii(x) { abortFnPtrError(x, 'viiiii'); } +function nullFunc_viiiiii(x) { abortFnPtrError(x, 'viiiiii'); } +function nullFunc_viiiiiii(x) { abortFnPtrError(x, 'viiiiiii'); } +function nullFunc_viiiiiiii(x) { abortFnPtrError(x, 'viiiiiiii'); } +function nullFunc_viiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiii'); } +function nullFunc_viiji(x) { abortFnPtrError(x, 'viiji'); } + +var asmGlobalArg = {}; + +var asmLibraryArg = { + "abort": abort, + "setTempRet0": setTempRet0, + "getTempRet0": getTempRet0, + "abortStackOverflow": abortStackOverflow, + "nullFunc_ff": nullFunc_ff, + "nullFunc_fff": nullFunc_fff, + "nullFunc_i": nullFunc_i, + "nullFunc_ii": nullFunc_ii, + "nullFunc_iidiiii": nullFunc_iidiiii, + "nullFunc_iii": nullFunc_iii, + "nullFunc_iiii": nullFunc_iiii, + "nullFunc_iiiii": nullFunc_iiiii, + "nullFunc_jiji": nullFunc_jiji, + "nullFunc_v": nullFunc_v, + "nullFunc_vf": nullFunc_vf, + "nullFunc_vff": nullFunc_vff, + "nullFunc_vffff": nullFunc_vffff, + "nullFunc_vfi": nullFunc_vfi, + "nullFunc_vi": nullFunc_vi, + "nullFunc_vidd": nullFunc_vidd, + "nullFunc_vif": nullFunc_vif, + "nullFunc_viff": nullFunc_viff, + "nullFunc_vifff": nullFunc_vifff, + "nullFunc_viffff": nullFunc_viffff, + "nullFunc_vii": nullFunc_vii, + "nullFunc_viif": nullFunc_viif, + "nullFunc_viii": nullFunc_viii, + "nullFunc_viiii": nullFunc_viiii, + "nullFunc_viiiii": nullFunc_viiiii, + "nullFunc_viiiiii": nullFunc_viiiiii, + "nullFunc_viiiiiii": nullFunc_viiiiiii, + "nullFunc_viiiiiiii": nullFunc_viiiiiiii, + "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, + "nullFunc_viiji": nullFunc_viiji, + "___assert_fail": ___assert_fail, + "___lock": ___lock, + "___setErrNo": ___setErrNo, + "___syscall140": ___syscall140, + "___syscall145": ___syscall145, + "___syscall221": ___syscall221, + "___syscall5": ___syscall5, + "___syscall54": ___syscall54, + "___syscall6": ___syscall6, + "___unlock": ___unlock, + "___wasi_fd_write": ___wasi_fd_write, + "__computeUnpackAlignedImageSize": __computeUnpackAlignedImageSize, + "__fillFullscreenChangeEventData": __fillFullscreenChangeEventData, + "__fillGamepadEventData": __fillGamepadEventData, + "__fillMouseEventData": __fillMouseEventData, + "__fillPointerlockChangeEventData": __fillPointerlockChangeEventData, + "__findEventTarget": __findEventTarget, + "__glGenObject": __glGenObject, + "__registerFullscreenChangeEventCallback": __registerFullscreenChangeEventCallback, + "__registerGamepadEventCallback": __registerGamepadEventCallback, + "__registerKeyEventCallback": __registerKeyEventCallback, + "__registerMouseEventCallback": __registerMouseEventCallback, + "__registerTouchEventCallback": __registerTouchEventCallback, + "__requestPointerLock": __requestPointerLock, + "_eglGetProcAddress": _eglGetProcAddress, + "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, + "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, + "_emscripten_get_heap_size": _emscripten_get_heap_size, + "_emscripten_get_now": _emscripten_get_now, + "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, + "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, + "_emscripten_glActiveTexture": _emscripten_glActiveTexture, + "_emscripten_glAttachShader": _emscripten_glAttachShader, + "_emscripten_glBeginQueryEXT": _emscripten_glBeginQueryEXT, + "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, + "_emscripten_glBindBuffer": _emscripten_glBindBuffer, + "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, + "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, + "_emscripten_glBindTexture": _emscripten_glBindTexture, + "_emscripten_glBindVertexArrayOES": _emscripten_glBindVertexArrayOES, + "_emscripten_glBlendColor": _emscripten_glBlendColor, + "_emscripten_glBlendEquation": _emscripten_glBlendEquation, + "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, + "_emscripten_glBlendFunc": _emscripten_glBlendFunc, + "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, + "_emscripten_glBufferData": _emscripten_glBufferData, + "_emscripten_glBufferSubData": _emscripten_glBufferSubData, + "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, + "_emscripten_glClear": _emscripten_glClear, + "_emscripten_glClearColor": _emscripten_glClearColor, + "_emscripten_glClearDepthf": _emscripten_glClearDepthf, + "_emscripten_glClearStencil": _emscripten_glClearStencil, + "_emscripten_glColorMask": _emscripten_glColorMask, + "_emscripten_glCompileShader": _emscripten_glCompileShader, + "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, + "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, + "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, + "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, + "_emscripten_glCreateProgram": _emscripten_glCreateProgram, + "_emscripten_glCreateShader": _emscripten_glCreateShader, + "_emscripten_glCullFace": _emscripten_glCullFace, + "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, + "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, + "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, + "_emscripten_glDeleteQueriesEXT": _emscripten_glDeleteQueriesEXT, + "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, + "_emscripten_glDeleteShader": _emscripten_glDeleteShader, + "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, + "_emscripten_glDeleteVertexArraysOES": _emscripten_glDeleteVertexArraysOES, + "_emscripten_glDepthFunc": _emscripten_glDepthFunc, + "_emscripten_glDepthMask": _emscripten_glDepthMask, + "_emscripten_glDepthRangef": _emscripten_glDepthRangef, + "_emscripten_glDetachShader": _emscripten_glDetachShader, + "_emscripten_glDisable": _emscripten_glDisable, + "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, + "_emscripten_glDrawArrays": _emscripten_glDrawArrays, + "_emscripten_glDrawArraysInstancedANGLE": _emscripten_glDrawArraysInstancedANGLE, + "_emscripten_glDrawBuffersWEBGL": _emscripten_glDrawBuffersWEBGL, + "_emscripten_glDrawElements": _emscripten_glDrawElements, + "_emscripten_glDrawElementsInstancedANGLE": _emscripten_glDrawElementsInstancedANGLE, + "_emscripten_glEnable": _emscripten_glEnable, + "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, + "_emscripten_glEndQueryEXT": _emscripten_glEndQueryEXT, + "_emscripten_glFinish": _emscripten_glFinish, + "_emscripten_glFlush": _emscripten_glFlush, + "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, + "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, + "_emscripten_glFrontFace": _emscripten_glFrontFace, + "_emscripten_glGenBuffers": _emscripten_glGenBuffers, + "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, + "_emscripten_glGenQueriesEXT": _emscripten_glGenQueriesEXT, + "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, + "_emscripten_glGenTextures": _emscripten_glGenTextures, + "_emscripten_glGenVertexArraysOES": _emscripten_glGenVertexArraysOES, + "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, + "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, + "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, + "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, + "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, + "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, + "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, + "_emscripten_glGetError": _emscripten_glGetError, + "_emscripten_glGetFloatv": _emscripten_glGetFloatv, + "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, + "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, + "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, + "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, + "_emscripten_glGetQueryObjecti64vEXT": _emscripten_glGetQueryObjecti64vEXT, + "_emscripten_glGetQueryObjectivEXT": _emscripten_glGetQueryObjectivEXT, + "_emscripten_glGetQueryObjectui64vEXT": _emscripten_glGetQueryObjectui64vEXT, + "_emscripten_glGetQueryObjectuivEXT": _emscripten_glGetQueryObjectuivEXT, + "_emscripten_glGetQueryivEXT": _emscripten_glGetQueryivEXT, + "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, + "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, + "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, + "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, + "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, + "_emscripten_glGetString": _emscripten_glGetString, + "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, + "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, + "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, + "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, + "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, + "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, + "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, + "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, + "_emscripten_glHint": _emscripten_glHint, + "_emscripten_glIsBuffer": _emscripten_glIsBuffer, + "_emscripten_glIsEnabled": _emscripten_glIsEnabled, + "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, + "_emscripten_glIsProgram": _emscripten_glIsProgram, + "_emscripten_glIsQueryEXT": _emscripten_glIsQueryEXT, + "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, + "_emscripten_glIsShader": _emscripten_glIsShader, + "_emscripten_glIsTexture": _emscripten_glIsTexture, + "_emscripten_glIsVertexArrayOES": _emscripten_glIsVertexArrayOES, + "_emscripten_glLineWidth": _emscripten_glLineWidth, + "_emscripten_glLinkProgram": _emscripten_glLinkProgram, + "_emscripten_glPixelStorei": _emscripten_glPixelStorei, + "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, + "_emscripten_glQueryCounterEXT": _emscripten_glQueryCounterEXT, + "_emscripten_glReadPixels": _emscripten_glReadPixels, + "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, + "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, + "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, + "_emscripten_glScissor": _emscripten_glScissor, + "_emscripten_glShaderBinary": _emscripten_glShaderBinary, + "_emscripten_glShaderSource": _emscripten_glShaderSource, + "_emscripten_glStencilFunc": _emscripten_glStencilFunc, + "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, + "_emscripten_glStencilMask": _emscripten_glStencilMask, + "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, + "_emscripten_glStencilOp": _emscripten_glStencilOp, + "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, + "_emscripten_glTexImage2D": _emscripten_glTexImage2D, + "_emscripten_glTexParameterf": _emscripten_glTexParameterf, + "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, + "_emscripten_glTexParameteri": _emscripten_glTexParameteri, + "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, + "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, + "_emscripten_glUniform1f": _emscripten_glUniform1f, + "_emscripten_glUniform1fv": _emscripten_glUniform1fv, + "_emscripten_glUniform1i": _emscripten_glUniform1i, + "_emscripten_glUniform1iv": _emscripten_glUniform1iv, + "_emscripten_glUniform2f": _emscripten_glUniform2f, + "_emscripten_glUniform2fv": _emscripten_glUniform2fv, + "_emscripten_glUniform2i": _emscripten_glUniform2i, + "_emscripten_glUniform2iv": _emscripten_glUniform2iv, + "_emscripten_glUniform3f": _emscripten_glUniform3f, + "_emscripten_glUniform3fv": _emscripten_glUniform3fv, + "_emscripten_glUniform3i": _emscripten_glUniform3i, + "_emscripten_glUniform3iv": _emscripten_glUniform3iv, + "_emscripten_glUniform4f": _emscripten_glUniform4f, + "_emscripten_glUniform4fv": _emscripten_glUniform4fv, + "_emscripten_glUniform4i": _emscripten_glUniform4i, + "_emscripten_glUniform4iv": _emscripten_glUniform4iv, + "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, + "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, + "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, + "_emscripten_glUseProgram": _emscripten_glUseProgram, + "_emscripten_glValidateProgram": _emscripten_glValidateProgram, + "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, + "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, + "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, + "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, + "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, + "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, + "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, + "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, + "_emscripten_glVertexAttribDivisorANGLE": _emscripten_glVertexAttribDivisorANGLE, + "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, + "_emscripten_glViewport": _emscripten_glViewport, + "_emscripten_memcpy_big": _emscripten_memcpy_big, + "_emscripten_request_pointerlock": _emscripten_request_pointerlock, + "_emscripten_resize_heap": _emscripten_resize_heap, + "_emscripten_run_script": _emscripten_run_script, + "_emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, + "_emscripten_set_click_callback_on_thread": _emscripten_set_click_callback_on_thread, + "_emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, + "_emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, + "_emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, + "_emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, + "_emscripten_set_main_loop": _emscripten_set_main_loop, + "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, + "_emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, + "_emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, + "_emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, + "_emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, + "_exit": _exit, + "_fd_write": _fd_write, + "_glActiveTexture": _glActiveTexture, + "_glAttachShader": _glAttachShader, + "_glBindAttribLocation": _glBindAttribLocation, + "_glBindBuffer": _glBindBuffer, + "_glBindTexture": _glBindTexture, + "_glBlendFunc": _glBlendFunc, + "_glBufferData": _glBufferData, + "_glBufferSubData": _glBufferSubData, + "_glClear": _glClear, + "_glClearColor": _glClearColor, + "_glClearDepthf": _glClearDepthf, + "_glCompileShader": _glCompileShader, + "_glCompressedTexImage2D": _glCompressedTexImage2D, + "_glCreateProgram": _glCreateProgram, + "_glCreateShader": _glCreateShader, + "_glCullFace": _glCullFace, + "_glDeleteBuffers": _glDeleteBuffers, + "_glDeleteProgram": _glDeleteProgram, + "_glDeleteShader": _glDeleteShader, + "_glDeleteTextures": _glDeleteTextures, + "_glDepthFunc": _glDepthFunc, + "_glDetachShader": _glDetachShader, + "_glDisable": _glDisable, + "_glDisableVertexAttribArray": _glDisableVertexAttribArray, + "_glDrawArrays": _glDrawArrays, + "_glDrawElements": _glDrawElements, + "_glEnable": _glEnable, + "_glEnableVertexAttribArray": _glEnableVertexAttribArray, + "_glFrontFace": _glFrontFace, + "_glGenBuffers": _glGenBuffers, + "_glGenTextures": _glGenTextures, + "_glGetAttribLocation": _glGetAttribLocation, + "_glGetFloatv": _glGetFloatv, + "_glGetProgramInfoLog": _glGetProgramInfoLog, + "_glGetProgramiv": _glGetProgramiv, + "_glGetShaderInfoLog": _glGetShaderInfoLog, + "_glGetShaderiv": _glGetShaderiv, + "_glGetString": _glGetString, + "_glGetUniformLocation": _glGetUniformLocation, + "_glLinkProgram": _glLinkProgram, + "_glPixelStorei": _glPixelStorei, + "_glReadPixels": _glReadPixels, + "_glShaderSource": _glShaderSource, + "_glTexImage2D": _glTexImage2D, + "_glTexParameteri": _glTexParameteri, + "_glUniform1i": _glUniform1i, + "_glUniform4f": _glUniform4f, + "_glUniformMatrix4fv": _glUniformMatrix4fv, + "_glUseProgram": _glUseProgram, + "_glVertexAttribPointer": _glVertexAttribPointer, + "_glViewport": _glViewport, + "_glfwCreateWindow": _glfwCreateWindow, + "_glfwDefaultWindowHints": _glfwDefaultWindowHints, + "_glfwDestroyWindow": _glfwDestroyWindow, + "_glfwGetCursorPos": _glfwGetCursorPos, + "_glfwGetKey": _glfwGetKey, + "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, + "_glfwGetTime": _glfwGetTime, + "_glfwGetVideoModes": _glfwGetVideoModes, + "_glfwInit": _glfwInit, + "_glfwMakeContextCurrent": _glfwMakeContextCurrent, + "_glfwSetCharCallback": _glfwSetCharCallback, + "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, + "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, + "_glfwSetDropCallback": _glfwSetDropCallback, + "_glfwSetErrorCallback": _glfwSetErrorCallback, + "_glfwSetKeyCallback": _glfwSetKeyCallback, + "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, + "_glfwSetScrollCallback": _glfwSetScrollCallback, + "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, + "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, + "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, + "_glfwSwapBuffers": _glfwSwapBuffers, + "_glfwSwapInterval": _glfwSwapInterval, + "_glfwTerminate": _glfwTerminate, + "_glfwWindowHint": _glfwWindowHint, + "_llvm_exp2_f32": _llvm_exp2_f32, + "_llvm_stackrestore": _llvm_stackrestore, + "_llvm_stacksave": _llvm_stacksave, + "_nanosleep": _nanosleep, + "_time": _time, + "_usleep": _usleep, + "abortOnCannotGrowMemory": abortOnCannotGrowMemory, + "demangle": demangle, + "demangleAll": demangleAll, + "emscriptenWebGLGet": emscriptenWebGLGet, + "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, + "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, + "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, + "jsStackTrace": jsStackTrace, + "stackTrace": stackTrace, + "stringToNewUTF8": stringToNewUTF8, + "tempDoublePtr": tempDoublePtr, + "DYNAMICTOP_PTR": DYNAMICTOP_PTR +}; +// EMSCRIPTEN_START_ASM +var asm =Module["asm"]// EMSCRIPTEN_END_ASM +(asmGlobalArg, asmLibraryArg, buffer); + +Module["asm"] = asm; +var ___errno_location = Module["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___errno_location"].apply(null, arguments) +}; + +var _emscripten_GetProcAddress = Module["_emscripten_GetProcAddress"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_GetProcAddress"].apply(null, arguments) +}; + +var _fflush = Module["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_fflush"].apply(null, arguments) +}; + +var _free = Module["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_free"].apply(null, arguments) +}; + +var _llvm_round_f32 = Module["_llvm_round_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_llvm_round_f32"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_capture__webaudio = Module["_ma_device_process_pcm_frames_capture__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_capture__webaudio"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_playback__webaudio = Module["_ma_device_process_pcm_frames_playback__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_playback__webaudio"].apply(null, arguments) +}; + +var _main = Module["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_main"].apply(null, arguments) +}; + +var _malloc = Module["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_malloc"].apply(null, arguments) +}; + +var _memcpy = Module["_memcpy"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memcpy"].apply(null, arguments) +}; + +var _memmove = Module["_memmove"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memmove"].apply(null, arguments) +}; + +var _memset = Module["_memset"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memset"].apply(null, arguments) +}; + +var _sbrk = Module["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_sbrk"].apply(null, arguments) +}; + +var _strstr = Module["_strstr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_strstr"].apply(null, arguments) +}; + +var establishStackSpace = Module["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["establishStackSpace"].apply(null, arguments) +}; + +var stackAlloc = Module["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackAlloc"].apply(null, arguments) +}; + +var stackRestore = Module["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackRestore"].apply(null, arguments) +}; + +var stackSave = Module["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackSave"].apply(null, arguments) +}; + +var dynCall_ff = Module["dynCall_ff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ff"].apply(null, arguments) +}; + +var dynCall_fff = Module["dynCall_fff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_fff"].apply(null, arguments) +}; + +var dynCall_i = Module["dynCall_i"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_i"].apply(null, arguments) +}; + +var dynCall_ii = Module["dynCall_ii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ii"].apply(null, arguments) +}; + +var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iidiiii"].apply(null, arguments) +}; + +var dynCall_iii = Module["dynCall_iii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iii"].apply(null, arguments) +}; + +var dynCall_iiii = Module["dynCall_iiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiii"].apply(null, arguments) +}; + +var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiii"].apply(null, arguments) +}; + +var dynCall_jiji = Module["dynCall_jiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_jiji"].apply(null, arguments) +}; + +var dynCall_v = Module["dynCall_v"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_v"].apply(null, arguments) +}; + +var dynCall_vf = Module["dynCall_vf"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vf"].apply(null, arguments) +}; + +var dynCall_vff = Module["dynCall_vff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vff"].apply(null, arguments) +}; + +var dynCall_vffff = Module["dynCall_vffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vffff"].apply(null, arguments) +}; + +var dynCall_vfi = Module["dynCall_vfi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vfi"].apply(null, arguments) +}; + +var dynCall_vi = Module["dynCall_vi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vi"].apply(null, arguments) +}; + +var dynCall_vidd = Module["dynCall_vidd"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vidd"].apply(null, arguments) +}; + +var dynCall_vif = Module["dynCall_vif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vif"].apply(null, arguments) +}; + +var dynCall_viff = Module["dynCall_viff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viff"].apply(null, arguments) +}; + +var dynCall_vifff = Module["dynCall_vifff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vifff"].apply(null, arguments) +}; + +var dynCall_viffff = Module["dynCall_viffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viffff"].apply(null, arguments) +}; + +var dynCall_vii = Module["dynCall_vii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vii"].apply(null, arguments) +}; + +var dynCall_viif = Module["dynCall_viif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viif"].apply(null, arguments) +}; + +var dynCall_viii = Module["dynCall_viii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viii"].apply(null, arguments) +}; + +var dynCall_viiii = Module["dynCall_viiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiii"].apply(null, arguments) +}; + +var dynCall_viiiii = Module["dynCall_viiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiii"].apply(null, arguments) +}; + +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiji = Module["dynCall_viiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiji"].apply(null, arguments) +}; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["getMemory"] = getMemory; +if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["addRunDependency"] = addRunDependency; +Module["removeRunDependency"] = removeRunDependency; +if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["FS_createFolder"] = FS.createFolder; +Module["FS_createPath"] = FS.createPath; +Module["FS_createDataFile"] = FS.createDataFile; +Module["FS_createPreloadedFile"] = FS.createPreloadedFile; +Module["FS_createLazyFile"] = FS.createLazyFile; +Module["FS_createLink"] = FS.createLink; +Module["FS_createDevice"] = FS.createDevice; +Module["FS_unlink"] = FS.unlink; +if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "establishStackSpace")) Module["establishStackSpace"] = function() { abort("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +Module["calledRun"] = calledRun; + + + +var calledRun; + + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + + args = args || []; + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + + var ret = Module['_main'](argc, argv); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + noExitRuntime = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exception thrown: ' + toLog); + quit_(1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = out; + var printErr = err; + var has = false; + out = err = function(x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = Module['_fflush']; + if (flush) flush(0); + // also flush in the JS FS layer + ['stdout', 'stderr'].forEach(function(name) { + var info = FS.analyzePath('/dev/' + name); + if (!info) return; + var stream = info.object; + var rdev = stream.rdev; + var tty = TTY.ttys[rdev]; + if (tty && tty.output && tty.output.length) { + has = true; + } + }); + } catch(e) {} + out = print; + err = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + err('exit(' + status + ') called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + + + noExitRuntime = true; + +run(); + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/examples/web/textures/textures_image_text.wasm b/examples/web/textures/textures_image_text.wasm index 8b50536..6ab1e36 100644 Binary files a/examples/web/textures/textures_image_text.wasm and b/examples/web/textures/textures_image_text.wasm differ diff --git a/examples/web/textures/textures_to_image.html b/examples/web/textures/textures_to_image.html index 3d8f0dc..ed999b2 100644 --- a/examples/web/textures/textures_to_image.html +++ b/examples/web/textures/textures_to_image.html @@ -1 +1,329 @@ -raylib HTML5 GAME
Downloading...
\ No newline at end of file + + + + + + + raylib HTML5 GAME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/examples/web/textures/textures_to_image.js b/examples/web/textures/textures_to_image.js index 37dd7bc..fa902e1 100644 --- a/examples/web/textures/textures_to_image.js +++ b/examples/web/textures/textures_to_image.js @@ -1 +1,10698 @@ -var Module=typeof Module!=="undefined"?Module:{};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="textures/textures_to_image.data";var REMOTE_PACKAGE_BASE="textures_to_image.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata.remote_package_size;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","resources",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createDataFile"](this.name,null,byteArray,true,true,true);Module["removeRunDependency"]("fp "+that.name);this.requests[this.name]=null}};var files=metadata.files;for(var i=0;i1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end<=_emscripten_get_heap_size()){HEAP32[DYNAMICTOP_PTR>>2]=end}else{return 0}return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);if(typeof WebAssembly!=="object"){err("no native wasm support detected")}var wasmMemory;var wasmTable;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_NORMAL=0;var ALLOC_NONE=3;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[_malloc,stackAlloc,dynamicAlloc][allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var WASM_PAGE_SIZE=65536;var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var DYNAMIC_BASE=5273424,DYNAMICTOP_PTR=30512;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="textures_to_image.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":320,"maximum":320,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);return exports};function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ___lock(){}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)},resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(1)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=function(e){done(this.error);e.preventDefault()};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var NODEFS={isWindows:false,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process["binding"]("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"]}},bufferFrom:function(arrayBuffer){return Buffer.alloc?Buffer.from(arrayBuffer):new Buffer(arrayBuffer)},mount:function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(22)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return stat.mode},realPath:function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:function(flags){flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(!flags){return newFlags}else{throw new FS.ErrnoError(22)}},node_ops:{getattr:function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},lookup:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}return node},rename:function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},unlink:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},rmdir:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readdir:function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},symlink:function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},readlink:function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}}},stream_ops:{open:function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},close:function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(-e.errno)}},read:function(stream,buffer,offset,length,position){if(length===0)return 0;try{return fs.readSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},write:function(stream,buffer,offset,length,position){try{return fs.writeSync(stream.nfd,NODEFS.bufferFrom(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(-e.errno)}},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(-e.errno)}}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(5)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(22)}return position}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(40)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(40)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 13}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 13}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 13}return 0},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return 13;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 17}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return 20}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 16}}else{if(FS.isDir(node.mode)){return 21}}return 0},mayOpen:function(node,flags){if(!node){return 2}if(FS.isLink(node.mode)){return 40}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 21}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(24)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(29)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(16)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(16)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(20)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(22)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(22)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(1)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(5)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},getStreamFromFD:function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream},getSocketFromFD:function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket},getSocketAddress:function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();if(!(offset_high==-1&&offset_low<0)&&!(offset_high==0&&offset_low>=0)){return-ERRNO_CODES.EOVERFLOW}var offset=offset_low;FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[result>>2]=tempI64[0],HEAP32[result+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-ERRNO_CODES.EINVAL}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:{return-ERRNO_CODES.EINVAL}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21509:case 21505:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21519:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return-ERRNO_CODES.EINVAL}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}case 21524:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___unlock(){}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";Module["readAsync"](url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){return _emscripten_GetProcAddress(name_)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i0||window.pageYOffset>0){return[window.pageXOffset,window.pageYOffset]}if(typeof document.documentElement.scrollLeft!=="undefined"||typeof document.documentElement.scrollTop!=="undefined"){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}return[document.body.scrollLeft|0,document.body.scrollTop|0]},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},tick:function(){if(window["performance"]&&window["performance"]["now"])return window["performance"]["now"]();else return Date.now()},fullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}};function __requestPointerLock(target){if(target.requestPointerLock){target.requestPointerLock()}else if(target.mozRequestPointerLock){target.mozRequestPointerLock()}else if(target.webkitRequestPointerLock){target.webkitRequestPointerLock()}else if(target.msRequestPointerLock){target.msRequestPointerLock()}else{if(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock){return-3}else{return-1}}return 0}function _emscripten_exit_pointerlock(){JSEvents.removeDeferredCalls(__requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else if(document.msExitPointerLock){document.msExitPointerLock()}else if(document.mozExitPointerLock){document.mozExitPointerLock()}else if(document.webkitExitPointerLock){document.webkitExitPointerLock()}else{return-1}return 0}function __fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;__fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_num_gamepads(){return JSEvents.lastGamepadState.length}function __fillPointerlockChangeEventData(eventStruct,e){var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP32[eventStruct>>2]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement&&pointerLockElement.id?pointerLockElement.id:"";stringToUTF8(nodeName,eventStruct+4,128);stringToUTF8(id,eventStruct+132,128)}function _emscripten_get_pointerlock_status(pointerlockStatus){if(pointerlockStatus)__fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);return ctx&&GL.registerContext(ctx,webGLContextAttributes)},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){var instancedArraysExt=GLctx.getExtension("ANGLE_instanced_arrays");if(instancedArraysExt){GLctx["vertexAttribDivisor"]=function(index,divisor){instancedArraysExt["vertexAttribDivisorANGLE"](index,divisor)};GLctx["drawArraysInstanced"]=function(mode,first,count,primcount){instancedArraysExt["drawArraysInstancedANGLE"](mode,first,count,primcount)};GLctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){instancedArraysExt["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}var vaoExt=GLctx.getExtension("OES_vertex_array_object");if(vaoExt){GLctx["createVertexArray"]=function(){return vaoExt["createVertexArrayOES"]()};GLctx["deleteVertexArray"]=function(vao){vaoExt["deleteVertexArrayOES"](vao)};GLctx["bindVertexArray"]=function(vao){vaoExt["bindVertexArrayOES"](vao)};GLctx["isVertexArray"]=function(vao){return vaoExt["isVertexArrayOES"](vao)}}var drawBuffersExt=GLctx.getExtension("WEBGL_draw_buffers");if(drawBuffersExt){GLctx["drawBuffers"]=function(n,bufs){drawBuffersExt["drawBuffersWEBGL"](n,bufs)}}}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions();if(exts&&exts.length>0){GLctx.getSupportedExtensions().forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})}},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;if(bufSize>0&&name){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=="Integer"&&type!=="Integer64"){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case"Float":HEAPF32[p+i*4>>2]=result[i];break;case"Boolean":HEAP8[p+i>>0]=result[i]?1:0;break;default:throw"internal glGet error, bad type: "+type}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);return}}switch(type){case"Integer64":tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[p>>2]=tempI64[0],HEAP32[p+4>>2]=tempI64[1];break;case"Integer":HEAP32[p>>2]=ret;break;case"Float":HEAPF32[p>>2]=ret;break;case"Boolean":HEAP8[p>>0]=ret?1:0;break;default:throw"internal glGet error, bad type: "+type}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,"Boolean")}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){if(GL.lastError){var error=GL.lastError;GL.lastError=0;return error}else{return GLctx.getError()}}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,"Integer")}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;if(bufSize>0&&source){var numBytesWrittenExclNull=stringToUTF8(result,source,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Float")}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,"Integer")}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case"Integer":HEAP32[params>>2]=data;break;case"Float":HEAPF32[params>>2]=data;break;case"FloatToInteger":HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case"Float":HEAPF32[params+i*4>>2]=data[i];break;case"FloatToInteger":HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"Float")}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,"FloatToInteger")}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4};var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var sizePerPixel=__colorChannelsInGlTextureFormat[format]*__sizeOfGlTextureElementType[type];if(!sizePerPixel){GL.recordError(1280);return}var bytes=__computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);var end=pixels+bytes;switch(type){case 5121:return HEAPU8.subarray(pixels,end);case 5126:return HEAPF32.subarray(pixels>>2,end>>2);case 5125:case 34042:return HEAPU32.subarray(pixels>>2,end>>2);case 5123:case 33635:case 32819:case 32820:case 36193:return HEAPU16.subarray(pixels>>1,end>>1);default:GL.recordError(1280)}}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){GLctx.uniform3iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*12>>2))}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){GLctx.uniform4iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*16>>2))}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var __specialEventTargets=[0,typeof document!=="undefined"?document:0,typeof window!=="undefined"?window:0];function __findEventTarget(target){try{if(!target)return window;if(typeof target==="number")target=__specialEventTargets[target]||UTF8ToString(target);if(target==="#window")return window;else if(target==="#document")return document;else if(target==="#screen")return screen;else if(target==="#canvas")return Module["canvas"];return typeof target==="string"?document.getElementById(target):target}catch(e){return null}}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.mozRequestPointerLock&&!target.webkitRequestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(__requestPointerLock,2,[target]);return 1}else{return-2}}return __requestPointerLock(target)}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){abortOnCannotGrowMemory(requestedSize)}function _emscripten_run_script(ptr){eval(UTF8ToString(ptr))}function _emscripten_sample_gamepad_data(){return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function __fillMouseEventData(eventStruct,e,target){HEAPF64[eventStruct>>3]=JSEvents.tick();HEAP32[eventStruct+8>>2]=e.screenX;HEAP32[eventStruct+12>>2]=e.screenY;HEAP32[eventStruct+16>>2]=e.clientX;HEAP32[eventStruct+20>>2]=e.clientY;HEAP32[eventStruct+24>>2]=e.ctrlKey;HEAP32[eventStruct+28>>2]=e.shiftKey;HEAP32[eventStruct+32>>2]=e.altKey;HEAP32[eventStruct+36>>2]=e.metaKey;HEAP16[eventStruct+40>>1]=e.button;HEAP16[eventStruct+42>>1]=e.buttons;HEAP32[eventStruct+44>>2]=e["movementX"]||e["mozMovementX"]||e["webkitMovementX"]||e.screenX-JSEvents.previousScreenX;HEAP32[eventStruct+48>>2]=e["movementY"]||e["mozMovementY"]||e["webkitMovementY"]||e.screenY-JSEvents.previousScreenY;if(Module["canvas"]){var rect=Module["canvas"].getBoundingClientRect();HEAP32[eventStruct+60>>2]=e.clientX-rect.left;HEAP32[eventStruct+64>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+60>>2]=0;HEAP32[eventStruct+64>>2]=0}if(target){var rect=JSEvents.getBoundingClientRectOrZeros(target);HEAP32[eventStruct+52>>2]=e.clientX-rect.left;HEAP32[eventStruct+56>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+52>>2]=0;HEAP32[eventStruct+56>>2]=0}if(e.type!=="wheel"&&e.type!=="mousewheel"){JSEvents.previousScreenX=e.screenX;JSEvents.previousScreenY=e.screenY}}function __registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(72);target=__findEventTarget(target);var mouseEventHandlerFunc=function(event){var e=event||window.event;__fillMouseEventData(JSEvents.mouseEvent,e,target);if(dynCall_iiii(callbackfunc,eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};if(JSEvents.isInternetExplorer()&&eventTypeString=="mousedown")eventHandler.allowsDeferredCalls=false;JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread);return 0}function __fillFullscreenChangeEventData(eventStruct,e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function __registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.fullscreenChangeEvent)JSEvents.fullscreenChangeEvent=_malloc(280);var fullscreenChangeEventhandlerFunc=function(event){var e=event||window.event;var fullscreenChangeEvent=JSEvents.fullscreenChangeEvent;__fillFullscreenChangeEventData(fullscreenChangeEvent,e);if(dynCall_iiii(callbackfunc,eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:false,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){if(typeof JSEvents.fullscreenEnabled()==="undefined")return-1;target=target?__findEventTarget(target):__specialEventTargets[1];if(!target)return-4;__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"mozfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);__registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"msfullscreenchange",targetThread);return 0}function __registerGamepadEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.gamepadEvent)JSEvents.gamepadEvent=_malloc(1432);var gamepadEventHandlerFunc=function(event){var e=event||window.event;var gamepadEvent=JSEvents.gamepadEvent;__fillGamepadEventData(gamepadEvent,e.gamepad);if(dynCall_iiii(callbackfunc,eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread);return 0}function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;__registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread);return 0}function __registerKeyEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.keyEvent)JSEvents.keyEvent=_malloc(164);var keyEventHandlerFunc=function(event){var e=event||window.event;var keyEventData=JSEvents.keyEvent;stringToUTF8(e.key?e.key:"",keyEventData+0,32);stringToUTF8(e.code?e.code:"",keyEventData+32,32);HEAP32[keyEventData+64>>2]=e.location;HEAP32[keyEventData+68>>2]=e.ctrlKey;HEAP32[keyEventData+72>>2]=e.shiftKey;HEAP32[keyEventData+76>>2]=e.altKey;HEAP32[keyEventData+80>>2]=e.metaKey;HEAP32[keyEventData+84>>2]=e.repeat;stringToUTF8(e.locale?e.locale:"",keyEventData+88,32);stringToUTF8(e.char?e.char:"",keyEventData+120,32);HEAP32[keyEventData+152>>2]=e.charCode;HEAP32[keyEventData+156>>2]=e.keyCode;HEAP32[keyEventData+160>>2]=e.which;if(dynCall_iiii(callbackfunc,eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:JSEvents.isInternetExplorer()?false:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function __registerTouchEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.touchEvent)JSEvents.touchEvent=_malloc(1684);target=__findEventTarget(target);var touchEventHandlerFunc=function(event){var e=event||window.event;var touches={};for(var i=0;i>2]=e.ctrlKey;HEAP32[ptr+8>>2]=e.shiftKey;HEAP32[ptr+12>>2]=e.altKey;HEAP32[ptr+16>>2]=e.metaKey;ptr+=20;var canvasRect=Module["canvas"]?Module["canvas"].getBoundingClientRect():undefined;var targetRect=JSEvents.getBoundingClientRectOrZeros(target);var numTouches=0;for(var i in touches){var t=touches[i];HEAP32[ptr>>2]=t.identifier;HEAP32[ptr+4>>2]=t.screenX;HEAP32[ptr+8>>2]=t.screenY;HEAP32[ptr+12>>2]=t.clientX;HEAP32[ptr+16>>2]=t.clientY;HEAP32[ptr+20>>2]=t.pageX;HEAP32[ptr+24>>2]=t.pageY;HEAP32[ptr+28>>2]=t.changed;HEAP32[ptr+32>>2]=t.onTarget;if(canvasRect){HEAP32[ptr+44>>2]=t.clientX-canvasRect.left;HEAP32[ptr+48>>2]=t.clientY-canvasRect.top}else{HEAP32[ptr+44>>2]=0;HEAP32[ptr+48>>2]=0}HEAP32[ptr+36>>2]=t.clientX-targetRect.left;HEAP32[ptr+40>>2]=t.clientY-targetRect.top;ptr+=52;if(++numTouches>=32){break}}HEAP32[touchEvent>>2]=numTouches;if(dynCall_iiii(callbackfunc,eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread);return 0}function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread);return 0}function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread);return 0}function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread);return 0}function _exit(status){exit(status)}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,"Float")}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";if(maxLength>0&&infoLog){var numBytesWrittenExclNull=stringToUTF8(log,infoLog,maxLength);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions();var gl_exts=[];for(var i=0;i=0&&arrayIndex>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GLFW={Window:function(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.framebufferSizeFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.dropFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null},WindowFromId:function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 94;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:function(win){var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:function(event){if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;dynCall_vii(GLFW.active.charFunc,GLFW.active.id,charCode)},onKeyChanged:function(keyCode,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(!GLFW.active.keyFunc)return;if(repeat)status=2;dynCall_viiiii(GLFW.active.keyFunc,GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))},onGamepadConnected:function(event){GLFW.refreshJoysticks()},onGamepadDisconnected:function(event){GLFW.refreshJoysticks()},onKeydown:function(event){GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:function(event){GLFW.onKeyChanged(event.keyCode,0)},onBlur:function(event){if(!GLFW.active)return;for(var i=0;i0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,1)},onMouseleave:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"]||!GLFW.active.cursorEnterFunc)return;dynCall_vii(GLFW.active.cursorEnterFunc,GLFW.active.id,0)},onMouseButtonChanged:function(event,status){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=0;if(event.type=="mousewheel"){sx=event.wheelDeltaX;sy=event.wheelDeltaY}else{sx=event.deltaX;sy=event.deltaY}dynCall_vidd(GLFW.active.scrollFunc,GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:function(width,height){if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.windowSizeFunc)return;dynCall_viii(GLFW.active.windowSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},onFramebufferSizeChanged:function(){if(!GLFW.active)return;if(!GLFW.active.framebufferSizeFunc)return;dynCall_viii(GLFW.active.framebufferSizeFunc,GLFW.active.id,GLFW.active.width,GLFW.active.height)},requestFullscreen:function(){var RFS=Module["canvas"]["requestFullscreen"]||Module["canvas"]["mozRequestFullScreen"]||Module["canvas"]["webkitRequestFullScreen"]||function(){};RFS.apply(Module["canvas"],[])},requestFullScreen:function(){err("GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.");GLFW.requestFullScreen=function(){return GLFW.requestFullscreen()};return GLFW.requestFullscreen()},exitFullscreen:function(){Browser.exitFullscreen()},cancelFullScreen:function(){err("GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.");GLFW.cancelFullScreen=function(){return GLFW.exitFullscreen()};return GLFW.exitFullscreen()},getTime:function(){return _emscripten_get_now()/1e3},setWindowTitle:function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=UTF8ToString(title);if(GLFW.active.id==win.id){document.title=win.title}},setJoystickCallback:function(cbfun){GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks()},joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function(){if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:null;GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joy0},getCursorPos:function(winid,x,y){setValue(x,Browser.mouseX,"double");setValue(y,Browser.mouseY,"double")},getMousePos:function(winid,x,y){setValue(x,Browser.mouseX,"i32");setValue(y,Browser.mouseY,"i32")},setCursorPos:function(winid,x,y){},getWindowPos:function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}setValue(x,wx,"i32");setValue(y,wy,"i32")},setWindowPos:function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}setValue(width,ww,"i32");setValue(height,wh,"i32")},setWindowSize:function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){GLFW.requestFullscreen()}else{GLFW.exitFullscreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(!win.windowSizeFunc)return;dynCall_viii(win.windowSizeFunc,win.id,width,height)},createWindow:function(width,height,title,monitor,share){var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){GLFW.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}if(!Module.ctx)return 0;var win=new GLFW.Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc)dynCall_vi(win.windowCloseFunc,win.id);GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i>2];var nanoseconds=HEAP32[rqtp+4>>2];if(rmtp!==0){HEAP32[rmtp>>2]=0;HEAP32[rmtp+4>>2]=0}return _usleep(seconds*1e6+nanoseconds/1e3)}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}FS.staticInit();Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function _emscripten_get_now_actual(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmGlobalArg={};var asmLibraryArg={"c":abort,"b":___assert_fail,"uc":___lock,"C":___setErrNo,"db":___syscall140,"Ua":___syscall145,"B":___syscall146,"m":___syscall221,"pa":___syscall5,"A":___syscall54,"W":___syscall6,"z":___unlock,"y":_eglGetProcAddress,"V":_emscripten_exit_pointerlock,"Ad":_emscripten_get_gamepad_status,"pd":_emscripten_get_heap_size,"ed":_emscripten_get_num_gamepads,"U":_emscripten_get_pointerlock_status,"Lc":_emscripten_glActiveTexture,"Bc":_emscripten_glAttachShader,"tc":_emscripten_glBeginQueryEXT,"oc":_emscripten_glBindAttribLocation,"hc":_emscripten_glBindBuffer,"bc":_emscripten_glBindFramebuffer,"Wb":_emscripten_glBindRenderbuffer,"Rb":_emscripten_glBindTexture,"Ib":_emscripten_glBindVertexArrayOES,"yb":_emscripten_glBlendColor,"rb":_emscripten_glBlendEquation,"ob":_emscripten_glBlendEquationSeparate,"nb":_emscripten_glBlendFunc,"mb":_emscripten_glBlendFuncSeparate,"lb":_emscripten_glBufferData,"kb":_emscripten_glBufferSubData,"jb":_emscripten_glCheckFramebufferStatus,"ib":_emscripten_glClear,"hb":_emscripten_glClearColor,"gb":_emscripten_glClearDepthf,"fb":_emscripten_glClearStencil,"eb":_emscripten_glColorMask,"cb":_emscripten_glCompileShader,"bb":_emscripten_glCompressedTexImage2D,"ab":_emscripten_glCompressedTexSubImage2D,"$a":_emscripten_glCopyTexImage2D,"_a":_emscripten_glCopyTexSubImage2D,"Za":_emscripten_glCreateProgram,"Ya":_emscripten_glCreateShader,"Xa":_emscripten_glCullFace,"Wa":_emscripten_glDeleteBuffers,"Va":_emscripten_glDeleteFramebuffers,"Ta":_emscripten_glDeleteProgram,"Sa":_emscripten_glDeleteQueriesEXT,"Ra":_emscripten_glDeleteRenderbuffers,"Qa":_emscripten_glDeleteShader,"Pa":_emscripten_glDeleteTextures,"Oa":_emscripten_glDeleteVertexArraysOES,"Na":_emscripten_glDepthFunc,"Ma":_emscripten_glDepthMask,"La":_emscripten_glDepthRangef,"Ka":_emscripten_glDetachShader,"Ja":_emscripten_glDisable,"Ia":_emscripten_glDisableVertexAttribArray,"Ha":_emscripten_glDrawArrays,"Ga":_emscripten_glDrawArraysInstancedANGLE,"Fa":_emscripten_glDrawBuffersWEBGL,"Ea":_emscripten_glDrawElements,"Da":_emscripten_glDrawElementsInstancedANGLE,"Ca":_emscripten_glEnable,"Ba":_emscripten_glEnableVertexAttribArray,"Aa":_emscripten_glEndQueryEXT,"za":_emscripten_glFinish,"ya":_emscripten_glFlush,"xa":_emscripten_glFramebufferRenderbuffer,"wa":_emscripten_glFramebufferTexture2D,"va":_emscripten_glFrontFace,"ua":_emscripten_glGenBuffers,"ta":_emscripten_glGenFramebuffers,"sa":_emscripten_glGenQueriesEXT,"ra":_emscripten_glGenRenderbuffers,"qa":_emscripten_glGenTextures,"oa":_emscripten_glGenVertexArraysOES,"na":_emscripten_glGenerateMipmap,"ma":_emscripten_glGetActiveAttrib,"la":_emscripten_glGetActiveUniform,"ka":_emscripten_glGetAttachedShaders,"ja":_emscripten_glGetAttribLocation,"ia":_emscripten_glGetBooleanv,"ha":_emscripten_glGetBufferParameteriv,"ga":_emscripten_glGetError,"fa":_emscripten_glGetFloatv,"ea":_emscripten_glGetFramebufferAttachmentParameteriv,"da":_emscripten_glGetIntegerv,"ca":_emscripten_glGetProgramInfoLog,"ba":_emscripten_glGetProgramiv,"aa":_emscripten_glGetQueryObjecti64vEXT,"$":_emscripten_glGetQueryObjectivEXT,"_":_emscripten_glGetQueryObjectui64vEXT,"Z":_emscripten_glGetQueryObjectuivEXT,"Y":_emscripten_glGetQueryivEXT,"X":_emscripten_glGetRenderbufferParameteriv,"me":_emscripten_glGetShaderInfoLog,"le":_emscripten_glGetShaderPrecisionFormat,"ke":_emscripten_glGetShaderSource,"je":_emscripten_glGetShaderiv,"ie":_emscripten_glGetString,"he":_emscripten_glGetTexParameterfv,"ge":_emscripten_glGetTexParameteriv,"fe":_emscripten_glGetUniformLocation,"ee":_emscripten_glGetUniformfv,"de":_emscripten_glGetUniformiv,"ce":_emscripten_glGetVertexAttribPointerv,"be":_emscripten_glGetVertexAttribfv,"ae":_emscripten_glGetVertexAttribiv,"$d":_emscripten_glHint,"_d":_emscripten_glIsBuffer,"Zd":_emscripten_glIsEnabled,"Yd":_emscripten_glIsFramebuffer,"Xd":_emscripten_glIsProgram,"Wd":_emscripten_glIsQueryEXT,"Vd":_emscripten_glIsRenderbuffer,"Ud":_emscripten_glIsShader,"Td":_emscripten_glIsTexture,"Sd":_emscripten_glIsVertexArrayOES,"Rd":_emscripten_glLineWidth,"Qd":_emscripten_glLinkProgram,"Pd":_emscripten_glPixelStorei,"Od":_emscripten_glPolygonOffset,"Nd":_emscripten_glQueryCounterEXT,"Md":_emscripten_glReadPixels,"Ld":_emscripten_glReleaseShaderCompiler,"Kd":_emscripten_glRenderbufferStorage,"Jd":_emscripten_glSampleCoverage,"Id":_emscripten_glScissor,"Hd":_emscripten_glShaderBinary,"Gd":_emscripten_glShaderSource,"Fd":_emscripten_glStencilFunc,"Ed":_emscripten_glStencilFuncSeparate,"Dd":_emscripten_glStencilMask,"Cd":_emscripten_glStencilMaskSeparate,"Bd":_emscripten_glStencilOp,"zd":_emscripten_glStencilOpSeparate,"yd":_emscripten_glTexImage2D,"xd":_emscripten_glTexParameterf,"wd":_emscripten_glTexParameterfv,"vd":_emscripten_glTexParameteri,"ud":_emscripten_glTexParameteriv,"td":_emscripten_glTexSubImage2D,"sd":_emscripten_glUniform1f,"rd":_emscripten_glUniform1fv,"qd":_emscripten_glUniform1i,"od":_emscripten_glUniform1iv,"nd":_emscripten_glUniform2f,"md":_emscripten_glUniform2fv,"ld":_emscripten_glUniform2i,"kd":_emscripten_glUniform2iv,"jd":_emscripten_glUniform3f,"id":_emscripten_glUniform3fv,"hd":_emscripten_glUniform3i,"gd":_emscripten_glUniform3iv,"fd":_emscripten_glUniform4f,"dd":_emscripten_glUniform4fv,"cd":_emscripten_glUniform4i,"bd":_emscripten_glUniform4iv,"ad":_emscripten_glUniformMatrix2fv,"$c":_emscripten_glUniformMatrix3fv,"_c":_emscripten_glUniformMatrix4fv,"Zc":_emscripten_glUseProgram,"Yc":_emscripten_glValidateProgram,"Xc":_emscripten_glVertexAttrib1f,"Wc":_emscripten_glVertexAttrib1fv,"Vc":_emscripten_glVertexAttrib2f,"Uc":_emscripten_glVertexAttrib2fv,"Tc":_emscripten_glVertexAttrib3f,"Sc":_emscripten_glVertexAttrib3fv,"Rc":_emscripten_glVertexAttrib4f,"Qc":_emscripten_glVertexAttrib4fv,"Pc":_emscripten_glVertexAttribDivisorANGLE,"Oc":_emscripten_glVertexAttribPointer,"Nc":_emscripten_glViewport,"Mc":_emscripten_memcpy_big,"Kc":_emscripten_request_pointerlock,"Jc":_emscripten_resize_heap,"T":_emscripten_run_script,"Ic":_emscripten_sample_gamepad_data,"Hc":_emscripten_set_click_callback_on_thread,"Gc":_emscripten_set_fullscreenchange_callback_on_thread,"Fc":_emscripten_set_gamepadconnected_callback_on_thread,"Ec":_emscripten_set_gamepaddisconnected_callback_on_thread,"Dc":_emscripten_set_keypress_callback_on_thread,"Cc":_emscripten_set_main_loop,"Ac":_emscripten_set_touchcancel_callback_on_thread,"zc":_emscripten_set_touchend_callback_on_thread,"yc":_emscripten_set_touchmove_callback_on_thread,"xc":_emscripten_set_touchstart_callback_on_thread,"wc":_exit,"vc":_glActiveTexture,"S":_glAttachShader,"k":_glBindAttribLocation,"d":_glBindBuffer,"f":_glBindFramebuffer,"R":_glBindRenderbuffer,"h":_glBindTexture,"sc":_glBlendFunc,"t":_glBufferData,"x":_glBufferSubData,"rc":_glCheckFramebufferStatus,"Q":_glClear,"P":_glClearColor,"qc":_glClearDepthf,"pc":_glCompileShader,"nc":_glCompressedTexImage2D,"mc":_glCreateProgram,"lc":_glCreateShader,"kc":_glCullFace,"s":_glDeleteBuffers,"jc":_glDeleteFramebuffers,"O":_glDeleteProgram,"ic":_glDeleteRenderbuffers,"N":_glDeleteShader,"r":_glDeleteTextures,"gc":_glDepthFunc,"M":_glDetachShader,"fc":_glDisable,"q":_glDisableVertexAttribArray,"ec":_glDrawArrays,"dc":_glDrawElements,"L":_glEnable,"j":_glEnableVertexAttribArray,"cc":_glFramebufferRenderbuffer,"p":_glFramebufferTexture2D,"ac":_glFrontFace,"o":_glGenBuffers,"$b":_glGenFramebuffers,"_b":_glGenRenderbuffers,"K":_glGenTextures,"w":_glGetAttribLocation,"Zb":_glGetFloatv,"Yb":_glGetProgramInfoLog,"J":_glGetProgramiv,"Xb":_glGetShaderInfoLog,"I":_glGetShaderiv,"l":_glGetString,"v":_glGetUniformLocation,"Vb":_glLinkProgram,"Ub":_glPixelStorei,"H":_glReadPixels,"Tb":_glRenderbufferStorage,"Sb":_glShaderSource,"G":_glTexImage2D,"e":_glTexParameteri,"Qb":_glUniform1i,"Pb":_glUniform4f,"Ob":_glUniformMatrix4fv,"u":_glUseProgram,"i":_glVertexAttribPointer,"Nb":_glViewport,"Mb":_glfwCreateWindow,"Lb":_glfwDefaultWindowHints,"Kb":_glfwDestroyWindow,"Jb":_glfwGetCursorPos,"n":_glfwGetTime,"Hb":_glfwInit,"Gb":_glfwMakeContextCurrent,"Fb":_glfwSetCharCallback,"Eb":_glfwSetCursorEnterCallback,"Db":_glfwSetCursorPosCallback,"Cb":_glfwSetDropCallback,"Bb":_glfwSetErrorCallback,"Ab":_glfwSetKeyCallback,"zb":_glfwSetMouseButtonCallback,"xb":_glfwSetScrollCallback,"wb":_glfwSetWindowIconifyCallback,"vb":_glfwSetWindowShouldClose,"ub":_glfwSetWindowSizeCallback,"tb":_glfwSwapBuffers,"F":_glfwTerminate,"g":_glfwWindowHint,"E":_llvm_stackrestore,"D":_llvm_stacksave,"sb":_nanosleep,"qb":_time,"pb":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);Module["asm"]=asm;var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["ne"].apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){return Module["asm"]["oe"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["pe"].apply(null,arguments)};var _ma_device_process_pcm_frames_capture__webaudio=Module["_ma_device_process_pcm_frames_capture__webaudio"]=function(){return Module["asm"]["qe"].apply(null,arguments)};var _ma_device_process_pcm_frames_playback__webaudio=Module["_ma_device_process_pcm_frames_playback__webaudio"]=function(){return Module["asm"]["re"].apply(null,arguments)};var _main=Module["_main"]=function(){return Module["asm"]["se"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["te"].apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return Module["asm"]["Ce"].apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return Module["asm"]["De"].apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return Module["asm"]["Ee"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["ue"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["ve"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["we"].apply(null,arguments)};var dynCall_vidd=Module["dynCall_vidd"]=function(){return Module["asm"]["xe"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["ye"].apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){return Module["asm"]["ze"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["Ae"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return Module["asm"]["Be"].apply(null,arguments)};Module["asm"]=asm;Module["getMemory"]=getMemory;Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(Module["thisProgram"]);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);Module["quit"](1,e)}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status)}Module["quit"](status,new ExitStatus(status))}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}Module["noExitRuntime"]=true;run(); +// Copyright 2010 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// The Module object: Our interface to the outside world. We import +// and export values on it. There are various ways Module can be used: +// 1. Not defined. We create it here +// 2. A function parameter, function(Module) { ..generated code.. } +// 3. pre-run appended it, var Module = {}; ..generated code.. +// 4. External script tag defines var Module. +// We need to check if Module already exists (e.g. case 3 above). +// Substitution will be replaced with actual code on later stage of the build, +// this way Closure Compiler will not mangle it (e.g. case 4. above). +// Note that if you want to run closure, and also to use Module +// after the generated code, you will need to define var Module = {}; +// before the code. Then that object will be used in the code, and you +// can continue to use Module afterwards as well. +var Module = typeof Module !== 'undefined' ? Module : {}; + +// --pre-jses are emitted after the Module integration code, so that they can +// refer to Module (if they choose; they can also define Module) + +if (!Module.expectedDataFileDownloads) { + Module.expectedDataFileDownloads = 0; + Module.finishedDataFileDownloads = 0; +} +Module.expectedDataFileDownloads++; +(function() { + var loadPackage = function(metadata) { + + var PACKAGE_PATH; + if (typeof window === 'object') { + PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'); + } else if (typeof location !== 'undefined') { + // worker + PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/'); + } else { + throw 'using preloaded data can only be done on a web page or in a web worker'; + } + var PACKAGE_NAME = 'textures/textures_to_image.data'; + var REMOTE_PACKAGE_BASE = 'textures_to_image.data'; + if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) { + Module['locateFile'] = Module['locateFilePackage']; + err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)'); + } + var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE; + + var REMOTE_PACKAGE_SIZE = metadata.remote_package_size; + var PACKAGE_UUID = metadata.package_uuid; + + function fetchRemotePackage(packageName, packageSize, callback, errback) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', packageName, true); + xhr.responseType = 'arraybuffer'; + xhr.onprogress = function(event) { + var url = packageName; + var size = packageSize; + if (event.total) size = event.total; + if (event.loaded) { + if (!xhr.addedTotal) { + xhr.addedTotal = true; + if (!Module.dataFileDownloads) Module.dataFileDownloads = {}; + Module.dataFileDownloads[url] = { + loaded: event.loaded, + total: size + }; + } else { + Module.dataFileDownloads[url].loaded = event.loaded; + } + var total = 0; + var loaded = 0; + var num = 0; + for (var download in Module.dataFileDownloads) { + var data = Module.dataFileDownloads[download]; + total += data.total; + loaded += data.loaded; + num++; + } + total = Math.ceil(total * Module.expectedDataFileDownloads/num); + if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')'); + } else if (!Module.dataFileDownloads) { + if (Module['setStatus']) Module['setStatus']('Downloading data...'); + } + }; + xhr.onerror = function(event) { + throw new Error("NetworkError for: " + packageName); + } + xhr.onload = function(event) { + if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + var packageData = xhr.response; + callback(packageData); + } else { + throw new Error(xhr.statusText + " : " + xhr.responseURL); + } + }; + xhr.send(null); + }; + + function handleError(error) { + console.error('package error:', error); + }; + + var fetchedCallback = null; + var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null; + + if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) { + if (fetchedCallback) { + fetchedCallback(data); + fetchedCallback = null; + } else { + fetched = data; + } + }, handleError); + + function runWithFS() { + + function assert(check, msg) { + if (!check) throw msg + new Error().stack; + } +Module['FS_createPath']('/', 'resources', true, true); + + function DataRequest(start, end, audio) { + this.start = start; + this.end = end; + this.audio = audio; + } + DataRequest.prototype = { + requests: {}, + open: function(mode, name) { + this.name = name; + this.requests[name] = this; + Module['addRunDependency']('fp ' + this.name); + }, + send: function() {}, + onload: function() { + var byteArray = this.byteArray.subarray(this.start, this.end); + this.finish(byteArray); + }, + finish: function(byteArray) { + var that = this; + + Module['FS_createDataFile'](this.name, null, byteArray, true, true, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change + Module['removeRunDependency']('fp ' + that.name); + + this.requests[this.name] = null; + } + }; + + var files = metadata.files; + for (var i = 0; i < files.length; ++i) { + new DataRequest(files[i].start, files[i].end, files[i].audio).open('GET', files[i].filename); + } + + + function processPackageData(arrayBuffer) { + Module.finishedDataFileDownloads++; + assert(arrayBuffer, 'Loading data file failed.'); + assert(arrayBuffer instanceof ArrayBuffer, 'bad input to processPackageData'); + var byteArray = new Uint8Array(arrayBuffer); + var curr; + + // copy the entire loaded file into a spot in the heap. Files will refer to slices in that. They cannot be freed though + // (we may be allocating before malloc is ready, during startup). + var ptr = Module['getMemory'](byteArray.length); + Module['HEAPU8'].set(byteArray, ptr); + DataRequest.prototype.byteArray = Module['HEAPU8'].subarray(ptr, ptr+byteArray.length); + + var files = metadata.files; + for (var i = 0; i < files.length; ++i) { + DataRequest.prototype.requests[files[i].filename].onload(); + } + Module['removeRunDependency']('datafile_textures/textures_to_image.data'); + + }; + Module['addRunDependency']('datafile_textures/textures_to_image.data'); + + if (!Module.preloadResults) Module.preloadResults = {}; + + Module.preloadResults[PACKAGE_NAME] = {fromCache: false}; + if (fetched) { + processPackageData(fetched); + fetched = null; + } else { + fetchedCallback = processPackageData; + } + + } + if (Module['calledRun']) { + runWithFS(); + } else { + if (!Module['preRun']) Module['preRun'] = []; + Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it + } + + } + loadPackage({"files": [{"start": 0, "audio": 0, "end": 3760, "filename": "/resources/raylib_logo.png"}], "remote_package_size": 3760, "package_uuid": "4a05c488-1488-40c8-96c3-e1005889fc40"}); + +})(); + + + +// Sometimes an existing Module object exists with properties +// meant to overwrite the default module functionality. Here +// we collect those properties and reapply _after_ we configure +// the current environment's defaults to avoid having to be so +// defensive during initialization. +var moduleOverrides = {}; +var key; +for (key in Module) { + if (Module.hasOwnProperty(key)) { + moduleOverrides[key] = Module[key]; + } +} + +var arguments_ = []; +var thisProgram = './this.program'; +var quit_ = function(status, toThrow) { + throw toThrow; +}; + +// Determine the runtime environment we are in. You can customize this by +// setting the ENVIRONMENT setting at compile time (see settings.js). + +var ENVIRONMENT_IS_WEB = false; +var ENVIRONMENT_IS_WORKER = false; +var ENVIRONMENT_IS_NODE = false; +var ENVIRONMENT_HAS_NODE = false; +var ENVIRONMENT_IS_SHELL = false; +ENVIRONMENT_IS_WEB = typeof window === 'object'; +ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +// A web environment like Electron.js can have Node enabled, so we must +// distinguish between Node-enabled environments and Node environments per se. +// This will allow the former to do things like mount NODEFS. +// Extended check using process.versions fixes issue #8816. +// (Also makes redundant the original check that 'require' is a function.) +ENVIRONMENT_HAS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string'; +ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER; +ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (Module['ENVIRONMENT']) { + throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)'); +} + + +// Three configurations we can be running in: +// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) +// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) +// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) + + + + +// `/` should be present at the end if `scriptDirectory` is not empty +var scriptDirectory = ''; +function locateFile(path) { + if (Module['locateFile']) { + return Module['locateFile'](path, scriptDirectory); + } + return scriptDirectory + path; +} + +// Hooks that are implemented differently in different runtime environments. +var read_, + readAsync, + readBinary, + setWindowTitle; + +if (ENVIRONMENT_IS_NODE) { + scriptDirectory = __dirname + '/'; + + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + var nodeFS; + var nodePath; + + read_ = function shell_read(filename, binary) { + var ret; + if (!nodeFS) nodeFS = require('fs'); + if (!nodePath) nodePath = require('path'); + filename = nodePath['normalize'](filename); + ret = nodeFS['readFileSync'](filename); + return binary ? ret : ret.toString(); + }; + + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + assert(ret.buffer); + return ret; + }; + + if (process['argv'].length > 1) { + thisProgram = process['argv'][1].replace(/\\/g, '/'); + } + + arguments_ = process['argv'].slice(2); + + if (typeof module !== 'undefined') { + module['exports'] = Module; + } + + process['on']('uncaughtException', function(ex) { + // suppress ExitStatus exceptions from showing an error + if (!(ex instanceof ExitStatus)) { + throw ex; + } + }); + + process['on']('unhandledRejection', abort); + + quit_ = function(status) { + process['exit'](status); + }; + + Module['inspect'] = function () { return '[Emscripten Module object]'; }; +} else +if (ENVIRONMENT_IS_SHELL) { + + + if (typeof read != 'undefined') { + read_ = function shell_read(f) { + return read(f); + }; + } + + readBinary = function readBinary(f) { + var data; + if (typeof readbuffer === 'function') { + return new Uint8Array(readbuffer(f)); + } + data = read(f, 'binary'); + assert(typeof data === 'object'); + return data; + }; + + if (typeof scriptArgs != 'undefined') { + arguments_ = scriptArgs; + } else if (typeof arguments != 'undefined') { + arguments_ = arguments; + } + + if (typeof quit === 'function') { + quit_ = function(status) { + quit(status); + }; + } + + if (typeof print !== 'undefined') { + // Prefer to use print/printErr where they exist, as they usually work better. + if (typeof console === 'undefined') console = {}; + console.log = print; + console.warn = console.error = typeof printErr !== 'undefined' ? printErr : print; + } +} else +if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled + scriptDirectory = self.location.href; + } else if (document.currentScript) { // web + scriptDirectory = document.currentScript.src; + } + // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. + // otherwise, slice off the final part of the url to find the script directory. + // if scriptDirectory does not contain a slash, lastIndexOf will return -1, + // and scriptDirectory will correctly be replaced with an empty string. + if (scriptDirectory.indexOf('blob:') !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1); + } else { + scriptDirectory = ''; + } + + + read_ = function shell_read(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.responseType = 'arraybuffer'; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.onload = function xhr_onload() { + if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + + setWindowTitle = function(title) { document.title = title }; +} else +{ + throw new Error('environment detection error'); +} + +// Set up the out() and err() hooks, which are how we can print to stdout or +// stderr, respectively. +var out = Module['print'] || console.log.bind(console); +var err = Module['printErr'] || console.warn.bind(console); + +// Merge back in the overrides +for (key in moduleOverrides) { + if (moduleOverrides.hasOwnProperty(key)) { + Module[key] = moduleOverrides[key]; + } +} +// Free the object hierarchy contained in the overrides, this lets the GC +// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array. +moduleOverrides = null; + +// Emit code to handle expected values on the Module object. This applies Module.x +// to the proper local x. This has two benefits: first, we only emit it if it is +// expected to arrive, and second, by using a local everywhere else that can be +// minified. +if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { get: function() { abort('Module.arguments has been replaced with plain arguments_') } }); +if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { get: function() { abort('Module.thisProgram has been replaced with plain thisProgram') } }); +if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { get: function() { abort('Module.quit has been replaced with plain quit_') } }); + +// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message +// Assertions on removed incoming Module JS APIs. +assert(typeof Module['memoryInitializerPrefixURL'] === 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['pthreadMainPrefixURL'] === 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['cdInitializerPrefixURL'] === 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['filePackagePrefixURL'] === 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'); +assert(typeof Module['read'] === 'undefined', 'Module.read option was removed (modify read_ in JS)'); +assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)'); +assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)'); +assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'); +if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { get: function() { abort('Module.read has been replaced with plain read_') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { get: function() { abort('Module.readAsync has been replaced with plain readAsync') } }); +if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { get: function() { abort('Module.readBinary has been replaced with plain readBinary') } }); +// TODO: add when SDL2 is fixed if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } }); + + +// TODO remove when SDL2 is fixed (also see above) + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// {{PREAMBLE_ADDITIONS}} + +var STACK_ALIGN = 16; + +// stack management, and other functionality that is provided by the compiled code, +// should not be used before it is ready +stackSave = stackRestore = stackAlloc = function() { + abort('cannot use the stack before compiled code is ready to run, and has provided stack access'); +}; + +function staticAlloc(size) { + abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)'); +} + +function dynamicAlloc(size) { + assert(DYNAMICTOP_PTR); + var ret = HEAP32[DYNAMICTOP_PTR>>2]; + var end = (ret + size + 15) & -16; + if (end > _emscripten_get_heap_size()) { + abort('failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly'); + } + HEAP32[DYNAMICTOP_PTR>>2] = end; + return ret; +} + +function alignMemory(size, factor) { + if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default + return Math.ceil(size / factor) * factor; +} + +function getNativeTypeSize(type) { + switch (type) { + case 'i1': case 'i8': return 1; + case 'i16': return 2; + case 'i32': return 4; + case 'i64': return 8; + case 'float': return 4; + case 'double': return 8; + default: { + if (type[type.length-1] === '*') { + return 4; // A pointer + } else if (type[0] === 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type); + return bits / 8; + } else { + return 0; + } + } + } +} + +function warnOnce(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text); + } +} + +var asm2wasmImports = { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + "debugger": function() { + debugger; + } +}; + + + +var jsCallStartIndex = 1; +var functionPointers = new Array(0); + +// Wraps a JS function as a wasm function with a given signature. +// In the future, we may get a WebAssembly.Function constructor. Until then, +// we create a wasm module that takes the JS function as an import with a given +// signature, and re-exports that as a wasm function. +function convertJsFunctionToWasm(func, sig) { + + // The module is static, with the exception of the type section, which is + // generated based on the signature passed in. + var typeSection = [ + 0x01, // id: section, + 0x00, // length: 0 (placeholder) + 0x01, // count: 1 + 0x60, // form: func + ]; + var sigRet = sig.slice(0, 1); + var sigParam = sig.slice(1); + var typeCodes = { + 'i': 0x7f, // i32 + 'j': 0x7e, // i64 + 'f': 0x7d, // f32 + 'd': 0x7c, // f64 + }; + + // Parameters, length + signatures + typeSection.push(sigParam.length); + for (var i = 0; i < sigParam.length; ++i) { + typeSection.push(typeCodes[sigParam[i]]); + } + + // Return values, length + signatures + // With no multi-return in MVP, either 0 (void) or 1 (anything else) + if (sigRet == 'v') { + typeSection.push(0x00); + } else { + typeSection = typeSection.concat([0x01, typeCodes[sigRet]]); + } + + // Write the overall length of the type section back into the section header + // (excepting the 2 bytes for the section id and length) + typeSection[1] = typeSection.length - 2; + + // Rest of the module is static + var bytes = new Uint8Array([ + 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") + 0x01, 0x00, 0x00, 0x00, // version: 1 + ].concat(typeSection, [ + 0x02, 0x07, // import section + // (import "e" "f" (func 0 (type 0))) + 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, + 0x07, 0x05, // export section + // (export "f" (func 0 (type 0))) + 0x01, 0x01, 0x66, 0x00, 0x00, + ])); + + // We can compile this wasm module synchronously because it is very small. + // This accepts an import (at "e.f"), that it reroutes to an export (at "f") + var module = new WebAssembly.Module(bytes); + var instance = new WebAssembly.Instance(module, { + e: { + f: func + } + }); + var wrappedFunc = instance.exports.f; + return wrappedFunc; +} + +// Add a wasm function to the table. +function addFunctionWasm(func, sig) { + var table = wasmTable; + var ret = table.length; + + // Grow the table + try { + table.grow(1); + } catch (err) { + if (!err instanceof RangeError) { + throw err; + } + throw 'Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.'; + } + + // Insert new element + try { + // Attempting to call this with JS function will cause of table.set() to fail + table.set(ret, func); + } catch (err) { + if (!err instanceof TypeError) { + throw err; + } + assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction'); + var wrapped = convertJsFunctionToWasm(func, sig); + table.set(ret, wrapped); + } + + return ret; +} + +function removeFunctionWasm(index) { + // TODO(sbc): Look into implementing this to allow re-using of table slots +} + +// 'sig' parameter is required for the llvm backend but only when func is not +// already a WebAssembly function. +function addFunction(func, sig) { + assert(typeof func !== 'undefined'); + + + var base = 0; + for (var i = base; i < base + 0; i++) { + if (!functionPointers[i]) { + functionPointers[i] = func; + return jsCallStartIndex + i; + } + } + throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; + +} + +function removeFunction(index) { + + functionPointers[index-jsCallStartIndex] = null; +} + +var funcWrappers = {}; + +function getFuncWrapper(func, sig) { + if (!func) return; // on null pointer, return undefined + assert(sig); + if (!funcWrappers[sig]) { + funcWrappers[sig] = {}; + } + var sigCache = funcWrappers[sig]; + if (!sigCache[func]) { + // optimize away arguments usage in common cases + if (sig.length === 1) { + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func); + }; + } else if (sig.length === 2) { + sigCache[func] = function dynCall_wrapper(arg) { + return dynCall(sig, func, [arg]); + }; + } else { + // general case + sigCache[func] = function dynCall_wrapper() { + return dynCall(sig, func, Array.prototype.slice.call(arguments)); + }; + } + } + return sigCache[func]; +} + + +function makeBigInt(low, high, unsigned) { + return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0)); +} + +function dynCall(sig, ptr, args) { + if (args && args.length) { + assert(args.length == sig.length-1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].apply(null, [ptr].concat(args)); + } else { + assert(sig.length == 1); + assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\''); + return Module['dynCall_' + sig].call(null, ptr); + } +} + +var tempRet0 = 0; + +var setTempRet0 = function(value) { + tempRet0 = value; +}; + +var getTempRet0 = function() { + return tempRet0; +}; + +function getCompilerSetting(name) { + throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work'; +} + +var Runtime = { + // helpful errors + getTempRet0: function() { abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + staticAlloc: function() { abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, + stackAlloc: function() { abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."') }, +}; + +// The address globals begin at. Very low in memory, for code size and optimization opportunities. +// Above 0 is static memory, starting with globals. +// Then the stack. +// Then 'dynamic' memory for sbrk. +var GLOBAL_BASE = 1024; + + + + +// === Preamble library stuff === + +// Documentation for the public APIs defined in this file must be updated in: +// site/source/docs/api_reference/preamble.js.rst +// A prebuilt local version of the documentation is available at: +// site/build/text/docs/api_reference/preamble.js.txt +// You can also build docs locally as HTML or other formats in site/ +// An online HTML version (which may be of a different version of Emscripten) +// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html + + +var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary') } }); +var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } }); + + +if (typeof WebAssembly !== 'object') { + abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.'); +} + + +// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking. +// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties) + +/** @type {function(number, number, string, boolean=)} */ +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[((ptr)>>0)]=value; break; + case 'i8': HEAP8[((ptr)>>0)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': HEAPF64[((ptr)>>3)]=value; break; + default: abort('invalid type for setValue: ' + type); + } +} + +/** @type {function(number, string, boolean=)} */ +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[((ptr)>>0)]; + case 'i8': return HEAP8[((ptr)>>0)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return HEAPF64[((ptr)>>3)]; + default: abort('invalid type for getValue: ' + type); + } + return null; +} + + + + + +// Wasm globals + +var wasmMemory; + +// Potentially used for direct table calls. +var wasmTable; + + +//======================================== +// Runtime essentials +//======================================== + +// whether we are quitting the application. no code should run after this. +// set in exit() and abort() +var ABORT = false; + +// set by exit() and abort(). Passed to 'onExit' handler. +// NOTE: This is also used as the process return code code in shell environments +// but only when noExitRuntime is false. +var EXITSTATUS = 0; + +/** @type {function(*, string=)} */ +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) +function getCFunc(ident) { + var func = Module['_' + ident]; // closure exported function + assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported'); + return func; +} + +// C calling interface. +function ccall(ident, returnType, argTypes, args, opts) { + // For fast lookup of conversion functions + var toC = { + 'string': function(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { // null string + // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' + var len = (str.length << 2) + 1; + ret = stackAlloc(len); + stringToUTF8(str, ret, len); + } + return ret; + }, + 'array': function(arr) { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + + function convertReturnValue(ret) { + if (returnType === 'string') return UTF8ToString(ret); + if (returnType === 'boolean') return Boolean(ret); + return ret; + } + + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + assert(returnType !== 'array', 'Return type should not be "array".'); + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(null, cArgs); + + ret = convertReturnValue(ret); + if (stack !== 0) stackRestore(stack); + return ret; +} + +function cwrap(ident, returnType, argTypes, opts) { + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + } +} + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk +var ALLOC_NONE = 3; // Do not allocate + +// allocate(): This is for internal use. You can use it yourself as well, but the interface +// is a little tricky (see docs right below). The reason is that it is optimized +// for multiple syntaxes to save space in generated code. So you should +// normally not use allocate(), and instead allocate memory using _malloc(), +// initialize it with setValue(), and so forth. +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block. This only matters if there +// is initial data - if @slab is a number, then this does not matter at all and is +// ignored. +// @allocator: How to allocate memory, see ALLOC_* +/** @type {function((TypedArray|Array|number), string, number, number=)} */ +function allocate(slab, types, allocator, ptr) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret; + if (allocator == ALLOC_NONE) { + ret = ptr; + } else { + ret = [_malloc, + stackAlloc, + dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length)); + } + + if (zeroinit) { + var stop; + ptr = ret; + assert((ret & 3) == 0); + stop = ret + (size & ~3); + for (; ptr < stop; ptr += 4) { + HEAP32[((ptr)>>2)]=0; + } + stop = ret + size; + while (ptr < stop) { + HEAP8[((ptr++)>>0)]=0; + } + return ret; + } + + if (singleType === 'i8') { + if (slab.subarray || slab.slice) { + HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret); + } else { + HEAPU8.set(new Uint8Array(slab), ret); + } + return ret; + } + + var i = 0, type, typeSize, previousType; + while (i < size) { + var curr = slab[i]; + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + + // no need to look up size unless type changes, so cache it + if (previousType !== type) { + typeSize = getNativeTypeSize(type); + previousType = type; + } + i += typeSize; + } + + return ret; +} + +// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready +function getMemory(size) { + if (!runtimeInitialized) return dynamicAlloc(size); + return _malloc(size); +} + + + + +/** @type {function(number, number=)} */ +function Pointer_stringify(ptr, length) { + abort("this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"); +} + +// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +function AsciiToString(ptr) { + var str = ''; + while (1) { + var ch = HEAPU8[((ptr++)>>0)]; + if (!ch) return str; + str += String.fromCharCode(ch); + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. + +function stringToAscii(str, outPtr) { + return writeAsciiToMemory(str, outPtr, false); +} + + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns +// a copy of that string as a Javascript String object. + +var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined; + +/** + * @param {number} idx + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ArrayToString(u8Array, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity) + while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr; + + if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) { + return UTF8Decoder.decode(u8Array.subarray(idx, endPtr)); + } else { + var str = ''; + // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that + while (idx < endPtr) { + // For UTF8 byte structure, see: + // http://en.wikipedia.org/wiki/UTF-8#Description + // https://www.ietf.org/rfc/rfc2279.txt + // https://tools.ietf.org/html/rfc3629 + var u0 = u8Array[idx++]; + if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } + var u1 = u8Array[idx++] & 63; + if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } + var u2 = u8Array[idx++] & 63; + if ((u0 & 0xF0) == 0xE0) { + u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; + } else { + if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!'); + u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (u8Array[idx++] & 63); + } + + if (u0 < 0x10000) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } + } + } + return str; +} + +// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a +// copy of that string as a Javascript String object. +// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit +// this parameter to scan the string until the first \0 byte. If maxBytesToRead is +// passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the +// middle, then the string will cut short at that byte index (i.e. maxBytesToRead will +// not produce a string of exact length [ptr, ptr+maxBytesToRead[) +// N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may +// throw JS JIT optimizations off, so it is worth to consider consistently using one +// style or the other. +/** + * @param {number} ptr + * @param {number=} maxBytesToRead + * @return {string} + */ +function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; +} + +// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', +// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. +// outIdx: The starting offset in the array to begin the copying. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. +// This count should include the null terminator, +// i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. +// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. + return 0; + + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) { + var u1 = str.charCodeAt(++i); + u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); + } + if (u <= 0x7F) { + if (outIdx >= endIdx) break; + outU8Array[outIdx++] = u; + } else if (u <= 0x7FF) { + if (outIdx + 1 >= endIdx) break; + outU8Array[outIdx++] = 0xC0 | (u >> 6); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else if (u <= 0xFFFF) { + if (outIdx + 2 >= endIdx) break; + outU8Array[outIdx++] = 0xE0 | (u >> 12); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } else { + if (outIdx + 3 >= endIdx) break; + if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).'); + outU8Array[outIdx++] = 0xF0 | (u >> 18); + outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); + outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); + outU8Array[outIdx++] = 0x80 | (u & 63); + } + } + // Null-terminate the pointer to the buffer. + outU8Array[outIdx] = 0; + return outIdx - startIdx; +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. +// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF8(str, outPtr, maxBytesToWrite) { + assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite); +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. +function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var u = str.charCodeAt(i); // possibly a lead surrogate + if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); + if (u <= 0x7F) ++len; + else if (u <= 0x7FF) len += 2; + else if (u <= 0xFFFF) len += 3; + else len += 4; + } + return len; +} + + +// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns +// a copy of that string as a Javascript String object. + +var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined; +function UTF16ToString(ptr) { + assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!'); + var endPtr = ptr; + // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself. + // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage. + var idx = endPtr >> 1; + while (HEAP16[idx]) ++idx; + endPtr = idx << 1; + + if (endPtr - ptr > 32 && UTF16Decoder) { + return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr)); + } else { + var i = 0; + + var str = ''; + while (1) { + var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; + if (codeUnit == 0) return str; + ++i; + // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. + str += String.fromCharCode(codeUnit); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. +// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. +// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF16(str, outPtr, maxBytesToWrite) { + assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 2) return 0; + maxBytesToWrite -= 2; // Null terminator. + var startPtr = outPtr; + var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; + for (var i = 0; i < numCharsToWrite; ++i) { + // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + HEAP16[((outPtr)>>1)]=codeUnit; + outPtr += 2; + } + // Null-terminate the pointer to the HEAP. + HEAP16[((outPtr)>>1)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF16(str) { + return str.length*2; +} + +function UTF32ToString(ptr) { + assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!'); + var i = 0; + + var str = ''; + while (1) { + var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; + if (utf32 == 0) + return str; + ++i; + // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + if (utf32 >= 0x10000) { + var ch = utf32 - 0x10000; + str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); + } else { + str += String.fromCharCode(utf32); + } + } +} + +// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', +// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. +// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. +// Parameters: +// str: the Javascript string to copy. +// outPtr: Byte address in Emscripten HEAP where to write the string to. +// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null +// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. +// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. +// Returns the number of bytes written, EXCLUDING the null terminator. + +function stringToUTF32(str, outPtr, maxBytesToWrite) { + assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!'); + assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!'); + // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. + if (maxBytesToWrite === undefined) { + maxBytesToWrite = 0x7FFFFFFF; + } + if (maxBytesToWrite < 4) return 0; + var startPtr = outPtr; + var endPtr = startPtr + maxBytesToWrite - 4; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); // possibly a lead surrogate + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { + var trailSurrogate = str.charCodeAt(++i); + codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); + } + HEAP32[((outPtr)>>2)]=codeUnit; + outPtr += 4; + if (outPtr + 4 > endPtr) break; + } + // Null-terminate the pointer to the HEAP. + HEAP32[((outPtr)>>2)]=0; + return outPtr - startPtr; +} + +// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. + +function lengthBytesUTF32(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. + // See http://unicode.org/faq/utf_bom.html#utf16-3 + var codeUnit = str.charCodeAt(i); + if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. + len += 4; + } + + return len; +} + +// Allocate heap space for a JS string, and write it there. +// It is the responsibility of the caller to free() that memory. +function allocateUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Allocate stack space for a JS string, and write it there. +function allocateUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8Array(str, HEAP8, ret, size); + return ret; +} + +// Deprecated: This function should not be called because it is unsafe and does not provide +// a maximum length limit of how many bytes it is allowed to write. Prefer calling the +// function stringToUTF8Array() instead, which takes in a maximum length that can be used +// to be secure from out of bounds writes. +/** @deprecated */ +function writeStringToMemory(string, buffer, dontAddNull) { + warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!'); + + var /** @type {number} */ lastChar, /** @type {number} */ end; + if (dontAddNull) { + // stringToUTF8Array always appends null. If we don't want to do that, remember the + // character that existed at the location where the null will be placed, and restore + // that after the write (below). + end = buffer + lengthBytesUTF8(string); + lastChar = HEAP8[end]; + } + stringToUTF8(string, buffer, Infinity); + if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character. +} + +function writeArrayToMemory(array, buffer) { + assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)') + HEAP8.set(array, buffer); +} + +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; ++i) { + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); + HEAP8[((buffer++)>>0)]=str.charCodeAt(i); + } + // Null-terminate the pointer to the HEAP. + if (!dontAddNull) HEAP8[((buffer)>>0)]=0; +} + + + + +// Memory management + +var PAGE_SIZE = 16384; +var WASM_PAGE_SIZE = 65536; +var ASMJS_PAGE_SIZE = 16777216; + +function alignUp(x, multiple) { + if (x % multiple > 0) { + x += multiple - (x % multiple); + } + return x; +} + +var HEAP, +/** @type {ArrayBuffer} */ + buffer, +/** @type {Int8Array} */ + HEAP8, +/** @type {Uint8Array} */ + HEAPU8, +/** @type {Int16Array} */ + HEAP16, +/** @type {Uint16Array} */ + HEAPU16, +/** @type {Int32Array} */ + HEAP32, +/** @type {Uint32Array} */ + HEAPU32, +/** @type {Float32Array} */ + HEAPF32, +/** @type {Float64Array} */ + HEAPF64; + +function updateGlobalBufferAndViews(buf) { + buffer = buf; + Module['HEAP8'] = HEAP8 = new Int8Array(buf); + Module['HEAP16'] = HEAP16 = new Int16Array(buf); + Module['HEAP32'] = HEAP32 = new Int32Array(buf); + Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf); + Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf); + Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf); + Module['HEAPF32'] = HEAPF32 = new Float32Array(buf); + Module['HEAPF64'] = HEAPF64 = new Float64Array(buf); +} + + +var STATIC_BASE = 1024, + STACK_BASE = 34288, + STACKTOP = STACK_BASE, + STACK_MAX = 5277168, + DYNAMIC_BASE = 5277168, + DYNAMICTOP_PTR = 34256; + +assert(STACK_BASE % 16 === 0, 'stack must start aligned'); +assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned'); + + + +var TOTAL_STACK = 5242880; +if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime') + +var INITIAL_TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;if (!Object.getOwnPropertyDescriptor(Module, 'TOTAL_MEMORY')) Object.defineProperty(Module, 'TOTAL_MEMORY', { get: function() { abort('Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY') } }); + +assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, 'TOTAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_TOTAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')'); + +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) +assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, + 'JS engine does not provide full typed array support'); + + + + + + + + if (Module['wasmMemory']) { + wasmMemory = Module['wasmMemory']; + } else + { + wasmMemory = new WebAssembly.Memory({ + 'initial': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + , + 'maximum': INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE + }); + } + + +if (wasmMemory) { + buffer = wasmMemory.buffer; +} + +// If the user provides an incorrect length, just use that length instead rather than providing the user to +// specifically provide the memory length with Module['TOTAL_MEMORY']. +INITIAL_TOTAL_MEMORY = buffer.byteLength; +assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0); +updateGlobalBufferAndViews(buffer); + +HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE; + + +// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode. +function writeStackCookie() { + assert((STACK_MAX & 3) == 0); + HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467; + HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE; +} + +function checkStackCookie() { + var cookie1 = HEAPU32[(STACK_MAX >> 2)-1]; + var cookie2 = HEAPU32[(STACK_MAX >> 2)-2]; + if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { + abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16)); + } + // Also test the global address 0 for integrity. + // We don't do this with ASan because ASan does its own checks for this. + if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); +} + +function abortStackOverflow(allocSize) { + abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!'); +} + + + HEAP32[0] = 0x63736d65; /* 'emsc' */ + + + +// Endianness check (note: assumes compiler arch was little-endian) +HEAP16[1] = 0x6373; +if (HEAPU8[2] !== 0x73 || HEAPU8[3] !== 0x63) throw 'Runtime error: expected the system to be little-endian!'; + +function abortFnPtrError(ptr, sig) { + abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info."); +} + + + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } + var func = callback.func; + if (typeof func === 'number') { + if (callback.arg === undefined) { + Module['dynCall_v'](func); + } else { + Module['dynCall_vi'](func, callback.arg); + } + } else { + func(callback.arg === undefined ? null : callback.arg); + } + } +} + +var __ATPRERUN__ = []; // functions called before the runtime is initialized +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown +var __ATPOSTRUN__ = []; // functions called after the main() is called + +var runtimeInitialized = false; +var runtimeExited = false; + + +function preRun() { + + if (Module['preRun']) { + if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; + while (Module['preRun'].length) { + addOnPreRun(Module['preRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPRERUN__); +} + +function initRuntime() { + checkStackCookie(); + assert(!runtimeInitialized); + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); +TTY.init(); + callRuntimeCallbacks(__ATINIT__); +} + +function preMain() { + checkStackCookie(); + FS.ignorePermissions = false; + callRuntimeCallbacks(__ATMAIN__); +} + +function exitRuntime() { + checkStackCookie(); + runtimeExited = true; +} + +function postRun() { + checkStackCookie(); + + if (Module['postRun']) { + if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; + while (Module['postRun'].length) { + addOnPostRun(Module['postRun'].shift()); + } + } + + callRuntimeCallbacks(__ATPOSTRUN__); +} + +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} + +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} + +function addOnPreMain(cb) { + __ATMAIN__.unshift(cb); +} + +function addOnExit(cb) { +} + +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} + +function unSign(value, bits, ignore) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; +} +function reSign(value, bits, ignore) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + + +assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); +assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'); + +var Math_abs = Math.abs; +var Math_cos = Math.cos; +var Math_sin = Math.sin; +var Math_tan = Math.tan; +var Math_acos = Math.acos; +var Math_asin = Math.asin; +var Math_atan = Math.atan; +var Math_atan2 = Math.atan2; +var Math_exp = Math.exp; +var Math_log = Math.log; +var Math_sqrt = Math.sqrt; +var Math_ceil = Math.ceil; +var Math_floor = Math.floor; +var Math_pow = Math.pow; +var Math_imul = Math.imul; +var Math_fround = Math.fround; +var Math_round = Math.round; +var Math_min = Math.min; +var Math_max = Math.max; +var Math_clz32 = Math.clz32; +var Math_trunc = Math.trunc; + + + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in a place like +// Module.preRun (used by emcc to add file preloading). +// Note that you can add dependencies in preRun, even though +// it happens right before run - run will be postponed until +// the dependencies are met. +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled +var runDependencyTracking = {}; + +function getUniqueRunDependency(id) { + var orig = id; + while (1) { + if (!runDependencyTracking[id]) return id; + id = orig + Math.random(); + } + return id; +} + +function addRunDependency(id) { + runDependencies++; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(!runDependencyTracking[id]); + runDependencyTracking[id] = 1; + if (runDependencyWatcher === null && typeof setInterval !== 'undefined') { + // Check for missing dependencies every few seconds + runDependencyWatcher = setInterval(function() { + if (ABORT) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + return; + } + var shown = false; + for (var dep in runDependencyTracking) { + if (!shown) { + shown = true; + err('still waiting on run dependencies:'); + } + err('dependency: ' + dep); + } + if (shown) { + err('(end of list)'); + } + }, 10000); + } + } else { + err('warning: run dependency added without ID'); + } +} + +function removeRunDependency(id) { + runDependencies--; + + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + + if (id) { + assert(runDependencyTracking[id]); + delete runDependencyTracking[id]; + } else { + err('warning: run dependency removed without ID'); + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); // can add another dependenciesFulfilled + } + } +} + +Module["preloadedImages"] = {}; // maps url to image data +Module["preloadedAudios"] = {}; // maps url to audio data + + +var memoryInitializer = null; + + + + + + + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +// Prefix of data URIs emitted by SINGLE_FILE and related options. +var dataURIPrefix = 'data:application/octet-stream;base64,'; + +// Indicates whether filename is a base64 data URI. +function isDataURI(filename) { + return String.prototype.startsWith ? + filename.startsWith(dataURIPrefix) : + filename.indexOf(dataURIPrefix) === 0; +} + + + + +var wasmBinaryFile = 'textures_to_image.wasm'; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} + +function getBinary() { + try { + if (wasmBinary) { + return new Uint8Array(wasmBinary); + } + + if (readBinary) { + return readBinary(wasmBinaryFile); + } else { + throw "both async and sync fetching of the wasm failed"; + } + } + catch (err) { + abort(err); + } +} + +function getBinaryPromise() { + // if we don't have the binary yet, and have the Fetch api, use that + // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function') { + return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) { + if (!response['ok']) { + throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; + } + return response['arrayBuffer'](); + }).catch(function () { + return getBinary(); + }); + } + // Otherwise, getBinary should be able to get it synchronously + return new Promise(function(resolve, reject) { + resolve(getBinary()); + }); +} + + + +// Create the wasm instance. +// Receives the wasm imports, returns the exports. +function createWasm(env) { + // prepare imports + var info = { + 'env': env, + 'wasi_unstable': env + , + 'global': { + 'NaN': NaN, + 'Infinity': Infinity + }, + 'global.Math': Math, + 'asm2wasm': asm2wasmImports + }; + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup + function receiveInstance(instance, module) { + var exports = instance.exports; + Module['asm'] = exports; + removeRunDependency('wasm-instantiate'); + } + // we can't run yet (except in a pthread, where we have a custom sync instantiator) + addRunDependency('wasm-instantiate'); + + + // Async compilation can be confusing when an error on the page overwrites Module + // (for example, if the order of elements is wrong, and the one defining Module is + // later), so we save Module and check it later. + var trueModule = Module; + function receiveInstantiatedSource(output) { + // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance. + // receiveInstance() will swap in the exports (to Module.asm) so they can be called + assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'); + trueModule = null; + // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. + // When the regression is fixed, can restore the above USE_PTHREADS-enabled path. + receiveInstance(output['instance']); + } + + + function instantiateArrayBuffer(receiver) { + return getBinaryPromise().then(function(binary) { + return WebAssembly.instantiate(binary, info); + }).then(receiver, function(reason) { + err('failed to asynchronously prepare wasm: ' + reason); + abort(reason); + }); + } + + // Prefer streaming instantiation if available. + function instantiateAsync() { + if (!wasmBinary && + typeof WebAssembly.instantiateStreaming === 'function' && + !isDataURI(wasmBinaryFile) && + typeof fetch === 'function') { + fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, info); + return result.then(receiveInstantiatedSource, function(reason) { + // We expect the most common failure cause to be a bad MIME type for the binary, + // in which case falling back to ArrayBuffer instantiation should work. + err('wasm streaming compile failed: ' + reason); + err('falling back to ArrayBuffer instantiation'); + instantiateArrayBuffer(receiveInstantiatedSource); + }); + }); + } else { + return instantiateArrayBuffer(receiveInstantiatedSource); + } + } + // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback + // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel + // to any other async startup actions they are performing. + if (Module['instantiateWasm']) { + try { + var exports = Module['instantiateWasm'](info, receiveInstance); + return exports; + } catch(e) { + err('Module.instantiateWasm callback failed with error: ' + e); + return false; + } + } + + instantiateAsync(); + return {}; // no exports yet; we'll fill them in later +} + +// Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate +// the wasm module at that time, and it receives imports and provides exports and so forth, the app +// doesn't need to care that it is wasm or asm.js. + +Module['asm'] = function(global, env, providedBuffer) { + // memory was already allocated (so js could use the buffer) + env['memory'] = wasmMemory + ; + // import table + env['table'] = wasmTable = new WebAssembly.Table({ + 'initial': 5114, + 'maximum': 5114, + 'element': 'anyfunc' + }); + // With the wasm backend __memory_base and __table_base and only needed for + // relocatable output. + env['__memory_base'] = 1024; // tell the memory segments where to place themselves + // table starts at 0 by default (even in dynamic linking, for the main module) + env['__table_base'] = 0; + + var exports = createWasm(env); + assert(exports, 'binaryen setup failed (no wasm support?)'); + return exports; +}; + +// Globals used by JS i64 conversions +var tempDouble; +var tempI64; + +// === Body === + +var ASM_CONSTS = []; + + + + + +// STATICTOP = STATIC_BASE + 33264; +/* global initializers */ /*__ATINIT__.push();*/ + + + + + + + + +/* no memory initializer */ +var tempDoublePtr = 34272 +assert(tempDoublePtr % 8 == 0); + +function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; +} + +function copyTempDouble(ptr) { + HEAP8[tempDoublePtr] = HEAP8[ptr]; + HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; + HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; + HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; + HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; + HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; + HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; + HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; +} + +// {{PRE_LIBRARY}} + + + function demangle(func) { + warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); + return func; + } + + function demangleAll(text) { + var regex = + /\b__Z[\w\d_]+/g; + return text.replace(regex, + function(x) { + var y = demangle(x); + return x === y ? x : (y + ' [' + x + ']'); + }); + } + + function jsStackTrace() { + var err = new Error(); + if (!err.stack) { + // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, + // so try that as a special-case. + try { + throw new Error(0); + } catch(e) { + err = e; + } + if (!err.stack) { + return '(no stack trace available)'; + } + } + return err.stack.toString(); + } + + function stackTrace() { + var js = jsStackTrace(); + if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace'](); + return demangleAll(js); + } + + function ___assert_fail(condition, filename, line, func) { + abort('Assertion failed: ' + UTF8ToString(condition) + ', at: ' + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']); + } + + function ___lock() {} + + + + var PATH={splitPath:function(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + },normalizeArray:function(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift('..'); + } + } + return parts; + },normalize:function(path) { + var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.substr(-1) === '/'; + // Normalize the path + path = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + return (isAbsolute ? '/' : '') + path; + },dirname:function(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + },basename:function(path) { + // EMSCRIPTEN return '/'' for '/', not an empty string + if (path === '/') return '/'; + var lastSlash = path.lastIndexOf('/'); + if (lastSlash === -1) return path; + return path.substr(lastSlash+1); + },extname:function(path) { + return PATH.splitPath(path)[3]; + },join:function() { + var paths = Array.prototype.slice.call(arguments, 0); + return PATH.normalize(paths.join('/')); + },join2:function(l, r) { + return PATH.normalize(l + '/' + r); + }}; + + + function ___setErrNo(value) { + if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value; + else err('failed to set errno from JS'); + return value; + } + + var PATH_FS={resolve:function() { + var resolvedPath = '', + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : FS.cwd(); + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + return ''; // an invalid portion invalidates the whole thing + } + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; + },relative:function(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join('/'); + }}; + + var TTY={ttys:[],init:function () { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // currently, FS.init does not distinguish if process.stdin is a file or TTY + // // device, it always assumes it's a TTY device. because of this, we're forcing + // // process.stdin to UTF8 encoding to at least make stdin reading compatible + // // with text files until FS.init can be refactored. + // process['stdin']['setEncoding']('utf8'); + // } + },shutdown:function() { + // https://github.com/emscripten-core/emscripten/pull/1555 + // if (ENVIRONMENT_IS_NODE) { + // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? + // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation + // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? + // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle + // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call + // process['stdin']['pause'](); + // } + },register:function(dev, ops) { + TTY.ttys[dev] = { input: [], output: [], ops: ops }; + FS.registerDevice(dev, TTY.stream_ops); + },stream_ops:{open:function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(19); + } + stream.tty = tty; + stream.seekable = false; + },close:function(stream) { + // flush any pending line data + stream.tty.ops.flush(stream.tty); + },flush:function(stream) { + stream.tty.ops.flush(stream.tty); + },read:function(stream, buffer, offset, length, pos /* ignored */) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(6); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + },write:function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(6); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset+i]); + } + } catch (e) { + throw new FS.ErrnoError(5); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + }},default_tty_ops:{get_char:function(tty) { + if (!tty.input.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + // we will read data by chunks of BUFSIZE + var BUFSIZE = 256; + var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); + var bytesRead = 0; + + var isPosixPlatform = (process.platform != 'win32'); // Node doesn't offer a direct check, so test by exclusion + + var fd = process.stdin.fd; + if (isPosixPlatform) { + // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) + var usingDevice = false; + try { + fd = fs.openSync('/dev/stdin', 'r'); + usingDevice = true; + } catch (e) {} + } + + try { + bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); + } catch(e) { + // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, + // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. + if (e.toString().indexOf('EOF') != -1) bytesRead = 0; + else throw e; + } + + if (usingDevice) { fs.closeSync(fd); } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString('utf-8'); + } else { + result = null; + } + } else + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); // returns null on cancel + if (result !== null) { + result += '\n'; + } + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + if (result !== null) { + result += '\n'; + } + } + if (!result) { + return null; + } + tty.input = intArrayFromString(result, true); + } + return tty.input.shift(); + },put_char:function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }},default_tty1_ops:{put_char:function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + },flush:function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }}}; + + var MEMFS={ops_table:null,mount:function(mount) { + return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); + },createNode:function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + // no supported + throw new FS.ErrnoError(1); + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }; + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. + // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred + // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size + // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + // add the new node to the parent + if (parent) { + parent.contents[name] = node; + } + return node; + },getFileDataAsRegularArray:function(node) { + if (node.contents && node.contents.subarray) { + var arr = []; + for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); + return arr; // Returns a copy of the original data. + } + return node.contents; // No-op, the file contents are already in a JS array. Return as-is. + },getFileDataAsTypedArray:function(node) { + if (!node.contents) return new Uint8Array; + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. + return new Uint8Array(node.contents); + },expandFileStorage:function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. + // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. + // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to + // avoid overshooting the allocation cap by a very large margin. + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); // Allocate new storage. + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. + return; + },resizeFileStorage:function(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; // Fully decommit when requesting a resize to zero. + node.usedBytes = 0; + return; + } + if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. + var oldContents = node.contents; + node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. + } + node.usedBytes = newSize; + return; + } + // Backing with a JS array. + if (!node.contents) node.contents = []; + if (node.contents.length > newSize) node.contents.length = newSize; + else while (node.contents.length < newSize) node.contents.push(0); + node.usedBytes = newSize; + },node_ops:{getattr:function(node) { + var attr = {}; + // device numbers reuse inode numbers. + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), + // but this is not required by the standard. + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + },lookup:function(parent, name) { + throw FS.genericErrors[2]; + },mknod:function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + },rename:function(old_node, new_dir, new_name) { + // if we're overwriting a directory at new_name, make sure it's empty. + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + } + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(39); + } + } + } + // do the internal rewiring + delete old_node.parent.contents[old_node.name]; + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + old_node.parent = new_dir; + },unlink:function(parent, name) { + delete parent.contents[name]; + },rmdir:function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(39); + } + delete parent.contents[name]; + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); + node.link = oldpath; + return node; + },readlink:function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(22); + } + return node.link; + }},stream_ops:{read:function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + assert(size >= 0); + if (size > 8 && contents.subarray) { // non-trivial, and typed array + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + },write:function(stream, buffer, offset, length, position, canOwn) { + + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + + if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? + if (canOwn) { + assert(position === 0, 'canOwn must imply no weird position inside the file'); + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. + node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + + // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. + MEMFS.expandFileStorage(node, position+length); + if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. + else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. + } + } + node.usedBytes = Math.max(node.usedBytes, position+length); + return length; + },llseek:function(stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + },allocate:function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + var ptr; + var allocated; + var contents = stream.node.contents; + // Only make a new copy when MAP_PRIVATE is specified. + if ( !(flags & 2) && + (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { + // We can't emulate MAP_SHARED when the file is not backed by the buffer + // we're mapping to (e.g. the HEAP buffer). + allocated = false; + ptr = contents.byteOffset; + } else { + // Try to avoid unnecessary slices. + if (position > 0 || position + length < stream.node.usedBytes) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + // malloc() can lead to growing the heap. If targeting the heap, we need to + // re-acquire the heap buffer object in case growth had occurred. + var fromHeap = (buffer.buffer == HEAP8.buffer); + ptr = _malloc(length); + if (!ptr) { + throw new FS.ErrnoError(12); + } + (fromHeap ? HEAP8 : buffer).set(contents, ptr); + } + return { ptr: ptr, allocated: allocated }; + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (mmapFlags & 2) { + // MAP_PRIVATE calls need not to be synced back to underlying fs + return 0; + } + + var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + // should we check if bytesWritten and length are the same? + return 0; + }}}; + + var IDBFS={dbs:{},indexedDB:function() { + if (typeof indexedDB !== 'undefined') return indexedDB; + var ret = null; + if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + assert(ret, 'IDBFS used, but indexedDB not supported'); + return ret; + },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(mount) { + // reuse all of the core MEMFS functionality + return MEMFS.mount.apply(null, arguments); + },syncfs:function(mount, populate, callback) { + IDBFS.getLocalSet(mount, function(err, local) { + if (err) return callback(err); + + IDBFS.getRemoteSet(mount, function(err, remote) { + if (err) return callback(err); + + var src = populate ? remote : local; + var dst = populate ? local : remote; + + IDBFS.reconcile(src, dst, callback); + }); + }); + },getDB:function(name, callback) { + // check the cache first + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); + } + + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); + } + if (!req) { + return callback("Unable to connect to IndexedDB"); + } + req.onupgradeneeded = function(e) { + var db = e.target.result; + var transaction = e.target.transaction; + + var fileStore; + + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); + } + + if (!fileStore.indexNames.contains('timestamp')) { + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + } + }; + req.onsuccess = function() { + db = req.result; + + // add to the cache + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },getLocalSet:function(mount, callback) { + var entries = {}; + + function isRealDir(p) { + return p !== '.' && p !== '..'; + }; + function toAbsolute(root) { + return function(p) { + return PATH.join2(root, p); + } + }; + + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + + while (check.length) { + var path = check.pop(); + var stat; + + try { + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); + } + + entries[path] = { timestamp: stat.mtime }; + } + + return callback(null, { type: 'local', entries: entries }); + },getRemoteSet:function(mount, callback) { + var entries = {}; + + IDBFS.getDB(mount.mountpoint, function(err, db) { + if (err) return callback(err); + + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); + transaction.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index('timestamp'); + + index.openKeyCursor().onsuccess = function(event) { + var cursor = event.target.result; + + if (!cursor) { + return callback(null, { type: 'remote', db: db, entries: entries }); + } + + entries[cursor.primaryKey] = { timestamp: cursor.key }; + + cursor.continue(); + }; + } catch (e) { + return callback(e); + } + }); + },loadLocalEntry:function(path, callback) { + var stat, node; + + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode }); + } else if (FS.isFile(stat.mode)) { + // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. + // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); + } else { + return callback(new Error('node type not supported')); + } + },storeLocalEntry:function(path, entry, callback) { + try { + if (FS.isDir(entry.mode)) { + FS.mkdir(path, entry.mode); + } else if (FS.isFile(entry.mode)) { + FS.writeFile(path, entry.contents, { canOwn: true }); + } else { + return callback(new Error('node type not supported')); + } + + FS.chmod(path, entry.mode); + FS.utime(path, entry.timestamp, entry.timestamp); + } catch (e) { + return callback(e); + } + + callback(null); + },removeLocalEntry:function(path, callback) { + try { + var lookup = FS.lookupPath(path); + var stat = FS.stat(path); + + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + + callback(null); + },loadRemoteEntry:function(store, path, callback) { + var req = store.get(path); + req.onsuccess = function(event) { callback(null, event.target.result); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },storeRemoteEntry:function(store, path, entry, callback) { + var req = store.put(entry, path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },removeRemoteEntry:function(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function() { callback(null); }; + req.onerror = function(e) { + callback(this.error); + e.preventDefault(); + }; + },reconcile:function(src, dst, callback) { + var total = 0; + + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e.timestamp > e2.timestamp) { + create.push(key); + total++; + } + }); + + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + var e = dst.entries[key]; + var e2 = src.entries[key]; + if (!e2) { + remove.push(key); + total++; + } + }); + + if (!total) { + return callback(null); + } + + var errored = false; + var db = src.type === 'remote' ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + + function done(err) { + if (err && !errored) { + errored = true; + return callback(err); + } + }; + + transaction.onerror = function(e) { + done(this.error); + e.preventDefault(); + }; + + transaction.oncomplete = function(e) { + if (!errored) { + callback(null); + } + }; + + // sort paths in ascending order so directory entries are created + // before the files inside them + create.sort().forEach(function (path) { + if (dst.type === 'local') { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + + // sort paths in descending order so files are deleted before their + // parent directories + remove.sort().reverse().forEach(function(path) { + if (dst.type === 'local') { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); + }}; + + var NODEFS={isWindows:false,staticInit:function() { + NODEFS.isWindows = !!process.platform.match(/^win/); + var flags = process["binding"]("constants"); + // Node.js 4 compatibility: it has no namespaces for constants + if (flags["fs"]) { + flags = flags["fs"]; + } + NODEFS.flagsForNodeMap = { + "1024": flags["O_APPEND"], + "64": flags["O_CREAT"], + "128": flags["O_EXCL"], + "0": flags["O_RDONLY"], + "2": flags["O_RDWR"], + "4096": flags["O_SYNC"], + "512": flags["O_TRUNC"], + "1": flags["O_WRONLY"] + }; + },bufferFrom:function (arrayBuffer) { + // Node.js < 4.5 compatibility: Buffer.from does not support ArrayBuffer + // Buffer.from before 4.5 was just a method inherited from Uint8Array + // Buffer.alloc has been added with Buffer.from together, so check it instead + return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); + },mount:function (mount) { + assert(ENVIRONMENT_HAS_NODE); + return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); + },createNode:function (parent, name, mode, dev) { + if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { + throw new FS.ErrnoError(22); + } + var node = FS.createNode(parent, name, mode); + node.node_ops = NODEFS.node_ops; + node.stream_ops = NODEFS.stream_ops; + return node; + },getMode:function (path) { + var stat; + try { + stat = fs.lstatSync(path); + if (NODEFS.isWindows) { + // Node.js on Windows never represents permission bit 'x', so + // propagate read bits to execute bits + stat.mode = stat.mode | ((stat.mode & 292) >> 2); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); // syscall errnos are negated, node's are not + } + return stat.mode; + },realPath:function (node) { + var parts = []; + while (node.parent !== node) { + parts.push(node.name); + node = node.parent; + } + parts.push(node.mount.opts.root); + parts.reverse(); + return PATH.join.apply(null, parts); + },flagsForNode:function(flags) { + flags &= ~0x200000 /*O_PATH*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x800 /*O_NONBLOCK*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x8000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file. + flags &= ~0x80000 /*O_CLOEXEC*/; // Some applications may pass it; it makes no sense for a single process. + var newFlags = 0; + for (var k in NODEFS.flagsForNodeMap) { + if (flags & k) { + newFlags |= NODEFS.flagsForNodeMap[k]; + flags ^= k; + } + } + + if (!flags) { + return newFlags; + } else { + throw new FS.ErrnoError(22); + } + },node_ops:{getattr:function(node) { + var path = NODEFS.realPath(node); + var stat; + try { + stat = fs.lstatSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. + // See http://support.microsoft.com/kb/140365 + if (NODEFS.isWindows && !stat.blksize) { + stat.blksize = 4096; + } + if (NODEFS.isWindows && !stat.blocks) { + stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; + } + return { + dev: stat.dev, + ino: stat.ino, + mode: stat.mode, + nlink: stat.nlink, + uid: stat.uid, + gid: stat.gid, + rdev: stat.rdev, + size: stat.size, + atime: stat.atime, + mtime: stat.mtime, + ctime: stat.ctime, + blksize: stat.blksize, + blocks: stat.blocks + }; + },setattr:function(node, attr) { + var path = NODEFS.realPath(node); + try { + if (attr.mode !== undefined) { + fs.chmodSync(path, attr.mode); + // update the common node structure mode as well + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + var date = new Date(attr.timestamp); + fs.utimesSync(path, date, date); + } + if (attr.size !== undefined) { + fs.truncateSync(path, attr.size); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },lookup:function (parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + var mode = NODEFS.getMode(path); + return NODEFS.createNode(parent, name, mode); + },mknod:function (parent, name, mode, dev) { + var node = NODEFS.createNode(parent, name, mode, dev); + // create the backing node for this in the fs root as well + var path = NODEFS.realPath(node); + try { + if (FS.isDir(node.mode)) { + fs.mkdirSync(path, node.mode); + } else { + fs.writeFileSync(path, '', { mode: node.mode }); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + return node; + },rename:function (oldNode, newDir, newName) { + var oldPath = NODEFS.realPath(oldNode); + var newPath = PATH.join2(NODEFS.realPath(newDir), newName); + try { + fs.renameSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },unlink:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.unlinkSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },rmdir:function(parent, name) { + var path = PATH.join2(NODEFS.realPath(parent), name); + try { + fs.rmdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readdir:function(node) { + var path = NODEFS.realPath(node); + try { + return fs.readdirSync(path); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },symlink:function(parent, newName, oldPath) { + var newPath = PATH.join2(NODEFS.realPath(parent), newName); + try { + fs.symlinkSync(oldPath, newPath); + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },readlink:function(node) { + var path = NODEFS.realPath(node); + try { + path = fs.readlinkSync(path); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); + return path; + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + }},stream_ops:{open:function (stream) { + var path = NODEFS.realPath(stream.node); + try { + if (FS.isFile(stream.node.mode)) { + stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags)); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },close:function (stream) { + try { + if (FS.isFile(stream.node.mode) && stream.nfd) { + fs.closeSync(stream.nfd); + } + } catch (e) { + if (!e.code) throw e; + throw new FS.ErrnoError(-e.errno); + } + },read:function (stream, buffer, offset, length, position) { + // Node.js < 6 compatibility: node errors on 0 length reads + if (length === 0) return 0; + try { + return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },write:function (stream, buffer, offset, length, position) { + try { + return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position); + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + try { + var stat = fs.fstatSync(stream.nfd); + position += stat.size; + } catch (e) { + throw new FS.ErrnoError(-e.errno); + } + } + } + + if (position < 0) { + throw new FS.ErrnoError(22); + } + + return position; + }}}; + + var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) { + assert(ENVIRONMENT_IS_WORKER); + if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync(); + var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0); + var createdParents = {}; + function ensureParent(path) { + // return the parent node, creating subdirs as necessary + var parts = path.split('/'); + var parent = root; + for (var i = 0; i < parts.length-1; i++) { + var curr = parts.slice(0, i+1).join('/'); + // Issue 4254: Using curr as a node name will prevent the node + // from being found in FS.nameTable when FS.open is called on + // a path which holds a child of this node, + // given that all FS functions assume node names + // are just their corresponding parts within their given path, + // rather than incremental aggregates which include their parent's + // directories. + if (!createdParents[curr]) { + createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0); + } + parent = createdParents[curr]; + } + return parent; + } + function base(path) { + var parts = path.split('/'); + return parts[parts.length-1]; + } + // We also accept FileList here, by using Array.prototype + Array.prototype.forEach.call(mount.opts["files"] || [], function(file) { + WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate); + }); + (mount.opts["blobs"] || []).forEach(function(obj) { + WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]); + }); + (mount.opts["packages"] || []).forEach(function(pack) { + pack['metadata'].files.forEach(function(file) { + var name = file.filename.substr(1); // remove initial slash + WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end)); + }); + }); + return root; + },createNode:function (parent, name, mode, dev, contents, mtime) { + var node = FS.createNode(parent, name, mode); + node.mode = mode; + node.node_ops = WORKERFS.node_ops; + node.stream_ops = WORKERFS.stream_ops; + node.timestamp = (mtime || new Date).getTime(); + assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE); + if (mode === WORKERFS.FILE_MODE) { + node.size = contents.size; + node.contents = contents; + } else { + node.size = 4096; + node.contents = {}; + } + if (parent) { + parent.contents[name] = node; + } + return node; + },node_ops:{getattr:function(node) { + return { + dev: 1, + ino: undefined, + mode: node.mode, + nlink: 1, + uid: 0, + gid: 0, + rdev: undefined, + size: node.size, + atime: new Date(node.timestamp), + mtime: new Date(node.timestamp), + ctime: new Date(node.timestamp), + blksize: 4096, + blocks: Math.ceil(node.size / 4096), + }; + },setattr:function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + },lookup:function(parent, name) { + throw new FS.ErrnoError(2); + },mknod:function (parent, name, mode, dev) { + throw new FS.ErrnoError(1); + },rename:function (oldNode, newDir, newName) { + throw new FS.ErrnoError(1); + },unlink:function(parent, name) { + throw new FS.ErrnoError(1); + },rmdir:function(parent, name) { + throw new FS.ErrnoError(1); + },readdir:function(node) { + var entries = ['.', '..']; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue; + } + entries.push(key); + } + return entries; + },symlink:function(parent, newName, oldPath) { + throw new FS.ErrnoError(1); + },readlink:function(node) { + throw new FS.ErrnoError(1); + }},stream_ops:{read:function (stream, buffer, offset, length, position) { + if (position >= stream.node.size) return 0; + var chunk = stream.node.contents.slice(position, position + length); + var ab = WORKERFS.reader.readAsArrayBuffer(chunk); + buffer.set(new Uint8Array(ab), offset); + return chunk.size; + },write:function (stream, buffer, offset, length, position) { + throw new FS.ErrnoError(5); + },llseek:function (stream, offset, whence) { + var position = offset; + if (whence === 1) { // SEEK_CUR. + position += stream.position; + } else if (whence === 2) { // SEEK_END. + if (FS.isFile(stream.node.mode)) { + position += stream.node.size; + } + } + if (position < 0) { + throw new FS.ErrnoError(22); + } + return position; + }}}; + + var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; + + var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) { + if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); + return ___setErrNo(e.errno); + },lookupPath:function(path, opts) { + path = PATH_FS.resolve(FS.cwd(), path); + opts = opts || {}; + + if (!path) return { path: '', node: null }; + + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + for (var key in defaults) { + if (opts[key] === undefined) { + opts[key] = defaults[key]; + } + } + + if (opts.recurse_count > 8) { // max recursive lookup of 8 + throw new FS.ErrnoError(40); + } + + // split the path + var parts = PATH.normalizeArray(path.split('/').filter(function(p) { + return !!p; + }), false); + + // start at the root + var current = FS.root; + var current_path = '/'; + + for (var i = 0; i < parts.length; i++) { + var islast = (i === parts.length-1); + if (islast && opts.parent) { + // stop resolving + break; + } + + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + + // jump to the mount's root node if this is a mountpoint + if (FS.isMountpoint(current)) { + if (!islast || (islast && opts.follow_mount)) { + current = current.mounted.root; + } + } + + // by default, lookupPath will not follow a symlink if it is the final path component. + // setting opts.follow = true will override this behavior. + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + + var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); + current = lookup.node; + + if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). + throw new FS.ErrnoError(40); + } + } + } + } + + return { path: current_path, node: current }; + },getPath:function(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; + } + path = path ? node.name + '/' + path : node.name; + node = node.parent; + } + },hashName:function(parentid, name) { + var hash = 0; + + + for (var i = 0; i < name.length; i++) { + hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; + } + return ((parentid + hash) >>> 0) % FS.nameTable.length; + },hashAddNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + },hashRemoveNode:function(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + },lookupNode:function(parent, name) { + var err = FS.mayLookup(parent); + if (err) { + throw new FS.ErrnoError(err, parent); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + // if we failed to find it in the cache, call into the VFS + return FS.lookup(parent, name); + },createNode:function(parent, name, mode, rdev) { + if (!FS.FSNode) { + FS.FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this; // root node sets parent to itself + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + }; + + FS.FSNode.prototype = {}; + + // compatibility + var readMode = 292 | 73; + var writeMode = 146; + + // NOTE we must use Object.defineProperties instead of individual calls to + // Object.defineProperty in order to make closure compiler happy + Object.defineProperties(FS.FSNode.prototype, { + read: { + get: function() { return (this.mode & readMode) === readMode; }, + set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } + }, + write: { + get: function() { return (this.mode & writeMode) === writeMode; }, + set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } + }, + isFolder: { + get: function() { return FS.isDir(this.mode); } + }, + isDevice: { + get: function() { return FS.isChrdev(this.mode); } + } + }); + } + + var node = new FS.FSNode(parent, name, mode, rdev); + + FS.hashAddNode(node); + + return node; + },destroyNode:function(node) { + FS.hashRemoveNode(node); + },isRoot:function(node) { + return node === node.parent; + },isMountpoint:function(node) { + return !!node.mounted; + },isFile:function(mode) { + return (mode & 61440) === 32768; + },isDir:function(mode) { + return (mode & 61440) === 16384; + },isLink:function(mode) { + return (mode & 61440) === 40960; + },isChrdev:function(mode) { + return (mode & 61440) === 8192; + },isBlkdev:function(mode) { + return (mode & 61440) === 24576; + },isFIFO:function(mode) { + return (mode & 61440) === 4096; + },isSocket:function(mode) { + return (mode & 49152) === 49152; + },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str) { + var flags = FS.flagModes[str]; + if (typeof flags === 'undefined') { + throw new Error('Unknown file open mode: ' + str); + } + return flags; + },flagsToPermissionString:function(flag) { + var perms = ['r', 'w', 'rw'][flag & 3]; + if ((flag & 512)) { + perms += 'w'; + } + return perms; + },nodePermissions:function(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + // return 0 if any user, group or owner bits are set. + if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { + return 13; + } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { + return 13; + } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { + return 13; + } + return 0; + },mayLookup:function(dir) { + var err = FS.nodePermissions(dir, 'x'); + if (err) return err; + if (!dir.node_ops.lookup) return 13; + return 0; + },mayCreate:function(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 17; + } catch (e) { + } + return FS.nodePermissions(dir, 'wx'); + },mayDelete:function(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var err = FS.nodePermissions(dir, 'wx'); + if (err) { + return err; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 20; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 16; + } + } else { + if (FS.isDir(node.mode)) { + return 21; + } + } + return 0; + },mayOpen:function(node, flags) { + if (!node) { + return 2; + } + if (FS.isLink(node.mode)) { + return 40; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write + (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) + return 21; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) { + fd_start = fd_start || 0; + fd_end = fd_end || FS.MAX_OPEN_FDS; + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(24); + },getStream:function(fd) { + return FS.streams[fd]; + },createStream:function(stream, fd_start, fd_end) { + if (!FS.FSStream) { + FS.FSStream = function(){}; + FS.FSStream.prototype = {}; + // compatibility + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function() { return this.node; }, + set: function(val) { this.node = val; } + }, + isRead: { + get: function() { return (this.flags & 2097155) !== 1; } + }, + isWrite: { + get: function() { return (this.flags & 2097155) !== 0; } + }, + isAppend: { + get: function() { return (this.flags & 1024); } + } + }); + } + // clone it, so we can return an instance of FSStream + var newStream = new FS.FSStream(); + for (var p in stream) { + newStream[p] = stream[p]; + } + stream = newStream; + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + },closeStream:function(fd) { + FS.streams[fd] = null; + },chrdev_stream_ops:{open:function(stream) { + var device = FS.getDevice(stream.node.rdev); + // override node's stream ops with the device's + stream.stream_ops = device.stream_ops; + // forward the open call + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + },llseek:function() { + throw new FS.ErrnoError(29); + }},major:function(dev) { + return ((dev) >> 8); + },minor:function(dev) { + return ((dev) & 0xff); + },makedev:function(ma, mi) { + return ((ma) << 8 | (mi)); + },registerDevice:function(dev, ops) { + FS.devices[dev] = { stream_ops: ops }; + },getDevice:function(dev) { + return FS.devices[dev]; + },getMounts:function(mount) { + var mounts = []; + var check = [mount]; + + while (check.length) { + var m = check.pop(); + + mounts.push(m); + + check.push.apply(check, m.mounts); + } + + return mounts; + },syncfs:function(populate, callback) { + if (typeof(populate) === 'function') { + callback = populate; + populate = false; + } + + FS.syncFSRequests++; + + if (FS.syncFSRequests > 1) { + console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work'); + } + + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + + function doCallback(err) { + assert(FS.syncFSRequests > 0); + FS.syncFSRequests--; + return callback(err); + } + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return doCallback(err); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + }; + + // sync all mounts + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + },mount:function(type, opts, mountpoint) { + var root = mountpoint === '/'; + var pseudo = !mountpoint; + var node; + + if (root && FS.root) { + throw new FS.ErrnoError(16); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + mountpoint = lookup.path; // use the absolute path + node = lookup.node; + + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + } + + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + + // create a root node for the fs + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + + if (root) { + FS.root = mountRoot; + } else if (node) { + // set as a mountpoint + node.mounted = mount; + + // add the new mount to the current mount's children + if (node.mount) { + node.mount.mounts.push(mount); + } + } + + return mountRoot; + },unmount:function (mountpoint) { + var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(22); + } + + // destroy the nodes for this mount, and all its child mounts + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + + while (current) { + var next = current.name_next; + + if (mounts.indexOf(current.mount) !== -1) { + FS.destroyNode(current); + } + + current = next; + } + }); + + // no longer a mountpoint + node.mounted = null; + + // remove this mount from the child mounts + var idx = node.mount.mounts.indexOf(mount); + assert(idx !== -1); + node.mount.mounts.splice(idx, 1); + },lookup:function(parent, name) { + return parent.node_ops.lookup(parent, name); + },mknod:function(path, mode, dev) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === '.' || name === '..') { + throw new FS.ErrnoError(22); + } + var err = FS.mayCreate(parent, name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.mknod(parent, name, mode, dev); + },create:function(path, mode) { + mode = mode !== undefined ? mode : 438 /* 0666 */; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + },mkdir:function(path, mode) { + mode = mode !== undefined ? mode : 511 /* 0777 */; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + },mkdirTree:function(path, mode) { + var dirs = path.split('/'); + var d = ''; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += '/' + dirs[i]; + try { + FS.mkdir(d, mode); + } catch(e) { + if (e.errno != 17) throw e; + } + } + },mkdev:function(path, mode, dev) { + if (typeof(dev) === 'undefined') { + dev = mode; + mode = 438 /* 0666 */; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + },symlink:function(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(2); + } + var lookup = FS.lookupPath(newpath, { parent: true }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(2); + } + var newname = PATH.basename(newpath); + var err = FS.mayCreate(parent, newname); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(1); + } + return parent.node_ops.symlink(parent, newname, oldpath); + },rename:function(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + // parents must exist + var lookup, old_dir, new_dir; + try { + lookup = FS.lookupPath(old_path, { parent: true }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { parent: true }); + new_dir = lookup.node; + } catch (e) { + throw new FS.ErrnoError(16); + } + if (!old_dir || !new_dir) throw new FS.ErrnoError(2); + // need to be part of the same mount + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(18); + } + // source must exist + var old_node = FS.lookupNode(old_dir, old_name); + // old path should not be an ancestor of the new path + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(22); + } + // new path should not be an ancestor of the old path + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== '.') { + throw new FS.ErrnoError(39); + } + // see if the new path already exists + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) { + // not fatal + } + // early out if nothing needs to change + if (old_node === new_node) { + return; + } + // we'll need to delete the old entry + var isdir = FS.isDir(old_node.mode); + var err = FS.mayDelete(old_dir, old_name, isdir); + if (err) { + throw new FS.ErrnoError(err); + } + // need delete permissions if we'll be overwriting. + // need create permissions if new doesn't already exist. + err = new_node ? + FS.mayDelete(new_dir, new_name, isdir) : + FS.mayCreate(new_dir, new_name); + if (err) { + throw new FS.ErrnoError(err); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { + throw new FS.ErrnoError(16); + } + // if we are going to change the parent, check write permissions + if (new_dir !== old_dir) { + err = FS.nodePermissions(old_dir, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + } + try { + if (FS.trackingDelegate['willMovePath']) { + FS.trackingDelegate['willMovePath'](old_path, new_path); + } + } catch(e) { + console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + // remove the node from the lookup hash + FS.hashRemoveNode(old_node); + // do the underlying fs rename + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + // add the node back to the hash (in case node_ops.rename + // changed its name) + FS.hashAddNode(old_node); + } + try { + if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); + } catch(e) { + console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); + } + },rmdir:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, true); + if (err) { + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(20); + } + return node.node_ops.readdir(node); + },unlink:function(path) { + var lookup = FS.lookupPath(path, { parent: true }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var err = FS.mayDelete(parent, name, false); + if (err) { + // According to POSIX, we should map EISDIR to EPERM, but + // we instead do what Linux does (and we must, as we use + // the musl linux libc). + throw new FS.ErrnoError(err); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(1); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(16); + } + try { + if (FS.trackingDelegate['willDeletePath']) { + FS.trackingDelegate['willDeletePath'](path); + } + } catch(e) { + console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + try { + if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); + } catch(e) { + console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); + } + },readlink:function(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(2); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(22); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + },stat:function(path, dontFollow) { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(2); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(1); + } + return node.node_ops.getattr(node); + },lstat:function(path) { + return FS.stat(path, true); + },chmod:function(path, mode, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + mode: (mode & 4095) | (node.mode & ~4095), + timestamp: Date.now() + }); + },lchmod:function(path, mode) { + FS.chmod(path, mode, true); + },fchmod:function(fd, mode) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chmod(stream.node, mode); + },chown:function(path, uid, gid, dontFollow) { + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: !dontFollow }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + // we ignore the uid / gid for now + }); + },lchown:function(path, uid, gid) { + FS.chown(path, uid, gid, true); + },fchown:function(fd, uid, gid) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + FS.chown(stream.node, uid, gid); + },truncate:function(path, len) { + if (len < 0) { + throw new FS.ErrnoError(22); + } + var node; + if (typeof path === 'string') { + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(1); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(21); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(22); + } + var err = FS.nodePermissions(node, 'w'); + if (err) { + throw new FS.ErrnoError(err); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + },ftruncate:function(fd, len) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(22); + } + FS.truncate(stream.node, len); + },utime:function(path, atime, mtime) { + var lookup = FS.lookupPath(path, { follow: true }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + },open:function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(2); + } + flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; + if ((flags & 64)) { + mode = (mode & 4095) | 32768; + } else { + mode = 0; + } + var node; + if (typeof path === 'object') { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) { + // ignore + } + } + // perhaps we need to create the node + var created = false; + if ((flags & 64)) { + if (node) { + // if O_CREAT and O_EXCL are set, error out if the node already exists + if ((flags & 128)) { + throw new FS.ErrnoError(17); + } + } else { + // node doesn't exist, try to create it + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(2); + } + // can't truncate a device + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + // if asked only for a directory, then this must be one + if ((flags & 65536) && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(20); + } + // check permissions, if this is not a file we just created now (it is ok to + // create and write to a file with read-only permissions; it is read-only + // for later use) + if (!created) { + var err = FS.mayOpen(node, flags); + if (err) { + throw new FS.ErrnoError(err); + } + } + // do truncation if necessary + if ((flags & 512)) { + FS.truncate(node, 0); + } + // we've already handled these, don't pass down to the underlying vfs + flags &= ~(128 | 512); + + // register the stream with the filesystem + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), // we want the absolute path to the node + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + // used by the file family libc calls (fopen, fwrite, ferror, etc.) + ungotten: [], + error: false + }, fd_start, fd_end); + // call the new stream's open function + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module['logReadFiles'] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + console.log("FS.trackingDelegate error on read file: " + path); + } + } + try { + if (FS.trackingDelegate['onOpenFile']) { + var trackingFlags = 0; + if ((flags & 2097155) !== 1) { + trackingFlags |= FS.tracking.openFlags.READ; + } + if ((flags & 2097155) !== 0) { + trackingFlags |= FS.tracking.openFlags.WRITE; + } + FS.trackingDelegate['onOpenFile'](path, trackingFlags); + } + } catch(e) { + console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); + } + return stream; + },close:function(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (stream.getdents) stream.getdents = null; // free readdir state + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + },isClosed:function(stream) { + return stream.fd === null; + },llseek:function(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(29); + } + if (whence != 0 /* SEEK_SET */ && whence != 1 /* SEEK_CUR */ && whence != 2 /* SEEK_END */) { + throw new FS.ErrnoError(22); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + },read:function(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(22); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + },write:function(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(22); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(21); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(22); + } + if (stream.flags & 1024) { + // seek to the end before writing in append mode + FS.llseek(stream, 0, 2); + } + var seeking = typeof position !== 'undefined'; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(29); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + try { + if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); + } catch(e) { + console.log("FS.trackingDelegate['onWriteToFile']('"+stream.path+"') threw an exception: " + e.message); + } + return bytesWritten; + },allocate:function(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(9); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(22); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(9); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(19); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(95); + } + stream.stream_ops.allocate(stream, offset, length); + },mmap:function(stream, buffer, offset, length, position, prot, flags) { + // User requests writing to file (prot & PROT_WRITE != 0). + // Checking if we have permissions to write to the file unless + // MAP_PRIVATE flag is set. According to POSIX spec it is possible + // to write to file opened in read-only mode with MAP_PRIVATE flag, + // as all modifications will be visible only in the memory of + // the current process. + if ((prot & 2) !== 0 + && (flags & 2) === 0 + && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(13); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(13); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(19); + } + return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); + },msync:function(stream, buffer, offset, length, mmapFlags) { + if (!stream || !stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + },munmap:function(stream) { + return 0; + },ioctl:function(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(25); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + },readFile:function(path, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'r'; + opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === 'utf8') { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === 'binary') { + ret = buf; + } + FS.close(stream); + return ret; + },writeFile:function(path, data, opts) { + opts = opts || {}; + opts.flags = opts.flags || 'w'; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data === 'string') { + var buf = new Uint8Array(lengthBytesUTF8(data)+1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error('Unsupported data type'); + } + FS.close(stream); + },cwd:function() { + return FS.currentPath; + },chdir:function(path) { + var lookup = FS.lookupPath(path, { follow: true }); + if (lookup.node === null) { + throw new FS.ErrnoError(2); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(20); + } + var err = FS.nodePermissions(lookup.node, 'x'); + if (err) { + throw new FS.ErrnoError(err); + } + FS.currentPath = lookup.path; + },createDefaultDirectories:function() { + FS.mkdir('/tmp'); + FS.mkdir('/home'); + FS.mkdir('/home/web_user'); + },createDefaultDevices:function() { + // create /dev + FS.mkdir('/dev'); + // setup /dev/null + FS.registerDevice(FS.makedev(1, 3), { + read: function() { return 0; }, + write: function(stream, buffer, offset, length, pos) { return length; } + }); + FS.mkdev('/dev/null', FS.makedev(1, 3)); + // setup /dev/tty and /dev/tty1 + // stderr needs to print output using Module['printErr'] + // so we register a second tty just for it. + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev('/dev/tty', FS.makedev(5, 0)); + FS.mkdev('/dev/tty1', FS.makedev(6, 0)); + // setup /dev/[u]random + var random_device; + if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') { + // for modern web browsers + var randomBuffer = new Uint8Array(1); + random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; + } else + if (ENVIRONMENT_IS_NODE) { + // for nodejs with or without crypto support included + try { + var crypto_module = require('crypto'); + // nodejs has crypto support + random_device = function() { return crypto_module['randomBytes'](1)[0]; }; + } catch (e) { + // nodejs doesn't have crypto support + } + } else + {} + if (!random_device) { + // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 + random_device = function() { abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };"); }; + } + FS.createDevice('/dev', 'random', random_device); + FS.createDevice('/dev', 'urandom', random_device); + // we're not going to emulate the actual shm device, + // just create the tmp dirs that reside in it commonly + FS.mkdir('/dev/shm'); + FS.mkdir('/dev/shm/tmp'); + },createSpecialDirectories:function() { + // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname) + FS.mkdir('/proc'); + FS.mkdir('/proc/self'); + FS.mkdir('/proc/self/fd'); + FS.mount({ + mount: function() { + var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) throw new FS.ErrnoError(9); + var ret = { + parent: null, + mount: { mountpoint: 'fake' }, + node_ops: { readlink: function() { return stream.path } } + }; + ret.parent = ret; // make it look like a simple root node + return ret; + } + }; + return node; + } + }, {}, '/proc/self/fd'); + },createStandardStreams:function() { + // TODO deprecate the old functionality of a single + // input / output callback and that utilizes FS.createDevice + // and instead require a unique set of stream ops + + // by default, we symlink the standard streams to the + // default tty devices. however, if the standard streams + // have been overwritten we create a unique device for + // them instead. + if (Module['stdin']) { + FS.createDevice('/dev', 'stdin', Module['stdin']); + } else { + FS.symlink('/dev/tty', '/dev/stdin'); + } + if (Module['stdout']) { + FS.createDevice('/dev', 'stdout', null, Module['stdout']); + } else { + FS.symlink('/dev/tty', '/dev/stdout'); + } + if (Module['stderr']) { + FS.createDevice('/dev', 'stderr', null, Module['stderr']); + } else { + FS.symlink('/dev/tty1', '/dev/stderr'); + } + + // open default streams for the stdin, stdout and stderr devices + var stdin = FS.open('/dev/stdin', 'r'); + var stdout = FS.open('/dev/stdout', 'w'); + var stderr = FS.open('/dev/stderr', 'w'); + assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); + assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); + assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); + },ensureErrnoError:function() { + if (FS.ErrnoError) return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.node = node; + this.setErrno = function(errno) { + this.errno = errno; + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } + }; + this.setErrno(errno); + this.message = ERRNO_MESSAGES[errno]; + + // Try to get a maximally helpful stack trace. On Node.js, getting Error.stack + // now ensures it shows what we want. + if (this.stack) { + // Define the stack property for Node.js 4, which otherwise errors on the next line. + Object.defineProperty(this, "stack", { value: (new Error).stack, writable: true }); + this.stack = demangleAll(this.stack); + } + }; + FS.ErrnoError.prototype = new Error(); + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) + [2].forEach(function(code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ''; + }); + },staticInit:function() { + FS.ensureErrnoError(); + + FS.nameTable = new Array(4096); + + FS.mount(MEMFS, {}, '/'); + + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + + FS.filesystems = { + 'MEMFS': MEMFS, + 'IDBFS': IDBFS, + 'NODEFS': NODEFS, + 'WORKERFS': WORKERFS, + }; + },init:function(input, output, error) { + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureErrnoError(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + Module['stdin'] = input || Module['stdin']; + Module['stdout'] = output || Module['stdout']; + Module['stderr'] = error || Module['stderr']; + + FS.createStandardStreams(); + },quit:function() { + FS.init.initialized = false; + // force-flush all streams, so we get musl std streams printed out + var fflush = Module['_fflush']; + if (fflush) fflush(0); + // close all of our streams + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + },getMode:function(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; + },joinPath:function(parts, forceRelative) { + var path = PATH.join.apply(null, parts); + if (forceRelative && path[0] == '/') path = path.substr(1); + return path; + },absolutePath:function(relative, base) { + return PATH_FS.resolve(base, relative); + },standardizePath:function(path) { + return PATH.normalize(path); + },findObject:function(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + },analyzePath:function(path, dontResolveLastLink) { + // operate from within the context of the symlink's target + try { + var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + path = lookup.path; + } catch (e) { + } + var ret = { + isRoot: false, exists: false, error: 0, name: null, path: null, object: null, + parentExists: false, parentPath: null, parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { parent: true }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === '/'; + } catch (e) { + ret.error = e.errno; + }; + return ret; + },createFolder:function(parent, name, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.mkdir(path, mode); + },createPath:function(parent, path, canRead, canWrite) { + parent = typeof parent === 'string' ? parent : FS.getPath(parent); + var parts = path.split('/').reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) { + // ignore EEXIST + } + parent = current; + } + return current; + },createFile:function(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(canRead, canWrite); + return FS.create(path, mode); + },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) { + var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; + var mode = FS.getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data === 'string') { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + // make sure we can write to the file + FS.chmod(node, mode | 146); + var stream = FS.open(node, 'w'); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + return node; + },createDevice:function(parent, name, input, output) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + var mode = FS.getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + // Create a fake device that a set of stream ops to emulate + // the old behavior. + FS.registerDevice(dev, { + open: function(stream) { + stream.seekable = false; + }, + close: function(stream) { + // flush any pending line data + if (output && output.buffer && output.buffer.length) { + output(10); + } + }, + read: function(stream, buffer, offset, length, pos /* ignored */) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(5); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(11); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset+i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset+i]); + } catch (e) { + throw new FS.ErrnoError(5); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + },createLink:function(parent, name, target, canRead, canWrite) { + var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); + return FS.symlink(target, path); + },forceLoadFile:function(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(5); + return success; + },createLazyFile:function(parent, name, url, canRead, canWrite) { + // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = []; // Loaded chunks. Index is the chunk number + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length-1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = (idx / this.chunkSize)|0; + return this.getter(chunkNum)[chunkOffset]; + }; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter; + }; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + // Find length + var xhr = new XMLHttpRequest(); + xhr.open('HEAD', url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + + var chunkSize = 1024*1024; // Chunk size in bytes + + if (!hasByteServing) chunkSize = datalength; + + // Function to get a range from the remote URL. + var doXHR = (function(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); + + // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + + // Some hints to the browser that we want binary data. + if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=x-user-defined'); + } + + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } else { + return intArrayFromString(xhr.responseText || '', true); + } + }); + var lazyArray = this; + lazyArray.setDataGetter(function(chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum+1) * chunkSize - 1; // including this byte + end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + + if (usesGzip || !datalength) { + // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length + chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file + datalength = this.getter(0).length; + chunkSize = datalength; + console.log("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + }; + if (typeof XMLHttpRequest !== 'undefined') { + if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; + var lazyArray = new LazyUint8Array(); + Object.defineProperties(lazyArray, { + length: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, + chunkSize: { + get: function() { + if(!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + } + }); + + var properties = { isDevice: false, contents: lazyArray }; + } else { + var properties = { isDevice: false, url: url }; + } + + var node = FS.createFile(parent, name, properties, canRead, canWrite); + // This is a total hack, but I want to get this lazy file code out of the + // core of MEMFS. If we want to keep this lazy file concept I feel it should + // be its own thin LAZYFS proxying calls to MEMFS. + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + // Add a function that defers querying the file size until it is asked the first time. + Object.defineProperties(node, { + usedBytes: { + get: function() { return this.contents.length; } + } + }); + // override each stream op with one that tries to force load the lazy file first + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function(key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + return fn.apply(null, arguments); + }; + }); + // use a custom read function + stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { + if (!FS.forceLoadFile(node)) { + throw new FS.ErrnoError(5); + } + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + assert(size >= 0); + if (contents.slice) { // normal array + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR + buffer[offset + i] = contents.get(position + i); + } + } + return size; + }; + node.stream_ops = stream_ops; + return node; + },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + Browser.init(); // XXX perhaps this method should move onto Browser? + // TODO we should allow people to just pass in a complete filename instead + // of parent and name being that we just join them anyways + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + if (onload) onload(); + removeRunDependency(dep); + } + var handled = false; + Module['preloadPlugins'].forEach(function(plugin) { + if (handled) return; + if (plugin['canHandle'](fullname)) { + plugin['handle'](byteArray, fullname, finish, function() { + if (onerror) onerror(); + removeRunDependency(dep); + }); + handled = true; + } + }); + if (!handled) finish(byteArray); + } + addRunDependency(dep); + if (typeof url == 'string') { + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); + } else { + processData(url); + } + },indexedDB:function() { + return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + },DB_NAME:function() { + return 'EM_FS_' + window.location.pathname; + },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { + console.log('creating db'); + var db = openRequest.result; + db.createObjectStore(FS.DB_STORE_NAME); + }; + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var putRequest = files.put(FS.analyzePath(path).object.contents, path); + putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; + putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + },loadFilesFromDB:function(paths, onload, onerror) { + onload = onload || function(){}; + onerror = onerror || function(){}; + var indexedDB = FS.indexedDB(); + try { + var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); + } catch (e) { + return onerror(e); + } + openRequest.onupgradeneeded = onerror; // no database to load from + openRequest.onsuccess = function openRequest_onsuccess() { + var db = openRequest.result; + try { + var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); + } catch(e) { + onerror(e); + return; + } + var files = transaction.objectStore(FS.DB_STORE_NAME); + var ok = 0, fail = 0, total = paths.length; + function finish() { + if (fail == 0) onload(); else onerror(); + } + paths.forEach(function(path) { + var getRequest = files.get(path); + getRequest.onsuccess = function getRequest_onsuccess() { + if (FS.analyzePath(path).exists) { + FS.unlink(path); + } + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); + ok++; + if (ok + fail == total) finish(); + }; + getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; + }); + transaction.onerror = onerror; + }; + openRequest.onerror = onerror; + }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(dirfd, path) { + if (path[0] !== '/') { + // relative path + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = FS.getStream(dirfd); + if (!dirstream) throw new FS.ErrnoError(9); + dir = dirstream.path; + } + path = PATH.join2(dir, path); + } + return path; + },doStat:function(func, path, buf) { + try { + var stat = func(path); + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + // an error occurred while trying to look up the path; we should just report ENOTDIR + return -20; + } + throw e; + } + HEAP32[((buf)>>2)]=stat.dev; + HEAP32[(((buf)+(4))>>2)]=0; + HEAP32[(((buf)+(8))>>2)]=stat.ino; + HEAP32[(((buf)+(12))>>2)]=stat.mode; + HEAP32[(((buf)+(16))>>2)]=stat.nlink; + HEAP32[(((buf)+(20))>>2)]=stat.uid; + HEAP32[(((buf)+(24))>>2)]=stat.gid; + HEAP32[(((buf)+(28))>>2)]=stat.rdev; + HEAP32[(((buf)+(32))>>2)]=0; + (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]); + HEAP32[(((buf)+(48))>>2)]=4096; + HEAP32[(((buf)+(52))>>2)]=stat.blocks; + HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0; + HEAP32[(((buf)+(60))>>2)]=0; + HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0; + HEAP32[(((buf)+(68))>>2)]=0; + HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0; + HEAP32[(((buf)+(76))>>2)]=0; + (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]); + return 0; + },doMsync:function(addr, stream, len, flags) { + var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len)); + FS.msync(stream, buffer, 0, len, flags); + },doMkdir:function(path, mode) { + // remove a trailing slash, if one - /a/b/ has basename of '', but + // we want to create b in the context of this function + path = PATH.normalize(path); + if (path[path.length-1] === '/') path = path.substr(0, path.length-1); + FS.mkdir(path, mode, 0); + return 0; + },doMknod:function(path, mode, dev) { + // we don't want this in the JS API as it uses mknod to create all nodes. + switch (mode & 61440) { + case 32768: + case 8192: + case 24576: + case 4096: + case 49152: + break; + default: return -22; + } + FS.mknod(path, mode, dev); + return 0; + },doReadlink:function(path, buf, bufsize) { + if (bufsize <= 0) return -22; + var ret = FS.readlink(path); + + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf+len]; + stringToUTF8(ret, buf, bufsize+1); + // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) + // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. + HEAP8[buf+len] = endChar; + + return len; + },doAccess:function(path, amode) { + if (amode & ~7) { + // need a valid mode + return -22; + } + var node; + var lookup = FS.lookupPath(path, { follow: true }); + node = lookup.node; + if (!node) { + return -2; + } + var perms = ''; + if (amode & 4) perms += 'r'; + if (amode & 2) perms += 'w'; + if (amode & 1) perms += 'x'; + if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { + return -13; + } + return 0; + },doDup:function(path, flags, suggestFD) { + var suggest = FS.getStream(suggestFD); + if (suggest) FS.close(suggest); + return FS.open(path, flags, 0, suggestFD, suggestFD).fd; + },doReadv:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.read(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; // nothing more to read + } + return ret; + },doWritev:function(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAP32[(((iov)+(i*8))>>2)]; + var len = HEAP32[(((iov)+(i*8 + 4))>>2)]; + var curr = FS.write(stream, HEAP8,ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + } + return ret; + },varargs:0,get:function(varargs) { + SYSCALLS.varargs += 4; + var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)]; + return ret; + },getStr:function() { + var ret = UTF8ToString(SYSCALLS.get()); + return ret; + },getStreamFromFD:function() { + var stream = FS.getStream(SYSCALLS.get()); + if (!stream) throw new FS.ErrnoError(9); + return stream; + },get64:function() { + var low = SYSCALLS.get(), high = SYSCALLS.get(); + if (low >= 0) assert(high === 0); + else assert(high === -1); + return low; + },getZero:function() { + assert(SYSCALLS.get() === 0); + }};function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs; + try { + // llseek + var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get(); + var HIGH_OFFSET = 0x100000000; // 2^32 + // use an unsigned operator on low and shift high by 32-bits + var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); + + var DOUBLE_LIMIT = 0x20000000000000; // 2^53 + // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT + if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { + return -75; + } + + FS.llseek(stream, offset, whence); + (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((result)>>2)]=tempI64[0],HEAP32[(((result)+(4))>>2)]=tempI64[1]); + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall145(which, varargs) {SYSCALLS.varargs = varargs; + try { + // readv + var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get(); + return SYSCALLS.doReadv(stream, iov, iovcnt); + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall221(which, varargs) {SYSCALLS.varargs = varargs; + try { + // fcntl64 + var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get(); + switch (cmd) { + case 0: { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -22; + } + var newStream; + newStream = FS.open(stream.path, stream.flags, 0, arg); + return newStream.fd; + } + case 1: + case 2: + return 0; // FD_CLOEXEC makes no sense for a single process. + case 3: + return stream.flags; + case 4: { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0; + } + case 12: + /* case 12: Currently in musl F_GETLK64 has same value as F_GETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ { + + var arg = SYSCALLS.get(); + var offset = 0; + // We're always unlocked. + HEAP16[(((arg)+(offset))>>1)]=2; + return 0; + } + case 13: + case 14: + /* case 13: Currently in musl F_SETLK64 has same value as F_SETLK, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + /* case 14: Currently in musl F_SETLKW64 has same value as F_SETLKW, so omitted to avoid duplicate case blocks. If that changes, uncomment this */ + + + return 0; // Pretend that the locking is successful. + case 16: + case 8: + return -22; // These are for sockets. We don't have them fully implemented yet. + case 9: + // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves. + ___setErrNo(22); + return -1; + default: { + return -22; + } + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall5(which, varargs) {SYSCALLS.varargs = varargs; + try { + // open + var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get(); // optional TODO + var stream = FS.open(pathname, flags, mode); + return stream.fd; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs; + try { + // ioctl + var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get(); + switch (op) { + case 21509: + case 21505: { + if (!stream.tty) return -25; + return 0; + } + case 21510: + case 21511: + case 21512: + case 21506: + case 21507: + case 21508: { + if (!stream.tty) return -25; + return 0; // no-op, not actually adjusting terminal settings + } + case 21519: { + if (!stream.tty) return -25; + var argp = SYSCALLS.get(); + HEAP32[((argp)>>2)]=0; + return 0; + } + case 21520: { + if (!stream.tty) return -25; + return -22; // not supported + } + case 21531: { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp); + } + case 21523: { + // TODO: in theory we should write to the winsize struct that gets + // passed in, but for now musl doesn't read anything on it + if (!stream.tty) return -25; + return 0; + } + case 21524: { + // TODO: technically, this ioctl call should change the window size. + // but, since emscripten doesn't have any concept of a terminal window + // yet, we'll just silently throw it away as we do TIOCGWINSZ + if (!stream.tty) return -25; + return 0; + } + default: abort('bad ioctl syscall ' + op); + } + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs; + try { + // close + var stream = SYSCALLS.getStreamFromFD(); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + } + + function ___unlock() {} + + + function _fd_write(stream, iov, iovcnt, pnum) {try { + + stream = FS.getStream(stream); + if (!stream) throw new FS.ErrnoError(9); + var num = SYSCALLS.doWritev(stream, iov, iovcnt); + HEAP32[((pnum)>>2)]=num + return 0; + } catch (e) { + if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e); + return -e.errno; + } + }function ___wasi_fd_write( + ) { + return _fd_write.apply(null, arguments) + } + + + + + + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + + if (!Browser.mainLoop.func) { + console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.'); + return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. + } + + if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop + }; + Browser.mainLoop.method = 'timeout'; + } else if (mode == 1 /*EM_TIMING_RAF*/) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'rAF'; + } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) { + if (typeof setImmediate === 'undefined') { + // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed) + var setImmediates = []; + var emscriptenMainLoopMessageId = 'setimmediate'; + var Browser_setImmediate_messageHandler = function(event) { + // When called in current thread or Worker, the main loop ID is structured slightly different to accommodate for --proxy-to-worker runtime listening to Worker events, + // so check for both cases. + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + } + addEventListener("message", Browser_setImmediate_messageHandler, true); + setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module['setImmediates'] === undefined) Module['setImmediates'] = []; + Module['setImmediates'].push(func); + postMessage({target: emscriptenMainLoopMessageId}); // In --proxy-to-worker, route the message via proxyClient.js + } else postMessage(emscriptenMainLoopMessageId, "*"); // On the main thread, can just send the message to itself. + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + setImmediate(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = 'immediate'; + } + return 0; + } + + function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { + noExitRuntime = true; + + assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); + + Browser.mainLoop.func = func; + Browser.mainLoop.arg = arg; + + var browserIterationFunc; + if (typeof arg !== 'undefined') { + browserIterationFunc = function() { + Module['dynCall_vi'](func, arg); + }; + } else { + browserIterationFunc = function() { + Module['dynCall_v'](func); + }; + } + + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + // not counted, but move the progress along a tiny bit + next = next + 0.5; // do not steal all the next one's progress + Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; + } + } + console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); + Browser.mainLoop.updateStatus(); + + // catches pause/resume main loop from blocker execution + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + setTimeout(Browser.mainLoop.runner, 0); + return; + } + + // catch pauses from non-main loop sources + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Implement very basic swap interval control + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + // Not the scheduled time to render this frame - skip. + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + + // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize + // VBO double-buffering and reduce GPU stalls. + + + + if (Browser.mainLoop.method === 'timeout' && Module.ctx) { + err('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); + Browser.mainLoop.method = ''; // just warn once per call to set main loop + } + + Browser.mainLoop.runIter(browserIterationFunc); + + checkStackCookie(); + + // catch pauses from the main loop itself + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; + + // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able + // to queue the newest produced audio samples. + // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() + // do not need to be hardcoded into this function, but can be more generic. + if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); + + Browser.mainLoop.scheduler(); + } + + if (!noSetTiming) { + if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) + + Browser.mainLoop.scheduler(); + } + + if (simulateInfiniteLoop) { + throw 'SimulateInfiniteLoop'; + } + }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. + },resume:function() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + },updateStatus:function() { + if (Module['setStatus']) { + var message = Module['statusMessage'] || 'Please wait...'; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); + } else { + Module['setStatus'](message); + } + } else { + Module['setStatus'](''); + } + } + },runIter:function(func) { + if (ABORT) return; + if (Module['preMainLoop']) { + var preRet = Module['preMainLoop'](); + if (preRet === false) { + return; // |return false| skips a frame + } + } + try { + func(); + } catch (e) { + if (e instanceof ExitStatus) { + return; + } else { + if (e && typeof e === 'object' && e.stack) err('exception thrown: ' + [e, e.stack]); + throw e; + } + } + if (Module['postMainLoop']) Module['postMainLoop'](); + }},isFullscreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function() { + if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers + + if (Browser.initted) return; + Browser.initted = true; + + try { + new Blob(); + Browser.hasBlobConstructor = true; + } catch(e) { + Browser.hasBlobConstructor = false; + console.log("warning: no blob constructor, cannot create blobs with mimetypes"); + } + Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); + Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; + if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { + console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); + Module.noImageDecoding = true; + } + + // Support for plugins that can process preloaded files. You can add more of these to + // your app by creating and appending to Module.preloadPlugins. + // + // Each plugin is asked if it can handle a file based on the file's name. If it can, + // it is given the file's raw data. When it is done, it calls a callback with the file's + // (possibly modified) data. For example, a plugin might decompress a file, or it + // might create some side data structure for use later (like an Image element, etc.). + + var imagePlugin = {}; + imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = null; + if (Browser.hasBlobConstructor) { + try { + b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + if (b.size !== byteArray.length) { // Safari bug #118630 + // Safari's Blob can only take an ArrayBuffer + b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); + } + } catch(e) { + warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); + } + } + if (!b) { + var bb = new Browser.BlobBuilder(); + bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range + b = bb.getBlob(); + } + var url = Browser.URLObject.createObjectURL(b); + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var img = new Image(); + img.onload = function img_onload() { + assert(img.complete, 'Image ' + name + ' could not be decoded'); + var canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + Module["preloadedImages"][name] = canvas; + Browser.URLObject.revokeObjectURL(url); + if (onload) onload(byteArray); + }; + img.onerror = function img_onerror(event) { + console.log('Image ' + url + ' could not be decoded'); + if (onerror) onerror(); + }; + img.src = url; + }; + Module['preloadPlugins'].push(imagePlugin); + + var audioPlugin = {}; + audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; + }; + audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + Module["preloadedAudios"][name] = audio; + if (onload) onload(byteArray); + } + function fail() { + if (done) return; + done = true; + Module["preloadedAudios"][name] = new Audio(); // empty shim + if (onerror) onerror(); + } + if (Browser.hasBlobConstructor) { + try { + var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); + } catch(e) { + return fail(); + } + var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! + assert(typeof url == 'string', 'createObjectURL must return a url as a string'); + var audio = new Audio(); + audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 + audio.onerror = function audio_onerror(event) { + if (done) return; + console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); + function encode64(data) { + var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var PAD = '='; + var ret = ''; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = (leftchar << 8) | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = (leftchar >> (leftbits-6)) & 0x3f; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar&3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar&0xf) << 2]; + ret += PAD; + } + return ret; + } + audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); + finish(audio); // we don't wait for confirmation this worked - but it's worth trying + }; + audio.src = url; + // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror + Browser.safeSetTimeout(function() { + finish(audio); // try to use it even though it is not necessarily ready to play + }, 10000); + } else { + return fail(); + } + }; + Module['preloadPlugins'].push(audioPlugin); + + + // Canvas event setup + + function pointerLockChange() { + Browser.pointerLock = document['pointerLockElement'] === Module['canvas'] || + document['mozPointerLockElement'] === Module['canvas'] || + document['webkitPointerLockElement'] === Module['canvas'] || + document['msPointerLockElement'] === Module['canvas']; + } + var canvas = Module['canvas']; + if (canvas) { + // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module + // Module['forcedAspectRatio'] = 4 / 3; + + canvas.requestPointerLock = canvas['requestPointerLock'] || + canvas['mozRequestPointerLock'] || + canvas['webkitRequestPointerLock'] || + canvas['msRequestPointerLock'] || + function(){}; + canvas.exitPointerLock = document['exitPointerLock'] || + document['mozExitPointerLock'] || + document['webkitExitPointerLock'] || + document['msExitPointerLock'] || + function(){}; // no-op if function does not exist + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + + document.addEventListener('pointerlockchange', pointerLockChange, false); + document.addEventListener('mozpointerlockchange', pointerLockChange, false); + document.addEventListener('webkitpointerlockchange', pointerLockChange, false); + document.addEventListener('mspointerlockchange', pointerLockChange, false); + + if (Module['elementPointerLock']) { + canvas.addEventListener("click", function(ev) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + },createContext:function(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. + + var ctx; + var contextHandle; + if (useWebGL) { + // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: 1, + }; + + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + + // This check of existence of GL is here to satisfy Closure compiler, which yells if variable GL is referenced below but GL object is not + // actually compiled in because application is not doing any GL operations. TODO: Ideally if GL is not being used, this function + // Browser.createContext() should not even be emitted. + if (typeof GL !== 'undefined') { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } + } else { + ctx = canvas.getContext('2d'); + } + + if (!ctx) return null; + + if (setInModule) { + if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); + + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); + Browser.init(); + } + return ctx; + },destroyContext:function(canvas, useWebGL, setInModule) {},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer, resizeCanvas, vrDevice) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + Browser.vrDevice = vrDevice; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; + if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; + + var canvas = Module['canvas']; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } else { + // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } + if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullscreen); + if (Module['onFullscreen']) Module['onFullscreen'](Browser.isFullscreen); + } + + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener('fullscreenchange', fullscreenChange, false); + document.addEventListener('mozfullscreenchange', fullscreenChange, false); + document.addEventListener('webkitfullscreenchange', fullscreenChange, false); + document.addEventListener('MSFullscreenChange', fullscreenChange, false); + } + + // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + + // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) + canvasContainer.requestFullscreen = canvasContainer['requestFullscreen'] || + canvasContainer['mozRequestFullScreen'] || + canvasContainer['msRequestFullscreen'] || + (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) || + (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); + + if (vrDevice) { + canvasContainer.requestFullscreen({ vrDisplay: vrDevice }); + } else { + canvasContainer.requestFullscreen(); + } + },requestFullScreen:function(lockPointer, resizeCanvas, vrDevice) { + err('Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.'); + Browser.requestFullScreen = function(lockPointer, resizeCanvas, vrDevice) { + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + } + return Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice); + },exitFullscreen:function() { + // This is workaround for chrome. Trying to exit from fullscreen + // not in fullscreen state will cause "TypeError: Document not active" + // in chrome. See https://github.com/emscripten-core/emscripten/pull/8236 + if (!Browser.isFullscreen) { + return false; + } + + var CFS = document['exitFullscreen'] || + document['cancelFullScreen'] || + document['mozCancelFullScreen'] || + document['msExitFullscreen'] || + document['webkitCancelFullScreen'] || + (function() {}); + CFS.apply(document, []); + return true; + },nextRAF:0,fakeRequestAnimationFrame:function(func) { + // try to keep 60fps between calls to here + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1000/60; + } else { + while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 + Browser.nextRAF += 1000/60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + },requestAnimationFrame:function(func) { + if (typeof requestAnimationFrame === 'function') { + requestAnimationFrame(func); + return; + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func); + },safeCallback:function(func) { + return function() { + if (!ABORT) return func.apply(null, arguments); + }; + },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function() { + Browser.allowAsyncCallbacks = false; + },resumeAsyncCallbacks:function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now + Browser.allowAsyncCallbacks = true; + if (Browser.queuedAsyncCallbacks.length > 0) { + var callbacks = Browser.queuedAsyncCallbacks; + Browser.queuedAsyncCallbacks = []; + callbacks.forEach(function(func) { + func(); + }); + } + },safeRequestAnimationFrame:function(func) { + return Browser.requestAnimationFrame(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }); + },safeSetTimeout:function(func, timeout) { + noExitRuntime = true; + return setTimeout(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } else { + Browser.queuedAsyncCallbacks.push(func); + } + }, timeout); + },safeSetInterval:function(func, timeout) { + noExitRuntime = true; + return setInterval(function() { + if (ABORT) return; + if (Browser.allowAsyncCallbacks) { + func(); + } // drop it on the floor otherwise, next interval will kick in + }, timeout); + },getMimetype:function(name) { + return { + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'png': 'image/png', + 'bmp': 'image/bmp', + 'ogg': 'audio/ogg', + 'wav': 'audio/wav', + 'mp3': 'audio/mpeg' + }[name.substr(name.lastIndexOf('.')+1)]; + },getUserMedia:function(func) { + if(!window.getUserMedia) { + window.getUserMedia = navigator['getUserMedia'] || + navigator['mozGetUserMedia']; + } + window.getUserMedia(func); + },getMovementX:function(event) { + return event['movementX'] || + event['mozMovementX'] || + event['webkitMovementX'] || + 0; + },getMovementY:function(event) { + return event['movementY'] || + event['mozMovementY'] || + event['webkitMovementY'] || + 0; + },getMouseWheelDelta:function(event) { + var delta = 0; + switch (event.type) { + case 'DOMMouseScroll': + // 3 lines make up a step + delta = event.detail / 3; + break; + case 'mousewheel': + // 120 units make up a step + delta = event.wheelDelta / 120; + break; + case 'wheel': + delta = event.deltaY + switch(event.deltaMode) { + case 0: + // DOM_DELTA_PIXEL: 100 pixels make up a step + delta /= 100; + break; + case 1: + // DOM_DELTA_LINE: 3 lines make up a step + delta /= 3; + break; + case 2: + // DOM_DELTA_PAGE: A page makes up 80 steps + delta *= 80; + break; + default: + throw 'unrecognized mouse wheel delta mode: ' + event.deltaMode; + } + break; + default: + throw 'unrecognized mouse wheel event: ' + event.type; + } + return delta; + },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event) { // event should be mousemove, mousedown or mouseup + if (Browser.pointerLock) { + // When the pointer is locked, calculate the coordinates + // based on the movement of the mouse. + // Workaround for Firefox bug 764498 + if (event.type != 'mousemove' && + ('mozMovementX' in event)) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + + // check if SDL is available + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + // just add the mouse delta to the current absolut mouse position + // FIXME: ideally this should be clamped against the canvas size and zero + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + // Otherwise, calculate the movement based on the changes + // in the coordinates. + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + + // Neither .scrollX or .pageXOffset are defined in a spec, but + // we prefer .scrollX because it is currently in a spec draft. + // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) + var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); + var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); + // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset + // and we have no viable fallback. + assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.'); + + if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { + var touch = event.touch; + if (touch === undefined) { + return; // the "touch" property is only defined in SDL + + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + + var coords = { x: adjustedX, y: adjustedY }; + + if (event.type === 'touchstart') { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === 'touchend' || event.type === 'touchmove') { + var last = Browser.touches[touch.identifier]; + if (!last) last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + + // the canvas might be CSS-scaled compared to its backbuffer; + // SDL-using content will want mouse coordinates in terms + // of backbuffer units. + x = x * (cw / rect.width); + y = y * (ch / rect.height); + + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + } + },asyncLoad:function(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency('al ' + url) : ''; + readAsync(url, function(arrayBuffer) { + assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function(event) { + if (onerror) { + onerror(); + } else { + throw 'Loading data file "' + url + '" failed.'; + } + }); + if (dep) addRunDependency(dep); + },resizeListeners:[],updateResizeListeners:function() { + var canvas = Module['canvas']; + Browser.resizeListeners.forEach(function(listener) { + listener(canvas.width, canvas.height); + }); + },setCanvasSize:function(width, height, noUpdates) { + var canvas = Module['canvas']; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + },windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags | 0x00800000; // set SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },setWindowedCanvasSize:function() { + // check if SDL is available + if (typeof SDL != "undefined") { + var flags = HEAPU32[((SDL.screen)>>2)]; + flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag + HEAP32[((SDL.screen)>>2)]=flags + } + Browser.updateCanvasDimensions(Module['canvas']); + Browser.updateResizeListeners(); + },updateCanvasDimensions:function(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { + if (w/h < Module['forcedAspectRatio']) { + w = Math.round(h * Module['forcedAspectRatio']); + } else { + h = Math.round(w / Module['forcedAspectRatio']); + } + } + if (((document['fullscreenElement'] || document['mozFullScreenElement'] || + document['msFullscreenElement'] || document['webkitFullscreenElement'] || + document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != 'undefined') { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != 'undefined') { + if (w != wNative || h != hNative) { + canvas.style.setProperty( "width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty( "width"); + canvas.style.removeProperty("height"); + } + } + } + },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function() { + var handle = Browser.nextWgetRequestHandle; + Browser.nextWgetRequestHandle++; + return handle; + }};var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code) { + EGL.errorCode = code; + },chooseConfig:function(display, attribList, config, config_size, numConfigs) { + if (display != 62000 /* Magic ID for Emscripten 'default display' */) { + EGL.setErrorCode(0x3008 /* EGL_BAD_DISPLAY */); + return 0; + } + + if (attribList) { + // read attribList if it is non-null + for(;;) { + var param = HEAP32[((attribList)>>2)]; + if (param == 0x3021 /*EGL_ALPHA_SIZE*/) { + var alphaSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.alpha = (alphaSize > 0); + } else if (param == 0x3025 /*EGL_DEPTH_SIZE*/) { + var depthSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.depth = (depthSize > 0); + } else if (param == 0x3026 /*EGL_STENCIL_SIZE*/) { + var stencilSize = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.stencil = (stencilSize > 0); + } else if (param == 0x3031 /*EGL_SAMPLES*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples > 0); + } else if (param == 0x3032 /*EGL_SAMPLE_BUFFERS*/) { + var samples = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.antialias = (samples == 1); + } else if (param == 0x3100 /*EGL_CONTEXT_PRIORITY_LEVEL_IMG*/) { + var requestedPriority = HEAP32[(((attribList)+(4))>>2)]; + EGL.contextAttributes.lowLatency = (requestedPriority != 0x3103 /*EGL_CONTEXT_PRIORITY_LOW_IMG*/); + } else if (param == 0x3038 /*EGL_NONE*/) { + break; + } + attribList += 8; + } + } + + if ((!config || !config_size) && !numConfigs) { + EGL.setErrorCode(0x300C /* EGL_BAD_PARAMETER */); + return 0; + } + if (numConfigs) { + HEAP32[((numConfigs)>>2)]=1; // Total number of supported configs: 1. + } + if (config && config_size > 0) { + HEAP32[((config)>>2)]=62002; + } + + EGL.setErrorCode(0x3000 /* EGL_SUCCESS */); + return 1; + }};function _eglGetProcAddress(name_) { + return _emscripten_GetProcAddress(name_); + } + + + var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function() { + for(var i = JSEvents.eventHandlers.length-1; i >= 0; --i) { + JSEvents._removeHandler(i); + } + JSEvents.eventHandlers = []; + JSEvents.deferredCalls = []; + },registerRemoveEventListeners:function() { + if (!JSEvents.removeEventListenersRegistered) { + __ATEXIT__.push(JSEvents.removeAllEventListeners); + JSEvents.removeEventListenersRegistered = true; + } + },deferredCalls:[],deferCall:function(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) return false; + + for(var i in arrA) { + if (arrA[i] != arrB[i]) return false; + } + return true; + } + // Test if the given call was already queued, and if so, don't add it again. + for(var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return; + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + + JSEvents.deferredCalls.sort(function(x,y) { return x.precedence < y.precedence; }); + },removeDeferredCalls:function(targetFunction) { + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i; + } + } + },canPerformEventHandlerRequests:function() { + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; + },runDeferredCalls:function() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return; + } + for(var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + call.targetFunction.apply(this, call.argsList); + } + },inEventHandler:0,currentEventHandler:null,eventHandlers:[],isInternetExplorer:function() { return navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0; },removeAllHandlersOnTarget:function(target, eventTypeString) { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && + (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--); + } + } + },_removeHandler:function(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1); + },registerOrRemoveHandler:function(eventHandler) { + var jsEventHandler = function jsEventHandler(event) { + // Increment nesting count for the event handler. + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + // Process any old deferred calls the user has placed. + JSEvents.runDeferredCalls(); + // Process the actual event, calls back to user C code handler. + eventHandler.handlerFunc(event); + // Process any new deferred calls that were placed right now from this event handler. + JSEvents.runDeferredCalls(); + // Out of event handler - restore nesting count. + --JSEvents.inEventHandler; + }; + + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = jsEventHandler; + eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + JSEvents.registerRemoveEventListeners(); + } else { + for(var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target + && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--); + } + } + } + },getBoundingClientRectOrZeros:function(target) { + return target.getBoundingClientRect ? target.getBoundingClientRect() : { left: 0, top: 0 }; + },pageScrollPos:function() { + if (pageXOffset > 0 || pageYOffset > 0) { + return [pageXOffset, pageYOffset]; + } + if (typeof document.documentElement.scrollLeft !== 'undefined' || typeof document.documentElement.scrollTop !== 'undefined') { + return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; + } + return [document.body.scrollLeft|0, document.body.scrollTop|0]; + },getNodeNameForTarget:function(target) { + if (!target) return ''; + if (target == window) return '#window'; + if (target == screen) return '#screen'; + return (target && target.nodeName) ? target.nodeName : ''; + },tick:function() { + if (window['performance'] && window['performance']['now']) return window['performance']['now'](); + else return Date.now(); + },fullscreenEnabled:function() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled; + }}; + + function __requestPointerLock(target) { + if (target.requestPointerLock) { + target.requestPointerLock(); + } else if (target.mozRequestPointerLock) { + target.mozRequestPointerLock(); + } else if (target.webkitRequestPointerLock) { + target.webkitRequestPointerLock(); + } else if (target.msRequestPointerLock) { + target.msRequestPointerLock(); + } else { + // document.body is known to accept pointer lock, so use that to differentiate if the user passed a bad element, + // or if the whole browser just doesn't support the feature. + if (document.body.requestPointerLock || document.body.mozRequestPointerLock || document.body.webkitRequestPointerLock || document.body.msRequestPointerLock) { + return -3; + } else { + return -1; + } + } + return 0; + }function _emscripten_exit_pointerlock() { + // Make sure no queued up calls will fire after this. + JSEvents.removeDeferredCalls(__requestPointerLock); + + if (document.exitPointerLock) { + document.exitPointerLock(); + } else if (document.msExitPointerLock) { + document.msExitPointerLock(); + } else if (document.mozExitPointerLock) { + document.mozExitPointerLock(); + } else if (document.webkitExitPointerLock) { + document.webkitExitPointerLock(); + } else { + return -1; + } + return 0; + } + + + function __fillGamepadEventData(eventStruct, e) { + HEAPF64[((eventStruct)>>3)]=e.timestamp; + for(var i = 0; i < e.axes.length; ++i) { + HEAPF64[(((eventStruct+i*8)+(16))>>3)]=e.axes[i]; + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i].value; + } else { + HEAPF64[(((eventStruct+i*8)+(528))>>3)]=e.buttons[i]; + } + } + for(var i = 0; i < e.buttons.length; ++i) { + if (typeof(e.buttons[i]) === 'object') { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i].pressed; + } else { + HEAP32[(((eventStruct+i*4)+(1040))>>2)]=e.buttons[i] == 1.0; + } + } + HEAP32[(((eventStruct)+(1296))>>2)]=e.connected; + HEAP32[(((eventStruct)+(1300))>>2)]=e.index; + HEAP32[(((eventStruct)+(8))>>2)]=e.axes.length; + HEAP32[(((eventStruct)+(12))>>2)]=e.buttons.length; + stringToUTF8(e.id, eventStruct + 1304, 64); + stringToUTF8(e.mapping, eventStruct + 1368, 64); + }function _emscripten_get_gamepad_status(index, gamepadState) { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_gamepad_status() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + + // INVALID_PARAM is returned on a Gamepad index that never was there. + if (index < 0 || index >= JSEvents.lastGamepadState.length) return -5; + + // NO_DATA is returned on a Gamepad index that was removed. + // For previously disconnected gamepads there should be an empty slot (null/undefined/false) at the index. + // This is because gamepads must keep their original position in the array. + // For example, removing the first of two gamepads produces [null/undefined/false, gamepad]. + if (!JSEvents.lastGamepadState[index]) return -7; + + __fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); + return 0; + } + + function _emscripten_get_heap_size() { + return HEAP8.length; + } + + function _emscripten_get_num_gamepads() { + if (!JSEvents.lastGamepadState) throw 'emscripten_get_num_gamepads() can only be called after having first called emscripten_sample_gamepad_data() and that function has returned EMSCRIPTEN_RESULT_SUCCESS!'; + // N.B. Do not call emscripten_get_num_gamepads() unless having first called emscripten_sample_gamepad_data(), and that has returned EMSCRIPTEN_RESULT_SUCCESS. + // Otherwise the following line will throw an exception. + return JSEvents.lastGamepadState.length; + } + + + function __fillPointerlockChangeEventData(eventStruct, e) { + var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; + var isPointerlocked = !!pointerLockElement; + HEAP32[((eventStruct)>>2)]=isPointerlocked; + var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); + var id = (pointerLockElement && pointerLockElement.id) ? pointerLockElement.id : ''; + stringToUTF8(nodeName, eventStruct + 4, 128); + stringToUTF8(id, eventStruct + 132, 128); + }function _emscripten_get_pointerlock_status(pointerlockStatus) { + if (pointerlockStatus) __fillPointerlockChangeEventData(pointerlockStatus); + if (!document.body || (!document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock)) { + return -1; + } + return 0; + } + + + var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function() { + GL.miniTempBuffer = new Float32Array(GL.MINI_TEMP_BUFFER_SIZE); + for (var i = 0; i < GL.MINI_TEMP_BUFFER_SIZE; i++) { + GL.miniTempBufferViews[i] = GL.miniTempBuffer.subarray(0, i+1); + } + },recordError:function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode; + } + },getNewId:function(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null; + } + return ret; + },MINI_TEMP_BUFFER_SIZE:256,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function(shader, count, string, length) { + var source = ''; + for (var i = 0; i < count; ++i) { + var len = length ? HEAP32[(((length)+(i*4))>>2)] : -1; + source += UTF8ToString(HEAP32[(((string)+(i*4))>>2)], len < 0 ? undefined : len); + } + return source; + },createContext:function(canvas, webGLContextAttributes) { + + + + + var ctx = + (canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes)); + + + if (!ctx) return 0; + + var handle = GL.registerContext(ctx, webGLContextAttributes); + + + + return handle; + },registerContext:function(ctx, webGLContextAttributes) { + var handle = _malloc(8); // Make space on the heap to store GL context attributes that need to be accessible as shared between threads. + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + + + + // Store the created context object so that we can access the context given a canvas without having to pass the parameters again. + if (ctx.canvas) ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + if (typeof webGLContextAttributes.enableExtensionsByDefault === 'undefined' || webGLContextAttributes.enableExtensionsByDefault) { + GL.initExtensions(context); + } + + + + + return handle; + },makeContextCurrent:function(contextHandle) { + + GL.currentContext = GL.contexts[contextHandle]; // Active Emscripten GL layer context object. + Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; // Active WebGL context object. + return !(contextHandle && !GLctx); + },getContext:function(contextHandle) { + return GL.contexts[contextHandle]; + },deleteContext:function(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) GL.currentContext = null; + if (typeof JSEvents === 'object') JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all JS event handlers on the DOM element that the GL context is associated with since the context is now deleted. + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; // Make sure the canvas object no longer refers to the context object so there are no GC surprises. + _free(GL.contexts[contextHandle]); + GL.contexts[contextHandle] = null; + },acquireInstancedArraysExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 26 and Google Chrome 30 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('ANGLE_instanced_arrays'); + if (ext) { + ctx['vertexAttribDivisor'] = function(index, divisor) { ext['vertexAttribDivisorANGLE'](index, divisor); }; + ctx['drawArraysInstanced'] = function(mode, first, count, primcount) { ext['drawArraysInstancedANGLE'](mode, first, count, primcount); }; + ctx['drawElementsInstanced'] = function(mode, count, type, indices, primcount) { ext['drawElementsInstancedANGLE'](mode, count, type, indices, primcount); }; + } + },acquireVertexArrayObjectExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 25 and WebKit 536.28/desktop Safari 6.0.3 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('OES_vertex_array_object'); + if (ext) { + ctx['createVertexArray'] = function() { return ext['createVertexArrayOES'](); }; + ctx['deleteVertexArray'] = function(vao) { ext['deleteVertexArrayOES'](vao); }; + ctx['bindVertexArray'] = function(vao) { ext['bindVertexArrayOES'](vao); }; + ctx['isVertexArray'] = function(vao) { return ext['isVertexArrayOES'](vao); }; + } + },acquireDrawBuffersExtension:function(ctx) { + // Extension available in WebGL 1 from Firefox 28 onwards. Core feature in WebGL 2. + var ext = ctx.getExtension('WEBGL_draw_buffers'); + if (ext) { + ctx['drawBuffers'] = function(n, bufs) { ext['drawBuffersWEBGL'](n, bufs); }; + } + },initExtensions:function(context) { + // If this function is called without a specific context object, init the extensions of the currently active context. + if (!context) context = GL.currentContext; + + if (context.initExtensionsDone) return; + context.initExtensionsDone = true; + + var GLctx = context.GLctx; + + // Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist. + + if (context.version < 2) { + GL.acquireInstancedArraysExtension(GLctx); + GL.acquireVertexArrayObjectExtension(GLctx); + GL.acquireDrawBuffersExtension(GLctx); + } + + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query"); + + // These are the 'safe' feature-enabling extensions that don't add any performance impact related to e.g. debugging, and + // should be enabled by default so that client GLES2/GL code will not need to go through extra hoops to get its stuff working. + // As new extensions are ratified at http://www.khronos.org/registry/webgl/extensions/ , feel free to add your new extensions + // here, as long as they don't produce a performance impact for users that might not be using those extensions. + // E.g. debugging-related extensions should probably be off by default. + var automaticallyEnabledExtensions = [ // Khronos ratified WebGL extensions ordered by number (no debug extensions): + "OES_texture_float", "OES_texture_half_float", "OES_standard_derivatives", + "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBGL_depth_texture", + "OES_element_index_uint", "EXT_texture_filter_anisotropic", "EXT_frag_depth", + "WEBGL_draw_buffers", "ANGLE_instanced_arrays", "OES_texture_float_linear", + "OES_texture_half_float_linear", "EXT_blend_minmax", "EXT_shader_texture_lod", + // Community approved WebGL extensions ordered by number: + "WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float", + "EXT_sRGB", "WEBGL_compressed_texture_etc1", "EXT_disjoint_timer_query", + "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_astc", "EXT_color_buffer_float", + "WEBGL_compressed_texture_s3tc_srgb", "EXT_disjoint_timer_query_webgl2"]; + + function shouldEnableAutomatically(extension) { + var ret = false; + automaticallyEnabledExtensions.forEach(function(include) { + if (extension.indexOf(include) != -1) { + ret = true; + } + }); + return ret; + } + + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts.forEach(function(ext) { + if (automaticallyEnabledExtensions.indexOf(ext) != -1) { + GLctx.getExtension(ext); // Calling .getExtension enables that extension permanently, no need to store the return value to be enabled. + } + }); + },populateUniformTable:function(program) { + var p = GL.programs[program]; + var ptable = GL.programInfos[program] = { + uniforms: {}, + maxUniformLength: 0, // This is eagerly computed below, since we already enumerate all uniforms anyway. + maxAttributeLength: -1, // This is lazily computed and cached, computed when/if first asked, "-1" meaning not computed yet. + maxUniformBlockNameLength: -1 // Lazily computed as well + }; + + var utable = ptable.uniforms; + // A program's uniform table maps the string name of an uniform to an integer location of that uniform. + // The global GL.uniforms map maps integer locations to WebGLUniformLocations. + var numUniforms = GLctx.getProgramParameter(p, 0x8B86/*GL_ACTIVE_UNIFORMS*/); + for (var i = 0; i < numUniforms; ++i) { + var u = GLctx.getActiveUniform(p, i); + + var name = u.name; + ptable.maxUniformLength = Math.max(ptable.maxUniformLength, name.length+1); + + // If we are dealing with an array, e.g. vec4 foo[3], strip off the array index part to canonicalize that "foo", "foo[]", + // and "foo[0]" will mean the same. Loop below will populate foo[1] and foo[2]. + if (name.slice(-1) == ']') { + name = name.slice(0, name.lastIndexOf('[')); + } + + // Optimize memory usage slightly: If we have an array of uniforms, e.g. 'vec3 colors[3];', then + // only store the string 'colors' in utable, and 'colors[0]', 'colors[1]' and 'colors[2]' will be parsed as 'colors'+i. + // Note that for the GL.uniforms table, we still need to fetch the all WebGLUniformLocations for all the indices. + var loc = GLctx.getUniformLocation(p, name); + if (loc) { + var id = GL.getNewId(GL.uniforms); + utable[name] = [u.size, id]; + GL.uniforms[id] = loc; + + for (var j = 1; j < u.size; ++j) { + var n = name + '['+j+']'; + loc = GLctx.getUniformLocation(p, n); + id = GL.getNewId(GL.uniforms); + + GL.uniforms[id] = loc; + } + } + } + }};function _emscripten_glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _emscripten_glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glBeginQueryEXT(target, id) { + GLctx.disjointTimerQueryExt['beginQueryEXT'](target, GL.timerQueriesEXT[id]); + } + + function _emscripten_glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _emscripten_glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _emscripten_glBindFramebuffer(target, framebuffer) { + + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); + + } + + function _emscripten_glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _emscripten_glBindVertexArrayOES(vao) { + GLctx['bindVertexArray'](GL.vaos[vao]); + } + + function _emscripten_glBlendColor(x0, x1, x2, x3) { GLctx['blendColor'](x0, x1, x2, x3) } + + function _emscripten_glBlendEquation(x0) { GLctx['blendEquation'](x0) } + + function _emscripten_glBlendEquationSeparate(x0, x1) { GLctx['blendEquationSeparate'](x0, x1) } + + function _emscripten_glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _emscripten_glBlendFuncSeparate(x0, x1, x2, x3) { GLctx['blendFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _emscripten_glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _emscripten_glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } + + function _emscripten_glClear(x0) { GLctx['clear'](x0) } + + function _emscripten_glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _emscripten_glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _emscripten_glClearStencil(x0) { GLctx['clearStencil'](x0) } + + function _emscripten_glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha); + } + + function _emscripten_glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _emscripten_glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + GLctx['compressedTexSubImage2D'](target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexSubImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } + + function _emscripten_glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _emscripten_glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _emscripten_glCullFace(x0) { GLctx['cullFace'](x0) } + + function _emscripten_glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _emscripten_glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[(((framebuffers)+(i*4))>>2)]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } + } + + function _emscripten_glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _emscripten_glDeleteQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((ids)+(i*4))>>2)]; + var query = GL.timerQueriesEXT[id]; + if (!query) continue; // GL spec: "unused names in ids are ignored, as is the name zero." + GLctx.disjointTimerQueryExt['deleteQueryEXT'](query); + GL.timerQueriesEXT[id] = null; + } + } + + function _emscripten_glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } + } + + function _emscripten_glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _emscripten_glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _emscripten_glDeleteVertexArraysOES(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((vaos)+(i*4))>>2)]; + GLctx['deleteVertexArray'](GL.vaos[id]); + GL.vaos[id] = null; + } + } + + function _emscripten_glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _emscripten_glDepthMask(flag) { + GLctx.depthMask(!!flag); + } + + function _emscripten_glDepthRangef(x0, x1) { GLctx['depthRange'](x0, x1) } + + function _emscripten_glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _emscripten_glDisable(x0) { GLctx['disable'](x0) } + + function _emscripten_glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _emscripten_glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _emscripten_glDrawArraysInstancedANGLE(mode, first, count, primcount) { + GLctx['drawArraysInstanced'](mode, first, count, primcount); + } + + + var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n, bufs) { + + var bufArray = __tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[(((bufs)+(i*4))>>2)]; + } + + GLctx['drawBuffers'](bufArray); + } + + function _emscripten_glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _emscripten_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount) { + GLctx['drawElementsInstanced'](mode, count, type, indices, primcount); + } + + function _emscripten_glEnable(x0) { GLctx['enable'](x0) } + + function _emscripten_glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _emscripten_glEndQueryEXT(target) { + GLctx.disjointTimerQueryExt['endQueryEXT'](target); + } + + function _emscripten_glFinish() { GLctx['finish']() } + + function _emscripten_glFlush() { GLctx['flush']() } + + function _emscripten_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, + GL.renderbuffers[renderbuffer]); + } + + function _emscripten_glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, + GL.textures[texture], level); + } + + function _emscripten_glFrontFace(x0) { GLctx['frontFace'](x0) } + + + function __glGenObject(n, buffers, createFunction, objectTable + ) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer; + } else { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + } + HEAP32[(((buffers)+(i*4))>>2)]=id; + } + }function _emscripten_glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _emscripten_glGenFramebuffers(n, ids) { + __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers + ); + } + + function _emscripten_glGenQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var query = GLctx.disjointTimerQueryExt['createQueryEXT'](); + if (!query) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + while(i < n) HEAP32[(((ids)+(i++*4))>>2)]=0; + return; + } + var id = GL.getNewId(GL.timerQueriesEXT); + query.name = id; + GL.timerQueriesEXT[id] = query; + HEAP32[(((ids)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers + ); + } + + function _emscripten_glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _emscripten_glGenVertexArraysOES(n, arrays) { + __glGenObject(n, arrays, 'createVertexArray', GL.vaos + ); + } + + function _emscripten_glGenerateMipmap(x0) { GLctx['generateMipmap'](x0) } + + function _emscripten_glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveAttrib(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size and type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetActiveUniform(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getActiveUniform(program, index); + if (!info) return; // If an error occurs, nothing will be written to length, size, type and name. + + var numBytesWrittenExclNull = (bufSize > 0 && name) ? stringToUTF8(info.name, name, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + if (size) HEAP32[((size)>>2)]=info.size; + if (type) HEAP32[((type)>>2)]=info.type; + } + + function _emscripten_glGetAttachedShaders(program, maxCount, count, shaders) { + var result = GLctx.getAttachedShaders(GL.programs[program]); + var len = result.length; + if (len > maxCount) { + len = maxCount; + } + HEAP32[((count)>>2)]=len; + for (var i = 0; i < len; ++i) { + var id = GL.shaders.indexOf(result[i]); + HEAP32[(((shaders)+(i*4))>>2)]=id; + } + } + + function _emscripten_glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + + function emscriptenWebGLGet(name_, p, type) { + // Guard against user passing a null pointer. + // Note that GLES2 spec does not say anything about how passing a null pointer should be treated. + // Testing on desktop core GL 3, the application crashes on glGetIntegerv to a null pointer, but + // better to report an error instead of doing anything random. + if (!p) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var ret = undefined; + switch(name_) { // Handle a few trivial GLES values + case 0x8DFA: // GL_SHADER_COMPILER + ret = 1; + break; + case 0x8DF8: // GL_SHADER_BINARY_FORMATS + if (type != 0 && type != 1) { + GL.recordError(0x0500); // GL_INVALID_ENUM + } + return; // Do not write anything to the out pointer, since no binary formats are supported. + case 0x8DF9: // GL_NUM_SHADER_BINARY_FORMATS + ret = 0; + break; + case 0x86A2: // GL_NUM_COMPRESSED_TEXTURE_FORMATS + // WebGL doesn't have GL_NUM_COMPRESSED_TEXTURE_FORMATS (it's obsolete since GL_COMPRESSED_TEXTURE_FORMATS returns a JS array that can be queried for length), + // so implement it ourselves to allow C++ GLES2 code get the length. + var formats = GLctx.getParameter(0x86A3 /*GL_COMPRESSED_TEXTURE_FORMATS*/); + ret = formats ? formats.length : 0; + break; + } + + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (typeof(result)) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + case "object": + if (result === null) { + // null is a valid result for some (e.g., which buffer is bound - perhaps nothing is bound), but otherwise + // can mean an invalid name_, which we need to report as an error + switch(name_) { + case 0x8894: // ARRAY_BUFFER_BINDING + case 0x8B8D: // CURRENT_PROGRAM + case 0x8895: // ELEMENT_ARRAY_BUFFER_BINDING + case 0x8CA6: // FRAMEBUFFER_BINDING + case 0x8CA7: // RENDERBUFFER_BINDING + case 0x8069: // TEXTURE_BINDING_2D + case 0x85B5: // WebGL 2 GL_VERTEX_ARRAY_BINDING, or WebGL 1 extension OES_vertex_array_object GL_VERTEX_ARRAY_BINDING_OES + case 0x8514: { // TEXTURE_BINDING_CUBE_MAP + ret = 0; + break; + } + default: { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + } + } else if (result instanceof Float32Array || + result instanceof Uint32Array || + result instanceof Int32Array || + result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: HEAP32[(((p)+(i*4))>>2)]=result[i]; break; + case 2: HEAPF32[(((p)+(i*4))>>2)]=result[i]; break; + case 4: HEAP8[(((p)+(i))>>0)]=result[i] ? 1 : 0; break; + } + } + return; + } else { + try { + ret = result.name | 0; + } catch(e) { + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Unknown object returned from WebGL getParameter(' + name_ + ')! (error: ' + e + ')'); + return; + } + } + break; + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + err('GL_INVALID_ENUM in glGet' + type + 'v: Native code calling glGet' + type + 'v(' + name_ + ') and it returns ' + result + ' of type ' + typeof(result) + '!'); + return; + } + } + + switch (type) { + case 1: (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((p)>>2)]=tempI64[0],HEAP32[(((p)+(4))>>2)]=tempI64[1]); break; + case 0: HEAP32[((p)>>2)]=ret; break; + case 2: HEAPF32[((p)>>2)]=ret; break; + case 4: HEAP8[((p)>>0)]=ret ? 1 : 0; break; + } + }function _emscripten_glGetBooleanv(name_, p) { + emscriptenWebGLGet(name_, p, 4); + } + + function _emscripten_glGetBufferParameteriv(target, value, data) { + if (!data) { + // GLES2 specification does not specify how to behave if data is a null pointer. Since calling this function does not make sense + // if data == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((data)>>2)]=GLctx.getBufferParameter(target, value); + } + + function _emscripten_glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0/*GL_NO_ERROR*/; + return error; + } + + function _emscripten_glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _emscripten_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || + result instanceof WebGLTexture) { + result = result.name | 0; + } + HEAP32[((params)>>2)]=result; + } + + function _emscripten_glGetIntegerv(name_, p) { + emscriptenWebGLGet(name_, p, 0); + } + + function _emscripten_glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _emscripten_glGetQueryObjecti64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryObjectui64vEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + (tempI64 = [ret>>>0,(tempDouble=ret,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((params)>>2)]=tempI64[0],HEAP32[(((params)+(4))>>2)]=tempI64[1]); + } + + function _emscripten_glGetQueryObjectuivEXT(id, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var query = GL.timerQueriesEXT[id]; + var param = GLctx.disjointTimerQueryExt['getQueryObjectEXT'](query, pname); + var ret; + if (typeof param == 'boolean') { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[((params)>>2)]=ret; + } + + function _emscripten_glGetQueryivEXT(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.disjointTimerQueryExt['getQueryEXT'](target, pname); + } + + function _emscripten_glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getRenderbufferParameter(target, pname); + } + + function _emscripten_glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[((range)>>2)]=result.rangeMin; + HEAP32[(((range)+(4))>>2)]=result.rangeMax; + HEAP32[((precision)>>2)]=result.precision; + } + + function _emscripten_glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) return; // If an error occurs, nothing will be written to length or source. + var numBytesWrittenExclNull = (bufSize > 0 && source) ? stringToUTF8(result, source, bufSize) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _emscripten_glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + + function stringToNewUTF8(jsString) { + var length = lengthBytesUTF8(jsString)+1; + var cString = _malloc(length); + stringToUTF8(jsString, cString, length); + return cString; + }function _emscripten_glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _emscripten_glGetTexParameterfv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAPF32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetTexParameteriv(target, pname, params) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((params)>>2)]=GLctx.getTexParameter(target, pname); + } + + function _emscripten_glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + + function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getUniform(GL.programs[program], GL.uniforms[location]); + if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + default: throw 'internal emscriptenWebGLGetUniform() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetUniformfv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 2); + } + + function _emscripten_glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0); + } + + function _emscripten_glGetVertexAttribPointerv(index, pname, pointer) { + if (!pointer) { + // GLES2 specification does not specify how to behave if pointer is a null pointer. Since calling this function does not make sense + // if pointer == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + HEAP32[((pointer)>>2)]=GLctx.getVertexAttribOffset(index, pname); + } + + + function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + // GLES2 specification does not specify how to behave if params is a null pointer. Since calling this function does not make sense + // if params == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 0x889F/*VERTEX_ATTRIB_ARRAY_BUFFER_BINDING*/) { + HEAP32[((params)>>2)]=data["name"]; + } else if (typeof data == 'number' || typeof data == 'boolean') { + switch (type) { + case 0: HEAP32[((params)>>2)]=data; break; + case 2: HEAPF32[((params)>>2)]=data; break; + case 5: HEAP32[((params)>>2)]=Math.fround(data); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: HEAP32[(((params)+(i*4))>>2)]=data[i]; break; + case 2: HEAPF32[(((params)+(i*4))>>2)]=data[i]; break; + case 5: HEAP32[(((params)+(i*4))>>2)]=Math.fround(data[i]); break; + default: throw 'internal emscriptenWebGLGetVertexAttrib() error, bad type: ' + type; + } + } + } + }function _emscripten_glGetVertexAttribfv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 2); + } + + function _emscripten_glGetVertexAttribiv(index, pname, params) { + // N.B. This function may only be called if the vertex attribute was specified using the function glVertexAttrib*f(), + // otherwise the results are undefined. (GLES3 spec 6.1.12) + emscriptenWebGLGetVertexAttrib(index, pname, params, 5); + } + + function _emscripten_glHint(x0, x1) { GLctx['hint'](x0, x1) } + + function _emscripten_glIsBuffer(buffer) { + var b = GL.buffers[buffer]; + if (!b) return 0; + return GLctx.isBuffer(b); + } + + function _emscripten_glIsEnabled(x0) { return GLctx['isEnabled'](x0) } + + function _emscripten_glIsFramebuffer(framebuffer) { + var fb = GL.framebuffers[framebuffer]; + if (!fb) return 0; + return GLctx.isFramebuffer(fb); + } + + function _emscripten_glIsProgram(program) { + program = GL.programs[program]; + if (!program) return 0; + return GLctx.isProgram(program); + } + + function _emscripten_glIsQueryEXT(id) { + var query = GL.timerQueriesEXT[id]; + if (!query) return 0; + return GLctx.disjointTimerQueryExt['isQueryEXT'](query); + } + + function _emscripten_glIsRenderbuffer(renderbuffer) { + var rb = GL.renderbuffers[renderbuffer]; + if (!rb) return 0; + return GLctx.isRenderbuffer(rb); + } + + function _emscripten_glIsShader(shader) { + var s = GL.shaders[shader]; + if (!s) return 0; + return GLctx.isShader(s); + } + + function _emscripten_glIsTexture(id) { + var texture = GL.textures[id]; + if (!texture) return 0; + return GLctx.isTexture(texture); + } + + function _emscripten_glIsVertexArrayOES(array) { + + var vao = GL.vaos[array]; + if (!vao) return 0; + return GLctx['isVertexArray'](vao); + } + + function _emscripten_glLineWidth(x0) { GLctx['lineWidth'](x0) } + + function _emscripten_glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _emscripten_glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _emscripten_glPolygonOffset(x0, x1) { GLctx['polygonOffset'](x0, x1) } + + function _emscripten_glQueryCounterEXT(id, target) { + GLctx.disjointTimerQueryExt['queryCounterEXT'](GL.timerQueriesEXT[id], target); + } + + + + function __computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return (x + y - 1) & -y; + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize; + } + + var __colorChannelsInGlTextureFormat={6402:1,6406:1,6407:3,6408:4,6409:1,6410:2,35904:3,35906:4}; + + var __sizeOfGlTextureElementType={5121:1,5123:2,5125:4,5126:4,32819:2,32820:2,33635:2,34042:4,36193:2};function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var sizePerPixel = __colorChannelsInGlTextureFormat[format] * __sizeOfGlTextureElementType[type]; + if (!sizePerPixel) { + GL.recordError(0x0500); // GL_INVALID_ENUM + return; + } + var bytes = __computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + var end = pixels + bytes; + switch(type) { + case 0x1401 /* GL_UNSIGNED_BYTE */: + return HEAPU8.subarray(pixels, end); + case 0x1406 /* GL_FLOAT */: + return HEAPF32.subarray(pixels>>2, end>>2); + case 0x1405 /* GL_UNSIGNED_INT */: + case 0x84FA /* GL_UNSIGNED_INT_24_8_WEBGL/GL_UNSIGNED_INT_24_8 */: + return HEAPU32.subarray(pixels>>2, end>>2); + case 0x1403 /* GL_UNSIGNED_SHORT */: + case 0x8363 /* GL_UNSIGNED_SHORT_5_6_5 */: + case 0x8033 /* GL_UNSIGNED_SHORT_4_4_4_4 */: + case 0x8034 /* GL_UNSIGNED_SHORT_5_5_5_1 */: + case 0x8D61 /* GL_HALF_FLOAT_OES */: + return HEAPU16.subarray(pixels>>1, end>>1); + default: + GL.recordError(0x0500); // GL_INVALID_ENUM + } + }function _emscripten_glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _emscripten_glReleaseShaderCompiler() { + // NOP (as allowed by GLES 2.0 spec) + } + + function _emscripten_glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } + + function _emscripten_glSampleCoverage(value, invert) { + GLctx.sampleCoverage(value, !!invert); + } + + function _emscripten_glScissor(x0, x1, x2, x3) { GLctx['scissor'](x0, x1, x2, x3) } + + function _emscripten_glShaderBinary() { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + + function _emscripten_glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _emscripten_glStencilFunc(x0, x1, x2) { GLctx['stencilFunc'](x0, x1, x2) } + + function _emscripten_glStencilFuncSeparate(x0, x1, x2, x3) { GLctx['stencilFuncSeparate'](x0, x1, x2, x3) } + + function _emscripten_glStencilMask(x0) { GLctx['stencilMask'](x0) } + + function _emscripten_glStencilMaskSeparate(x0, x1) { GLctx['stencilMaskSeparate'](x0, x1) } + + function _emscripten_glStencilOp(x0, x1, x2) { GLctx['stencilOp'](x0, x1, x2) } + + function _emscripten_glStencilOpSeparate(x0, x1, x2, x3) { GLctx['stencilOpSeparate'](x0, x1, x2, x3) } + + function _emscripten_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _emscripten_glTexParameterf(x0, x1, x2) { GLctx['texParameterf'](x0, x1, x2) } + + function _emscripten_glTexParameterfv(target, pname, params) { + var param = HEAPF32[((params)>>2)]; + GLctx.texParameterf(target, pname, param); + } + + function _emscripten_glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _emscripten_glTexParameteriv(target, pname, params) { + var param = HEAP32[((params)>>2)]; + GLctx.texParameteri(target, pname, param); + } + + function _emscripten_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + var pixelData = null; + if (pixels) pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); + } + + function _emscripten_glUniform1f(location, v0) { + GLctx.uniform1f(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1fv(location, count, value) { + + + if (count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[count-1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*4)>>2); + } + GLctx.uniform1fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _emscripten_glUniform1iv(location, count, value) { + + + GLctx.uniform1iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*4)>>2)); + } + + function _emscripten_glUniform2f(location, v0, v1) { + GLctx.uniform2f(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2fv(location, count, value) { + + + if (2*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[2*count-1]; + for (var i = 0; i < 2*count; i += 2) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*8)>>2); + } + GLctx.uniform2fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform2i(location, v0, v1) { + GLctx.uniform2i(GL.uniforms[location], v0, v1); + } + + function _emscripten_glUniform2iv(location, count, value) { + + + GLctx.uniform2iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*8)>>2)); + } + + function _emscripten_glUniform3f(location, v0, v1, v2) { + GLctx.uniform3f(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3fv(location, count, value) { + + + if (3*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[3*count-1]; + for (var i = 0; i < 3*count; i += 3) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*12)>>2); + } + GLctx.uniform3fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform3i(location, v0, v1, v2) { + GLctx.uniform3i(GL.uniforms[location], v0, v1, v2); + } + + function _emscripten_glUniform3iv(location, count, value) { + + + GLctx.uniform3iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*12)>>2)); + } + + function _emscripten_glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4fv(location, count, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniform4fv(GL.uniforms[location], view); + } + + function _emscripten_glUniform4i(location, v0, v1, v2, v3) { + GLctx.uniform4i(GL.uniforms[location], v0, v1, v2, v3); + } + + function _emscripten_glUniform4iv(location, count, value) { + + + GLctx.uniform4iv(GL.uniforms[location], HEAP32.subarray((value)>>2,(value+count*16)>>2)); + } + + function _emscripten_glUniformMatrix2fv(location, count, transpose, value) { + + + if (4*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[4*count-1]; + for (var i = 0; i < 4*count; i += 4) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*16)>>2); + } + GLctx.uniformMatrix2fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix3fv(location, count, transpose, value) { + + + if (9*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[9*count-1]; + for (var i = 0; i < 9*count; i += 9) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*36)>>2); + } + GLctx.uniformMatrix3fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _emscripten_glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _emscripten_glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]); + } + + function _emscripten_glVertexAttrib1f(x0, x1) { GLctx['vertexAttrib1f'](x0, x1) } + + function _emscripten_glVertexAttrib1fv(index, v) { + + GLctx.vertexAttrib1f(index, HEAPF32[v>>2]); + } + + function _emscripten_glVertexAttrib2f(x0, x1, x2) { GLctx['vertexAttrib2f'](x0, x1, x2) } + + function _emscripten_glVertexAttrib2fv(index, v) { + + GLctx.vertexAttrib2f(index, HEAPF32[v>>2], HEAPF32[v+4>>2]); + } + + function _emscripten_glVertexAttrib3f(x0, x1, x2, x3) { GLctx['vertexAttrib3f'](x0, x1, x2, x3) } + + function _emscripten_glVertexAttrib3fv(index, v) { + + GLctx.vertexAttrib3f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2]); + } + + function _emscripten_glVertexAttrib4f(x0, x1, x2, x3, x4) { GLctx['vertexAttrib4f'](x0, x1, x2, x3, x4) } + + function _emscripten_glVertexAttrib4fv(index, v) { + + GLctx.vertexAttrib4f(index, HEAPF32[v>>2], HEAPF32[v+4>>2], HEAPF32[v+8>>2], HEAPF32[v+12>>2]); + } + + function _emscripten_glVertexAttribDivisorANGLE(index, divisor) { + GLctx['vertexAttribDivisor'](index, divisor); + } + + function _emscripten_glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _emscripten_glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + + var __specialEventTargets=[0, typeof document !== 'undefined' ? document : 0, typeof window !== 'undefined' ? window : 0];function __findEventTarget(target) { + warnOnce('Rules for selecting event targets in HTML5 API are changing: instead of using document.getElementById() that only can refer to elements by their DOM ID, new event target selection mechanism uses the more flexible function document.querySelector() that can look up element names, classes, and complex CSS selectors. Build with -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 to change to the new lookup rules. See https://github.com/emscripten-core/emscripten/pull/7977 for more details.'); + try { + // The sensible "default" target varies between events, but use window as the default + // since DOM events mostly can default to that. Specific callback registrations + // override their own defaults. + if (!target) return window; + if (typeof target === "number") target = __specialEventTargets[target] || UTF8ToString(target); + if (target === '#window') return window; + else if (target === '#document') return document; + else if (target === '#screen') return screen; + else if (target === '#canvas') return Module['canvas']; + return (typeof target === 'string') ? document.getElementById(target) : target; + } catch(e) { + // In Web Workers, some objects above, such as '#document' do not exist. Gracefully + // return null for them. + return null; + } + }function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { + if (!target) target = '#canvas'; + target = __findEventTarget(target); + if (!target) return -4; + if (!target.requestPointerLock && !target.mozRequestPointerLock && !target.webkitRequestPointerLock && !target.msRequestPointerLock) { + return -1; + } + + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + + // Queue this function call if we're not currently in an event handler and the user saw it appropriate to do so. + if (!canPerformRequests) { + if (deferUntilInEventHandler) { + JSEvents.deferCall(__requestPointerLock, 2 /* priority below fullscreen */, [target]); + return 1; + } else { + return -2; + } + } + + return __requestPointerLock(target); + } + + function _emscripten_run_script(ptr) { + eval(UTF8ToString(ptr)); + } + + function _emscripten_sample_gamepad_data() { + return (JSEvents.lastGamepadState = (navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null))) + ? 0 : -1; + } + + + + function __fillMouseEventData(eventStruct, e, target) { + HEAPF64[((eventStruct)>>3)]=JSEvents.tick(); + HEAP32[(((eventStruct)+(8))>>2)]=e.screenX; + HEAP32[(((eventStruct)+(12))>>2)]=e.screenY; + HEAP32[(((eventStruct)+(16))>>2)]=e.clientX; + HEAP32[(((eventStruct)+(20))>>2)]=e.clientY; + HEAP32[(((eventStruct)+(24))>>2)]=e.ctrlKey; + HEAP32[(((eventStruct)+(28))>>2)]=e.shiftKey; + HEAP32[(((eventStruct)+(32))>>2)]=e.altKey; + HEAP32[(((eventStruct)+(36))>>2)]=e.metaKey; + HEAP16[(((eventStruct)+(40))>>1)]=e.button; + HEAP16[(((eventStruct)+(42))>>1)]=e.buttons; + HEAP32[(((eventStruct)+(44))>>2)]=e["movementX"] || e["mozMovementX"] || e["webkitMovementX"] || (e.screenX-JSEvents.previousScreenX); + HEAP32[(((eventStruct)+(48))>>2)]=e["movementY"] || e["mozMovementY"] || e["webkitMovementY"] || (e.screenY-JSEvents.previousScreenY); + + if (Module['canvas']) { + var rect = Module['canvas'].getBoundingClientRect(); + HEAP32[(((eventStruct)+(60))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(64))>>2)]=e.clientY - rect.top; + } else { // Canvas is not initialized, return 0. + HEAP32[(((eventStruct)+(60))>>2)]=0; + HEAP32[(((eventStruct)+(64))>>2)]=0; + } + if (target) { + var rect = JSEvents.getBoundingClientRectOrZeros(target); + HEAP32[(((eventStruct)+(52))>>2)]=e.clientX - rect.left; + HEAP32[(((eventStruct)+(56))>>2)]=e.clientY - rect.top; + } else { // No specific target passed, return 0. + HEAP32[(((eventStruct)+(52))>>2)]=0; + HEAP32[(((eventStruct)+(56))>>2)]=0; + } + // wheel and mousewheel events contain wrong screenX/screenY on chrome/opera + // https://github.com/emscripten-core/emscripten/pull/4997 + // https://bugs.chromium.org/p/chromium/issues/detail?id=699956 + if (e.type !== 'wheel' && e.type !== 'mousewheel') { + JSEvents.previousScreenX = e.screenX; + JSEvents.previousScreenY = e.screenY; + } + }function __registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.mouseEvent) JSEvents.mouseEvent = _malloc( 72 ); + target = __findEventTarget(target); + + var mouseEventHandlerFunc = function(ev) { + var e = ev || event; + + // TODO: Make this access thread safe, or this could update live while app is reading it. + __fillMouseEventData(JSEvents.mouseEvent, e, target); + + if (dynCall_iiii(callbackfunc, eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString != 'mousemove' && eventTypeString != 'mouseenter' && eventTypeString != 'mouseleave', // Mouse move events do not allow fullscreen/pointer lock requests to be handled in them! + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: mouseEventHandlerFunc, + useCapture: useCapture + }; + // In IE, mousedown events don't either allow deferred calls to be run! + if (JSEvents.isInternetExplorer() && eventTypeString == 'mousedown') eventHandler.allowsDeferredCalls = false; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_click_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerMouseEventCallback(target, userData, useCapture, callbackfunc, 4, "click", targetThread); + return 0; + } + + + + function __fillFullscreenChangeEventData(eventStruct, e) { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + var isFullscreen = !!fullscreenElement; + HEAP32[((eventStruct)>>2)]=isFullscreen; + HEAP32[(((eventStruct)+(4))>>2)]=JSEvents.fullscreenEnabled(); + // If transitioning to fullscreen, report info about the element that is now fullscreen. + // If transitioning to windowed mode, report info about the element that just was fullscreen. + var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; + var nodeName = JSEvents.getNodeNameForTarget(reportedElement); + var id = (reportedElement && reportedElement.id) ? reportedElement.id : ''; + stringToUTF8(nodeName, eventStruct + 8, 128); + stringToUTF8(id, eventStruct + 136, 128); + HEAP32[(((eventStruct)+(264))>>2)]=reportedElement ? reportedElement.clientWidth : 0; + HEAP32[(((eventStruct)+(268))>>2)]=reportedElement ? reportedElement.clientHeight : 0; + HEAP32[(((eventStruct)+(272))>>2)]=screen.width; + HEAP32[(((eventStruct)+(276))>>2)]=screen.height; + if (isFullscreen) { + JSEvents.previousFullscreenElement = fullscreenElement; + } + }function __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.fullscreenChangeEvent) JSEvents.fullscreenChangeEvent = _malloc( 280 ); + + var fullscreenChangeEventhandlerFunc = function(ev) { + var e = ev || event; + + var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; + + __fillFullscreenChangeEventData(fullscreenChangeEvent, e); + + if (dynCall_iiii(callbackfunc, eventTypeId, fullscreenChangeEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: false, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: fullscreenChangeEventhandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (!JSEvents.fullscreenEnabled()) return -1; + target = target ? __findEventTarget(target) : __specialEventTargets[1]; + if (!target) return -4; + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); + __registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "msfullscreenchange", targetThread); + return 0; + } + + + function __registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.gamepadEvent) JSEvents.gamepadEvent = _malloc( 1432 ); + + var gamepadEventHandlerFunc = function(ev) { + var e = ev || event; + + var gamepadEvent = JSEvents.gamepadEvent; + __fillGamepadEventData(gamepadEvent, e["gamepad"]); + + if (dynCall_iiii(callbackfunc, eventTypeId, gamepadEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: gamepadEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread); + return 0; + } + + function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (!navigator.getGamepads && !navigator.webkitGetGamepads) return -1; + __registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread); + return 0; + } + + + function __registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.keyEvent) JSEvents.keyEvent = _malloc( 164 ); + + var keyEventHandlerFunc = function(ev) { + var e = ev || event; + + var keyEventData = JSEvents.keyEvent; + stringToUTF8(e.key ? e.key : "", keyEventData + 0, 32); + stringToUTF8(e.code ? e.code : "", keyEventData + 32, 32); + HEAP32[(((keyEventData)+(64))>>2)]=e.location; + HEAP32[(((keyEventData)+(68))>>2)]=e.ctrlKey; + HEAP32[(((keyEventData)+(72))>>2)]=e.shiftKey; + HEAP32[(((keyEventData)+(76))>>2)]=e.altKey; + HEAP32[(((keyEventData)+(80))>>2)]=e.metaKey; + HEAP32[(((keyEventData)+(84))>>2)]=e.repeat; + stringToUTF8(e.locale ? e.locale : "", keyEventData + 88, 32); + stringToUTF8(e.char ? e.char : "", keyEventData + 120, 32); + HEAP32[(((keyEventData)+(152))>>2)]=e.charCode; + HEAP32[(((keyEventData)+(156))>>2)]=e.keyCode; + HEAP32[(((keyEventData)+(160))>>2)]=e.which; + + if (dynCall_iiii(callbackfunc, eventTypeId, keyEventData, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: __findEventTarget(target), + allowsDeferredCalls: JSEvents.isInternetExplorer() ? false : true, // MSIE doesn't allow fullscreen and pointerlock requests from key handlers, others do. + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: keyEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread); + return 0; + } + + + + function __registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.touchEvent) JSEvents.touchEvent = _malloc( 1684 ); + + target = __findEventTarget(target); + + var touchEventHandlerFunc = function(ev) { + var e = ev || event; + + var touches = {}; + for(var i = 0; i < e.touches.length; ++i) { + var touch = e.touches[i]; + touch.changed = false; + touches[touch.identifier] = touch; + } + for(var i = 0; i < e.changedTouches.length; ++i) { + var touch = e.changedTouches[i]; + touches[touch.identifier] = touch; + touch.changed = true; + } + for(var i = 0; i < e.targetTouches.length; ++i) { + var touch = e.targetTouches[i]; + touches[touch.identifier].onTarget = true; + } + + var touchEvent = JSEvents.touchEvent; + var ptr = touchEvent; + HEAP32[(((ptr)+(4))>>2)]=e.ctrlKey; + HEAP32[(((ptr)+(8))>>2)]=e.shiftKey; + HEAP32[(((ptr)+(12))>>2)]=e.altKey; + HEAP32[(((ptr)+(16))>>2)]=e.metaKey; + ptr += 20; // Advance to the start of the touch array. + var canvasRect = Module['canvas'] ? Module['canvas'].getBoundingClientRect() : undefined; + var targetRect = JSEvents.getBoundingClientRectOrZeros(target); + var numTouches = 0; + for(var i in touches) { + var t = touches[i]; + HEAP32[((ptr)>>2)]=t.identifier; + HEAP32[(((ptr)+(4))>>2)]=t.screenX; + HEAP32[(((ptr)+(8))>>2)]=t.screenY; + HEAP32[(((ptr)+(12))>>2)]=t.clientX; + HEAP32[(((ptr)+(16))>>2)]=t.clientY; + HEAP32[(((ptr)+(20))>>2)]=t.pageX; + HEAP32[(((ptr)+(24))>>2)]=t.pageY; + HEAP32[(((ptr)+(28))>>2)]=t.changed; + HEAP32[(((ptr)+(32))>>2)]=t.onTarget; + if (canvasRect) { + HEAP32[(((ptr)+(44))>>2)]=t.clientX - canvasRect.left; + HEAP32[(((ptr)+(48))>>2)]=t.clientY - canvasRect.top; + } else { + HEAP32[(((ptr)+(44))>>2)]=0; + HEAP32[(((ptr)+(48))>>2)]=0; + } + HEAP32[(((ptr)+(36))>>2)]=t.clientX - targetRect.left; + HEAP32[(((ptr)+(40))>>2)]=t.clientY - targetRect.top; + + ptr += 52; + + if (++numTouches >= 32) { + break; + } + } + HEAP32[((touchEvent)>>2)]=numTouches; + + if (dynCall_iiii(callbackfunc, eventTypeId, touchEvent, userData)) e.preventDefault(); + }; + + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString == 'touchstart' || eventTypeString == 'touchend', + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: touchEventHandlerFunc, + useCapture: useCapture + }; + JSEvents.registerOrRemoveHandler(eventHandler); + }function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread); + return 0; + } + + function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread); + return 0; + } + + function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread); + return 0; + } + + function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + __registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread); + return 0; + } + + function _exit(status) { + // void _exit(int status); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html + exit(status); + } + + function _glActiveTexture(x0) { GLctx['activeTexture'](x0) } + + function _glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); + } + + function _glBindBuffer(target, buffer) { + + GLctx.bindBuffer(target, GL.buffers[buffer]); + } + + function _glBindFramebuffer(target, framebuffer) { + + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); + + } + + function _glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); + } + + function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); + } + + function _glBlendFunc(x0, x1) { GLctx['blendFunc'](x0, x1) } + + function _glBufferData(target, size, data, usage) { + // N.b. here first form specifies a heap subarray, second form an integer size, so the ?: code here is polymorphic. It is advised to avoid + // randomly mixing both uses in calling code, to avoid any potential JS engine JIT issues. + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data+size) : size, usage); + } + + function _glBufferSubData(target, offset, size, data) { + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size)); + } + + function _glCheckFramebufferStatus(x0) { return GLctx['checkFramebufferStatus'](x0) } + + function _glClear(x0) { GLctx['clear'](x0) } + + function _glClearColor(x0, x1, x2, x3) { GLctx['clearColor'](x0, x1, x2, x3) } + + function _glClearDepthf(x0) { GLctx['clearDepth'](x0) } + + function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); + } + + function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + GLctx['compressedTexImage2D'](target, level, internalFormat, width, height, border, data ? HEAPU8.subarray((data),(data+imageSize)) : null); + } + + function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + GL.programs[id] = program; + return id; + } + + function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; + } + + function _glCullFace(x0) { GLctx['cullFace'](x0) } + + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } + } + + function _glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[(((framebuffers)+(i*4))>>2)]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; // GL spec: "glDeleteFramebuffers silently ignores 0s and names that do not correspond to existing framebuffer objects". + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } + } + + function _glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { // glDeleteProgram actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; + GL.programInfos[id] = null; + } + + function _glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((renderbuffers)+(i*4))>>2)]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; // GL spec: "glDeleteRenderbuffers silently ignores 0s and names that do not correspond to existing renderbuffer objects". + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } + } + + function _glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { // glDeleteShader actually signals an error when deleting a nonexisting object, unlike some other GL delete functions. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; + } + + function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((textures)+(i*4))>>2)]; + var texture = GL.textures[id]; + if (!texture) continue; // GL spec: "glDeleteTextures silently ignores 0s and names that do not correspond to existing textures". + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } + } + + function _glDepthFunc(x0) { GLctx['depthFunc'](x0) } + + function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], + GL.shaders[shader]); + } + + function _glDisable(x0) { GLctx['disable'](x0) } + + function _glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); + } + + function _glDrawArrays(mode, first, count) { + + GLctx.drawArrays(mode, first, count); + + } + + function _glDrawElements(mode, count, type, indices) { + + GLctx.drawElements(mode, count, type, indices); + + } + + function _glEnable(x0) { GLctx['enable'](x0) } + + function _glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); + } + + function _glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, + GL.renderbuffers[renderbuffer]); + } + + function _glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, + GL.textures[texture], level); + } + + function _glFrontFace(x0) { GLctx['frontFace'](x0) } + + function _glGenBuffers(n, buffers) { + __glGenObject(n, buffers, 'createBuffer', GL.buffers + ); + } + + function _glGenFramebuffers(n, ids) { + __glGenObject(n, ids, 'createFramebuffer', GL.framebuffers + ); + } + + function _glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, 'createRenderbuffer', GL.renderbuffers + ); + } + + function _glGenTextures(n, textures) { + __glGenObject(n, textures, 'createTexture', GL.textures + ); + } + + function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); + } + + function _glGetFloatv(name_, p) { + emscriptenWebGLGet(name_, p, 2); + } + + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetProgramiv(program, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + if (program >= GL.counter) { + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + + var ptable = GL.programInfos[program]; + if (!ptable) { + GL.recordError(0x0502 /* GL_INVALID_OPERATION */); + return; + } + + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B87 /* GL_ACTIVE_UNIFORM_MAX_LENGTH */) { + HEAP32[((p)>>2)]=ptable.maxUniformLength; + } else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) { + if (ptable.maxAttributeLength == -1) { + program = GL.programs[program]; + var numAttribs = GLctx.getProgramParameter(program, 0x8B89/*GL_ACTIVE_ATTRIBUTES*/); + ptable.maxAttributeLength = 0; // Spec says if there are no active attribs, 0 must be returned. + for (var i = 0; i < numAttribs; ++i) { + var activeAttrib = GLctx.getActiveAttrib(program, i); + ptable.maxAttributeLength = Math.max(ptable.maxAttributeLength, activeAttrib.name.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxAttributeLength; + } else if (pname == 0x8A35 /* GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */) { + if (ptable.maxUniformBlockNameLength == -1) { + program = GL.programs[program]; + var numBlocks = GLctx.getProgramParameter(program, 0x8A36/*GL_ACTIVE_UNIFORM_BLOCKS*/); + ptable.maxUniformBlockNameLength = 0; + for (var i = 0; i < numBlocks; ++i) { + var activeBlockName = GLctx.getActiveUniformBlockName(program, i); + ptable.maxUniformBlockNameLength = Math.max(ptable.maxUniformBlockNameLength, activeBlockName.length+1); + } + } + HEAP32[((p)>>2)]=ptable.maxUniformBlockNameLength; + } else { + HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname); + } + } + + function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + var numBytesWrittenExclNull = (maxLength > 0 && infoLog) ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } + + function _glGetShaderiv(shader, pname, p) { + if (!p) { + // GLES2 specification does not specify how to behave if p is a null pointer. Since calling this function does not make sense + // if p == null, issue a GL error to notify user about it. + GL.recordError(0x0501 /* GL_INVALID_VALUE */); + return; + } + if (pname == 0x8B84) { // GL_INFO_LOG_LENGTH + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = '(unknown error)'; + HEAP32[((p)>>2)]=log.length + 1; + } else if (pname == 0x8B88) { // GL_SHADER_SOURCE_LENGTH + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = (source === null || source.length == 0) ? 0 : source.length + 1; + HEAP32[((p)>>2)]=sourceLength; + } else { + HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname); + } + } + + function _glGetString(name_) { + if (GL.stringCache[name_]) return GL.stringCache[name_]; + var ret; + switch(name_) { + case 0x1F03 /* GL_EXTENSIONS */: + var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array. + exts = exts.concat(exts.map(function(e) { return "GL_" + e; })); + ret = stringToNewUTF8(exts.join(' ')); + break; + case 0x1F00 /* GL_VENDOR */: + case 0x1F01 /* GL_RENDERER */: + case 0x9245 /* UNMASKED_VENDOR_WEBGL */: + case 0x9246 /* UNMASKED_RENDERER_WEBGL */: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + } + ret = stringToNewUTF8(s); + break; + + case 0x1F02 /* GL_VERSION */: + var glVersion = GLctx.getParameter(GLctx.VERSION); + // return GLES version string corresponding to the version of the WebGL context + { + glVersion = 'OpenGL ES 2.0 (' + glVersion + ')'; + } + ret = stringToNewUTF8(glVersion); + break; + case 0x8B8C /* GL_SHADING_LANGUAGE_VERSION */: + var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION); + // extract the version number 'N.M' from the string 'WebGL GLSL ES N.M ...' + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + '0'; // ensure minor version has 2 digits + glslVersion = 'OpenGL ES GLSL ES ' + ver_num[1] + ' (' + glslVersion + ')'; + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return 0; + } + GL.stringCache[name_] = ret; + return ret; + } + + function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + + var arrayIndex = 0; + // If user passed an array accessor "[index]", parse the array index off the accessor. + if (name[name.length - 1] == ']') { + var leftBrace = name.lastIndexOf('['); + arrayIndex = name[leftBrace+1] != ']' ? parseInt(name.slice(leftBrace + 1)) : 0; // "index]", parseInt will ignore the ']' at the end; but treat "foo[]" as "foo[0]" + name = name.slice(0, leftBrace); + } + + var uniformInfo = GL.programInfos[program] && GL.programInfos[program].uniforms[name]; // returns pair [ dimension_of_uniform_array, uniform_location ] + if (uniformInfo && arrayIndex >= 0 && arrayIndex < uniformInfo[0]) { // Check if user asked for an out-of-bounds element, i.e. for 'vec4 colors[3];' user could ask for 'colors[10]' which should return -1. + return uniformInfo[1] + arrayIndex; + } else { + return -1; + } + } + + function _glLinkProgram(program) { + GLctx.linkProgram(GL.programs[program]); + GL.populateUniformTable(program); + } + + function _glPixelStorei(pname, param) { + if (pname == 0x0cf5 /* GL_UNPACK_ALIGNMENT */) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); + } + + function _glReadPixels(x, y, width, height, format, type, pixels) { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(0x0500/*GL_INVALID_ENUM*/); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); + } + + function _glRenderbufferStorage(x0, x1, x2, x3) { GLctx['renderbufferStorage'](x0, x1, x2, x3) } + + function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + + + GLctx.shaderSource(GL.shaders[shader], source); + } + + function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); + } + + function _glTexParameteri(x0, x1, x2) { GLctx['texParameteri'](x0, x1, x2) } + + function _glUniform1i(location, v0) { + GLctx.uniform1i(GL.uniforms[location], v0); + } + + function _glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(GL.uniforms[location], v0, v1, v2, v3); + } + + function _glUniformMatrix4fv(location, count, transpose, value) { + + + if (16*count <= GL.MINI_TEMP_BUFFER_SIZE) { + // avoid allocation when uploading few enough uniforms + var view = GL.miniTempBufferViews[16*count-1]; + for (var i = 0; i < 16*count; i += 16) { + view[i] = HEAPF32[(((value)+(4*i))>>2)]; + view[i+1] = HEAPF32[(((value)+(4*i+4))>>2)]; + view[i+2] = HEAPF32[(((value)+(4*i+8))>>2)]; + view[i+3] = HEAPF32[(((value)+(4*i+12))>>2)]; + view[i+4] = HEAPF32[(((value)+(4*i+16))>>2)]; + view[i+5] = HEAPF32[(((value)+(4*i+20))>>2)]; + view[i+6] = HEAPF32[(((value)+(4*i+24))>>2)]; + view[i+7] = HEAPF32[(((value)+(4*i+28))>>2)]; + view[i+8] = HEAPF32[(((value)+(4*i+32))>>2)]; + view[i+9] = HEAPF32[(((value)+(4*i+36))>>2)]; + view[i+10] = HEAPF32[(((value)+(4*i+40))>>2)]; + view[i+11] = HEAPF32[(((value)+(4*i+44))>>2)]; + view[i+12] = HEAPF32[(((value)+(4*i+48))>>2)]; + view[i+13] = HEAPF32[(((value)+(4*i+52))>>2)]; + view[i+14] = HEAPF32[(((value)+(4*i+56))>>2)]; + view[i+15] = HEAPF32[(((value)+(4*i+60))>>2)]; + } + } else + { + var view = HEAPF32.subarray((value)>>2,(value+count*64)>>2); + } + GLctx.uniformMatrix4fv(GL.uniforms[location], !!transpose, view); + } + + function _glUseProgram(program) { + GLctx.useProgram(GL.programs[program]); + } + + function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); + } + + function _glViewport(x0, x1, x2, x3) { GLctx['viewport'](x0, x1, x2, x3) } + + + var GLFW={Window:function(id, width, height, title, monitor, share) { + this.id = id; + this.x = 0; + this.y = 0; + this.fullscreen = false; // Used to determine if app in fullscreen mode + this.storedX = 0; // Used to store X before fullscreen + this.storedY = 0; // Used to store Y before fullscreen + this.width = width; + this.height = height; + this.storedWidth = width; // Used to store width before fullscreen + this.storedHeight = height; // Used to store height before fullscreen + this.title = title; + this.monitor = monitor; + this.share = share; + this.attributes = GLFW.hints; + this.inputModes = { + 0x00033001:0x00034001, // GLFW_CURSOR (GLFW_CURSOR_NORMAL) + 0x00033002:0, // GLFW_STICKY_KEYS + 0x00033003:0, // GLFW_STICKY_MOUSE_BUTTONS + }; + this.buttons = 0; + this.keys = new Array(); + this.domKeys = new Array(); + this.shouldClose = 0; + this.title = null; + this.windowPosFunc = null; // GLFWwindowposfun + this.windowSizeFunc = null; // GLFWwindowsizefun + this.windowCloseFunc = null; // GLFWwindowclosefun + this.windowRefreshFunc = null; // GLFWwindowrefreshfun + this.windowFocusFunc = null; // GLFWwindowfocusfun + this.windowIconifyFunc = null; // GLFWwindowiconifyfun + this.framebufferSizeFunc = null; // GLFWframebuffersizefun + this.mouseButtonFunc = null; // GLFWmousebuttonfun + this.cursorPosFunc = null; // GLFWcursorposfun + this.cursorEnterFunc = null; // GLFWcursorenterfun + this.scrollFunc = null; // GLFWscrollfun + this.dropFunc = null; // GLFWdropfun + this.keyFunc = null; // GLFWkeyfun + this.charFunc = null; // GLFWcharfun + this.userptr = null; + },WindowFromId:function(id) { + if (id <= 0 || !GLFW.windows) return null; + return GLFW.windows[id - 1]; + },joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0},DOMToGLFWKeyCode:function(keycode) { + switch (keycode) { + // these keycodes are only defined for GLFW3, assume they are the same for GLFW2 + case 0x20:return 32; // DOM_VK_SPACE -> GLFW_KEY_SPACE + case 0xDE:return 39; // DOM_VK_QUOTE -> GLFW_KEY_APOSTROPHE + case 0xBC:return 44; // DOM_VK_COMMA -> GLFW_KEY_COMMA + case 0xAD:return 45; // DOM_VK_HYPHEN_MINUS -> GLFW_KEY_MINUS + case 0xBD:return 45; // DOM_VK_MINUS -> GLFW_KEY_MINUS + case 0xBE:return 46; // DOM_VK_PERIOD -> GLFW_KEY_PERIOD + case 0xBF:return 47; // DOM_VK_SLASH -> GLFW_KEY_SLASH + case 0x30:return 48; // DOM_VK_0 -> GLFW_KEY_0 + case 0x31:return 49; // DOM_VK_1 -> GLFW_KEY_1 + case 0x32:return 50; // DOM_VK_2 -> GLFW_KEY_2 + case 0x33:return 51; // DOM_VK_3 -> GLFW_KEY_3 + case 0x34:return 52; // DOM_VK_4 -> GLFW_KEY_4 + case 0x35:return 53; // DOM_VK_5 -> GLFW_KEY_5 + case 0x36:return 54; // DOM_VK_6 -> GLFW_KEY_6 + case 0x37:return 55; // DOM_VK_7 -> GLFW_KEY_7 + case 0x38:return 56; // DOM_VK_8 -> GLFW_KEY_8 + case 0x39:return 57; // DOM_VK_9 -> GLFW_KEY_9 + case 0x3B:return 59; // DOM_VK_SEMICOLON -> GLFW_KEY_SEMICOLON + case 0x3D:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0xBB:return 61; // DOM_VK_EQUALS -> GLFW_KEY_EQUAL + case 0x41:return 65; // DOM_VK_A -> GLFW_KEY_A + case 0x42:return 66; // DOM_VK_B -> GLFW_KEY_B + case 0x43:return 67; // DOM_VK_C -> GLFW_KEY_C + case 0x44:return 68; // DOM_VK_D -> GLFW_KEY_D + case 0x45:return 69; // DOM_VK_E -> GLFW_KEY_E + case 0x46:return 70; // DOM_VK_F -> GLFW_KEY_F + case 0x47:return 71; // DOM_VK_G -> GLFW_KEY_G + case 0x48:return 72; // DOM_VK_H -> GLFW_KEY_H + case 0x49:return 73; // DOM_VK_I -> GLFW_KEY_I + case 0x4A:return 74; // DOM_VK_J -> GLFW_KEY_J + case 0x4B:return 75; // DOM_VK_K -> GLFW_KEY_K + case 0x4C:return 76; // DOM_VK_L -> GLFW_KEY_L + case 0x4D:return 77; // DOM_VK_M -> GLFW_KEY_M + case 0x4E:return 78; // DOM_VK_N -> GLFW_KEY_N + case 0x4F:return 79; // DOM_VK_O -> GLFW_KEY_O + case 0x50:return 80; // DOM_VK_P -> GLFW_KEY_P + case 0x51:return 81; // DOM_VK_Q -> GLFW_KEY_Q + case 0x52:return 82; // DOM_VK_R -> GLFW_KEY_R + case 0x53:return 83; // DOM_VK_S -> GLFW_KEY_S + case 0x54:return 84; // DOM_VK_T -> GLFW_KEY_T + case 0x55:return 85; // DOM_VK_U -> GLFW_KEY_U + case 0x56:return 86; // DOM_VK_V -> GLFW_KEY_V + case 0x57:return 87; // DOM_VK_W -> GLFW_KEY_W + case 0x58:return 88; // DOM_VK_X -> GLFW_KEY_X + case 0x59:return 89; // DOM_VK_Y -> GLFW_KEY_Y + case 0x5a:return 90; // DOM_VK_Z -> GLFW_KEY_Z + case 0xDB:return 91; // DOM_VK_OPEN_BRACKET -> GLFW_KEY_LEFT_BRACKET + case 0xDC:return 92; // DOM_VK_BACKSLASH -> GLFW_KEY_BACKSLASH + case 0xDD:return 93; // DOM_VK_CLOSE_BRACKET -> GLFW_KEY_RIGHT_BRACKET + case 0xC0:return 94; // DOM_VK_BACK_QUOTE -> GLFW_KEY_GRAVE_ACCENT + + + case 0x1B:return 256; // DOM_VK_ESCAPE -> GLFW_KEY_ESCAPE + case 0x0D:return 257; // DOM_VK_RETURN -> GLFW_KEY_ENTER + case 0x09:return 258; // DOM_VK_TAB -> GLFW_KEY_TAB + case 0x08:return 259; // DOM_VK_BACK -> GLFW_KEY_BACKSPACE + case 0x2D:return 260; // DOM_VK_INSERT -> GLFW_KEY_INSERT + case 0x2E:return 261; // DOM_VK_DELETE -> GLFW_KEY_DELETE + case 0x27:return 262; // DOM_VK_RIGHT -> GLFW_KEY_RIGHT + case 0x25:return 263; // DOM_VK_LEFT -> GLFW_KEY_LEFT + case 0x28:return 264; // DOM_VK_DOWN -> GLFW_KEY_DOWN + case 0x26:return 265; // DOM_VK_UP -> GLFW_KEY_UP + case 0x21:return 266; // DOM_VK_PAGE_UP -> GLFW_KEY_PAGE_UP + case 0x22:return 267; // DOM_VK_PAGE_DOWN -> GLFW_KEY_PAGE_DOWN + case 0x24:return 268; // DOM_VK_HOME -> GLFW_KEY_HOME + case 0x23:return 269; // DOM_VK_END -> GLFW_KEY_END + case 0x14:return 280; // DOM_VK_CAPS_LOCK -> GLFW_KEY_CAPS_LOCK + case 0x91:return 281; // DOM_VK_SCROLL_LOCK -> GLFW_KEY_SCROLL_LOCK + case 0x90:return 282; // DOM_VK_NUM_LOCK -> GLFW_KEY_NUM_LOCK + case 0x2C:return 283; // DOM_VK_SNAPSHOT -> GLFW_KEY_PRINT_SCREEN + case 0x13:return 284; // DOM_VK_PAUSE -> GLFW_KEY_PAUSE + case 0x70:return 290; // DOM_VK_F1 -> GLFW_KEY_F1 + case 0x71:return 291; // DOM_VK_F2 -> GLFW_KEY_F2 + case 0x72:return 292; // DOM_VK_F3 -> GLFW_KEY_F3 + case 0x73:return 293; // DOM_VK_F4 -> GLFW_KEY_F4 + case 0x74:return 294; // DOM_VK_F5 -> GLFW_KEY_F5 + case 0x75:return 295; // DOM_VK_F6 -> GLFW_KEY_F6 + case 0x76:return 296; // DOM_VK_F7 -> GLFW_KEY_F7 + case 0x77:return 297; // DOM_VK_F8 -> GLFW_KEY_F8 + case 0x78:return 298; // DOM_VK_F9 -> GLFW_KEY_F9 + case 0x79:return 299; // DOM_VK_F10 -> GLFW_KEY_F10 + case 0x7A:return 300; // DOM_VK_F11 -> GLFW_KEY_F11 + case 0x7B:return 301; // DOM_VK_F12 -> GLFW_KEY_F12 + case 0x7C:return 302; // DOM_VK_F13 -> GLFW_KEY_F13 + case 0x7D:return 303; // DOM_VK_F14 -> GLFW_KEY_F14 + case 0x7E:return 304; // DOM_VK_F15 -> GLFW_KEY_F15 + case 0x7F:return 305; // DOM_VK_F16 -> GLFW_KEY_F16 + case 0x80:return 306; // DOM_VK_F17 -> GLFW_KEY_F17 + case 0x81:return 307; // DOM_VK_F18 -> GLFW_KEY_F18 + case 0x82:return 308; // DOM_VK_F19 -> GLFW_KEY_F19 + case 0x83:return 309; // DOM_VK_F20 -> GLFW_KEY_F20 + case 0x84:return 310; // DOM_VK_F21 -> GLFW_KEY_F21 + case 0x85:return 311; // DOM_VK_F22 -> GLFW_KEY_F22 + case 0x86:return 312; // DOM_VK_F23 -> GLFW_KEY_F23 + case 0x87:return 313; // DOM_VK_F24 -> GLFW_KEY_F24 + case 0x88:return 314; // 0x88 (not used?) -> GLFW_KEY_F25 + case 0x60:return 320; // DOM_VK_NUMPAD0 -> GLFW_KEY_KP_0 + case 0x61:return 321; // DOM_VK_NUMPAD1 -> GLFW_KEY_KP_1 + case 0x62:return 322; // DOM_VK_NUMPAD2 -> GLFW_KEY_KP_2 + case 0x63:return 323; // DOM_VK_NUMPAD3 -> GLFW_KEY_KP_3 + case 0x64:return 324; // DOM_VK_NUMPAD4 -> GLFW_KEY_KP_4 + case 0x65:return 325; // DOM_VK_NUMPAD5 -> GLFW_KEY_KP_5 + case 0x66:return 326; // DOM_VK_NUMPAD6 -> GLFW_KEY_KP_6 + case 0x67:return 327; // DOM_VK_NUMPAD7 -> GLFW_KEY_KP_7 + case 0x68:return 328; // DOM_VK_NUMPAD8 -> GLFW_KEY_KP_8 + case 0x69:return 329; // DOM_VK_NUMPAD9 -> GLFW_KEY_KP_9 + case 0x6E:return 330; // DOM_VK_DECIMAL -> GLFW_KEY_KP_DECIMAL + case 0x6F:return 331; // DOM_VK_DIVIDE -> GLFW_KEY_KP_DIVIDE + case 0x6A:return 332; // DOM_VK_MULTIPLY -> GLFW_KEY_KP_MULTIPLY + case 0x6D:return 333; // DOM_VK_SUBTRACT -> GLFW_KEY_KP_SUBTRACT + case 0x6B:return 334; // DOM_VK_ADD -> GLFW_KEY_KP_ADD + // case 0x0D:return 335; // DOM_VK_RETURN -> GLFW_KEY_KP_ENTER (DOM_KEY_LOCATION_RIGHT) + // case 0x61:return 336; // DOM_VK_EQUALS -> GLFW_KEY_KP_EQUAL (DOM_KEY_LOCATION_RIGHT) + case 0x10:return 340; // DOM_VK_SHIFT -> GLFW_KEY_LEFT_SHIFT + case 0x11:return 341; // DOM_VK_CONTROL -> GLFW_KEY_LEFT_CONTROL + case 0x12:return 342; // DOM_VK_ALT -> GLFW_KEY_LEFT_ALT + case 0x5B:return 343; // DOM_VK_WIN -> GLFW_KEY_LEFT_SUPER + // case 0x10:return 344; // DOM_VK_SHIFT -> GLFW_KEY_RIGHT_SHIFT (DOM_KEY_LOCATION_RIGHT) + // case 0x11:return 345; // DOM_VK_CONTROL -> GLFW_KEY_RIGHT_CONTROL (DOM_KEY_LOCATION_RIGHT) + // case 0x12:return 346; // DOM_VK_ALT -> GLFW_KEY_RIGHT_ALT (DOM_KEY_LOCATION_RIGHT) + // case 0x5B:return 347; // DOM_VK_WIN -> GLFW_KEY_RIGHT_SUPER (DOM_KEY_LOCATION_RIGHT) + case 0x5D:return 348; // DOM_VK_CONTEXT_MENU -> GLFW_KEY_MENU + // XXX: GLFW_KEY_WORLD_1, GLFW_KEY_WORLD_2 what are these? + default:return -1; // GLFW_KEY_UNKNOWN + }; + },getModBits:function(win) { + var mod = 0; + if (win.keys[340]) mod |= 0x0001; // GLFW_MOD_SHIFT + if (win.keys[341]) mod |= 0x0002; // GLFW_MOD_CONTROL + if (win.keys[342]) mod |= 0x0004; // GLFW_MOD_ALT + if (win.keys[343]) mod |= 0x0008; // GLFW_MOD_SUPER + return mod; + },onKeyPress:function(event) { + if (!GLFW.active || !GLFW.active.charFunc) return; + if (event.ctrlKey || event.metaKey) return; + + // correct unicode charCode is only available with onKeyPress event + var charCode = event.charCode; + if (charCode == 0 || (charCode >= 0x00 && charCode <= 0x1F)) return; + + + dynCall_vii(GLFW.active.charFunc, GLFW.active.id, charCode); + },onKeyChanged:function(keyCode, status) { + if (!GLFW.active) return; + + var key = GLFW.DOMToGLFWKeyCode(keyCode); + if (key == -1) return; + + var repeat = status && GLFW.active.keys[key]; + GLFW.active.keys[key] = status; + GLFW.active.domKeys[keyCode] = status; + if (!GLFW.active.keyFunc) return; + + + if (repeat) status = 2; // GLFW_REPEAT + dynCall_viiiii(GLFW.active.keyFunc, GLFW.active.id, key, keyCode, status, GLFW.getModBits(GLFW.active)); + },onGamepadConnected:function(event) { + GLFW.refreshJoysticks(); + },onGamepadDisconnected:function(event) { + GLFW.refreshJoysticks(); + },onKeydown:function(event) { + GLFW.onKeyChanged(event.keyCode, 1); // GLFW_PRESS or GLFW_REPEAT + + // This logic comes directly from the sdl implementation. We cannot + // call preventDefault on all keydown events otherwise onKeyPress will + // not get called + if (event.keyCode === 8 /* backspace */ || event.keyCode === 9 /* tab */) { + event.preventDefault(); + } + },onKeyup:function(event) { + GLFW.onKeyChanged(event.keyCode, 0); // GLFW_RELEASE + },onBlur:function(event) { + if (!GLFW.active) return; + + for (var i = 0; i < GLFW.active.domKeys.length; ++i) { + if (GLFW.active.domKeys[i]) { + GLFW.onKeyChanged(i, 0); // GLFW_RELEASE + } + } + },onMousemove:function(event) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"] || !GLFW.active.cursorPosFunc) return; + + + dynCall_vidd(GLFW.active.cursorPosFunc, GLFW.active.id, Browser.mouseX, Browser.mouseY); + },DOMToGLFWMouseButton:function(event) { + // DOM and glfw have different button codes. + // See http://www.w3schools.com/jsref/event_button.asp. + var eventButton = event['button']; + if (eventButton > 0) { + if (eventButton == 1) { + eventButton = 2; + } else { + eventButton = 1; + } + } + return eventButton; + },onMouseenter:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 1); + },onMouseleave:function(event) { + if (!GLFW.active) return; + + if (event.target != Module["canvas"] || !GLFW.active.cursorEnterFunc) return; + + dynCall_vii(GLFW.active.cursorEnterFunc, GLFW.active.id, 0); + },onMouseButtonChanged:function(event, status) { + if (!GLFW.active) return; + + Browser.calculateMouseEvent(event); + + if (event.target != Module["canvas"]) return; + + var eventButton = GLFW.DOMToGLFWMouseButton(event); + + if (status == 1) { // GLFW_PRESS + GLFW.active.buttons |= (1 << eventButton); + try { + event.target.setCapture(); + } catch (e) {} + } else { // GLFW_RELEASE + GLFW.active.buttons &= ~(1 << eventButton); + } + + if (!GLFW.active.mouseButtonFunc) return; + + + dynCall_viiii(GLFW.active.mouseButtonFunc, GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active)); + },onMouseButtonDown:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 1); // GLFW_PRESS + },onMouseButtonUp:function(event) { + if (!GLFW.active) return; + GLFW.onMouseButtonChanged(event, 0); // GLFW_RELEASE + },onMouseWheel:function(event) { + // Note the minus sign that flips browser wheel direction (positive direction scrolls page down) to native wheel direction (positive direction is mouse wheel up) + var delta = -Browser.getMouseWheelDelta(event); + delta = (delta == 0) ? 0 : (delta > 0 ? Math.max(delta, 1) : Math.min(delta, -1)); // Quantize to integer so that minimum scroll is at least +/- 1. + GLFW.wheelPos += delta; + + if (!GLFW.active || !GLFW.active.scrollFunc || event.target != Module['canvas']) return; + + + var sx = 0; + var sy = 0; + if (event.type == 'mousewheel') { + sx = event.wheelDeltaX; + sy = event.wheelDeltaY; + } else { + sx = event.deltaX; + sy = event.deltaY; + } + + dynCall_vidd(GLFW.active.scrollFunc, GLFW.active.id, sx, sy); + + event.preventDefault(); + },onCanvasResize:function(width, height) { + if (!GLFW.active) return; + + var resizeNeeded = true; + + // If the client is requesting fullscreen mode + if (document["fullscreen"] || document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) { + GLFW.active.storedX = GLFW.active.x; + GLFW.active.storedY = GLFW.active.y; + GLFW.active.storedWidth = GLFW.active.width; + GLFW.active.storedHeight = GLFW.active.height; + GLFW.active.x = GLFW.active.y = 0; + GLFW.active.width = screen.width; + GLFW.active.height = screen.height; + GLFW.active.fullscreen = true; + + // If the client is reverting from fullscreen mode + } else if (GLFW.active.fullscreen == true) { + GLFW.active.x = GLFW.active.storedX; + GLFW.active.y = GLFW.active.storedY; + GLFW.active.width = GLFW.active.storedWidth; + GLFW.active.height = GLFW.active.storedHeight; + GLFW.active.fullscreen = false; + + // If the width/height values do not match current active window sizes + } else if (GLFW.active.width != width || GLFW.active.height != height) { + GLFW.active.width = width; + GLFW.active.height = height; + } else { + resizeNeeded = false; + } + + // If any of the above conditions were true, we need to resize the canvas + if (resizeNeeded) { + // resets the canvas size to counter the aspect preservation of Browser.updateCanvasDimensions + Browser.setCanvasSize(GLFW.active.width, GLFW.active.height, true); + // TODO: Client dimensions (clientWidth/clientHeight) vs pixel dimensions (width/height) of + // the canvas should drive window and framebuffer size respectfully. + GLFW.onWindowSizeChanged(); + GLFW.onFramebufferSizeChanged(); + } + },onWindowSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.windowSizeFunc) return; + + + dynCall_viii(GLFW.active.windowSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },onFramebufferSizeChanged:function() { + if (!GLFW.active) return; + + if (!GLFW.active.framebufferSizeFunc) return; + + dynCall_viii(GLFW.active.framebufferSizeFunc, GLFW.active.id, GLFW.active.width, GLFW.active.height); + },requestFullscreen:function() { + var RFS = Module["canvas"]['requestFullscreen'] || + Module["canvas"]['mozRequestFullScreen'] || + Module["canvas"]['webkitRequestFullScreen'] || + (function() {}); + RFS.apply(Module["canvas"], []); + },requestFullScreen:function() { + err('GLFW.requestFullScreen() is deprecated. Please call GLFW.requestFullscreen instead.'); + GLFW.requestFullScreen = function() { + return GLFW.requestFullscreen(); + } + return GLFW.requestFullscreen(); + },exitFullscreen:function() { + Browser.exitFullscreen(); + },cancelFullScreen:function() { + err('GLFW.cancelFullScreen() is deprecated. Please call GLFW.exitFullscreen instead.'); + GLFW.cancelFullScreen = function() { + return GLFW.exitFullscreen(); + } + return GLFW.exitFullscreen(); + },getTime:function() { + return _emscripten_get_now() / 1000; + },setWindowTitle:function(winid, title) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + win.title = UTF8ToString(title); + if (GLFW.active.id == win.id) { + document.title = win.title; + } + },setJoystickCallback:function(cbfun) { + GLFW.joystickFunc = cbfun; + GLFW.refreshJoysticks(); + },joys:{},lastGamepadState:null,lastGamepadStateFrame:null,refreshJoysticks:function() { + // Produce a new Gamepad API sample if we are ticking a new game frame, or if not using emscripten_set_main_loop() at all to drive animation. + if (Browser.mainLoop.currentFrameNumber !== GLFW.lastGamepadStateFrame || !Browser.mainLoop.currentFrameNumber) { + GLFW.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null); + GLFW.lastGamepadStateFrame = Browser.mainLoop.currentFrameNumber; + + for (var joy = 0; joy < GLFW.lastGamepadState.length; ++joy) { + var gamepad = GLFW.lastGamepadState[joy]; + + if (gamepad) { + if (!GLFW.joys[joy]) { + console.log('glfw joystick connected:',joy); + GLFW.joys[joy] = { + id: allocate(intArrayFromString(gamepad.id), 'i8', ALLOC_NORMAL), + buttonsCount: gamepad.buttons.length, + axesCount: gamepad.axes.length, + buttons: allocate(new Array(gamepad.buttons.length), 'i8', ALLOC_NORMAL), + axes: allocate(new Array(gamepad.axes.length*4), 'float', ALLOC_NORMAL) + }; + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040001); // GLFW_CONNECTED + } + } + + var data = GLFW.joys[joy]; + + for (var i = 0; i < gamepad.buttons.length; ++i) { + setValue(data.buttons + i, gamepad.buttons[i].pressed, 'i8'); + } + + for (var i = 0; i < gamepad.axes.length; ++i) { + setValue(data.axes + i*4, gamepad.axes[i], 'float'); + } + } else { + if (GLFW.joys[joy]) { + console.log('glfw joystick disconnected',joy); + + if (GLFW.joystickFunc) { + dynCall_vii(GLFW.joystickFunc, joy, 0x00040002); // GLFW_DISCONNECTED + } + + _free(GLFW.joys[joy].id); + _free(GLFW.joys[joy].buttons); + _free(GLFW.joys[joy].axes); + + delete GLFW.joys[joy]; + } + } + } + } + },setKeyCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.keyFunc = cbfun; + },setCharCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.charFunc = cbfun; + },setMouseButtonCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.mouseButtonFunc = cbfun; + },setCursorPosCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorPosFunc = cbfun; + },setScrollCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.scrollFunc = cbfun; + },setDropCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.dropFunc = cbfun; + console.log("--->LOG: setDropCallback assigned!"); + },onDrop:function(event) { + + console.log("--->LOG: OnDrop: GO!"); + + if (!GLFW.active || !GLFW.active.dropFunc) return; + if (!event.dataTransfer || !event.dataTransfer.files || event.dataTransfer.files.length == 0) return; + + console.log("--->LOG: OnDrop: STEP1"); + + event.preventDefault(); + + //#if '$FS' in addedLibraryItems + + console.log("--->LOG: OnDrop: STEP2"); + + var filenames = allocate(new Array(event.dataTransfer.files.length*4), 'i8*', ALLOC_NORMAL); + var filenamesArray = []; + var count = event.dataTransfer.files.length; + + // Read and save the files to emscripten's FS + var written = 0; + var drop_dir = '.glfw_dropped_files'; + FS.createPath('/', drop_dir); + + console.log("--->LOG: OnDrop: STEP3"); + + function save(file) { + var path = '/' + drop_dir + '/' + file.name.replace(/\//g, '_'); + var reader = new FileReader(); + reader.onloadend = function(e) { + if (reader.readyState != 2) { // not DONE + ++written; + console.log('failed to read dropped file: '+file.name+': '+reader.error); + return; + } + + var data = e.target.result; + FS.writeFile(path, new Uint8Array(data)); + if (++written === count) { + dynCall_viii(GLFW.active.dropFunc, GLFW.active.id, count, filenames); + + for (var i = 0; i < filenamesArray.length; ++i) { + _free(filenamesArray[i]); + } + _free(filenames); + } + }; + reader.readAsArrayBuffer(file); + + var filename = allocate(intArrayFromString(path), 'i8', ALLOC_NORMAL); + filenamesArray.push(filename); + setValue(filenames + i*4, filename, 'i8*'); + } + + for (var i = 0; i < count; ++i) { + save(event.dataTransfer.files[i]); + } + + //#endif // '$FS' in addedLibraryItems + + return false; + },onDragover:function(event) { + if (!GLFW.active || !GLFW.active.dropFunc) return; + + event.preventDefault(); + return false; + },setWindowSizeCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowSizeFunc = cbfun; + + },setWindowCloseCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowCloseFunc = cbfun; + },setWindowRefreshCallback:function(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowRefreshFunc = cbfun; + },onClickRequestPointerLock:function(e) { + if (!Browser.pointerLock && Module['canvas'].requestPointerLock) { + Module['canvas'].requestPointerLock(); + e.preventDefault(); + } + },setInputMode:function(winid, mode, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + switch(mode) { + case 0x00033001: { // GLFW_CURSOR + switch(value) { + case 0x00034001: { // GLFW_CURSOR_NORMAL + win.inputModes[mode] = value; + Module['canvas'].removeEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].exitPointerLock(); + break; + } + case 0x00034002: { // GLFW_CURSOR_HIDDEN + console.log("glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented."); + break; + } + case 0x00034003: { // GLFW_CURSOR_DISABLED + win.inputModes[mode] = value; + Module['canvas'].addEventListener('click', GLFW.onClickRequestPointerLock, true); + Module['canvas'].requestPointerLock(); + break; + } + default: { + console.log("glfwSetInputMode called with unknown value parameter value: " + value + "."); + break; + } + } + break; + } + case 0x00033002: { // GLFW_STICKY_KEYS + console.log("glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented."); + break; + } + case 0x00033003: { // GLFW_STICKY_MOUSE_BUTTONS + console.log("glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented."); + break; + } + default: { + console.log("glfwSetInputMode called with unknown mode parameter value: " + mode + "."); + break; + } + } + },getKey:function(winid, key) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return win.keys[key]; + },getMouseButton:function(winid, button) { + var win = GLFW.WindowFromId(winid); + if (!win) return 0; + return (win.buttons & (1 << button)) > 0; + },getCursorPos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'double'); + setValue(y, Browser.mouseY, 'double'); + },getMousePos:function(winid, x, y) { + setValue(x, Browser.mouseX, 'i32'); + setValue(y, Browser.mouseY, 'i32'); + },setCursorPos:function(winid, x, y) { + },getWindowPos:function(winid, x, y) { + var wx = 0; + var wy = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + wx = win.x; + wy = win.y; + } + + setValue(x, wx, 'i32'); + setValue(y, wy, 'i32'); + },setWindowPos:function(winid, x, y) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.x = x; + win.y = y; + },getWindowSize:function(winid, width, height) { + var ww = 0; + var wh = 0; + + var win = GLFW.WindowFromId(winid); + if (win) { + ww = win.width; + wh = win.height; + } + + setValue(width, ww, 'i32'); + setValue(height, wh, 'i32'); + },setWindowSize:function(winid, width, height) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (GLFW.active.id == win.id) { + if (width == screen.width && height == screen.height) { + GLFW.requestFullscreen(); + } else { + GLFW.exitFullscreen(); + Browser.setCanvasSize(width, height); + win.width = width; + win.height = height; + } + } + + if (!win.windowSizeFunc) return; + + + dynCall_viii(win.windowSizeFunc, win.id, width, height); + },createWindow:function(width, height, title, monitor, share) { + var i, id; + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] !== null; i++); + if (i > 0) throw "glfwCreateWindow only supports one window at time currently"; + + // id for window + id = i + 1; + + // not valid + if (width <= 0 || height <= 0) return 0; + + if (monitor) { + GLFW.requestFullscreen(); + } else { + Browser.setCanvasSize(width, height); + } + + // Create context when there are no existing alive windows + for (i = 0; i < GLFW.windows.length && GLFW.windows[i] == null; i++); + if (i == GLFW.windows.length) { + var contextAttributes = { + antialias: (GLFW.hints[0x0002100D] > 1), // GLFW_SAMPLES + depth: (GLFW.hints[0x00021005] > 0), // GLFW_DEPTH_BITS + stencil: (GLFW.hints[0x00021006] > 0), // GLFW_STENCIL_BITS + alpha: (GLFW.hints[0x00021004] > 0) // GLFW_ALPHA_BITS + } + Module.ctx = Browser.createContext(Module['canvas'], true, true, contextAttributes); + } + + // If context creation failed, do not return a valid window + if (!Module.ctx) return 0; + + // Get non alive id + var win = new GLFW.Window(id, width, height, title, monitor, share); + + // Set window to array + if (id - 1 == GLFW.windows.length) { + GLFW.windows.push(win); + } else { + GLFW.windows[id - 1] = win; + } + + GLFW.active = win; + return win.id; + },destroyWindow:function(winid) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + + if (win.windowCloseFunc) + dynCall_vi(win.windowCloseFunc, win.id); + + GLFW.windows[win.id - 1] = null; + if (GLFW.active.id == win.id) + GLFW.active = null; + + // Destroy context when no alive windows + for (var i = 0; i < GLFW.windows.length; i++) + if (GLFW.windows[i] !== null) return; + + Module.ctx = Browser.destroyContext(Module['canvas'], true, true); + },swapBuffers:function(winid) { + },GLFW2ParamToGLFW3Param:function(param) { + var table = { + 0x00030001:0, // GLFW_MOUSE_CURSOR + 0x00030002:0, // GLFW_STICKY_KEYS + 0x00030003:0, // GLFW_STICKY_MOUSE_BUTTONS + 0x00030004:0, // GLFW_SYSTEM_KEYS + 0x00030005:0, // GLFW_KEY_REPEAT + 0x00030006:0, // GLFW_AUTO_POLL_EVENTS + 0x00020001:0, // GLFW_OPENED + 0x00020002:0, // GLFW_ACTIVE + 0x00020003:0, // GLFW_ICONIFIED + 0x00020004:0, // GLFW_ACCELERATED + 0x00020005:0x00021001, // GLFW_RED_BITS + 0x00020006:0x00021002, // GLFW_GREEN_BITS + 0x00020007:0x00021003, // GLFW_BLUE_BITS + 0x00020008:0x00021004, // GLFW_ALPHA_BITS + 0x00020009:0x00021005, // GLFW_DEPTH_BITS + 0x0002000A:0x00021006, // GLFW_STENCIL_BITS + 0x0002000B:0x0002100F, // GLFW_REFRESH_RATE + 0x0002000C:0x00021007, // GLFW_ACCUM_RED_BITS + 0x0002000D:0x00021008, // GLFW_ACCUM_GREEN_BITS + 0x0002000E:0x00021009, // GLFW_ACCUM_BLUE_BITS + 0x0002000F:0x0002100A, // GLFW_ACCUM_ALPHA_BITS + 0x00020010:0x0002100B, // GLFW_AUX_BUFFERS + 0x00020011:0x0002100C, // GLFW_STEREO + 0x00020012:0, // GLFW_WINDOW_NO_RESIZE + 0x00020013:0x0002100D, // GLFW_FSAA_SAMPLES + 0x00020014:0x00022002, // GLFW_OPENGL_VERSION_MAJOR + 0x00020015:0x00022003, // GLFW_OPENGL_VERSION_MINOR + 0x00020016:0x00022006, // GLFW_OPENGL_FORWARD_COMPAT + 0x00020017:0x00022007, // GLFW_OPENGL_DEBUG_CONTEXT + 0x00020018:0x00022008, // GLFW_OPENGL_PROFILE + }; + return table[param]; + }};function _glfwCreateWindow(width, height, title, monitor, share) { + return GLFW.createWindow(width, height, title, monitor, share); + } + + function _glfwDefaultWindowHints() { + GLFW.hints = GLFW.defaultHints; + } + + function _glfwDestroyWindow(winid) { + return GLFW.destroyWindow(winid); + } + + function _glfwGetCursorPos(winid, x, y) { + GLFW.getCursorPos(winid, x, y); + } + + function _glfwGetPrimaryMonitor() { + return 1; + } + + function _glfwGetTime() { + return GLFW.getTime() - GLFW.initialTime; + } + + function _glfwGetVideoModes(monitor, count) { + setValue(count, 0, 'i32'); + return 0; + } + + function _glfwInit() { + if (GLFW.windows) return 1; // GL_TRUE + + GLFW.initialTime = GLFW.getTime(); + GLFW.hints = GLFW.defaultHints; + GLFW.windows = new Array() + GLFW.active = null; + + window.addEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.addEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.addEventListener("keydown", GLFW.onKeydown, true); + window.addEventListener("keypress", GLFW.onKeyPress, true); + window.addEventListener("keyup", GLFW.onKeyup, true); + window.addEventListener("blur", GLFW.onBlur, true); + Module["canvas"].addEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].addEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].addEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].addEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].addEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].addEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].addEventListener('drop', GLFW.onDrop, true); + Module["canvas"].addEventListener('dragover', GLFW.onDragover, true); + + Browser.resizeListeners.push(function(width, height) { + GLFW.onCanvasResize(width, height); + }); + return 1; // GL_TRUE + } + + function _glfwMakeContextCurrent(winid) {} + + function _glfwSetCharCallback(winid, cbfun) { + GLFW.setCharCallback(winid, cbfun); + } + + function _glfwSetCursorEnterCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.cursorEnterFunc = cbfun; + } + + function _glfwSetCursorPosCallback(winid, cbfun) { + GLFW.setCursorPosCallback(winid, cbfun); + } + + function _glfwSetDropCallback(winid, cbfun) { + GLFW.setDropCallback(winid, cbfun); + console.log("--->LOG: glfwSetDropCallback set!"); + } + + function _glfwSetErrorCallback(cbfun) { + GLFW.errorFunc = cbfun; + } + + function _glfwSetKeyCallback(winid, cbfun) { + GLFW.setKeyCallback(winid, cbfun); + } + + function _glfwSetMouseButtonCallback(winid, cbfun) { + GLFW.setMouseButtonCallback(winid, cbfun); + } + + function _glfwSetScrollCallback(winid, cbfun) { + GLFW.setScrollCallback(winid, cbfun); + } + + function _glfwSetWindowIconifyCallback(winid, cbfun) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.windowIconifyFunc = cbfun; + } + + function _glfwSetWindowShouldClose(winid, value) { + var win = GLFW.WindowFromId(winid); + if (!win) return; + win.shouldClose = value; + } + + function _glfwSetWindowSizeCallback(winid, cbfun) { + GLFW.setWindowSizeCallback(winid, cbfun); + } + + function _glfwSwapBuffers(winid) { + GLFW.swapBuffers(winid); + } + + function _glfwSwapInterval(interval) { + interval = Math.abs(interval); // GLFW uses negative values to enable GLX_EXT_swap_control_tear, which we don't have, so just treat negative and positive the same. + if (interval == 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 0); + else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, interval); + } + + function _glfwTerminate() { + window.removeEventListener("gamepadconnected", GLFW.onGamepadConnected, true); + window.removeEventListener("gamepaddisconnected", GLFW.onGamepadDisconnected, true); + window.removeEventListener("keydown", GLFW.onKeydown, true); + window.removeEventListener("keypress", GLFW.onKeyPress, true); + window.removeEventListener("keyup", GLFW.onKeyup, true); + window.removeEventListener("blur", GLFW.onBlur, true); + Module["canvas"].removeEventListener("mousemove", GLFW.onMousemove, true); + Module["canvas"].removeEventListener("mousedown", GLFW.onMouseButtonDown, true); + Module["canvas"].removeEventListener("mouseup", GLFW.onMouseButtonUp, true); + Module["canvas"].removeEventListener('wheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mousewheel', GLFW.onMouseWheel, true); + Module["canvas"].removeEventListener('mouseenter', GLFW.onMouseenter, true); + Module["canvas"].removeEventListener('mouseleave', GLFW.onMouseleave, true); + Module["canvas"].removeEventListener('drop', GLFW.onDrop, true); + Module["canvas"].removeEventListener('dragover', GLFW.onDragover, true); + + + Module["canvas"].width = Module["canvas"].height = 1; + GLFW.windows = null; + GLFW.active = null; + } + + function _glfwWindowHint(target, hint) { + GLFW.hints[target] = hint; + } + + + + + function _llvm_stackrestore(p) { + var self = _llvm_stacksave; + var ret = self.LLVM_SAVEDSTACKS[p]; + self.LLVM_SAVEDSTACKS.splice(p, 1); + stackRestore(ret); + } + + function _llvm_stacksave() { + var self = _llvm_stacksave; + if (!self.LLVM_SAVEDSTACKS) { + self.LLVM_SAVEDSTACKS = []; + } + self.LLVM_SAVEDSTACKS.push(stackSave()); + return self.LLVM_SAVEDSTACKS.length-1; + } + + + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.set(HEAPU8.subarray(src, src+num), dest); + } + + + + + + + + + function _usleep(useconds) { + // int usleep(useconds_t useconds); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/usleep.html + // We're single-threaded, so use a busy loop. Super-ugly. + var msec = useconds / 1000; + if ((ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && self['performance'] && self['performance']['now']) { + var start = self['performance']['now'](); + while (self['performance']['now']() - start < msec) { + // Do nothing. + } + } else { + var start = Date.now(); + while (Date.now() - start < msec) { + // Do nothing. + } + } + return 0; + }function _nanosleep(rqtp, rmtp) { + // int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); + if (rqtp === 0) { + ___setErrNo(22); + return -1; + } + var seconds = HEAP32[((rqtp)>>2)]; + var nanoseconds = HEAP32[(((rqtp)+(4))>>2)]; + if (nanoseconds < 0 || nanoseconds > 999999999 || seconds < 0) { + ___setErrNo(22); + return -1; + } + if (rmtp !== 0) { + HEAP32[((rmtp)>>2)]=0; + HEAP32[(((rmtp)+(4))>>2)]=0; + } + return _usleep((seconds * 1e6) + (nanoseconds / 1000)); + } + + + + function abortOnCannotGrowMemory(requestedSize) { + abort('Cannot enlarge memory arrays to size ' + requestedSize + ' bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + HEAP8.length + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 '); + }function _emscripten_resize_heap(requestedSize) { + abortOnCannotGrowMemory(requestedSize); + } + + function _time(ptr) { + var ret = (Date.now()/1000)|0; + if (ptr) { + HEAP32[((ptr)>>2)]=ret; + } + return ret; + } + +FS.staticInit();Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink;; +if (ENVIRONMENT_HAS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); }; +Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."); Module["requestFullScreen"] = Module["requestFullscreen"]; Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullscreen(lockPointer, resizeCanvas, vrDevice) }; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; + Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) }; +if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = function _emscripten_get_now_actual() { + var t = process['hrtime'](); + return t[0] * 1e3 + t[1] / 1e6; + }; + } else if (typeof dateNow !== 'undefined') { + _emscripten_get_now = dateNow; + } else if (typeof performance === 'object' && performance && typeof performance['now'] === 'function') { + _emscripten_get_now = function() { return performance['now'](); }; + } else { + _emscripten_get_now = Date.now; + }; +var GLctx; GL.init(); +for (var i = 0; i < 32; i++) __tempFixedLengthArray.push(new Array(i));; +var ASSERTIONS = true; + +// Copyright 2017 The Emscripten Authors. All rights reserved. +// Emscripten is available under two separate licenses, the MIT license and the +// University of Illinois/NCSA Open Source License. Both these licenses can be +// found in the LICENSE file. + +/** @type {function(string, boolean=, number=)} */ +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + if (ASSERTIONS) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + } + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} + + +// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil,Int8Array,Int32Array + +function nullFunc_ff(x) { abortFnPtrError(x, 'ff'); } +function nullFunc_fff(x) { abortFnPtrError(x, 'fff'); } +function nullFunc_i(x) { abortFnPtrError(x, 'i'); } +function nullFunc_ii(x) { abortFnPtrError(x, 'ii'); } +function nullFunc_iidiiii(x) { abortFnPtrError(x, 'iidiiii'); } +function nullFunc_iii(x) { abortFnPtrError(x, 'iii'); } +function nullFunc_iiii(x) { abortFnPtrError(x, 'iiii'); } +function nullFunc_iiiii(x) { abortFnPtrError(x, 'iiiii'); } +function nullFunc_jiji(x) { abortFnPtrError(x, 'jiji'); } +function nullFunc_v(x) { abortFnPtrError(x, 'v'); } +function nullFunc_vf(x) { abortFnPtrError(x, 'vf'); } +function nullFunc_vff(x) { abortFnPtrError(x, 'vff'); } +function nullFunc_vffff(x) { abortFnPtrError(x, 'vffff'); } +function nullFunc_vfi(x) { abortFnPtrError(x, 'vfi'); } +function nullFunc_vi(x) { abortFnPtrError(x, 'vi'); } +function nullFunc_vidd(x) { abortFnPtrError(x, 'vidd'); } +function nullFunc_vif(x) { abortFnPtrError(x, 'vif'); } +function nullFunc_viff(x) { abortFnPtrError(x, 'viff'); } +function nullFunc_vifff(x) { abortFnPtrError(x, 'vifff'); } +function nullFunc_viffff(x) { abortFnPtrError(x, 'viffff'); } +function nullFunc_vii(x) { abortFnPtrError(x, 'vii'); } +function nullFunc_viif(x) { abortFnPtrError(x, 'viif'); } +function nullFunc_viii(x) { abortFnPtrError(x, 'viii'); } +function nullFunc_viiii(x) { abortFnPtrError(x, 'viiii'); } +function nullFunc_viiiii(x) { abortFnPtrError(x, 'viiiii'); } +function nullFunc_viiiiii(x) { abortFnPtrError(x, 'viiiiii'); } +function nullFunc_viiiiiii(x) { abortFnPtrError(x, 'viiiiiii'); } +function nullFunc_viiiiiiii(x) { abortFnPtrError(x, 'viiiiiiii'); } +function nullFunc_viiiiiiiii(x) { abortFnPtrError(x, 'viiiiiiiii'); } +function nullFunc_viiji(x) { abortFnPtrError(x, 'viiji'); } + +var asmGlobalArg = {}; + +var asmLibraryArg = { + "abort": abort, + "setTempRet0": setTempRet0, + "getTempRet0": getTempRet0, + "abortStackOverflow": abortStackOverflow, + "nullFunc_ff": nullFunc_ff, + "nullFunc_fff": nullFunc_fff, + "nullFunc_i": nullFunc_i, + "nullFunc_ii": nullFunc_ii, + "nullFunc_iidiiii": nullFunc_iidiiii, + "nullFunc_iii": nullFunc_iii, + "nullFunc_iiii": nullFunc_iiii, + "nullFunc_iiiii": nullFunc_iiiii, + "nullFunc_jiji": nullFunc_jiji, + "nullFunc_v": nullFunc_v, + "nullFunc_vf": nullFunc_vf, + "nullFunc_vff": nullFunc_vff, + "nullFunc_vffff": nullFunc_vffff, + "nullFunc_vfi": nullFunc_vfi, + "nullFunc_vi": nullFunc_vi, + "nullFunc_vidd": nullFunc_vidd, + "nullFunc_vif": nullFunc_vif, + "nullFunc_viff": nullFunc_viff, + "nullFunc_vifff": nullFunc_vifff, + "nullFunc_viffff": nullFunc_viffff, + "nullFunc_vii": nullFunc_vii, + "nullFunc_viif": nullFunc_viif, + "nullFunc_viii": nullFunc_viii, + "nullFunc_viiii": nullFunc_viiii, + "nullFunc_viiiii": nullFunc_viiiii, + "nullFunc_viiiiii": nullFunc_viiiiii, + "nullFunc_viiiiiii": nullFunc_viiiiiii, + "nullFunc_viiiiiiii": nullFunc_viiiiiiii, + "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, + "nullFunc_viiji": nullFunc_viiji, + "___assert_fail": ___assert_fail, + "___lock": ___lock, + "___setErrNo": ___setErrNo, + "___syscall140": ___syscall140, + "___syscall145": ___syscall145, + "___syscall221": ___syscall221, + "___syscall5": ___syscall5, + "___syscall54": ___syscall54, + "___syscall6": ___syscall6, + "___unlock": ___unlock, + "___wasi_fd_write": ___wasi_fd_write, + "__computeUnpackAlignedImageSize": __computeUnpackAlignedImageSize, + "__fillFullscreenChangeEventData": __fillFullscreenChangeEventData, + "__fillGamepadEventData": __fillGamepadEventData, + "__fillMouseEventData": __fillMouseEventData, + "__fillPointerlockChangeEventData": __fillPointerlockChangeEventData, + "__findEventTarget": __findEventTarget, + "__glGenObject": __glGenObject, + "__registerFullscreenChangeEventCallback": __registerFullscreenChangeEventCallback, + "__registerGamepadEventCallback": __registerGamepadEventCallback, + "__registerKeyEventCallback": __registerKeyEventCallback, + "__registerMouseEventCallback": __registerMouseEventCallback, + "__registerTouchEventCallback": __registerTouchEventCallback, + "__requestPointerLock": __requestPointerLock, + "_eglGetProcAddress": _eglGetProcAddress, + "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, + "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, + "_emscripten_get_heap_size": _emscripten_get_heap_size, + "_emscripten_get_now": _emscripten_get_now, + "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, + "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, + "_emscripten_glActiveTexture": _emscripten_glActiveTexture, + "_emscripten_glAttachShader": _emscripten_glAttachShader, + "_emscripten_glBeginQueryEXT": _emscripten_glBeginQueryEXT, + "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, + "_emscripten_glBindBuffer": _emscripten_glBindBuffer, + "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, + "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, + "_emscripten_glBindTexture": _emscripten_glBindTexture, + "_emscripten_glBindVertexArrayOES": _emscripten_glBindVertexArrayOES, + "_emscripten_glBlendColor": _emscripten_glBlendColor, + "_emscripten_glBlendEquation": _emscripten_glBlendEquation, + "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, + "_emscripten_glBlendFunc": _emscripten_glBlendFunc, + "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, + "_emscripten_glBufferData": _emscripten_glBufferData, + "_emscripten_glBufferSubData": _emscripten_glBufferSubData, + "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, + "_emscripten_glClear": _emscripten_glClear, + "_emscripten_glClearColor": _emscripten_glClearColor, + "_emscripten_glClearDepthf": _emscripten_glClearDepthf, + "_emscripten_glClearStencil": _emscripten_glClearStencil, + "_emscripten_glColorMask": _emscripten_glColorMask, + "_emscripten_glCompileShader": _emscripten_glCompileShader, + "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, + "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, + "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, + "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, + "_emscripten_glCreateProgram": _emscripten_glCreateProgram, + "_emscripten_glCreateShader": _emscripten_glCreateShader, + "_emscripten_glCullFace": _emscripten_glCullFace, + "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, + "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, + "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, + "_emscripten_glDeleteQueriesEXT": _emscripten_glDeleteQueriesEXT, + "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, + "_emscripten_glDeleteShader": _emscripten_glDeleteShader, + "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, + "_emscripten_glDeleteVertexArraysOES": _emscripten_glDeleteVertexArraysOES, + "_emscripten_glDepthFunc": _emscripten_glDepthFunc, + "_emscripten_glDepthMask": _emscripten_glDepthMask, + "_emscripten_glDepthRangef": _emscripten_glDepthRangef, + "_emscripten_glDetachShader": _emscripten_glDetachShader, + "_emscripten_glDisable": _emscripten_glDisable, + "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, + "_emscripten_glDrawArrays": _emscripten_glDrawArrays, + "_emscripten_glDrawArraysInstancedANGLE": _emscripten_glDrawArraysInstancedANGLE, + "_emscripten_glDrawBuffersWEBGL": _emscripten_glDrawBuffersWEBGL, + "_emscripten_glDrawElements": _emscripten_glDrawElements, + "_emscripten_glDrawElementsInstancedANGLE": _emscripten_glDrawElementsInstancedANGLE, + "_emscripten_glEnable": _emscripten_glEnable, + "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, + "_emscripten_glEndQueryEXT": _emscripten_glEndQueryEXT, + "_emscripten_glFinish": _emscripten_glFinish, + "_emscripten_glFlush": _emscripten_glFlush, + "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, + "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, + "_emscripten_glFrontFace": _emscripten_glFrontFace, + "_emscripten_glGenBuffers": _emscripten_glGenBuffers, + "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, + "_emscripten_glGenQueriesEXT": _emscripten_glGenQueriesEXT, + "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, + "_emscripten_glGenTextures": _emscripten_glGenTextures, + "_emscripten_glGenVertexArraysOES": _emscripten_glGenVertexArraysOES, + "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, + "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, + "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, + "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, + "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, + "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, + "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, + "_emscripten_glGetError": _emscripten_glGetError, + "_emscripten_glGetFloatv": _emscripten_glGetFloatv, + "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, + "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, + "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, + "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, + "_emscripten_glGetQueryObjecti64vEXT": _emscripten_glGetQueryObjecti64vEXT, + "_emscripten_glGetQueryObjectivEXT": _emscripten_glGetQueryObjectivEXT, + "_emscripten_glGetQueryObjectui64vEXT": _emscripten_glGetQueryObjectui64vEXT, + "_emscripten_glGetQueryObjectuivEXT": _emscripten_glGetQueryObjectuivEXT, + "_emscripten_glGetQueryivEXT": _emscripten_glGetQueryivEXT, + "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, + "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, + "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, + "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, + "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, + "_emscripten_glGetString": _emscripten_glGetString, + "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, + "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, + "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, + "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, + "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, + "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, + "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, + "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, + "_emscripten_glHint": _emscripten_glHint, + "_emscripten_glIsBuffer": _emscripten_glIsBuffer, + "_emscripten_glIsEnabled": _emscripten_glIsEnabled, + "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, + "_emscripten_glIsProgram": _emscripten_glIsProgram, + "_emscripten_glIsQueryEXT": _emscripten_glIsQueryEXT, + "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, + "_emscripten_glIsShader": _emscripten_glIsShader, + "_emscripten_glIsTexture": _emscripten_glIsTexture, + "_emscripten_glIsVertexArrayOES": _emscripten_glIsVertexArrayOES, + "_emscripten_glLineWidth": _emscripten_glLineWidth, + "_emscripten_glLinkProgram": _emscripten_glLinkProgram, + "_emscripten_glPixelStorei": _emscripten_glPixelStorei, + "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, + "_emscripten_glQueryCounterEXT": _emscripten_glQueryCounterEXT, + "_emscripten_glReadPixels": _emscripten_glReadPixels, + "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, + "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, + "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, + "_emscripten_glScissor": _emscripten_glScissor, + "_emscripten_glShaderBinary": _emscripten_glShaderBinary, + "_emscripten_glShaderSource": _emscripten_glShaderSource, + "_emscripten_glStencilFunc": _emscripten_glStencilFunc, + "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, + "_emscripten_glStencilMask": _emscripten_glStencilMask, + "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, + "_emscripten_glStencilOp": _emscripten_glStencilOp, + "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, + "_emscripten_glTexImage2D": _emscripten_glTexImage2D, + "_emscripten_glTexParameterf": _emscripten_glTexParameterf, + "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, + "_emscripten_glTexParameteri": _emscripten_glTexParameteri, + "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, + "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, + "_emscripten_glUniform1f": _emscripten_glUniform1f, + "_emscripten_glUniform1fv": _emscripten_glUniform1fv, + "_emscripten_glUniform1i": _emscripten_glUniform1i, + "_emscripten_glUniform1iv": _emscripten_glUniform1iv, + "_emscripten_glUniform2f": _emscripten_glUniform2f, + "_emscripten_glUniform2fv": _emscripten_glUniform2fv, + "_emscripten_glUniform2i": _emscripten_glUniform2i, + "_emscripten_glUniform2iv": _emscripten_glUniform2iv, + "_emscripten_glUniform3f": _emscripten_glUniform3f, + "_emscripten_glUniform3fv": _emscripten_glUniform3fv, + "_emscripten_glUniform3i": _emscripten_glUniform3i, + "_emscripten_glUniform3iv": _emscripten_glUniform3iv, + "_emscripten_glUniform4f": _emscripten_glUniform4f, + "_emscripten_glUniform4fv": _emscripten_glUniform4fv, + "_emscripten_glUniform4i": _emscripten_glUniform4i, + "_emscripten_glUniform4iv": _emscripten_glUniform4iv, + "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, + "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, + "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, + "_emscripten_glUseProgram": _emscripten_glUseProgram, + "_emscripten_glValidateProgram": _emscripten_glValidateProgram, + "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, + "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, + "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, + "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, + "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, + "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, + "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, + "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, + "_emscripten_glVertexAttribDivisorANGLE": _emscripten_glVertexAttribDivisorANGLE, + "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, + "_emscripten_glViewport": _emscripten_glViewport, + "_emscripten_memcpy_big": _emscripten_memcpy_big, + "_emscripten_request_pointerlock": _emscripten_request_pointerlock, + "_emscripten_resize_heap": _emscripten_resize_heap, + "_emscripten_run_script": _emscripten_run_script, + "_emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, + "_emscripten_set_click_callback_on_thread": _emscripten_set_click_callback_on_thread, + "_emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, + "_emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, + "_emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, + "_emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, + "_emscripten_set_main_loop": _emscripten_set_main_loop, + "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, + "_emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, + "_emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, + "_emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, + "_emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, + "_exit": _exit, + "_fd_write": _fd_write, + "_glActiveTexture": _glActiveTexture, + "_glAttachShader": _glAttachShader, + "_glBindAttribLocation": _glBindAttribLocation, + "_glBindBuffer": _glBindBuffer, + "_glBindFramebuffer": _glBindFramebuffer, + "_glBindRenderbuffer": _glBindRenderbuffer, + "_glBindTexture": _glBindTexture, + "_glBlendFunc": _glBlendFunc, + "_glBufferData": _glBufferData, + "_glBufferSubData": _glBufferSubData, + "_glCheckFramebufferStatus": _glCheckFramebufferStatus, + "_glClear": _glClear, + "_glClearColor": _glClearColor, + "_glClearDepthf": _glClearDepthf, + "_glCompileShader": _glCompileShader, + "_glCompressedTexImage2D": _glCompressedTexImage2D, + "_glCreateProgram": _glCreateProgram, + "_glCreateShader": _glCreateShader, + "_glCullFace": _glCullFace, + "_glDeleteBuffers": _glDeleteBuffers, + "_glDeleteFramebuffers": _glDeleteFramebuffers, + "_glDeleteProgram": _glDeleteProgram, + "_glDeleteRenderbuffers": _glDeleteRenderbuffers, + "_glDeleteShader": _glDeleteShader, + "_glDeleteTextures": _glDeleteTextures, + "_glDepthFunc": _glDepthFunc, + "_glDetachShader": _glDetachShader, + "_glDisable": _glDisable, + "_glDisableVertexAttribArray": _glDisableVertexAttribArray, + "_glDrawArrays": _glDrawArrays, + "_glDrawElements": _glDrawElements, + "_glEnable": _glEnable, + "_glEnableVertexAttribArray": _glEnableVertexAttribArray, + "_glFramebufferRenderbuffer": _glFramebufferRenderbuffer, + "_glFramebufferTexture2D": _glFramebufferTexture2D, + "_glFrontFace": _glFrontFace, + "_glGenBuffers": _glGenBuffers, + "_glGenFramebuffers": _glGenFramebuffers, + "_glGenRenderbuffers": _glGenRenderbuffers, + "_glGenTextures": _glGenTextures, + "_glGetAttribLocation": _glGetAttribLocation, + "_glGetFloatv": _glGetFloatv, + "_glGetProgramInfoLog": _glGetProgramInfoLog, + "_glGetProgramiv": _glGetProgramiv, + "_glGetShaderInfoLog": _glGetShaderInfoLog, + "_glGetShaderiv": _glGetShaderiv, + "_glGetString": _glGetString, + "_glGetUniformLocation": _glGetUniformLocation, + "_glLinkProgram": _glLinkProgram, + "_glPixelStorei": _glPixelStorei, + "_glReadPixels": _glReadPixels, + "_glRenderbufferStorage": _glRenderbufferStorage, + "_glShaderSource": _glShaderSource, + "_glTexImage2D": _glTexImage2D, + "_glTexParameteri": _glTexParameteri, + "_glUniform1i": _glUniform1i, + "_glUniform4f": _glUniform4f, + "_glUniformMatrix4fv": _glUniformMatrix4fv, + "_glUseProgram": _glUseProgram, + "_glVertexAttribPointer": _glVertexAttribPointer, + "_glViewport": _glViewport, + "_glfwCreateWindow": _glfwCreateWindow, + "_glfwDefaultWindowHints": _glfwDefaultWindowHints, + "_glfwDestroyWindow": _glfwDestroyWindow, + "_glfwGetCursorPos": _glfwGetCursorPos, + "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, + "_glfwGetTime": _glfwGetTime, + "_glfwGetVideoModes": _glfwGetVideoModes, + "_glfwInit": _glfwInit, + "_glfwMakeContextCurrent": _glfwMakeContextCurrent, + "_glfwSetCharCallback": _glfwSetCharCallback, + "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, + "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, + "_glfwSetDropCallback": _glfwSetDropCallback, + "_glfwSetErrorCallback": _glfwSetErrorCallback, + "_glfwSetKeyCallback": _glfwSetKeyCallback, + "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, + "_glfwSetScrollCallback": _glfwSetScrollCallback, + "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, + "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, + "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, + "_glfwSwapBuffers": _glfwSwapBuffers, + "_glfwSwapInterval": _glfwSwapInterval, + "_glfwTerminate": _glfwTerminate, + "_glfwWindowHint": _glfwWindowHint, + "_llvm_stackrestore": _llvm_stackrestore, + "_llvm_stacksave": _llvm_stacksave, + "_nanosleep": _nanosleep, + "_time": _time, + "_usleep": _usleep, + "abortOnCannotGrowMemory": abortOnCannotGrowMemory, + "demangle": demangle, + "demangleAll": demangleAll, + "emscriptenWebGLGet": emscriptenWebGLGet, + "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, + "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, + "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, + "jsStackTrace": jsStackTrace, + "stackTrace": stackTrace, + "stringToNewUTF8": stringToNewUTF8, + "tempDoublePtr": tempDoublePtr, + "DYNAMICTOP_PTR": DYNAMICTOP_PTR +}; +// EMSCRIPTEN_START_ASM +var asm =Module["asm"]// EMSCRIPTEN_END_ASM +(asmGlobalArg, asmLibraryArg, buffer); + +Module["asm"] = asm; +var ___errno_location = Module["___errno_location"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["___errno_location"].apply(null, arguments) +}; + +var _emscripten_GetProcAddress = Module["_emscripten_GetProcAddress"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_emscripten_GetProcAddress"].apply(null, arguments) +}; + +var _fflush = Module["_fflush"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_fflush"].apply(null, arguments) +}; + +var _free = Module["_free"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_free"].apply(null, arguments) +}; + +var _llvm_round_f32 = Module["_llvm_round_f32"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_llvm_round_f32"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_capture__webaudio = Module["_ma_device_process_pcm_frames_capture__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_capture__webaudio"].apply(null, arguments) +}; + +var _ma_device_process_pcm_frames_playback__webaudio = Module["_ma_device_process_pcm_frames_playback__webaudio"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_ma_device_process_pcm_frames_playback__webaudio"].apply(null, arguments) +}; + +var _main = Module["_main"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_main"].apply(null, arguments) +}; + +var _malloc = Module["_malloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_malloc"].apply(null, arguments) +}; + +var _memcpy = Module["_memcpy"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memcpy"].apply(null, arguments) +}; + +var _memmove = Module["_memmove"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memmove"].apply(null, arguments) +}; + +var _memset = Module["_memset"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_memset"].apply(null, arguments) +}; + +var _sbrk = Module["_sbrk"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_sbrk"].apply(null, arguments) +}; + +var _strstr = Module["_strstr"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["_strstr"].apply(null, arguments) +}; + +var establishStackSpace = Module["establishStackSpace"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["establishStackSpace"].apply(null, arguments) +}; + +var stackAlloc = Module["stackAlloc"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackAlloc"].apply(null, arguments) +}; + +var stackRestore = Module["stackRestore"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackRestore"].apply(null, arguments) +}; + +var stackSave = Module["stackSave"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["stackSave"].apply(null, arguments) +}; + +var dynCall_ff = Module["dynCall_ff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ff"].apply(null, arguments) +}; + +var dynCall_fff = Module["dynCall_fff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_fff"].apply(null, arguments) +}; + +var dynCall_i = Module["dynCall_i"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_i"].apply(null, arguments) +}; + +var dynCall_ii = Module["dynCall_ii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_ii"].apply(null, arguments) +}; + +var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iidiiii"].apply(null, arguments) +}; + +var dynCall_iii = Module["dynCall_iii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iii"].apply(null, arguments) +}; + +var dynCall_iiii = Module["dynCall_iiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiii"].apply(null, arguments) +}; + +var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_iiiii"].apply(null, arguments) +}; + +var dynCall_jiji = Module["dynCall_jiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_jiji"].apply(null, arguments) +}; + +var dynCall_v = Module["dynCall_v"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_v"].apply(null, arguments) +}; + +var dynCall_vf = Module["dynCall_vf"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vf"].apply(null, arguments) +}; + +var dynCall_vff = Module["dynCall_vff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vff"].apply(null, arguments) +}; + +var dynCall_vffff = Module["dynCall_vffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vffff"].apply(null, arguments) +}; + +var dynCall_vfi = Module["dynCall_vfi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vfi"].apply(null, arguments) +}; + +var dynCall_vi = Module["dynCall_vi"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vi"].apply(null, arguments) +}; + +var dynCall_vidd = Module["dynCall_vidd"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vidd"].apply(null, arguments) +}; + +var dynCall_vif = Module["dynCall_vif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vif"].apply(null, arguments) +}; + +var dynCall_viff = Module["dynCall_viff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viff"].apply(null, arguments) +}; + +var dynCall_vifff = Module["dynCall_vifff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vifff"].apply(null, arguments) +}; + +var dynCall_viffff = Module["dynCall_viffff"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viffff"].apply(null, arguments) +}; + +var dynCall_vii = Module["dynCall_vii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_vii"].apply(null, arguments) +}; + +var dynCall_viif = Module["dynCall_viif"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viif"].apply(null, arguments) +}; + +var dynCall_viii = Module["dynCall_viii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viii"].apply(null, arguments) +}; + +var dynCall_viiii = Module["dynCall_viiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiii"].apply(null, arguments) +}; + +var dynCall_viiiii = Module["dynCall_viiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiii"].apply(null, arguments) +}; + +var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiiiiiiii"].apply(null, arguments) +}; + +var dynCall_viiji = Module["dynCall_viiji"] = function() { + assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); + assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); + return Module["asm"]["dynCall_viiji"].apply(null, arguments) +}; +; + + + +// === Auto-generated postamble setup entry stuff === + +Module['asm'] = asm; + +if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() { abort("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() { abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() { abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() { abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() { abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["getMemory"] = getMemory; +if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() { abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() { abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() { abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() { abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() { abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() { abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() { abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() { abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() { abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() { abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() { abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() { abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() { abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() { abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() { abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() { abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() { abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() { abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() { abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() { abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() { abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["addRunDependency"] = addRunDependency; +Module["removeRunDependency"] = removeRunDependency; +if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +Module["FS_createFolder"] = FS.createFolder; +Module["FS_createPath"] = FS.createPath; +Module["FS_createDataFile"] = FS.createDataFile; +Module["FS_createPreloadedFile"] = FS.createPreloadedFile; +Module["FS_createLazyFile"] = FS.createLazyFile; +Module["FS_createLink"] = FS.createLink; +Module["FS_createDevice"] = FS.createDevice; +Module["FS_unlink"] = FS.unlink; +if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function() { abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() { abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() { abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() { abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() { abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() { abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() { abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() { abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() { abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() { abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() { abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() { abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() { abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() { abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() { abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "establishStackSpace")) Module["establishStackSpace"] = function() { abort("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() { abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() { abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() { abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() { abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() { abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function() { abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") }; +if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() { abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } }); +Module["calledRun"] = calledRun; + + + +var calledRun; + + +/** + * @constructor + * @this {ExitStatus} + */ +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; +} + +var calledMain = false; + +dependenciesFulfilled = function runCaller() { + // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled +}; + +function callMain(args) { + assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'); + assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); + + + args = args || []; + + var argc = args.length+1; + var argv = stackAlloc((argc + 1) * 4); + HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram); + for (var i = 1; i < argc; i++) { + HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1]); + } + HEAP32[(argv >> 2) + argc] = 0; + + + try { + + + var ret = Module['_main'](argc, argv); + + + // if we're not running an evented main loop, it's time to exit + exit(ret, /* implicit = */ true); + } + catch(e) { + if (e instanceof ExitStatus) { + // exit() throws this once it's done to make sure execution + // has been stopped completely + return; + } else if (e == 'SimulateInfiniteLoop') { + // running an evented main loop, don't immediately exit + noExitRuntime = true; + return; + } else { + var toLog = e; + if (e && typeof e === 'object' && e.stack) { + toLog = [e, e.stack]; + } + err('exception thrown: ' + toLog); + quit_(1, e); + } + } finally { + calledMain = true; + } +} + + + + +/** @type {function(Array=)} */ +function run(args) { + args = args || arguments_; + + if (runDependencies > 0) { + return; + } + + writeStackCookie(); + + preRun(); + + if (runDependencies > 0) return; // a preRun added a dependency, run will be called later + + function doRun() { + // run may have just been called through dependencies being fulfilled just in this very frame, + // or while the async setStatus time below was happening + if (calledRun) return; + calledRun = true; + Module['calledRun'] = true; + + if (ABORT) return; + + initRuntime(); + + preMain(); + + if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); + + if (shouldRunNow) callMain(args); + + postRun(); + } + + if (Module['setStatus']) { + Module['setStatus']('Running...'); + setTimeout(function() { + setTimeout(function() { + Module['setStatus'](''); + }, 1); + doRun(); + }, 1); + } else + { + doRun(); + } + checkStackCookie(); +} +Module['run'] = run; + +function checkUnflushedContent() { + // Compiler settings do not allow exiting the runtime, so flushing + // the streams is not possible. but in ASSERTIONS mode we check + // if there was something to flush, and if so tell the user they + // should request that the runtime be exitable. + // Normally we would not even include flush() at all, but in ASSERTIONS + // builds we do so just for this check, and here we see if there is any + // content to flush, that is, we check if there would have been + // something a non-ASSERTIONS build would have not seen. + // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0 + // mode (which has its own special function for this; otherwise, all + // the code is inside libc) + var print = out; + var printErr = err; + var has = false; + out = err = function(x) { + has = true; + } + try { // it doesn't matter if it fails + var flush = Module['_fflush']; + if (flush) flush(0); + // also flush in the JS FS layer + ['stdout', 'stderr'].forEach(function(name) { + var info = FS.analyzePath('/dev/' + name); + if (!info) return; + var stream = info.object; + var rdev = stream.rdev; + var tty = TTY.ttys[rdev]; + if (tty && tty.output && tty.output.length) { + has = true; + } + }); + } catch(e) {} + out = print; + err = printErr; + if (has) { + warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.'); + } +} + +function exit(status, implicit) { + checkUnflushedContent(); + + // if this is just main exit-ing implicitly, and the status is 0, then we + // don't need to do anything here and can just leave. if the status is + // non-zero, though, then we need to report it. + // (we may have warned about this earlier, if a situation justifies doing so) + if (implicit && noExitRuntime && status === 0) { + return; + } + + if (noExitRuntime) { + // if exit() was called, we may warn the user if the runtime isn't actually being shut down + if (!implicit) { + err('exit(' + status + ') called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'); + } + } else { + + ABORT = true; + EXITSTATUS = status; + + exitRuntime(); + + if (Module['onExit']) Module['onExit'](status); + } + + quit_(status, new ExitStatus(status)); +} + +var abortDecorators = []; + +function abort(what) { + if (Module['onAbort']) { + Module['onAbort'](what); + } + + what += ''; + out(what); + err(what); + + ABORT = true; + EXITSTATUS = 1; + + var extra = ''; + var output = 'abort(' + what + ') at ' + stackTrace() + extra; + if (abortDecorators) { + abortDecorators.forEach(function(decorator) { + output = decorator(output, what); + }); + } + throw output; +} +Module['abort'] = abort; + +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + +// shouldRunNow refers to calling main(), not run(). +var shouldRunNow = true; + +if (Module['noInitialRun']) shouldRunNow = false; + + + noExitRuntime = true; + +run(); + + + + + +// {{MODULE_ADDITIONS}} + + + diff --git a/examples/web/textures/textures_to_image.wasm b/examples/web/textures/textures_to_image.wasm index cd3ad2e..d6a3559 100644 Binary files a/examples/web/textures/textures_to_image.wasm and b/examples/web/textures/textures_to_image.wasm differ -- cgit v1.2.3